help - python can't find file

enquiring mind braindead at braindead.com
Mon May 21 08:48:33 EDT 2007


-learning python with limited knowledge of linux.
-get error msg 21 "file or directory does not exist"
-running Suse linux 10.
-haven't had a problem before
- rebooted several times.
-python opened in shell/terminal program Konsole window like this
user1 at linux!~ - shell - Konsole
Sessions View Bookmark Settings Help

-first line in window gives me a linux prompt:
user1#linux:~>

- whereupon I type python and get >>> a command line I think it is  
called or type python pyfilename.py and it runs/interprets/opens
  the file on screen 

- but now I get a error message 21 saying file or directory doesn't
exist.

- my py files are created with editor gedit
- clicking on any py file and linux asks me to open it with what
  program and I choose utilities/editdors/gedit and it works.

-all my py files contain the following lines at the beginning 
#! /usr/bin/env python
# -*- coding: utf-8 -*-

# filename: blankpy.py  (for example of a file name)


- my linux file structure is as follows shown under Konqueror window:
rootfolder
bin 
boot
dev
etc
home
 user1
 bin
 desktop
 documents
lib
media 
 dvdrecorder
 floppy 

- (for example, and continues on, of course) 


- none of my python books or linux books show that I can type 
  python /dev/sda/ blankpy.py and get python to open it like in 
  windows98 or dos python A:\blankpy.py  

embarrassed and frustrated



More information about the Python-list mailing list