unihd-cag / skillbridge

A seamless python to Cadence Virtuoso Skill interface
https://unihd-cag.github.io/skillbridge/
GNU Lesser General Public License v3.0
185 stars 39 forks source link

[SUPPORT] Can't get python server pid over python #266

Closed aakhavanQC closed 4 months ago

aakhavanQC commented 4 months ago

I want to keep track of the running skillbridge python server pid so I can kill it programmatically (due to a virtuoso bug). The skill code would be pyStartServer.ipc->processPid (or the getq/getqq) equivalent. I can't seem to get skillbridge to translate any python call into that, though.

My best attempt thus far:

getqq=ws["getqq"](Symbol('pyStartServer'),Symbol('ipc'))
self._pyserver_pid=ws["getq"](getqq,"processPid")

but I get:

("getqq" 0 t nil ("*Error* getqq: argument #1 should be a symbol (type template = \"sS\")" 'pyStartServer))

Thanks in advance for the help!

nielsbuwen commented 4 months ago

The error message of getqq is strange. I can't make it work like that. But there is get and that one works

ipc = ws['get'](Symbol('pyStartServer'), 'ipc')
pid = ipc.process_pid
TM90 commented 4 months ago

I will close the issue. If the problem is not solved feel free to reopen the issue.