Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Mar 27th, 2005, 12:22 PM   #1
shawn488
Newbie
 
Join Date: Mar 2005
Posts: 4
Rep Power: 0 shawn488 is on a distinguished road
Python Help

I was reading this book and it says for me to enter C:\book\test> python brian to launch a python file in the python command line. But everythime I try this, it says that the ":" is invalid syntax. Does anyone know what I'm doing wrong. I'm using a windows xp box.

Thanks,

Shawn
shawn488 is offline   Reply With Quote
Old Mar 27th, 2005, 12:53 PM   #2
thechristelegacy
Expert Programmer
 
thechristelegacy's Avatar
 
Join Date: Jul 2004
Location: Somerset, Pa
Posts: 707
Rep Power: 5 thechristelegacy is on a distinguished road
Send a message via AIM to thechristelegacy Send a message via MSN to thechristelegacy
if you're trying to change director under MS-DOS, to get into that directory, then use

cd C:\book\test

Otherwise, I'm not sure what you're asking.

Also, double posting isn't encouraged here.
thechristelegacy is offline   Reply With Quote
Old Mar 27th, 2005, 6:04 PM   #3
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Question

Do you have Python installed, and if yes where on your drive?
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Mar 27th, 2005, 6:49 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Show us the python file and the exact error message you are getting.
tempest is offline   Reply With Quote
Old Mar 27th, 2005, 9:26 PM   #5
shawn488
Newbie
 
Join Date: Mar 2005
Posts: 4
Rep Power: 0 shawn488 is on a distinguished road
here is the exact code I am typing in: C:\stuff> python spam.py -i eggs -o bacon

C:\stuff is the folder I created to hold my created python docs on my hard drive. and the rest is suppose to be the code to call the file to run. My actualy Python program is located in C:\Python24 on my hard drive. Hope this helps. My AIM is ShwUWFChairman.

Thanks,

Shawn
shawn488 is offline   Reply With Quote
Old Mar 27th, 2005, 10:27 PM   #6
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Again, we need the freaking code. Not the commands to execute the program on the command line, the freaking code to your python program would be nice.
tempest is offline   Reply With Quote
Old Mar 27th, 2005, 10:35 PM   #7
shawn488
Newbie
 
Join Date: Mar 2005
Posts: 4
Rep Power: 0 shawn488 is on a distinguished road
Here is the actual code:

import sys
print sys.argv # more on this later
shawn488 is offline   Reply With Quote
Old Mar 28th, 2005, 2:52 PM   #8
Moldz
Programmer
 
Moldz's Avatar
 
Join Date: Feb 2005
Posts: 54
Rep Power: 4 Moldz is on a distinguished road
Are you sure you are typing that command in a console window instead of the python shell (IDLE)? For example, is the window you are typing this code in white with ">>> " or black with "C:\lalalalal\asdfasdf\" ?
Moldz 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 12:42 PM.

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