interactive interpreter

jedi jedi at group6.net
Tue Oct 23 06:55:27 EDT 2001


Here, try this.  I wrote a test script called test.py:

#!/usr/local/env python 
 
x=0
 
while x < 5:
        print "'ere we go!"
        x = x + 1
 
Then I ran like:

bash-2.05$ python test.py 
'ere we go!
'ere we go!
'ere we go!
'ere we go!
'ere we go!
bash-2.05$ ~

Then I tried:

bash-2.05$ python
Python 2.1 (#1, Apr 24 2001, 16:26:59) 
[GCC 2.95.3 [FreeBSD] 20010315 (release)] on freebsd4
Type "copyright", "credits" or "license" for more information.
>>> import test
'ere we go!
'ere we go!
'ere we go!
'ere we go!
'ere we go!
>>> 

Does that help?


On Tue, Oct 23, 2001 at 07:39:58PM +0200, Karol Makowski wrote:
> On Tue, 2001-10-23 at 03:42:51, jedi wrote:
> 
> jedi> import it from the interpeter cli.
> 
> i created test.py and print "something" inside it.
> i tried to 'import test.py' but nothing has happened.
> 
> -- 
> Karol Makowski, System Administrator
> URL: http://spaceman.bsdzine.org
> e-mail: spaceman at bsdzine.org

-- 
j3di
jedi at group6.net
http://jedi.group6.net/






More information about the Python-list mailing list