Python-spe-users digest, Vol 1 #20 - 1 msg
python-spe-users-request-tdrK/[email protected] Sat, 17 Sep 2005 12:00:23 +0200
| Newsgroups | gmane.comp.python.spe.user |
|---|---|
| Message-ID | <[email protected]> |
Send Python-spe-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://lists.berlios.de/mailman/listinfo/python-spe-users or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Python-spe-users digest..." Today's Topics: 1. Errors in module (Mario Lacunza) --__--__-- Message: 1 From: Mario Lacunza <[email protected]> To: Spe List <[email protected]> Date: Wed, 14 Sep 2005 17:18:36 -0500 Subject: [spe-users] Errors in module Reply-To: [email protected] --=-CU2wDz2JnIatzJWFhOfY Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi, I receipt this error: >>> Running '/home/mario/MisDocumentos/T1.py' ... Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/_spe/sm/scriptutils.py", line 49, in run exec codeObject in mainDict File "<source>", line 8, in ? AttributeError: 'module' object has no attribute 'div' Exception raised while running script <source> when I try to execute T1.py, with a simple import instruction Details: *File: PruebasML.py __version__=1.1 def Suma(x,y): return x+y def resta(x,y): return x-y def multi(x,y): return x*y def div(x,y): return x/y *File: T1.py import PruebasML a=PruebasML.Suma(3,18) b=PruebasML.resta(3,10) c=PruebasML.multi(4,7) d=PruebasML.__version__ #Obtiene el numero de version del modulo importado e=PruebasML.div(6,3) print 'La suma es: ', a print b print c print a+c print 'Division: ', e print PruebasML.__name__ if d==1.0: print "Version Correcta" else: print "Version Incorrecta" print dir(PruebasML) print dir() Another error: I add the def div(x,y) in PruebasML.py, but intellisence in T1.py not recognized it, when a typed e=PruebasML. no problem with the other def functions. This week I install Glib and Pygtk (last versions) maybe, that's the problem? My config: Linux Ubuntu 5.04 Python 2.4.1 wxPython 2.6.1 Thanks in advance! Saludos / Best regards Mario Lacunza Vásquez Desarrollador de Sistemas - Webmaster Celular : +51193100386 (Tim) Website : http://www.lacunza.tk Email : [email protected] Blog : http://mlacunza.blogspot.com Lima - Peru --=-CU2wDz2JnIatzJWFhOfY Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8"> <META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2"> </HEAD> <BODY> Hi,<BR> <BR> I receipt this error:<BR> <BR> >>> Running '/home/mario/MisDocumentos/T1.py' ...<BR> Traceback (most recent call last):<BR> File "/usr/lib/python2.4/site-packages/_spe/sm/scriptutils.py", line 49, in run<BR> exec codeObject in mainDict<BR> File "<source>", line 8, in ?<BR> AttributeError: 'module' object has no attribute 'div'<BR> Exception raised while running script <source><BR> <BR> when I try to execute T1.py, with a simple import instruction<BR> <BR> Details:<BR> <BR> *File: PruebasML.py<BR> <BR> __version__=1.1<BR> def Suma(x,y):<BR> return x+y<BR> <BR> def resta(x,y):<BR> return x-y<BR> <BR> def multi(x,y):<BR> return x*y<BR> <BR> def div(x,y):<BR> return x/y<BR> <BR> *File: T1.py<BR> import PruebasML<BR> <BR> a=PruebasML.Suma(3,18)<BR> b=PruebasML.resta(3,10)<BR> c=PruebasML.multi(4,7)<BR> d=PruebasML.__version__ #Obtiene el numero de version del modulo importado<BR> e=PruebasML.div(6,3)<BR> <BR> print 'La suma es: ', a <BR> print b<BR> print c<BR> print a+c<BR> print 'Division: ', e<BR> print PruebasML.__name__<BR> <BR> if d==1.0:<BR> print "Version Correcta"<BR> else:<BR> print "Version Incorrecta"<BR> print dir(PruebasML)<BR> print dir()<BR> <BR> <BR> Another error: I add the def div(x,y) in PruebasML.py, but intellisence in T1.py not recognized it, when a typed <BR> e=PruebasML.<BR> <BR> no problem with the other def functions.<BR> <BR> This week I install Glib and Pygtk (last versions) maybe, that's the problem?<BR> <BR> My config:<BR> Linux Ubuntu 5.04<BR> Python 2.4.1<BR> wxPython 2.6.1<BR> <BR> Thanks in advance!<BR> <BR> <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%"> <TR> <TD> Saludos / Best regards <BR> <BR> Mario Lacunza Vásquez <BR> Desarrollador de Sistemas - Webmaster <BR> Celular : +51193100386 (Tim) <BR> Website : http://www.lacunza.tk <BR> Email : [email protected] <BR> Blog : http://mlacunza.blogspot.com <BR> Lima - Peru </TD> </TR> </TABLE> </BODY> </HTML> --=-CU2wDz2JnIatzJWFhOfY-- --__--__-- _______________________________________________ Python-spe-users mailing list [email protected] http://lists.berlios.de/mailman/listinfo/python-spe-users End of Python-spe-users Digest