By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 935 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

USB Missile.

P: n/a
I am trying to create a python version of the M&S USB Missile Launcher
code for Windows.

I am basing it off one designed for linux.

I note the following about dependencies:

0. python (>=2.3)
1. libusb (>=0.1.2)
-Fine, however the windows version has the following note:
If you are porting a libusb based program from Unix
style systems to Windows, remove all references to the library's global
variable usb_busses. Use the function usb_get_busses() instead to get
this variable. Global variables in shared libraries (DLLs) do not work
on Windows systems across different compilers.
2. pyusb (==0.3.1) python module with patch (to enable kernel
-Fine, besides patch since this does not seem to be
windows compatible (patch is hosted at
3. urwid python module

I am trying to use the following code at but with the
following lines removed due to the patch above not being applied:

It loads okay, but gives the following error:

Traceback (most recent call last):
File "C:\Documents and Settings\Bob\Desktop\", line 367, in
File "C:\Documents and Settings\Bob\Desktop\", line 361, in
File "C:\Documents and Settings\Bob\Desktop\", line 156, in
File "C:\Python24\lib\urwid\", line 179, in
return fn()
File "C:\Documents and Settings\Bob\Desktop\", line 197, in
File "C:\Documents and Settings\Bob\Desktop\", line 83, in
move, 0x09, self.INITA, 0x02, 0x01)
usb.USBError: usb_control_msg: sending control message failed, win
error: The de
vice does not recognize the command.
Does anyone have any ideas of how to solve this error? I thought it
might have something to do with
busses = usb.busses()
in the python, but libusb requiring the function usb_get_busses() to be
used to obtain the usb_busses variable.

I don't however have much python experience.


Dec 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.