/
Connect a Python client to Shogun Post
Connect a Python client to Shogun Post
When a Shogun Post Python client object is created it automatically tries to connect to a local instance of Shogun Post over TCP/IP via port 803.
import ViconShogunPost shogun = ViconShogunPost.ViconShogunPost()
To direct the client to a different instance of Shogun Post, specify the appropriate parameters, or re-direct after creation using the Connect() method.
shogun = ViconShogunPost.ViconShogunPost( "192.168.0.0", 804 )
You can change the port used by Shogun Post for communication in the Preferences dialog box, on the Misc tab. The default behavior of Shogun Post is to communicate via port 803, though if multiple instances of Shogun Post are opened on the same machine they will automatically choose different port numbers (searching incrementally upwards). You can specify a fixed port in the Preferences dialog box, or from the application command line.
ShogunPost.exe -ControlStreamPort 804 ShogunPostCL.exe -controlStreamPort 804
Tip
If you disconnect your Ethernet cable and disable wifi, when you enter a Python command, the following error may be displayed:
To solve this issue, install the Microsoft Loopback Adapter. For instructions on how to do this, see Adding the MS Loopback Adapter on Windows 7, on Blogs.msdn.com.
If you disconnect your Ethernet cable and disable wifi, when you enter a Python command, the following error may be displayed:
Host Application is not connected, unable to retrieve command list
This is because Python connects toShogun Post over TCP/IP and if you are working entirely offline, Python andShogun Post cannot connect.To solve this issue, install the Microsoft Loopback Adapter. For instructions on how to do this, see Adding the MS Loopback Adapter on Windows 7, on Blogs.msdn.com.
, multiple selections available,