forked from navjotts/node-python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPythonServer.py
More file actions
Latest commit
21 lines (16 loc) · 444 Bytes
/
Copy pathPythonServer.py
File metadata and controls
21 lines (16 loc) · 444 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
importzerorpc
fromtest_pythonimporttest_me
PORT=4242
classPythonServer(object):
deflisten(self):
print(f'Python Server started listening on {PORT} ...')
deftest(self, param):
returntest_me(param)
try:
s=zerorpc.Server(PythonServer())
s.bind(f'tcp://0.0.0.0:{PORT}')
s.run()
print('PythonServer running...')
exceptExceptionase:
print('unable to start PythonServer:', e)
raisee