English 中文(简体)
书写“U”装置,使用Ouctl
原标题:Writing to USB device with Python using ioctl
  • 时间:2011-11-23 15:35:54
  •  标签:
  • python
  • usb

我在利用Adhur,正试图用电线向一个U的感官书写。 我有直接使用或通过“yu”或简单文件书写的读物例子,但任何更为复杂的情况都从射线上抹去。

我需要使用控制——转让来撰写特质报告信息

指挥系统是ioctl(devicehandle,Operation, Args)

我已经确定正确的行动。 Args,我认为应该是一个缓冲地带,包含该装置的特性报告? 加上真正的可变旗帜

任何帮助或建议都会得到极大接受。

I should add; the reason for using Python is the code must be device independent.

问题回答

根据文件,fcntl模块中的ioctl(>是独特的,因此不会在Windows上工作。 似乎有一个“Windows”变量,名称为DeviceIoControl(),同样运作。

仪器驾驶员或操作系统宣布了国际奥委会,因此我非常怀疑,国际奥委会的运行情况相同(国际反转录组织编号),而且对不同的操作系统具有相同的参数。

就LC而言,你可以检查特定装置司机的头盔文件,或可能的话,为有效的国际中型散射器检查一些纸质。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签