file open "no such file"
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

file open "no such file"

From: Gary Wessle <phddas@yahoo.com>
Date: Mon May 01 2006 - 02:10:08 CEST

I am getting this error when I try to run the code below

****************
f = open("~/m", "r")
print f.read()
****************

****************
:~$ python python/my.py
Traceback (most recent call last):
  File "python/my.py", line 1, in ?
    f = open("~/m", "r")
IOError: [Errno 2] No such file or directory: '~/m'
****************

but I have the "m" file in my home/username/

thank you
Received on Mon May 1 00:48:45 2006