Thread (1 message) 1 message, 1 author, 2003-02-06

Re: Issue reading files under /proc/acpi using python.

From: Sergio Visinoni <hidden>
Date: 2003-02-06 12:30:39

* Srihari Vijayaraghavan (harisri-bzGI/hKkdgRBDgjK7y7TUQ@public.gmane.org) wrote:
While I can read /proc/acpi files fine using 'cat', python is unable to read 
files under that directory.

Here is how you can reproduce the issue:

$ cat /proc/acpi/battery/BAT0/info
[snip]
quoted
quoted
quoted
file("/proc/acpi/battery/BATO/info").read()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IOError: [Errno 2] No such file or directory: '/proc/acpi/battery/BATO/info'
quoted
quoted
quoted
file("/proc/version").read()
well BATO != BAT0... you're using a capital o (letter) instead of a 0 (number)

Greetings,
Sergio Visinoni


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help