Illegal seek error with seek() and os.lseek()
Andreas Perstinger
andipersti at gmail.com
Tue May 14 16:12:23 EDT 2013
On 14.05.2013 21:00, krishna2prasad at gmail.com wrote:
> # first, open the file as a plain binary
> try:
> self.file = open(/dev/relpcfpga, "r+b", buffering=0)
Aren't you missing the quotes for "/dev/relpcfpga"?
> The method seek() complains "OSError: [Errno 29] Illegal seek"
> The device relpcfpga is a char device.
Are you sure that your device is seekable?
Try
f = open("/dev/relpcfpga", "r+b", buffering=0)
print(f.seekable())
Bye, Andreas
More information about the Python-list
mailing list