Re: [Tutor] commands module

2007-12-06 Thread ds
Evert Rol wrote: >> So, I tried setting COLUMNS equal to 500 (arbitrarily large) prior to >> going into python. It seems to change back to 158 automatically >> however. >> For example, when I go into python, import commands, and execute >> commands.getoutput('set') I find that COLUMNS is back to 1

[Tutor] Still Can't Find Timed While Loops

2007-12-06 Thread earlylight publishing
Hello all, I now have my bit of code in while loop form and it works! It's great but not exactly what I wanted to do. I've been googling my heart out and I find lots of info on while loops and lots of info on timers that will execute an action AFTER a given interval but nothing on a time

[Tutor] unsubscribe

2007-12-06 Thread John Merritt
___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] commands module (Forwarded back to list)

2007-12-06 Thread Evert Rol
> So, I tried setting COLUMNS equal to 500 (arbitrarily large) prior to > going into python. It seems to change back to 158 automatically > however. > For example, when I go into python, import commands, and execute > commands.getoutput('set') I find that COLUMNS is back to 158. So, I > think m

Re: [Tutor] commands module (Forwarded back to list)

2007-12-06 Thread ds
Evert Rol wrote: >> >> I've been trying to do something that I thought was going to be >> >> relatively straight-forward, but so far I haven't found a good solution. >> >> >> >> What I'm trying to do is discover a pid on a process and kill it. The >> >> way that I thought that I could do it is so

Re: [Tutor] commands module

2007-12-06 Thread Evert Rol
> I've been trying to do something that I thought was going to be > relatively straight-forward, but so far I haven't found a good > solution. > > What I'm trying to do is discover a pid on a process and kill it. The > way that I thought that I could do it is something along the lines of: > > im

[Tutor] commands module

2007-12-06 Thread DS
I've been trying to do something that I thought was going to be relatively straight-forward, but so far I haven't found a good solution. What I'm trying to do is discover a pid on a process and kill it. The way that I thought that I could do it is something along the lines of: import commands p

Re: [Tutor] Mail? What's that?

2007-12-06 Thread Ricardo Aráoz
Justin Cardinal wrote: > Ricardo Aráoz wrote: > >>Are From: To: Date: and Subject: mandatory in the contents of the >>email(text)? Do I have to put "real" address in From when calling >>sendmail()? And in the contents? > > Here's the page I used to learn on this subject. > http://www.thinkspot.

Re: [Tutor] python precision output?

2007-12-06 Thread Kent Johnson
Andre Walker-Loud wrote: > To reiterate, I need str(value) to be written to my file with 16 > digits of precision...??? You can use string formatting to specify exactly how many decimal places to include: In [1]: v=1.0/7 In [2]: v Out[2]: 0.14285714285714285 In [3]: str(v) Out[3]: '0.142857142

Re: [Tutor] python precision output?

2007-12-06 Thread Andre Walker-Loud
> if you want accuracy and are willing to sacrifice the total range of > numbers that Python's IEEE754 double-precision floats give you, then > use the decimal.Decimal class instead -- better precision, smaller > range. > > however, if you wish to stick with floats, use the string format > operator

Re: [Tutor] Best way of learning

2007-12-06 Thread wesley chun
> Over a year ago I dabbled in learning Python, working my way through a > few tutorials, the Deitel's "How to program in Python" and Hetland's > "Practical Python", until I came across the OOP sections. My mind just > froze up, and I found myself wondering if I had really understood > anything at

Re: [Tutor] python precision output?

2007-12-06 Thread wesley chun
> The problem I am having is getting python to write number into this > input file, keeping 16 digits of precision. I have played around > interactively, and see that python default prints 17 digits of > precision to the screen, but when I use a replace command to write > into the input file, it o

Re: [Tutor] python precision output?

2007-12-06 Thread Eric Brunson
Andre Walker-Loud wrote: > Hi there, > Hi Andre, First of all, please don't start a new thread by replying to an existing thread, RFC compliant email readers will thread your post along with the original posting based on headers other than the Subject. :-) I don't think you'll ever get sat

[Tutor] python precision output?

2007-12-06 Thread Andre Walker-Loud
Hi there, I am using python to do some scripting. In particular, I am using it to run some jobs which require precision inputs. I do this by having python write an input file, which I then feed to some other program. The problem I am having is getting python to write number into this inpu

Re: [Tutor] Best way of learning

2007-12-06 Thread Trey Keown
The way I learned python was through this wikibook: http://en.wikibooks.org/wiki/Python_Programming I found it very easy to understand and very helpful. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to iterate and update subseqent items in list

2007-12-06 Thread bob gailer
ted b wrote: > Can you suggest a good way to iterate through the > remainder of list and update them? > > Ex: > Thing1.value = 0 > Thing2.value = 1 > Thing3.value = 0 > Thing4.value = 0 > > Things = [Thing1, Thing2, Thing3, Thing4] > > I want to iterate through 'Things' and if > 'Thing.value' > 0,

[Tutor] PIDA Issue

2007-12-06 Thread Mahesh N
I have installed pida succesfully using the command python setup.py install Installation was successful i.e. no errors but when i launch pida, it says some module is missing. wat could be the problem??? i am posting the result of installation and of launching the program. maggi:~/Desktop/PIDA-0.5

Re: [Tutor] Questions about wxEvents

