Please, use the last svn version, it fixes this "No Error" problem..
The path is: https://pyusb.svn.sourceforge.net/svnroot/pyusb/branches/0.x

Wander

PS: please, always prefer mailing than mailing me directly, if I can't
help you, other people might to...

2009/11/11 Olivier GARNIER <oli.garn...@free.fr>:
> I've tried this :
> #./test.py
> Traceback (most recent call last):
>  File "/home/test/test.py", line 8, in <module>
>   bus = usb.busses()         # get a list of all available busses
> usb.USBError: No error
> #
>
> this is the file test.py (i found it in the port) :
>
> #!/usr/local/bin/python
> #
> # Open a device, look at the alternate interfaces, use the device, and
> # then close the connection.
> #
>
> import usb                 # import the usb module
> bus = usb.busses()         # get a list of all available busses
> dev = bus[0].devices[0]    # choose the first device on the first bus
> handle = dev.open()        # open the device
> for alt in dev.configurations[0].interfaces[0]:
>   print alt              # look at the alternate settings.
> handle.setConfiguration(1) # choose the first configuration
> handle.claimInterface(0)   # choose the first interface
>
> ### Use the device here. ###
> handle.releaseInterface()  # also called automatically on __del__
>
>
> Olivier
>
> Wander Lairson a écrit :
>>
>> usb.core is for PyUSB 1.0 only...
>> PyUSB 0.x should use "import usb".
>>
>> Wander
>>
>>
>> 2009/11/10  <oli.garn...@free.fr>:
>>
>>>
>>> Hi,
>>>
>>>
>>> I've got a FreeBSD 7.0-RELEASE.
>>> I've installed python25-2.5.4_2
>>> Then i've installed py25-pyusb-0.4.2
>>>
>>> I tried to use it and i can't :
>>>
>>>>>>
>>>>>> import usb.core
>>>>>>
>>>
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>> ImportError: No module named core
>>>
>>> So i tried to look for a valid script and find this one :
>>> http://cvs.berlios.de/cgi-bin/viewcvs.cgi/pyusb/pyusb/tests/pytest.py
>>>
>>> I download it and run it and that's the answere :
>>> #./pytest.py
>>> ********************************
>>> PyUSB test script
>>> ********************************
>>>
>>> enumeration device test...
>>> enumeration test failed...
>>> #
>>>
>>> Can you please help my ?
>>> I'm trying to get data from personnal weather station which is
>>> usb-connected.
>>>
>>> Thanks,
>>>
>>> Olivier
>>>
>>> Ps: you can speak french if you want :)
>>>
>>>
>>
>>
>
>
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Pyusb-users mailing list
Pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to