Make Python 3 recognize USB drive - python-3.3

I'm running Python 3.3 and I'm wondering how to have my program recognize a USB Drive and give the option to open it. Can this work?

Related

Virtual Monitor on Arch Linux and NVIDIA Proprietary Driver?

I want to add multiple Virtual Displays to my Linux PC, for VNC Purposes. I have an NVIDIA GeForce GTX 750 Ti and an Ryzen 3 1200 with no On-Board Graphics.
I have already tried:
The Option "ConnectedMonitor" in /etc/X11/xorg.conf (Works, but only allows for one output at the moment, because xrandr only shows 5 outputs. When I try and add the fifth output tho, nvidia-settings throws me some kind of error, that i can only use 4 Monitors, and other programs just straight up crash when they try to change the X Screen Config...)
The EVDI Driver (After the Modprobe the X Screen crashes as expected, but xrandr --listproviders doesn't show the driver and xrandr --setprovideroutputsource doesn't work either...)
Wayland (I am an KDE Plasma user and Wayland support of KDE is Trash with the proprietary NVIDIA Driver)
Adding the Dummy Driver (Doesn't work because of NVIDIA's Proprietary trash Xinerama [I also have multiple Physical Displays])
Is it maybe possible to somehow use the nouveau driver at the same time? Or am i just adding the Dummy Driver wrong? Is it possible to get the EVDI Driver working?
I really hope someone helps me very soon...

How to develop a wacom driver for linux?

I am going to read absolute position from touchpad ,and the simulate a wacom so that oridinary applications like GIMP can be adapted.
I have successfully get absolute position from my touchpad,but where can I get the document on developing a fake wacom driver.
Not sure what you are doing, but start with the actual Wacom Linux driver, and change what you need from that: https://github.com/linuxwacom/input-wacom

How can I write a virtual keyboard for the linux console?

I'd like some way to send keyboard input to a linux machine without a keyboard. I'd like this input to be accepted in any linux console, and in xmbc.
One idea I had would be to write some type of virtual USB keyboard that would send the input to in that way, but maybe this is over complicating it.
Basically what I'm looking for is Synergy without X (and with XMBC)
Anyone have suggestions on where to look?
You could write a user space driver to inject events into kernel.. so you can ssh into your linux box, run the driver and inject the keypresses you type.. so it will be as if there is a physical keyboard attached and would work with all programs. This gives good info on how to write user space drivers... if you don't want to reinvent the wheel, this program TermKeyboard does exactly that.
Disclaimer: I wrote the program
there is a keyboard for fbcon on sourceforge. to com;ile it you must add string.h include
http://sourceforge.net/projects/tabletvk/?source=dlp

How to detect Endianess and Filesystem with Python3

I'm theorizing of a project where my python script
looks at filesystem(s) on the machine running the script
but also reports back on the filesystem(s) of devices
that it mounts, thumb drives, mobile devices, etc.
Is anyone aware of the a BIF in python3 that would looks at endianness and filesystem.
Finally, I want to make a loop that looks at what storage devices are mounted, but I'm not sure how/whre to access that on OSX or Linux (fstab on linux?) and see what is currently mounted and if that changes. If Fstab was the correct file, would I constantly sort through it or should I just periodically open it and compare it against a file object?
I'm still very new at programming, so please pardon any newbie oversights.
Thanks
For the endianness of the platform:
>>> import sys
>>> print(sys.byteorder)
little
You can get quite a lot of information about the platform from the [platform][1] module. Endianess is from sys.byteorder though.
For lists of devices things become more platform-dependent though. There are various modules that give you USB access that can give you USB device lists, but nothing to list harddisk for example. Otherwise I don't know of anything platform-independent.

Linux RFID reader HID Device not matching driver

I got a RFID reader (GigaTek PCR330A-00) that is meant to be recognized under linux/windows as a (Human Interface Device) keyboard/USB.
I hate to say this but it is working as a charm under Win7 but not "really" under Linux.
Under Debian-like distros (x/k/Ubuntu, Debian,..), or Gentoo, or... I just can't have the device working at all: the device scan well (it has its USB 5V, so it is happy/beeping/blinking) something happened in the dmesg, but no immediate screen display of the RFID Tag code as expected (and seen under win7)
Support is claiming it is ok under RHEL or SLED "enterprises" distros... and I must admit I saw it working under a RHEL4... I tried stealing the driver but did not succeed having my reader working...
My question is thus double:
1./ How can I hack the kernel to add support to my device (simply register PID/VID?) ?
2./ What is different at all in a "enterprise" proprietary distro? how can I re-use it?
Thank you for any hint/help.
Cheers,
If you have the source code of the driver you can compile it against the current Kernel your system uses, since the Kernel only allows drivers for its current version. Then you can try to load it as a Kernel module, notice that by doing this, you do not hack the Kernel you just need your current system's Kernel header to compile the driver against it.
You may want to check this http://www.freesoftwaremagazine.com/articles/drivers_linux in order to grasp the basics.
Hope this helps.

Resources