Hi Justin Thank for extra information, but how can you know which one message will be send to in case users open multi-application's instance at the same time?
commandPort doesn't allow us to query port's name but only checking it. I can do a for loop, but somehow, i feel uneasy with that way :) On Thu, May 7, 2015 at 5:50 PM, Justin Israel <[email protected]> wrote: > Are you looking to find out this information from within the Maya process, > or external to the Maya process? > > Maya allows you to open multiple command ports, so there isn't necessarily > just one. The docs show how you can query is a specific named port is open: > > http://download.autodesk.com/global/docs/maya2014/en_us/CommandsPython/commandPort.html > > If you are looking to find out which ports are open, from outside of Maya, > then that is going to depend on which platform you are running. On > OSX/Linux you could use the "lsof" command to check what a given process is > listening on: > > # list the tcp sockets that are listening from a Maya pid > $ lsof -i 4 -a -p <pid> | grep LISTEN > > # list the unix domain sockets that are open from a Maya pid > $ lsof -U -a -p <pid> > > > Justin > > > > On Thu, 7 May 2015 10:01 PM illunara <[email protected]> wrote: > >> Hi everybody >> I wonder if we can get port or port's name using for commandPort of >> current maya's instance?. I had been searching on google for a while but no >> luck >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/12d63e01-519c-4007-bb9e-5c701bd547aa%40googlegroups.com >> <https://groups.google.com/d/msgid/python_inside_maya/12d63e01-519c-4007-bb9e-5c701bd547aa%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Python Programming for Autodesk Maya" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/python_inside_maya/ct5I0Q4Vs94/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1qHuLvGK7V6SAmjXe_NwC65O9q2B0RpxML-pgNd-Z-RA%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1qHuLvGK7V6SAmjXe_NwC65O9q2B0RpxML-pgNd-Z-RA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMCvD%2BGCZEK-P_ziJmQM%3D_NUbiXyTQA-M7m17_wSsAo4a%3DC7dw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
