Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 28th, 2005, 10:38 AM   #1
Nissanspecv04
Newbie
 
Join Date: Apr 2005
Posts: 3
Rep Power: 0 Nissanspecv04 is on a distinguished road
Help a newb please...

Well im new to python. Ive worked with html, php, and a little C++. For some reason ive having problems saving the file. Im just using the test script hello world. When I go to save the file I save it as hello.py in the default directory and I go to the command line, this is in windows xp pro by the way, and type cd python23 to get to the python directory. I then try to open hello.py I even try python hello.py THe file is no where to be found. Ive also tried python 2.4 and that wont work either. I read a post from august of last year with the same problem and I tried everything verbatum in that post. I believe legacy answered the question. I just get nothing from everything. Do I have to set up something for it to save correctly in windows or did I miss a step. I know this has to be easy but im stumped lol. Any help is greatly appreciated. Even a link to an answer would help. I really want to use python and dont want something this simple to push me away. Thanks again.
Nissanspecv04 is offline   Reply With Quote
Old Apr 28th, 2005, 12:42 PM   #2
Moldz
Programmer
 
Moldz's Avatar
 
Join Date: Feb 2005
Posts: 54
Rep Power: 4 Moldz is on a distinguished road
Ok, let's say I create a simple python script and save it on my desktop. You need to figure out the full path to the file. If your windows login name is nissan and the script is named hello.py, the full path is probably c:\documents and settings\nissan\desktop\hello.py.

Now open a console window by clicking Start, then Run, then typing "cmd.exe" and clicking Ok. Change into the Python directory by typing "cd \program files\python24" or where ever you installed Python.

Now run the script by typing "python c:\documents and settings\nissan\desktop\hello.py".



But really, why do it the hard way? Find your script, right-click on it and select "Edit with IDLE". It will open two windows, one text editor with your script and another with the interpreter. From the editor, click on Run >> Run Module. Much easier!
Moldz is offline   Reply With Quote
Old Apr 28th, 2005, 7:27 PM   #3
Nissanspecv04
Newbie
 
Join Date: Apr 2005
Posts: 3
Rep Power: 0 Nissanspecv04 is on a distinguished road
ok I gave that a try and I get no such file, internal orexternal COMMAND,operable program or batch file. It just seems like the prgram isnt saving. If I save the file to my desktop for example I should at least see the file there right? Just sitting on my desktop. I did a search of my whole computer for the hello.py file and it couldnt find it. Anymore ideas?
Nissanspecv04 is offline   Reply With Quote
Old Apr 29th, 2005, 1:43 AM   #4
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

Somehow you are missing something real basic. Go to our sister site DaniWeb.com, they have a sticky under Python with real basic beginner stuff. They recommend using Idle to write, save and run your program.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Apr 29th, 2005, 6:49 AM   #5
Nissanspecv04
Newbie
 
Join Date: Apr 2005
Posts: 3
Rep Power: 0 Nissanspecv04 is on a distinguished road
ok I figured it out. The person I got python from(on cd) gave me a version by activestate. That didnt work for me apperently so I just downloaded python from the .org site.Thanx for the help. It was a very simple problem. Now I be able to enjoy the python programming world
Nissanspecv04 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC