![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 4
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
Expert Programmer
|
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. |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
Do you have Python installed, and if yes where on your drive?
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
Show us the python file and the exact error message you are getting.
|
|
|
|
|
|
#5 |
|
Newbie
Join Date: Mar 2005
Posts: 4
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#6 |
|
Programming Guru
![]() |
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.
|
|
|
|
|
|
#7 |
|
Newbie
Join Date: Mar 2005
Posts: 4
Rep Power: 0
![]() |
Here is the actual code:
import sys print sys.argv # more on this later |
|
|
|
|
|
#8 |
|
Programmer
Join Date: Feb 2005
Posts: 54
Rep Power: 4
![]() |
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\" ?
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|