Battleship_server/pider.py

8 lines
224 B
Python
Raw Normal View History

#always use absolute paths
import os
def write_pid():
pid = os.getpid()
with open('/tmp/battleship_server.pid', 'w') as f:
f.write(str(pid))
print('Hello my(i \'m battleship server) pid is ' + str(pid))