Re: [Tutor] os.system() with NO_WAIT

2006-08-08 Thread János Juhász
Thanks Wesley,  I lokked for subprocess.Popen. os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg") was to complicated for me based on the manual. Yours sincerely, __ János Juhász VELUX Magyarország Fertődi Építőkomponens Kft. IT Department Malom Köz 1, H-9431

[Tutor] python

2006-08-08 Thread David Wilson
can you explain functions in python to me and give me some examples ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Community documentation framework?

2006-08-08 Thread Kent Johnson
> > From: "Bob Nienhuis" <[EMAIL PROTECTED]> > > Features I would like to see: > A Wikipedia-like capacity for community update-ability/modifiability > of documentation submissions. Fredrik Lundh has started wikis for the Python docs. I'm on vacation and don't have the links but you sh

[Tutor] Regex search in HTML data

2006-08-08 Thread Basil Shubin
Hi friends, Please, see the attachment and examine a code I have provide. The problem is, I want fetch data from Comments until the first occurrence , but with my code data fetchind until the last in htmlData variable, but that is not what I want. So question is, what is my mistake? Thank

[Tutor] Unusual behavior in readline

2006-08-08 Thread Tony Cappellini
I don't understand why readline is producing such unusual behavior.I don't remember it working like this previously. The docs say it is supposed to read a line at a time.this functiondef ProcessFile(self, Inputfile, Outputfile=None):         try:    fh=open(Inputfile,"r")    ex

Re: [Tutor] Community documentation framework?

2006-08-08 Thread Mike Hansen
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Nienhuis Sent: Sunday, August 06, 2006 3:56 PM To: tutor@python.org Subject: [Tutor] Community documentation framework? Have you had the experience of finding a nifty bit

Re: [Tutor] help regarding forms... (fwd)

2006-08-08 Thread Alan Gauld
>> I've been on the internet for over 20 years now and every mail >> tool/newreader I've ever used has (at least) two reply options: >> ... >> I don't understand why this seems to come as a surprise? >> What am I missing? > > Alan, I think you are judging based on technical lists, no? There are ot

Re: [Tutor] Rock, Paper, Scissors

2006-08-08 Thread Alan Gauld
> This looks like a fun project to work on. From > reading the description, I feel this would be pretty > straight forward game to program. However, I have no > idea how the computer would decide if it wanted a > rock, paper, or a pair of scissors. Any hints? Assign a value to rock, paper and s

Re: [Tutor] Unusual behavior in readline

2006-08-08 Thread Luke Paireepinart
Tony Cappellini wrote: > > I don't understand why readline is producing such unusual behavior. > I don't remember it working like this previously. The docs say it is > supposed to read a line at a time. It does :) > > this function > > def ProcessFile(self, Inputfile, Outputfile=None): > >

Re: [Tutor] python

2006-08-08 Thread Hugo González Monteverde
Hi David, Have you read the grat explanation in Alan's tutorial? What problem specifically are you having with functions? http://www.freenetpages.co.uk/hp/alan.gauld/ Get back to us with any questions... David Wilson wrote: > can you explain functions in python to me and give me some examples

[Tutor] try & except

2006-08-08 Thread Magnus Wirström
Hi I'm playing around with try: and except: i have a code like this try: bibl=os.listdir("c:\\klientdata\\") except: wx.MessageBox("Kunde inte läsa käll biblioteket.","Säkerhetskopiering",wx.OK|wx.ICON_ERROR) (yeah ... it's swedish :) ) So far i get how t

Re: [Tutor] python

2006-08-08 Thread Danny Yoo
On Mon, 7 Aug 2006, David Wilson wrote: > can you explain functions in python to me and give me some examples Hi David, Have you looked into a Python tutorial yet? http://wiki.python.org/moin/BeginnersGuide/NonProgrammers Most of the tutorials there talk about functions. If you could g

Re: [Tutor] help regarding forms... (fwd)

2006-08-08 Thread Brian van den Broek
Alan Gauld said unto the world upon 08/08/06 12:59 PM: >>> I've been on the internet for over 20 years now and every mail >>> tool/newreader I've ever used has (at least) two reply options: >>> ... >>> I don't understand why this seems to come as a surprise? >>> What am I missing? >> >> Alan, I thi

Re: [Tutor] python

2006-08-08 Thread Alan Gauld
> can you explain functions in python to me and give me some examples There are many tutorials that do that, including mine. Take a look at the Modules and functions topic... Or if you are experienced in other programming languages try the official tutorial at python.org. Alan Gauld Author of

Re: [Tutor] Regex search in HTML data

2006-08-08 Thread Alan Gauld
> Please, see the attachment and examine a code I have provide. The > problem is, I want fetch data from Comments until the first > occurrence , Do you mean the unmatched /td that occurs after the dd section? > import re > import string > > htmlData = """ > Instructions > Comments > > > No

Re: [Tutor] Unusual behavior in readline

2006-08-08 Thread Alan Gauld
>I don't understand why readline is producing such unusual behavior. > I don't remember it working like this previously. The docs say it is > supposed to read a line at a time. It does. > def ProcessFile(self, Inputfile, Outputfile=None): > >try: >fh=open(Inputfile,"r") >

Re: [Tutor] try & except

2006-08-08 Thread John Fouhy
On 09/08/06, Magnus Wirström <[EMAIL PROTECTED]> wrote: > Hi > > I'm playing around with try: and except: i have a code like this >try: >bibl=os.listdir("c:\\klientdata\\") >except: >wx.MessageBox("Kunde inte läsa käll > biblioteket.","Säkerhetskopiering",wx.

Re: [Tutor] try & except

2006-08-08 Thread Alan Gauld
> I'm playing around with try: and except: i have a code like this >try: >bibl=os.listdir("c:\\klientdata\\") >except: >wx.MessageBox("Kunde inte läsa käll ... > > So far i get how to use it but i would like to be able to execute > the try block again after

Re: [Tutor] Unusual behavior in readline

2006-08-08 Thread wesley chun
summarizing what folks have already said plus a few more tweaks such as moving the close() to finally (2.5+), following the style guideline of variable non-titlecasing, removing unused variables, etc.: #!/usr/bin/env python2.5 def processFile(inputfile): try: fh = open(inputfile, "r")

[Tutor] searching for a string in a dictionary

2006-08-08 Thread anil maran
all_types:.there is such a listhow do i search for a particular string say teststring in this listi triedif teststring in all_types:if teststring in all_types.type: it doesnt workplease help me out hereshould i use lambda Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great

[Tutor] Exercise in writing a python function.

2006-08-08 Thread Kermit Rose
Hello all. I feel more familar with Python now, and when I recently went back to reading the tutorial, I could actually read it without being overwhelmed by too much new detail. I've been staring at the specs for a python function for a while. I wrote one version of it and it worked.

Re: [Tutor] Exercise in writing a python function.

2006-08-08 Thread John Fouhy
On 09/08/06, Kermit Rose <[EMAIL PROTECTED]> wrote: > def incr(mult,z,zlim,mpylist): > # mult is a vector of exponents for the multipliers in mpylist. > # z is a positive odd integer. > # zlim is the upper bound critical value for the sum of ( mpylist[k][0] * > mpylist[k][1] ) > # where kth mult

Re: [Tutor] Exercise in writing a python function.

2006-08-08 Thread John Fouhy
On 09/08/06, Kermit Rose <[EMAIL PROTECTED]> wrote: > Hello John. > > Thanks for replying. > > In my previous version, I used z as the critical value,. > > Since I created zlim, a function of z, to be passed in as a parameter, I no > longer need z > > in the parameter list. > > In another part of