2007-12-06 Thread Marc Tompkins
Hot diggety! Exactly what I was trying to come up with. Thank you! On Dec 6, 2007 9:38 AM, Jeff Younker <[EMAIL PROTECTED]> wrote: > While I can't help you with the wx specific part of the question, I canoffer > help with the reuse question. Here is one approach. Add an > controller identi

Re: [Tutor] Questions about wxEvents

2007-12-06 Thread Tiago Saboga
On Thu, Dec 06, 2007 at 09:12:59AM -0800, Marc Tompkins wrote: > I have a specific question - how can I generalize a > FileBrowseButtonWithHistory - and I realized, as I was trying to word my > question, that my real question is a bit more generic. > > First, the specific question: The FileBrowse

Re: [Tutor] Questions about wxEvents

2007-12-06 Thread Jeff Younker
While I can't help you with the wx specific part of the question, I can offer help with the reuse question. Here is one approach. Add an controller identifier to fpCallback. Then use lambda expressions for the actual callback, where the lambda expressions pass in a fixed value for the i

[Tutor] Questions about wxEvents

2007-12-06 Thread Marc Tompkins
I have a specific question - how can I generalize a FileBrowseButtonWithHistory - and I realized, as I was trying to word my question, that my real question is a bit more generic. First, the specific question: The FileBrowseButtonWithHistory requires a callback override and some custom code to st

[Tutor] Mail? What's that?

2007-12-06 Thread Justin Cardinal
Ricardo Aráoz wrote: >Are From: To: Date: and Subject: mandatory in the contents of the >email(text)? Do I have to put "real" address in From when calling >sendmail()? And in the contents? Here's the page I used to learn on this subject. http://www.thinkspot.net/sheila/article.php?story=200408

Re: [Tutor] Problems with List Server?

2007-12-06 Thread Tim Johnson
On Thursday 06 December 2007, you wrote: > It arrived. > > Since you appear to be the only one reporting the problem, perhaps it's > something on your end? It was the domain hoster. It has now been corrected. thanks tim ___ Tutor maillist - Tutor@pytho

Re: [Tutor] Loops and modules

2007-12-06 Thread bhaaluu
On Dec 6, 2007 8:38 AM, richard west <[EMAIL PROTECTED]> wrote: > heres a partial solution. theres no error checking on the Raw Input and you > have to type in you last number and press return, before the loop will > break, but its a start! And modifying your modifications makes it work even a l

Re: [Tutor] How to iterate and update subseqent items in list

2007-12-06 Thread Remco Gerlich
Hi, In this case, I'd go for the simple old fashioned for loop with a boolean: found = False for thing in Things: if thing.value > 0: found = True if found: thing.value = 2 Remco Gerlich On Dec 6, 2007 9:48 AM, ted b <[EMAIL PROTECTED]> wrote: > Can you suggest a good w

Re: [Tutor] Loops and modules

2007-12-06 Thread richard west
g = '''\ > ... From: [EMAIL PROTECTED] > ... Subject: testin'... > ... > ... This is a test ''' > >>> s.sendmail("[EMAIL PROTECTED]",tolist,msg) > { "[EMAIL PROTECTED]" : ( 550 ,"User unknown&

Re: [Tutor] While Loops and Modules

2007-12-06 Thread bhaaluu
Greetings, On Dec 6, 2007 12:44 AM, earlylight publishing <[EMAIL PROTECTED]> wrote: > Hello again to all the wonderfully helpful folks on this list. Today I did > my Google homework and I found this neat bit of code for a countdown timer. > > import time > import threading > class Timer(threadin

[Tutor] How to iterate and update subseqent items in list

2007-12-06 Thread ted b
Can you suggest a good way to iterate through the remainder of list and update them? Ex: Thing1.value = 0 Thing2.value = 1 Thing3.value = 0 Thing4.value = 0 Things = [Thing1, Thing2, Thing3, Thing4] I want to iterate through 'Things' and if 'Thing.value' > 0, then I want to set all values for th

Re: [Tutor] Mail? What's that?

2007-12-06 Thread Ricardo Aráoz
Luke Paireepinart wrote: > Ricardo Aráoz wrote: >> So I eventually got to sending mail with python. >> Some articles, trying and google led me to this script: >> >> import smtplib >> import time >> >> date = time.ctime(time.time( )) >> >From = '[EMAIL PROTECTED]' >> To = ['[EMAIL PROTECTED]', '[EMA

Re: [Tutor] Selecting a browser

2007-12-06 Thread Tim Golden
Ricardo Aráoz wrote: > I've registered in the issue tracker, but got scared and didn't post > anything. Don't be scared: just post up what you think is wrong as clearly as possible. If you can reasonably provide a patch, do so. Otherwise, just make it clear what's going on. Even if no-one picks i

Re: [Tutor] Best way of learning

2007-12-06 Thread Remco Gerlich
On Dec 5, 2007 11:43 PM, andy <[EMAIL PROTECTED]> wrote: > So, after this long-winded introduction, I was hoping to pick the wisdom > of this list to get some pointers of what to do/not to do to make the > most effective use of the few hours I have to learn how to program using > Python. So, any a

Re: [Tutor] Problems with List Server?

2007-12-06 Thread Remco Gerlich
It arrived. Since you appear to be the only one reporting the problem, perhaps it's something on your end? Remco Gerlich On Dec 3, 2007 11:51 PM, Tim Johnson <[EMAIL PROTECTED]> wrote: > On Monday 03 December 2007, Tim Johnson wrote: > > I appear to be having a weird problem with the List Serve