Where can I get a pyusb manual?

Need help with C, C++, perl, python, etc?

Where can I get a pyusb manual?

Postby Aquiles » 2009-07-23 11:10

Hi,

I want to access a USB device from a Python script, so I installed python-usb. But so far I've been unseccessfull when trying to find a manual or a reference guide. Would you point me to some documentation resource?

Thanks.
Aquiles
User avatar
Aquiles
 
Posts: 50
Joined: 2007-07-16 13:45
Location: Somewhere, surrounded by my circumstances

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-01 05:40

Take a look here for some ideas
http://bleyer.org/pyusb/
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA

Re: Where can I get a pyusb manual?

Postby Aquiles » 2009-08-03 06:51

That's somewhere to start! Thanks.
Aquiles
User avatar
Aquiles
 
Posts: 50
Joined: 2007-07-16 13:45
Location: Somewhere, surrounded by my circumstances

Re: Where can I get a pyusb manual?

Postby Issyer » 2009-08-03 11:22

Why pyusb?

os.system("sudo mount -t vfat /dev/sdg /media/device")
os.chdir("/media/device")

:roll:

That pyusb is for Windows. It doesn't run on Linux.
User avatar
Issyer
 
Posts: 3054
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-03 16:15

Your snippet of code is useful but he didn't say it was a usb drive.. maybe it is and maybe it isn't.
Could be some other usb device.

Here is an excerpt from one of the pyusb Documentations.......
3.8
FT_OpenEx
Supported Operating Systems
Linux
Mac OS X (10.4 and later)
Windows (2000 and later)
Windows CE (4.2 and later)

:roll:
............. :D The rolling eyes are joke. I just thought I would throw one back at you.
Besides, no matter the OS there are many numbers of code examples in there that are useful to help along a programmer who needs usb help.
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA

Re: Where can I get a pyusb manual?

Postby Issyer » 2009-08-03 16:22

sqlpython wrote: :roll:
............. :D The rolling eyes are joke. I just thought I would throw one back at you.
Besides, no matter the OS there are many numbers of code examples in there that are useful to help along a programmer who needs usb help.


Really?
When you extract the sourse, don't forget to run it through dos2unix. I mean the one from your link.
Cheers.
User avatar
Issyer
 
Posts: 3054
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-03 16:36

Issyer
Here is some traffic going on......
http://groups.google.com/group/linux.de ... 6ff6ccfa70
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-03 16:39

Sorry I did that in a hurry. I should have added this in the event you would like to work with pyusb for Debian.
..Squeeze
http://packages.debian.org/source/squeeze/pyusb

...Lenny
http://packages.debian.org/source/lenny/pyusb
Last edited by sqlpython on 2009-08-03 16:44, edited 1 time in total.
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA

Re: Where can I get a pyusb manual?

Postby Issyer » 2009-08-03 16:40

And this is what is going from my terminal:
Code: Select all
alex@box:~/Download$ PyUSB-1.6/test/testProgram.py
bash: PyUSB-1.6/test/testProgram.py: python^M: bad interpreter: No such file or directory


I wonder why.
User avatar
Issyer
 
Posts: 3054
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-03 16:54

I wonder why.
:lol:
Did that cigarette burn down too far.........?
As I just pointed out download and use pyusb..
PyUSB is a separate item for their devices BUT as I said... You can read and learn from the Code Examples in the Documentation.
:?: :?:
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA

Re: Where can I get a pyusb manual?

Postby Issyer » 2009-08-03 17:00

sqlpython wrote:
I wonder why.
:lol:
Did that cigarette burn down too far.........?
As I just pointed out download and use pyusb..
PyUSB is a separate item for their devices BUT as I said... You can read and learn from the Code Examples in the Documentation.
:?: :?:


Are you sure I need to learn anything?
8)
User avatar
Issyer
 
Posts: 3054
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-03 17:07

Are you sure I need to learn anything?

You be the judge of that....... :)
I know that you didn't compile the source from the makefile before you attempted to run their testProgarm.
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA

Re: Where can I get a pyusb manual?

Postby Issyer » 2009-08-03 17:19

sqlpython wrote:
Are you sure I need to learn anything?

You be the judge of that....... :)
I know that you didn't compile the source from the makefile before you attempted to run their testProgarm.


Well, if you know how, post your way here. I have a lot of other things to do.
User avatar
Issyer
 
Posts: 3054
Joined: 2007-05-23 02:59
Location: Khakassia

Re: Where can I get a pyusb manual?

Postby sqlpython » 2009-08-03 17:30

Well, if you know how, post your way here. I have a lot of other things to do.

Me too, point is that the testProgram calls to import d2xx which you can't have until you compile their source.
I don't use PyUSB over pyusb myself because it has only been tested as they report with Win but my point is that the source is there for the adventurous. It may work fine.
If you remember.... this thread simply started out that a user wanted some help regarding code example for python and USB connections.
You did give one basic to mount a drive which is good.
Also I pointed out a manual of documentation with several coding examples and that may also be a help.
We are off on a tangent as to the usefulness or merits of PyUSB. Apparently, it works for Win and it is Python. Python is cross platform in most respects. I for one really don't care if Aquiles, You or I ever use PyUSB but the examples are still useful.....
and that is what Aquiles was most interested in seeing.

Case closed....
Cheers. :)
Criticism accepted for solutions that work! ;^)
User avatar
sqlpython
 
Posts: 214
Joined: 2008-09-05 01:36
Location: USA


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable