Re: [Tutor] question about __init__ in a class

2006-11-13 Thread Andreas Kostyrka
* shawn bright <[EMAIL PROTECTED]> [061113 23:51]: > hey thanks, did not think about the possible consequences of the use of a > built in as a variable name. Well, the consequences are minimal: a) pylint complains by default about that. b) if you paste code into your function, you might get probl

Re: [Tutor] free IDE for Python?

2006-11-13 Thread Matthew Gordon
agreed. if you plan on programming in a few different languages, i would suggest picking up vim, emacs, or another multi-language environment. you can get a plugin (at least for emacs) that highlights syntax, indents, etc. - matt On 11/13/06, Mike Hansen <[EMAIL PROTECTED]> wrote: > > > > -O

Re: [Tutor] free IDE for Python?

2006-11-13 Thread Pujo Aji
Try scite:http://www.scintilla.org/SciTE.htmlpujoOn 11/14/06, Vadhri, Srinivas < [EMAIL PROTECTED]> wrote: Hi   A newbie to Python. What is the free IDE for Python development activities? ActiveState's Komodo IDE needs a license and a fee.   Any recommendations?   Regards, Srini

Re: [Tutor] free IDE for Python?

2006-11-13 Thread tomd
Try Stani's Python editor from http://stani.be/python/spe/blog/ -- Tom, http://www.vscripts.net/ on Mon, 13 Nov 2006 16:03:15 -0700, you wrote: > A newbie to Python. What is the free IDE for Python development > activities? ActiveState’s Komodo IDE needs a license and a fee. _

Re: [Tutor] free IDE for Python?

2006-11-13 Thread Hugo Gonzalez M
Hi, I like SPE and IDLE, I do all development with them. Hugo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] free IDE for Python?

2006-11-13 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Vadhri, Srinivas > Sent: Monday, November 13, 2006 4:03 PM > To: tutor@python.org > Subject: [Tutor] free IDE for Python? > > Hi > > > > A newbie to Python. What is the free IDE for Python > de

[Tutor] free IDE for Python?

2006-11-13 Thread Vadhri, Srinivas
Hi   A newbie to Python. What is the free IDE for Python development activities? ActiveState’s Komodo IDE needs a license and a fee.   Any recommendations?   Regards, Srinivas Vadhri   ___ Tutor maillist - Tutor@python.org http://

Re: [Tutor] question about __init__ in a class

2006-11-13 Thread shawn bright
hey thanks, did not think about the possible consequences of the use of a built in as a variable name.-skOn 11/13/06, Andreas Kostyrka < [EMAIL PROTECTED]> wrote:* shawn bright < [EMAIL PROTECTED]> [061113 19:46]:> Hello there all.> i have a class that i need to load some class variables depending

Re: [Tutor] question about __init__ in a class

2006-11-13 Thread Andreas Kostyrka
* shawn bright <[EMAIL PROTECTED]> [061113 19:46]: > Hello there all. > i have a class that i need to load some class variables depending on what is > passed to the class, it would either be set up using one variable or > another. The values for the class variables would be loaded from a database.

Re: [Tutor] numpy memory muncher

2006-11-13 Thread Python
On Sat, 2006-11-11 at 15:40 -0500, Joel Levine wrote: > I'm using, perhaps misusing numpy which is eating up the memory and, > eventually crashing my program. I can reproduce the problem on my Linux system, so it is not Mac specific. Using xrange makes no difference. Oddly enough, print

[Tutor] Please comment my script

2006-11-13 Thread paulino1
This is a script I have at work, it is running fine (gives the output I want). Any comments are very welcome. It queries a database and gives out a reportlab pdf file with a balance sheet of costs per department. In the first version there were neither functions nor classes, it worked as well, bu

Re: [Tutor] what does it mean?

2006-11-13 Thread Richard Gelling
Registered Linux User : 256848 Failure isn't an option -- it comes bundled with Microsoft Windows -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kristinn Didriksson Sent: 13 November 2006 16:51 To: tutor@python.org Subject: [Tutor] what does it mean?

Re: [Tutor] question about __init__ in a class

2006-11-13 Thread Kent Johnson
Mike Hansen wrote: > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of shawn bright >> Sent: Monday, November 13, 2006 11:45 AM >> To: tutor-python >> Subject: [Tutor] question about __init__ in a class >> >> Hello there all. >> i have a class

Re: [Tutor] question about __init__ in a class

2006-11-13 Thread shawn bright
Thats a lot better, thanks, will use it like that.-shawnOn 11/13/06, Mike Hansen <[EMAIL PROTECTED] > wrote:> -Original Message-> From: [EMAIL PROTECTED]> [mailto:[EMAIL PROTECTED]] On Behalf Of shawn bright> Sent: Monday, November 13, 2006 11:45 AM> To: tutor-python> Subject: [Tutor] ques

Re: [Tutor] Sloppy Code ?

2006-11-13 Thread Matt Erasmus
Hi Michael Yes, that does help, although it doesn't print the FQDN which is what I'm really after. But thanks to you I now know about the socket module (is that the right terminology ?) and using the Python script in Vim I found socket.getfqdn() which prints exactly what I needed... So my code go

Re: [Tutor] question about __init__ in a class

2006-11-13 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of shawn bright > Sent: Monday, November 13, 2006 11:45 AM > To: tutor-python > Subject: [Tutor] question about __init__ in a class > > Hello there all. > i have a class that i need to load some class

