f



help - python can't find file

-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@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 
any suggestions to solve my problem would be appreciated.
0
braindead (10)
5/21/2007 12:47:16 PM
comp.os.linux 3406 articles. 0 followers. Post Follow

2 Replies
327 Views

Similar Articles

[PageSpeed] 58

"enquiring mind" <braindead@braindead.com> wrote in message 
news:46519496.F8BC0B2D@braindead.com...
> -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@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
> any suggestions to solve my problem would be appreciated.
Do you have version 2.5.1 installed and have you tried the online 
documentation? See
    http://www.python.org/doc/ . Update to the latest version if possible 
because just by reinstalling the problem may be fixed. You may want to 
download the full documentation/manual since it could contain the answer to 
your question. 


0
mu8ja0i (42)
5/21/2007 10:22:23 PM
In article <46519496.F8BC0B2D@braindead.com>, enquiring mind
<braindead@braindead.com> wrote:

> -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@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 
> any suggestions to solve my problem would be appreciated.

Check to see if /usr/bin/env python really delivers the path to the python
executable. Try subtituting /usr/bin/python, or whatever is the direct
path on your machine.
0
a.j.l (1)
6/2/2007 8:09:54 PM
Reply:

Similar Artilces:

[News] Google's OEM Success with Linux Shows Why Microsoft+Their Analysts Can't Help FUDing Chrome OS
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Google names Chrome OS partners ,----[ Quote ] | Google followed up on Thursday's announcement of a Linux-based Chrome OS for | netbooks by listing nine technology partners that are supporting the | open-source platform. Meanwhile, one report claims that Intel, which is not | on the list, is collaborating with Google on Chrome OS. `---- http://www.linux-watch.com/news/NS9174113805.html?kc=rss Google Chrome OS and the Open Source Desktop ,----[ Quote ] | So far, Google has showed itself to be a first-rate development shop with | pro...

iTunes can't find 'IEtemp' file
iTunes v4.9 (17) on a 733 Quicksilver running 10.3.9, 640 MB ram My daughter is being driven to distraction by a constantly appearing error message box: >>The movie file "Org_00b94fa4.IEtemp"cannot be found. Without this file, the movie cannot play properly.<< Clicking off that message brings up a second almost identical message, only it is looking for a different file, "Org_058dlaaa.IEtemp". It makes it almost impossible to use the software; any action she tries to make, the box pops up...over...and over...and over...again. Thoughts on what I might do to f...

Can't Find A Dialog Editor / Where are the help file
Hi, I'm trying to find a Dialog Editor for wxWindows. On this subject, the doc is not very clear. So : 1. Where can I find a GPL Dialog Editor for wxWindows ? I've used google without a lot of success. I've see XRCed, but not in an RPM. I don't want play with source package for now. 2. I've installed wxWindows, but where are the help files ? (I use Anjuta as IDE, so I search DevHelp file) 3. I see some reference to /contrib/... where is this directory ? Thank a lot. StepH. Bronsart, I use DialogBlocks. It's worth every penny. I gen...

linux newbie... can't find configuration file
I hope this question is appropriate for this group: sorry if it's not. I am running RH8 with Grub as my btldr. I put my options that are needed in my loader for wine to operate correctly. I also have ide=nodma so I can boot linux. When I run wine, I get the msg /mnt/fd0 is not a device, & /cdrom is not a device. I also get "err:wave: OSS_outinit cannot be found. I tried modifying the sample configuration file and put it where it needs to go, i.e., /.wine/configure and still doesn't seem to work. I also edited my /etc/fstab file to unlock permissions for th...

i can't find any error in my vi but it just doesn't work please help
I'm trying to control a robot named cs-113 and I find someone has already achieved this. He wrote a vi called robot cs-113.vi and I just tried to write a same one but&nbsp;it just doesn't work. Can anyone tell me why it doesn't work? Thanks for your help! robot-cs113.vi: http://forums.ni.com/attachments/ni/170/198418/1/robot-cs113.vi cs-113 test.vi: http://forums.ni.com/attachments/ni/170/198418/2/cs-113 test.vi ...

