Skip to content

Commit

Permalink
Some minute syntax changes and added doc strings
Browse files Browse the repository at this point in the history
Signed-off-by: Omar <[email protected]>
  • Loading branch information
adityaomar3 committed Sep 22, 2023
1 parent 8fae339 commit 13f6f0b
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions scripts/avogadro-remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def recv_json(self):
return json.loads(msg)
except Exception as exception:
print("error: " + str(exception))
return {}

def open_file(self,file):
return {}

def open_file(self, file):
"""Opens file"""
self.send_json(
{
"jsonrpc": "2.0",
Expand All @@ -77,7 +78,9 @@ def open_file(self,file):
"params": {"fileName": file},
}
)
def save_graphic(self,file):

def save_graphic(self, file):
"""Save Graphic"""
self.send_json(
{
"jsonrpc": "2.0",
Expand All @@ -86,15 +89,17 @@ def save_graphic(self,file):
"params": {"fileName": file},
}
)

def kill(self):
"""To kill the current operation"""
self.send_json(
{
"jsonrpc": "2.0",
"id": 0,
"method": "kill"
"jsonrpc": "2.0",
"id": 0,
"method": "kill"
}
)
)

def close(self):
'''Close the socket to the named pipe'''
self.sock.close()
self.sock.close()

0 comments on commit 13f6f0b

Please sign in to comment.