Re: [Tutor] Sloppy Code ?

2006-11-13 Thread Michael Lange
On Mon, 13 Nov 2006 17:13:25 +0200 "Matt Erasmus" <[EMAIL PROTECTED]> wrote: > Hi guys > > Very new to python programming but am really enjoying it. > > Anyway, I was just wondering if this code could be improved on in anway. > > ... > stdin, stdout, stderr = os.popen3('/bin/hostname -f') > sys

[Tutor] question about __init__ in a class

2006-11-13 Thread shawn bright
Hello there all.i have a class that i need to load some class variables depending on what is passed to the class, it would either be set up using one variable or another. The values for the class variables would be loaded from a database. But how it is looked up depends on how its called. Like this

Re: [Tutor] what does it mean?

2006-11-13 Thread Mehta, Amar
the function animals returns a reference to itself. the reference is printed in oldMac oldMac can be changed to remove the print statements def oldMac(): animals("cow", "moo") animals("pig", "oink") animals("horse", "neigh") animals("dog", "woof") animals

[Tutor] what does it mean?

2006-11-13 Thread Kristinn Didriksson
Hello, This is my first program calling functions :) It worked nicely except for the message above. Can anyone explain what the message means. Thanks, Kristinn Program - # a program that prints the lyrics for Old Mcdonal had a farm for 5 different animals. # this wi

Re: [Tutor] numpy memory muncher

2006-11-13 Thread Lloyd Kvam
On Sat, 2006-11-11 at 15:40 -0500, Joel Levine wrote: > I'm using, perhaps misusing numpy which is eating up the memory and, > eventually crashing my program. OK. that's a small enough piece of code to figure things out. One quick suggestion, for looping variables xrange avoids creating a real l

[Tutor] Houston PyCamp

2006-11-13 Thread Chris Calloway
Need to learn Python quickly? http://trizpug.org/boot-camp/hpyc1/ -- Sincerely, Chris Calloway http://www.seacoos.org office: 332 Chapman Hall phone: (919) 962-4323 mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599 ___ Tutor maillist - Tu

[Tutor] (no subject)

2006-11-13 Thread Alain Bélisle
Disreguard last message(Big Block text) on my part, bad coding , between me and my keyboard, sorry for that, thanks all for replying.Soyez parmi les premiers à essayer Windows Live Mail. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mai

Re: [Tutor] Not able to store result between function call.. Help needed

2006-11-13 Thread Bob Gailer
Asrarahmed Kadri wrote: > > > > Hi Folks, > > > I have a textbox and a button (in tkinter). What I want is the > following functionality: The user enters a number in the text box and > presses the button. The event will call a function called "adder" and > when the user enters another

Re: [Tutor] (no subject)

2006-11-13 Thread Bob Gailer
Alain Bélisle wrote: > Hello, my name is Alain , as you will guess, i'm new at programming > python, i bought a book, Python Programming Second Edition, for the > absolute beginner. > In the second chapter , the Game Over program, using triple quotes > strings , even after checking to see if my

Re: [Tutor] Tutor Digest, Vol 33, Issue 52

2006-11-13 Thread Danny Yoo
> Is it possible to a single that contains two classes: > > Myclass.py file contains: > > Class one(object): > def needsomething(self): > Class two (object): > def dosomething(self): > > I want Class one's methods to access Class two methods? > > Class one(object): > def needsomething(self): >

Re: [Tutor] Not able to store result between function call.. Help needed

2006-11-13 Thread Noufal Ibrahim
Asrarahmed Kadri wrote: > > > > Hi Folks, > > > I have a textbox and a button (in tkinter). What I want is the following > functionality: The user enters a number in the text box and presses the > button. The event will call a function called "adder" and when the user > enters another val

[Tutor] Sloppy Code ?

2006-11-13 Thread Matt Erasmus
Hi guys Very new to python programming but am really enjoying it. Anyway, I was just wondering if this code could be improved on in anway. ... stdin, stdout, stderr = os.popen3('/bin/hostname -f') system_name = stdout.read() stdin.close() stderr.close() stdout.close() ... report.write("System Re

Re: [Tutor] (no subject)

2006-11-13 Thread Kent Johnson
Alain Bélisle wrote: > Hello, my name is Alain , as you will guess, i'm new at programming > python, i bought a book, Python Programming Second Edition, for the > absolute beginner. > In the second chapter , the Game Over program, using triple quotes > strings , even after checking to see if my

Re: [Tutor] Help with Elementtree ...how to access the attributes..

2006-11-13 Thread doug shawhan
Oho! Thanks, Kent (and everyone else.) That clears up some things. The link has some embarassment reducing info as well. :-)On 11/11/06, Kent Johnson < [EMAIL PROTECTED]> wrote:doug shawhan wrote:> I'm having some difficulties with elementtree as well. >> I'm attempting to parse a fairly sizeable x

[Tutor] Not able to store result between function call.. Help needed

2006-11-13 Thread Asrarahmed Kadri
      Hi Folks,     I have a textbox and a button (in tkinter). What I want is the following functionality: The user enters a number in the text box and presses the button. The event will call a function called "adder" and when the user enters another value and presses the button, the 'adder' funct

[Tutor] (no subject)

2006-11-13 Thread Alain Bélisle
Hello, my name is Alain , as you will guess, i'm new at programming python, i bought a book, Python Programming Second Edition, for the absolute beginner. In the second chapter , the Game Over program, using triple quotes strings , even after checking to see if my code was well writing from