can't find input file 'stb.lib'
HI! I=B4m running a example of Signal Generator Library, but I had this bug: ----------------------------- build.pjt - Debug ----------------------------- [sgent1.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"C:/tidcs/c28/dsp_tbox/sgen/cstb/sgent1/build/Debug" -i"../../../clib/include" -i"../include" -i"../../../../../stb_lib/include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 -@"../build/Debug.lkf" "sgent1.c" [Linking...] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -@"Debug.lkf"...

Eudora can't write to file so can't start
I start Eudora. I get the mailbox In has been changed and is different from the table of contents error. I click rebuild. I get the error message saying can'r open file eudora\attachablah-blah (loads of sgquiggle charcters I can't recreate). I click ok and get an unhandled exception error. Then I get the illegal operation closing down error. then we cycle endlessly though it. I can't get Eudora started and would be grateful for ideas. Thanks in advance, BB Big Bill <kruse@cityscape.co.uk> wrote in news:qhedk0lpmnjgkd9hnia5q82cqfbccnfrfl@4ax.com: > I start Eudora. I get the mailbox In has been changed and is different > from the table of contents error. I click rebuild. I get the error > message saying can'r open file eudora\attachablah-blah (loads of > sgquiggle charcters I can't recreate). > I click ok and get an unhandled exception error. Then I get the > illegal operation closing down error. then we cycle endlessly though > it. > I can't get Eudora started and would be grateful for ideas. > Thanks in advance, > > BB > Assuming that Eudora is not running (all renaming operations etc should be done with Eudora *NOT* running). Further assuming you do NOT have a virus. Copy/Backup the in.mbx and in.toc files to another location. Then delete the in.toc, and retry opening Eudora. If another error comes up, you have to rename the in.mbx file to something like in-old.mbx...

'Firefox can't find the file at /home/rick/feDD/return false;?.'
I'm trying to test some ideas for a typing accelerator using JavaScript with Firefox and I've got error that's got me, but then I must say my JavaScript is lacking. The script works till I add an help feature which basically at the start overlays the user's TEXTAREA with description of the application. To start writing one clicks on a 'Continue' button and the TEXTAREA come up and one is suppose to start writing. Well when clicking 'Continue' there is a flash of a TEXTAREA but then I get: File not found Firefox can't find the file at /home/rick/fe...

Can't Use OnCurrent Event / Can't Find Macro
I have run into a sudden problem and thought I'd see if anyone else has ran into this. Out of nowhere (sort-of) I am not able to access the OnCurrent event on a subform. I, of course, can write code for the event, but [Event Procedure] under OnCurrent does not show up on the properties of the subform, and the event does not fire. When this problem happened, it seems to have also generated an error while changing records in the Main Form. The error is "...can't find the macro ".". At least I think their related...both started at the same time. I have never used a macro...

wxBitmap Can't Find File but wxFileExists Can
Don't know if anyone has had this problem, but it's giving me a heck of a time. My program references a bunch of BMP files in a /Icon directory within the application's folder. The application runs fine on my D: drive where I typically store projects. It also works fine on the desktop. However, if you create a heavily nested directory structure (as my research advisor tends to do) ie: D:\proj\test\long\path\names\for\fun\myApp\ wxBitmap throws up the dialog (built in wxWidgets dialog) saying that it cannot find the bitmaps referenced by the application. The...

.smil file can't find .rm file..
I have a .smil file that calls an .rm file.. on pc no problem (IE & FF..) on the mac, on both Safari and FF, .rm file called by .smil file cannot be found, I get an alert that says .rm file cannot be found (path to .rm file in .smil file is just name of .rm file b/c it's in same dir as .smil file that is calling it..) would appreciate any leads.. thank you.. Frances Frances wrote: > I have a .smil file that calls an .rm file.. on pc no problem (IE & > FF..) on the mac, on both Safari and FF, .rm file called by .smil file > cannot be found, I get an alert that ...

Can't Find Answer Any Where (What would you do/try): fopen ("file on shared drive","w+") doesn't work on 2nd call using Windows LabView DDL
Hello, I have a shared drive on SGI, Linux, and Windows. The fact that I'm using a shared drive may be mute information. The problem is within the same program a second call to fopen does not create a file if the file has been deleted. I would like to use fopen for its pointer return value to solve this. What is the best way to fix this problem? The reason I want to do this is I do not want to exit completely from LabView and then re-enter it to create the file! I talked to my system person and he said something "like" this. That it is a caching problem. Windows has the fil...

Help! On OS X, one of my files has weird ownership and even root can't change it! "Operation not permitted"
I have a whole bunch of files on my internal hard drive, on a powerbook running OS X Panther. Many of the files were placed there by a backup utility doing a copy from a desktop G4 running OS 9. All of them behave normally, except two, which have a weird ownership. Instead of being owned by me (mlevin), they are owned by "314112688" and I cannot move them. Here is the output of "ls -l": total 104 drwxr-xr-x 6 root unknown 204 14 Dec 15:49 . drwxr-xr-x 9 root unknown 306 16 Nov 06:04 .. -rw-r--r-- 1 mlevin unknown 12292 14 Dec 15:47 .DS_S...

OSX: Can't install RMagick. Can't find the ImageMagick lib
Hi all I'm trying to install RMagick because one of my used plugins for RoR needs it. But I have no idea how to do this. So I just tried sudo gem install rmagick But I'm getting the following error: Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install rmagick checking for Ruby version >= 1.8.2... yes checking for gcc... yes checking for Magick-config... yes checking for ImageMagick version >= 6.3.0... yes c...

Palm can't find com port to synch. I can't either.
Hi. I just got a palm IIIxe. It has a serial connection. When I try to synch, it can't find the computer, and it gave an error message about the com port being busy or not available. I opened the hotsynch on the laptop, and it only showed com 3 Com 1 seemed missing. Is there a way to see what com 1 is being used for? And are com ports numbered 1 and 3? Thanks Jim I wish you luck in getting this "ancient" palm device to work with XP's interpretation of Com ports. Yes there is com 1, 2, 3, 4, etc. You may want to search Microsoft's web site for inform...

OS X
after a bit of reading, it looks like I did a veeeeery shtupid thing... (I'm copying my post to this newsgroup, as the alt.sys.mac.newuser-help group didn't look quite as highly-trafficked...) anyways, here's what I did... ----------------------------------- in an effort to help the owner of a nice shiny new eMac 'clean up' their personal folder, I moved a few items... including the Library folder! it appears.... correct me if I'm wrong... that Mac OS X then created a NEW library... so we restarted it, and all the Quicken data, dialup info, (etc.) was gone... so we ...

can't run a built application because it can't find Run-Time engine
Let's start at the begining.... everything was working fine, and then I started getting an&nbsp;error 2 (memory is full) while compiling any application.&nbsp; I couldn't resolve the issue but the same applications would compile on another machine, so I uninstalled every National Instrument software from Control Panel (add remove programs), and deleted the c:\Program Files\National Instruments directory.&nbsp; I then reinstall the Labview 8.0 Prof Dev system,&nbsp; and performed the labview 8.0.1 upgrade.&nbsp; I can now open and compile applications,&nbsp; but ...

Error : Internal Mach-O Importer Error File 'ImportMachO.c' Line 1112 can't find section for address
HI folks, I just installed CW 9 and it's latest update 9.1. Next I created new Cocoa based project and it doesn't compile with error: Error : Internal Mach-O Importer Error File 'ImportMachO.c' Line 1112 can't find section for address Could anyone help? Thanks Robert In article <2004022021212116807%robertcerny@maccom>, Robert ?ern´┐Ż <robertcerny@mac.com> wrote: >HI folks, >I just installed CW 9 and it's latest update 9.1. Next I created new >Cocoa based project and it doesn't compile with error: Error : >Interna...

mplayer can't play "link," and I can't find the real one
I'm trying to listen to my football game, but I can't get mplayer to cooperate. I'm trying to play a link from http://knbr.com/listenNow.html without much luck (I want the link from the right for the 1050 station). The button link is javascript:openplayer('http://www.streamaudio.com/stations/player/pages/index.asp?headertext=KNBR 1050 The Sports Leader&Station=KTCT_AM'); so I try mplayer "http://www.streamaudio.com/stations/player/pages/index.asp?headertext=KNBR 1050 The Sports Leader&Station=KTCT_AM" and after some whirring and clicking, get Win32 LoadLibrary failed to load: avisynth.dll, /usr/local/lib/win32/avisynth.dll, /usr/lib/win32/avisynth.dll Exiting... (End of file) Some googling shows that the message isn't correct, and that this happens when feeding raw url's to mplayer. However, when I try to follow the link, all I can find is http://www.streamaudio.com/stations/asx/KTCT_AM.ask feeding *this* to mplayer, I get 404 errors. I can get the link to play with windows under firefox, and pageinfo shows this last link as an "embed". Any suggestions? thanks hawk Dr. R. E. Hawkins wrote: > mplayer > "http://www.streamaudio.com/stations/player/pages/index.asp?headertext=KNBR > 1050 The Sports Leader&Station=KTCT_AM" > > and after some whirring and clicking, get > > Win32 LoadLibrary failed to load: avisynth...

mysqld Can't start server: can't create PID file: Permission denied
I am kind of stuck and not sure why I can't start the mysqld sever. Here is my logs and folder permissions. [root@dev me]# /usr/bin/mysqld_safe --user=mysql Starting mysqld daemon with databases from /home/me/mysql/data STOPPING server from pid file /home/me/mysql/data/dev.pid 071117 20:53:26 mysqld ended /home/me/mysql/data/dev.err: 071117 20:53:26 mysqld started 071117 20:53:26 [ERROR] /usr/libexec/mysqld: Can't create/write to file '/home/me/mysql/data/dev.pid' (Errcode: 13) 071117 20:53:26 [ERROR] Can't start server: can't create PID file: Permission denied 071...

Can't Boot Up - Missing NTSDAPI.dll file
Hello, Someone please help me! I re-booted my computer last night after it hung up, and now it won't start up at all. I'm on Windows XP Home Media Center edition. The message I get after the windows screen is: "lsass.exe can't start...file NTSDAPI.dll missing..." After I click ok throught this message box...nothing. Just a black screen, although my wireless mouse functions fine - I can move my pointer about. Any pointers to get me started on figuring this out would be apprciated, it doesn't have to be a step by stop solution. Thanks!! Anthony Anthony wrote: ...

Kernel.exec won't find a file that File.expand_path can
I'm doing a fork/exec on a .rb file in the same directory as the parent rb. On two systems, this has worked. On the third, to which I just moved, I get /ecod-poll:254:in `exec': No such file or directory - /home/fritza/ecod/mail-tail/ecod-tracker.rb (Errno::ENOENT) I've put debugging puts'es into the code, and the path I'm using looks OK. Feeding the path from the puts to "ls -l" shows that the file exists and is world-readable and world-executable. Would someone please help me figure this out? No doubt it's something dumb, but I'm just not seeing it. ...

Tomcat can't find log4j properties file in war file
I have a web app served by Tomcat on a Unix system which I have been running out the development environment. I am trying to deploy it as a jar file. When the log4j logging system starts up it says it cannot find the properties file in the war file. Do I have to specify the properties file location differently? More detailed information is below. Any suggestions will be greatly appreciated; I thank you in advance for your help Jim Cant At startup, Tomcat loads a servlet to initialize the log4j logging system; the name of an initialization file is given in the servlet element in the web.xm...

It's 2008, and Linux can't move big files
"Hardy just cannot cope with big file moving on MY SYSTEM. I tried moving a file of 1 Gig and the whole system just froze. Only 1 out of 5 or 6 can be successful without crashing. I am running my STABLEST 2.6.24.18. I have no luck with other verions, they are the worst in terms of stability WHILE MOVING BIG FILES." http://ubuntuforums.org/showthread.php?t=844005 On Fri, 11 Jul 2008 23:46:09 -0400, DFS wrote: > "Hardy just cannot cope with big file moving on MY SYSTEM. I tried > moving a file of 1 Gig and the whole system just froze. Only 1 out of 5 > or 6 can ...

Matlab can't find files even though they're in the path
I've just installed my brand-new standalone Windows 2000 Matlab 7.0.1, and I've extended the path to include some directories of my own files. But the command, say >> e=imread('elephant.tif'); returns an error message that the file 'elephant.tif' can't be found. If I include the full path in the command: >> e=imread('F:\ProgramFiles\Matlab701\toolbox\myfiles\elephant.tif'); then the file is read with no trouble. But I've added the directory F:\ProgramFiles\Matlab701\toolbox\myfiles to Matlab's path (the path function lists the c...

Web resources about - help - python can't find file - comp.os.linux

Resources last updated: 3/7/2016 4:31:34 PM