difference between script and prompt ! looking for the Problem

William Famy william.famy at noos.fr
Sat Mar 24 11:23:31 EST 2001


Hi.

I this is my problem.

I have a file fonc.py where i write a class.

class comp:
	def __init__(re,im):
		self.r=re
		self.i=im



when i use a python shell i see this


>>> import fonction
>>> c=fonction.comp(3.0,4.5)
>>> c.r,c.i
(3.0, 4.5)
>>> 

but when i use the following script 

test.py
#!/usr/bin/python
import fonction
c=fonction.comp(3.0,-4.5)
c.r, c.i


i have no result

bash-2.04$ ./test.py 
bash-2.04$

Where is the problem? where is my error?

Thanks for answer.
-- 
 			     \\\|///
                           \\  - -  //
                            (  @ @  )
+-------------------------oOOo-(_)-oOOo-------------------------+
|  Famy William  36 avenue des barattes  74000 Annecy  France   |
|  email:william.famy at noos.fr william.famy at mail-enseignant.com  |
+---------------------------------Oooo--------------------------+
                           oooO   (   )
                          (   )    ) /
                           \ (    (_/
                            \_)



More information about the Python-list mailing list