¡@

Home 

python Programming Glossary: ioctl

Python List vs. Array - when to use?

http://stackoverflow.com/questions/176011/python-list-vs-array-when-to-use

a C array to an extension or a system call for example ioctl or fctnl . It's also a good way to represent a mutable string..

Get hard disk serial number using Python on Linux

http://stackoverflow.com/questions/4193514/get-hard-disk-serial-number-using-python-on-linux

I couldn't figure it out. Thanks ronakin python serial ioctl hard drive fcntl share improve this question Linux As you.. O_NONBLOCK 0 printf ERROR opening dev hda n exit 1 if ioctl fd HDIO_GET_IDENTITY hd printf .20s n hd.serial_no else if errno.. sizeof_hd_driveid 512 # Call native function buf fcntl.ioctl fd HDIO_GET_IDENTITY sizeof_hd_driveid fields struct.unpack..

How to get console window width in python

http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python

if no it checks whether the terminal supports a special ioctl call and that does not work too it checks for the environment.. only. def getTerminalSize import os env os.environ def ioctl_GWINSZ fd try import fcntl termios struct os cr struct.unpack.. import fcntl termios struct os cr struct.unpack 'hh' fcntl.ioctl fd termios.TIOCGWINSZ '1234' except return return cr cr ioctl_GWINSZ..

Python monitor serial port (RS-232) handshake signals

http://stackoverflow.com/questions/5904895/python-monitor-serial-port-rs-232-handshake-signals

TIOCMIWAIT from serial import Serial from fcntl import ioctl from termios import TIOCMIWAIT TIOCM_RNG TIOCM_DSR TIOCM_CD.. TIOCM_CD TIOCM_CTS if __name__ '__main__' while True ioctl ser.fd TIOCMIWAIT wait_signals print 'RI 5s DSR 5s CD 5s CTS..

Retrieving network mask in Python

http://stackoverflow.com/questions/936444/retrieving-network-mask-in-python

ctypes perhaps. That or parsing ifconfig. Any other way ioctl socknr SIOCGIFNETMASK ifreq C version python share improve.. in Python 2.2 on Linux iface eth0 socket.inet_ntoa fcntl.ioctl socket.socket socket.AF_INET socket.SOCK_DGRAM 35099 struct.pack..