[Tutor] Win '98 python

Brian Morud ordieth@home.com
Sun, 26 Mar 2000 13:48:20 -0600


Sorry for not including enough details.  It's a really short, easy
script, written as a text file, saved with a .py extension.  The script
is:

import string
phrase = "some phrase here"
i = 0
while ( i < 100 )
	print phrase,i
	i = i + 1


That's it.  When I am in the python directory, which is also where the
script is located, I type "python my_python.py" and nothing gets printed
out.  I've tried it with both "print phrase,i" and "printf("%s %s"
%(phrase,i))" but when I run it from the MSDOS promtp, nothing prints
out, ever.

Thanks for taking a look at this.

Brian


"Dennis E. Hamilton" wrote:
> 
> Brian,
> 
> That is the way to run a script from a file.
> 
> Tell us
> 
>         1. What platform and version you are running on.
>         2. More about what didn't work.
>         3. When it ever did work. Or how much works.
>                 (you might want to build the script up
>                 in parts and confirm the steps along the
>                 way for whatever the script does)
> 
> Also,
>         Try, from the same directory or folder, doing
> 
>                 python
>                 >>> import my_python_script
> 
>         and see if it does anything differently.
> 
> -- Dennis
> 
> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Brian Morud
> Sent: Saturday, March 25, 2000 19:50
> To: tutor@python.org; tutor@python.org
> Subject: [Tutor] Win '98 python
> 
> How do I run a script-like text file?
> I've tried   python my_python_script.py
> but that didn't print out like it was
> supposed to.
> 
> Thanks,
> Ordieth
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor