Trees | Indices | Help |
|
---|
|
Detect and enumerate com(serial) ports You should close all com ports you have open before calling any functions in this module. If you don't they will be detected as in use. Call the comscan() function It returns a list with each entry being a dictionary of useful information. See the platform notes for what is in each one. For your convenience the entries in the list are also sorted into an order that would make sense to the user. Platform Notes: =============== w Windows9x W WindowsNT/2K/XP L Linux M Mac wWLM name string Serial device name wWLM available Bool True if it is possible to open this device wW active Bool Is the driver actually running? An example of when this is False is USB devices or Bluetooth etc that aren't currently plugged in. If you are presenting stuff for users, do not show entries where this is false w driverstatus dict status is some random number, problem is non-zero if there is some issue (eg device disabled) wW hardwareinstance string instance of the device in the registry as named by Windows wWLM description string a friendly name to show users wW driverdate tuple (year, month, day) W driverversion string version string wW driverprovider string the manufacturer of the device driver wW driverdescription string some generic description of the driver L device tuple (major, minor) device specification L driver string the driver name from /proc/devices (eg ttyS or ttyUSB)
|
|||
RegistryAccess A class that is significantly easier to use to access the Registry |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
version =
|
|
Get detail about all com ports on Windows This code functions on both win9x and nt/2k/xp |
Get all the ports on Linux Note that Linux doesn't actually provide any way to enumerate actual ports. Consequently we just look for device nodes. It still isn't possible to establish if there are actual device drivers behind them. The availability testing is done however.
|
Get all the ports on Mac Just look for /dev/cu.* entries, they all seem to populate here whether USB->Serial, builtin, bluetooth, etc... |
Seperate a string and trailing number into a tuple For example "com10" returns ("com", 10) |
Comparison function for two port names In particular it looks for a number on the end, and sorts by the prefix (as a string operation) and then by the number. This function is needed because "com9" needs to come before "com10" |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Jan 24 16:19:49 2010 | http://epydoc.sourceforge.net |