Re: comparing two lists

2007-08-24 Thread Ladislav Andel
Peter Otten wrote: > Ladislav Andel wrote: > > >> Peter Otten wrote: >> >>> Ladislav Andel wrote: >>> >>> >>> what would be the most efficient way to do following? I have a list of dictionaries taken from DB e.g. dblist = [{'id:1, 'host':'google.com','ip_addre

Re: Co-developers wanted: document markup language

2007-08-24 Thread Paul Rubin
Torsten Bronger <[EMAIL PROTECTED]> writes: > The differences to LaTeX are explained comprehensively on the > webpage, and actually LaTeX is the real competitor rather than > reStructuredText. TeX/LateX have been around forever and are well established standards, as awful as they are. Why do we w

Error with Simplemapi.py

2007-08-24 Thread Mick Duprez
On Dec 24 2004, 4:56 pm, [EMAIL PROTECTED] wrote: > I wish I new why google doesn't show nicely aligned python code when > you paste the script. > Anyways, in case this helps someone else you can download the script > fromhttp://www.kirbyfooty.com/simplemapi.py > > Ian First of all, thanks to all

Re: beginner, idomatic python 2

2007-08-24 Thread Bruno Desthuilliers
bambam a écrit : > Would someone like to suggest a replacement for this? This is a > function that returns different kinds of similar objects, depending > on what is asked for. PSP and PWR are classes. I don't really > want to re-write the calling code very much: I'm just wondering > if the functi

Re: beginner, idomatic python 2

2007-08-24 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : (snip) > and ALL_LOWER That's 'ALL_UPPER', of course :( > for symbolic (pseudo) > constants. > -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: List file system roots

2007-08-24 Thread Tim Golden
Einar W. Høst wrote: > Hi, > > How would you list the file system roots in Python? That is, I'm looking > for a way to list all connected drives (C:, D: etc) on a Windows box, or > all /root, /tmp etc on a *nix box. In Java, there's a built-in API > function to do this, File.listRoots(), but I cou

Unequal Length Maze

2007-08-24 Thread tomtim20
Hi All, what's the best algorithm to solve such problem ? http://www.stetson.edu/~efriedma/unequal/ I will really appreciate some pieces of code (python). Thanks, Tommy -- http://mail.python.org/mailman/listinfo/python-list

Re: Co-developers wanted: document markup language

2007-08-24 Thread Evan Klitzke
On 8/23/07, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > Some LaTeX users in Aachen thought about a general-use markup > language this spring. I wrote some code and a rough project > description, however, we could need some help. > > If you are interested, visit the provisional proj

Re: comparing two lists

2007-08-24 Thread Peter Otten
Ladislav Andel wrote: > need to be stopped before deleting any instance from items. > So I need to call stopLoop method in the given item in items before it > gets removed. > If there is any addition to items it's quite easy to call > item.startLoop() method. Unless you want to rely on the __del_

Does shuffle() produce uniform result ?

2007-08-24 Thread tooru honda
Hi, I have read the source code of the built-in random module, random.py. After also reading Wiki article on Knuth Shuffle algorithm, I wonder if the shuffle method implemented in random.py produces results with modulo bias. The reasoning is as follows: Because the method random() only produc

tarfile module for version 2.2.3

2007-08-24 Thread Antoon Pardon
I have to write a little program that has to run on a number of hosts. Versions of python range from 2.2.3. to 2.4.2. The easiest way to implement the necessary behaviour seems to me to use the tarfile module. However that was only introduced in 2.3 I had a look in the code and at first sight coul

Re: How would I go about making a file open. Not the way you might think.

2007-08-24 Thread Tim Golden
[... snip extended discussion on opening text files ...] Lamonte Harris wrote: > I've completed this request and I got the answer already. Yes, but discussions here never simply end when the answer is found! :) TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: tarfile module for version 2.2.3

2007-08-24 Thread billiejoex
On 24 Ago, 09:57, Antoon Pardon <[EMAIL PROTECTED]> wrote: > I have to write a little program that has to run on a number of hosts. > Versions of python range from 2.2.3. to 2.4.2. > > The easiest way to implement the necessary behaviour seems to me to > use the tarfile module. However that was onl

Re: beginner, idomatic python 2

2007-08-24 Thread bambam
> trying to be "idiomatic" ...I hope that if a python programmer looks at my code it won't be an excuse to discard it. Less of an issue with Python than with C/C++, but since I'm just starting... def device(DeviceType): if DeviceType=='PSP': return Psp() elif DeviceType=="Power Su

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Paul Rubin writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> The differences to LaTeX are explained comprehensively on the >> webpage, and actually LaTeX is the real competitor rather than >> reStructuredText. > > TeX/LateX have been around forever and are well established > s

Re: beginner, idiomatic python

2007-08-24 Thread bambam
> This isn't a "cast" in the sense of some less-strongly-typed languages; > it's just a conversion. The `list` function/type iterates over its > argument and turns it into a list. Sets are iterable, so that's all > that's really going on here. oh :~). Learning experience happening here... Tha

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Evan Klitzke writes: > On 8/23/07, Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> Some LaTeX users in Aachen thought about a general-use markup >> language this spring. I wrote some code and a rough project >> description, however, we could need some help. >> >> If you are interested

I know almost all basics

2007-08-24 Thread Lamonte Harris
Now I'm moving more into the gaming world. What libs/modules would you recommend? -- http://mail.python.org/mailman/listinfo/python-list

Re: Co-developers wanted: document markup language

2007-08-24 Thread olive
> > Well, because they are awful. ;-) I don't see that there is a > bunch of already existing projects, in fact, I don't see anyone > challenging LaTeX at all. However, competition is a good thing, and > I think there are enough aspects about LaTeX that can be done better > so that this project

Clipboard Monitor (tkinter,windows)

2007-08-24 Thread Peter Sutton
Hi. I am an A-level student studying computer science. I have taken it upon myself to learn python. It is now my weapon of choice. I have had a problem trying to creating a clipboard monitor in Windows(XP,Vista) that is linked to a tkinter GUI. I have a perfectly good code for clipboard monitori

Re: beginner, idiomatic python

2007-08-24 Thread Mikael Olofsson
bambam wrote: > > In this case it doesn't matter - my lists don't contain > duplicate elements this time - but I have worked with lists in > money market and in inventory, and finding the intersection > and difference for matching off and netting out are standard > operations. I would use a list

Re: Newbie: List file system roots

2007-08-24 Thread Bjoern Schliessmann
"Einar W. Høst" wrote: > How would you list the file system roots in Python? That is, I'm > looking for a way to list all connected drives (C:, D: etc) on a > Windows box, or all /root, /tmp etc on a *nix box. /root and /tmp are no "roots", but normal directories. glob.glob("/*") will give you al

Re: beginner, idomatic python 2

2007-08-24 Thread Bruno Desthuilliers
bambam a écrit : >> trying to be "idiomatic" > > ...I hope that if a python programmer looks at my code it > won't be an excuse to discard it. Hopefully not - and nothing forces you into adopting the common convention !-) But it's a fact that Python relies heavily on naming conventions, and th

Re: Co-developers wanted: document markup language

2007-08-24 Thread Wildemar Wildenburger
Torsten Bronger wrote: > Hallöchen! > > Yes, you're German. Have you ever noticed that (we) Germans are virtually the only ones that feel the need to rub our nationality into everyones faces? ;) > Paul Rubin writes > >> TeX/LateX have been around forever and are well established >> standa

How to minimize command window when running wxPython script

2007-08-24 Thread care02
Dear friends, I have almost completed my first wxPython application. The only thing I need now is to minimize the command window. How is this accomplished on Win32? What about Mac and Linux? Carl -- http://mail.python.org/mailman/listinfo/python-list

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread Paul Rubin
Boris Borcic <[EMAIL PROTECTED]> writes: > >> For example, if I have x=[ [1,2], [3,4] ] > >> > >> What I want is a new list of list that has four sub-lists: > >> > >> [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] > > [[a, map(f,a)] for a in x] > > no, that one will be [[[1,2], [f(1), f(2)]], [[3,4],

Re: How to minimize command window when running wxPython script

2007-08-24 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Dear friends, > > I have almost completed my first wxPython application. The only thing > I need now is to minimize the command window. How is this accomplished > on Win32? Use a .pyw main module (eventually a wrapper calling your main .py module) - it is associate

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread Boris Borcic
Paul Rubin wrote: > beginner <[EMAIL PROTECTED]> writes: >> For example, if I have x=[ [1,2], [3,4] ] >> >> What I want is a new list of list that has four sub-lists: >> >> [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] > > [[a, map(f,a)] for a in x] no, that one will be [[[1,2], [f(1), f(2)]], [[3,4

Re: Server-side scripting in python

2007-08-24 Thread Bruno Desthuilliers
Nagarajan a écrit : > On Aug 22, 8:50 pm, [EMAIL PROTECTED] (Cameron Laird) wrote: >> In article <[EMAIL PROTECTED]>,Nagarajan <[EMAIL PROTECTED]> wrote: >> . . . >>> Let me phrase my problem in a finer way. >>>

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! olive writes: > [...] > >> Well, because they are awful. ;-) I don't see that there is a >> bunch of already existing projects, in fact, I don't see anyone >> challenging LaTeX at all. However, competition is a good thing, >> and I think there are enough aspects about LaTeX that can

Re: Server-side scripting in python

2007-08-24 Thread olive
> Yes : have a look at Pylons too. It's actually quite less 'polished' > than Django, but it's IMHO going in the right direction (as a matter of > fact, Turbogears 2.0 - another well-known Python MVC framework - will > be based on Pylons...). Django is clearly more oriented toward > content-manag

Re: Does shuffle() produce uniform result ?

2007-08-24 Thread Steve Holden
tooru honda wrote: > Hi, > > I have read the source code of the built-in random module, random.py. > After also reading Wiki article on Knuth Shuffle algorithm, I wonder if > the shuffle method implemented in random.py produces results with modulo > bias. > > The reasoning is as follows: Beca

any problem with py's RC?

2007-08-24 Thread Yan Zhu
hi all, Here is 3 PYs, we found there is a big memory wasting, specially the program c.py, we found the memory will increase very soon. any body knows why? any RC's problem? thanks -- eSX class a(): def __init__(self): fp = open("a_file_lager_1M","rb") self

Re: Regular expression use

2007-08-24 Thread anno4000
Nick Maclaren <[EMAIL PROTECTED]> wrote in comp.lang.perl.misc: > > For reasons that I won't explain, as they are too complicated > and not terribly relevant, Your reasons are relevant as a motivation for your readers to answer such a broad question. > I am interested in discovering what > peopl

Re: Co-developers wanted: document markup language

2007-08-24 Thread Wildemar Wildenburger
olive wrote: > What you need is good structured text editor which hides as much as > possible the underlying XML (or other) format. > What you do there is pose extra requirements on the user ("Use a text editor with some far-out functions"). That will prevent your (well, Torsten's ;)) standard

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Wildemar Wildenburger writes: > [...] > >> Well, because they are awful. ;-) I don't see that there is a >> bunch of already existing projects, in fact, I don't see anyone >> challenging LaTeX at all. However, competition is a good thing, >> and I think there are enough aspects abo

Regular expression use

2007-08-24 Thread Nick Maclaren
For reasons that I won't explain, as they are too complicated and not terribly relevant, I am interested in discovering what people actually use regular expressions for. Not the subject domain, but the construction of the regular expressions. I know about computer scientists and parsing, and I k

Re: Co-developers wanted: document markup language

2007-08-24 Thread olive
On 24 août, 12:43, Torsten Bronger <[EMAIL PROTECTED]> wrote: > Hallöchen! > > olive writes: > > What about ODF ? (http://www.odfalliance.org/) Isn't it a good > > competitor ? > > I'd be a nice further backend but I doubt that people want to enter > XML. > Why not if the schema is designed toward

Re: Co-developers wanted: document markup language

2007-08-24 Thread olive
On 24 août, 13:34, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > olive wrote: > > What you need is good structured text editor which hides as much as > > possible the underlying XML (or other) format. > > What you do there is pose extra requirements on the user ("Use a text > editor with some

Re: Regular expression use

2007-08-24 Thread Zara
On 24 Aug 2007 10:58:46 GMT, [EMAIL PROTECTED] (Nick Maclaren) wrote: > >For reasons that I won't explain, as they are too complicated >and not terribly relevant, I am interested in discovering what >people actually use regular expressions for. Not the subject >domain, but the construction of the

Re: Co-developers wanted: document markup language

2007-08-24 Thread David Boddie
On Fri Aug 24 11:04:33 CEST 2007, Torsten Bronger wrote: > Paul Rubin writes: > > > TeX/LateX have been around forever and are well established > > standards, as awful as they are. Why do we want ANOTHER markup > > language? > > Well, because they are awful. ;-) I don't see that there is a >

Re: Regular expression use

2007-08-24 Thread Mirco Wahab
Nick Maclaren wrote: > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. Not the subject > domain, but the construction of the regular expressions. After I figured out how t

Tinker question 1

2007-08-24 Thread Lamonte Harris
What does the pack function do exactly? Just puts everything together? Also I've been reading this manual/tutorial and I'm confused on the Frame, what does it do, I'm pretty confused on that. http://www.pythonware.com/library/tkinter/introduction/hello-again.htm -- http://mail.python.org/mailma

Re: Regular expression use

2007-08-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Nick Maclaren <[EMAIL PROTECTED]> wrote: > >For reasons that I won't explain, as they are too complicated >and not terribly relevant, I am interested in discovering what >people actually use regular expressions for. Not the subject >domain, but the construction of t

Re: any problem with py's RC?

2007-08-24 Thread Marc 'BlackJack' Rintsch
On Fri, 24 Aug 2007 19:44:37 +0800, Yan Zhu wrote: > Here is 3 PYs, we found there is a big memory wasting, specially the program > c.py, we found the memory will increase very soon. > any body knows why? any RC's problem? thanks You are creating reference cycles and instantiate many in very shor

Re: Does shuffle() produce uniform result ?

2007-08-24 Thread Hrvoje Niksic
tooru honda <[EMAIL PROTECTED]> writes: > I have read the source code of the built-in random module, > random.py. After also reading Wiki article on Knuth Shuffle > algorithm, I wonder if the shuffle method implemented in random.py > produces results with modulo bias. It doesn't have modulo bias

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread beginner
On Aug 24, 12:44 am, beginner <[EMAIL PROTECTED]> wrote: > On Aug 24, 12:41 am, Davo <[EMAIL PROTECTED]> wrote: > > > > > > > On Aug 23, 9:24 pm, beginner <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > How do I map a list to two lists with list comprehension? > > > > For example, if I have x=[

how to tar with python

2007-08-24 Thread Brian McCann
Hi, I'm trying to tar the contents of a directory "test" which contains 3 files foo1.xml ,foo2.xml, foo3.xml in my current directory /home/pythonbox/tmp I have the directory "test" if I run the below script it fails with the below error, but the files exist in the directory test any help

Re: Regular expression use

2007-08-24 Thread Bert Heymans
Nick, In "Mastering Regular Expressions" by Jeffrey E. F. Friedl your question is answered in the first 6 chapters. Seriously, that's what it takes. It's a really good book. Cheers Bert On Aug 24, 12:58 pm, [EMAIL PROTECTED] (Nick Maclaren) wrote: > For reasons that I won't explain, as they are

Re: Co-developers wanted: document markup language

2007-08-24 Thread Aahz
In article <[EMAIL PROTECTED]>, Torsten Bronger <[EMAIL PROTECTED]> wrote: >Aahz writes: >> >> My point is that docutils already exists; given the combined >> competition from LaTeX and docutils and OpenOffice, you should >> probably explain what differentiates your project and why people >> shoul

Re: Unequal Length Maze

2007-08-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi All, > what's the best algorithm to solve such problem ? > http://www.stetson.edu/~efriedma/unequal/ > > I will really appreciate some pieces of code (python). If you pay me 100$ (really a bargain), you get a solution in python. Diez -- http://mail.python.org/mai

Re: Unequal Length Maze

2007-08-24 Thread tomtim20
On Aug 24, 4:41 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > Hi All, > > what's the best algorithm to solve such problem ? > >http://www.stetson.edu/~efriedma/unequal/ > > > I will really appreciate some pieces of code (python). > > If you pay me 100$ (really

Re: Regular expression use

2007-08-24 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Mirco Wahab <[EMAIL PROTECTED]> writes: |> |> Using complex regular expressions is like tank destruction |> with contact charges glued on them. Only a few people |> will even survive the first "usage", but survivors will |> then eventually be able to destroy almos

Re: creating a tar file with python

2007-08-24 Thread J. Cliff Dyer
Brian McCann wrote: Hi, I'm trying to create a tar file of the contents of the current directory right now there is only one file "text.xml" in the current dir, I'm using"." current dir as source but that gives syntax error any help would be greatly appreciated --Brian #!/usr/bin/pyth

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread beginner
On Aug 24, 5:47 am, Paul Rubin wrote: > Boris Borcic <[EMAIL PROTECTED]> writes: > > >> For example, if I have x=[ [1,2], [3,4] ] > > > >> What I want is a new list of list that has four sub-lists: > > > >> [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] > > > [[a, map(f,a)] f

Re: Co-developers wanted: document markup language

2007-08-24 Thread J. Robertson
olive wrote: >>> [snip] > > But few people are used to Plain Text Markup (excepted in some > scientific area maybe) and it is error prone. > It looks very much like Gummi's authors and target audience actually are part of the few people you are talking about: i.e. console-happy folks that ar

Re: Unequal Length Maze

2007-08-24 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > On Aug 24, 4:41 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >>> Hi All, >>> what's the best algorithm to solve such problem ? >>> http://www.stetson.edu/~efriedma/unequal/ >>> I will really appreciate some pieces of code (python).

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! David Boddie writes: > On Fri Aug 24 11:04:33 CEST 2007, Torsten Bronger wrote: > >> Paul Rubin writes: >> >>> TeX/LateX have been around forever and are well established >>> standards, as awful as they are. Why do we want ANOTHER markup >>> language? >> >> Well, because they are aw

Re: Regular expression use

2007-08-24 Thread A.T.Hofkamp
On 2007-08-24, Nick Maclaren <[EMAIL PROTECTED]> wrote: > people actually use regular expressions for. Not the subject > domain, but the construction of the regular expressions. This is easy. I use RE for checking whether some input matches a certain pattern, and optionally, to extract some speci

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Grant Edwards
On 2007-08-24, Bryan Olson <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > [...] >> import socket,random >> >> HOST = '' # Symbolic name meaning the local host >> PORT = 8765 # Arbitrary non-privileged port >> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Hendrik van Rooyen
"Grant Edwards" wrote: > On 2007-08-23, Hendrik van Rooyen wrote: > > > While doing a netstring implementation I noticed that if you > > build a record up using socket's recv(1), then when you close > > the remote end down, the recv(1) hangs, > > I don't see that behavior running 2.4 on Gentoo

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Hendrik van Rooyen
"Dan Stromberg - Datallegro" wrote: > > Are you using sock.settimeout()? Yes. > > I've always done timed-out sockets in python using select; IINM, the > settimeout method is a new addition. > > I agree with Grant though - posting a minimal snippet of code that > replicates the problem would

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Hendrik van Rooyen
"Grant Edwards" wrote: > On 2007-08-23, Dan Stromberg - Datallegro wrote: > > > Are you using sock.settimeout()? > > Hey, somebody snuck timeouts into the socket module when I wasn't > looking... > > > I agree with Grant though - posting a minimal snippet of code that > > replicates the prob

csv module

2007-08-24 Thread luca72
Hello at all i have a problem with the csv module, really i don't undestud the writerows: if i have to write only one row i do as follow: def scrivo_csv(self): import csv q_righe = self.tableWidget.rowCount() for row in range(q_righe) : e_vuota = self.tableWidge

Re: Server-side scripting in python

2007-08-24 Thread Bruno Desthuilliers
olive a écrit : >> Yes : have a look at Pylons too. It's actually quite less 'polished' >> than Django, but it's IMHO going in the right direction (as a matter of >> fact, Turbogears 2.0 - another well-known Python MVC framework - will >> be based on Pylons...). Django is clearly more oriented tow

Re: creating a tar file with python

2007-08-24 Thread Ed Leafe
On Aug 23, 2007, at 11:27 PM, Brian McCann wrote: > I ran the code as you suggested, didn't work, tried variations of > it didn't work, > If you don't know the answer don't pretend you do! > > Apology not accepted, please don't wake up! > > Future correspondence on any python questions from you

I can't get value of entry box, Tinker

2007-08-24 Thread Lamonte Harris
I tried w/ my following code: from Tkinter import * master = Tk() Label(master, text="Username").grid(row=0, sticky=W) Label(master, text="Password").grid(row=1, sticky=W) e1 = Entry(master) e2 = Entry(master,show="*") def login(): global e2,e1 print e2 print e1 e3 = Button(master,tex

RE: creating a tar file with python

2007-08-24 Thread Carsten Haese
On Thu, 2007-08-23 at 23:27 -0400, Brian McCann wrote: > > > Steve, > > I ran the code as you suggested, didn't work, tried variations of it > didn't work, > If you don't know the answer don't pretend you do! > > Apology not accepted, please don't wake up! > > Future correspondence on any py

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread ZeD
Boris Borcic wrote: >>> For example, if I have x=[ [1,2], [3,4] ] >>> What I want is a new list of list that has four sub-lists: >>> [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] >> [[a, map(f,a)] for a in x] > [map(g,a) for a in x for g in [None,f]] > will do it. > > ...a bit too cleverly, but ther

Re: python setup.py: how to override a setup.cfg value ?

2007-08-24 Thread Michael Ströder
Chris Shenton wrote: > I'm building python-ldap and need to change values of library and > include paths that are in the setup.cfg file. This is an automated > build (using "buildit") so I'd prefer not to have edit the .cfg by hand, > with sed, or even with buildit's Substitute(). Almost everythi

Re: creating a tar file with python

2007-08-24 Thread Ed Leafe
On Aug 24, 2007, at 11:24 AM, Carsten Haese wrote: > You clearly have no idea who you're talking to. I suggest you > Google for > '"Steve Holden" Python' to get a clue. Good luck finding any more help > here. Even if it were Joe Nobody to whom he was directing those comments, it was *

Re: Regular expression use

2007-08-24 Thread Larry W. Virden
On Aug 24, 6:58 am, [EMAIL PROTECTED] (Nick Maclaren) wrote: > I am interested in discovering what > people actually use regular expressions for. Hmm - let's see. I tend to use regular expressions when I am writing code that needs to search through output to find certain patterns. I also use them

Re: Socket recv(1) seems to block instead of returning end of file.

2007-08-24 Thread Grant Edwards
On 2007-08-24, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > "Grant Edwards" wrote: > >> On 2007-08-23, Hendrik van Rooyen wrote: >> >> > While doing a netstring implementation I noticed that if you >> > build a record up using socket's recv(1), then when you close >> > the remote end down, th

Re: creating a tar file with python

2007-08-24 Thread kyosohma
On Aug 24, 10:33 am, Ed Leafe <[EMAIL PROTECTED]> wrote: > On Aug 24, 2007, at 11:24 AM, Carsten Haese wrote: > > > You clearly have no idea who you're talking to. I suggest you > > Google for > > '"Steve Holden" Python' to get a clue. Good luck finding any more help > > here. > > Even if i

RE: creating a tar file with python

2007-08-24 Thread Brian McCann
I don't care if Steve Holden is the python God himself, He's a rude, arrogant, vulgar human who shows his true level of intellect by his use of profanity And he goes one level lower stating he respects the python group he spews his profanity to He chose to respond to my question, no one dragged

How to replace a method in an instance.

2007-08-24 Thread Steven W. Orr
In the program below, I want this instance to end up calling repmeth whenever inst.m1 is called. As it is now, I get this error: Hello from init inst = <__main__.CC instance at 0x402105ec> Traceback (most recent call last): File "./foo9.py", line 17, in ? inst.m1() TypeError: repmeth() t

Re: Co-developers wanted: document markup language

2007-08-24 Thread Jeremy Sanders
Torsten Bronger wrote: > Some LaTeX users in Aachen thought about a general-use markup > language this spring. I wrote some code and a rough project > description, however, we could need some help. > > If you are interested, visit the provisional project page at > http://latex-bronger.sourceforg

Re: Co-developers wanted: document markup language

2007-08-24 Thread Torsten Bronger
Hallöchen! Aahz writes: > Torsten Bronger <[EMAIL PROTECTED]> wrote: > >> [...] >> >> reStructuredText, AsciiDoc, and some others focus on source code >> documentation, or on software documentation. In contrast to >> that, our markup should be suitable for PhD theses, papers and >> the like. T

RE: creating a tar file with python

2007-08-24 Thread Brian McCann
Ed, Carsten, Steve, I don't care if Steve Holden is the python God himself, He's a rude, arrogant, vulgar human who shows his true level of intellect by his use of profanity And he goes one level lower, stating he respects the python group he spews his profanity to. He chose to respond to my

Re: List Comprehension Question: One to Many Mapping?

2007-08-24 Thread Eduardo O. Padoan
> For example, if I have x=[ [1,2], [3,4] ] > > What I want is a new list of list that has four sub-lists: > > [[1,2], [f(1), f(2)], [3,4], [f(3), f(4)]] [[a, [f(b) for b in a]] for a in x] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to replace a method in an instance.

2007-08-24 Thread kyosohma
On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > In the program below, I want this instance to end up calling repmeth > whenever inst.m1 is called. As it is now, I get this error: > > Hello from init > inst = <__main__.CC instance at 0x402105ec> > Traceback (most recent call last)

Re: How to replace a method in an instance.

2007-08-24 Thread Steven W. Orr
On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: =>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: =>> In the program below, I want this instance to end up calling repmeth =>> whenever inst.m1 is called. As it is now, I get this error: =>> =>> Hello from init =>> i

Steve Holden is a moronic, self-indulgent BASTARD [WAS: Re: creating a tar file with python]

2007-08-24 Thread Wildemar Wildenburger
[EMAIL PROTECTED] wrote: > I like Steve, but he seems pretty crabby/rude much of the time. > Now what is going on here? I've been on this list for quite some time now and over all of Steves very frequent posts this is the first thread that I recall in which he sort of snapped. All of the othe

Re: I know almost all basics

2007-08-24 Thread Terry Reedy
"Lamonte Harris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Now I'm moving more into the gaming world. What libs/modules would you | recommend? One of the basics is learning to use search engines. Try 'Python game programming' with Google, for instance. -- http://mail.py

Re: How to replace a method in an instance.

2007-08-24 Thread Wildemar Wildenburger
Steven W. Orr wrote: > Sorry. I need repmeth to have self passed to it automatically if it's > called. I didn't mean to obfuscate the problem by not making a reference > to self in repmeth. > > Am I being clear? > > Sort of. Maybe you fare better if you state what you want to achieve, instea

Re: Regular expression use

2007-08-24 Thread brad
Nick Maclaren wrote: > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. Finding credit card numbers in files...among other things: http://filebox.vt.edu/users/rtilley/publi

Re: How to replace a method in an instance.

2007-08-24 Thread James Stroud
Steven W. Orr wrote: > On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: > > =>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > =>> In the program below, I want this instance to end up calling repmeth > =>> whenever inst.m1 is called. As it is now, I get this error

GUI and distrubution

2007-08-24 Thread anders
I have looked att Python on www.showmedo.com And after this i start testing writing som program i Python. But... So how is the preferably way to distribute software written i Python i am NOT into hiding stuff, more a easy way of giving eg friends a copy of the program without having them installti

Re: Regular expression use

2007-08-24 Thread Simon Brunning
On 24 Aug 2007 10:58:46 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > For reasons that I won't explain, as they are too complicated > and not terribly relevant, I am interested in discovering what > people actually use regular expressions for. http://xkcd.com/208/ -- Cheers, Simon B. [EMAIL

Re: How would I compile a Python file to a exe

2007-08-24 Thread vasudevram
On Aug 24, 2:11 am, Charlie <[EMAIL PROTECTED]> wrote: > Quoting Lamonte Harris <[EMAIL PROTECTED]>: > > > Been a while and I'm wondering how I would go about doing it. > > py2exe seems to be a fairly good option for this, at least in the > world of Windows. Yes, py2exe looks good. I've tried it o

Fwd: How would I compile a Python file to a exe

2007-08-24 Thread Lamonte Harris
I thought I answered this lol.. -- Forwarded message -- From: vasudevram <[EMAIL PROTECTED]> Date: Aug 24, 2007 11:56 AM Subject: Re: How would I compile a Python file to a exe To: python-list@python.org On Aug 24, 2:11 am, Charlie <[EMAIL PROTECTED]> wrote: > Quoting Lamonte Harr

Re: Regular expression use

2007-08-24 Thread Wildemar Wildenburger
Simon Brunning wrote: > On 24 Aug 2007 10:58:46 GMT, Nick Maclaren <[EMAIL PROTECTED]> wrote: > >> For reasons that I won't explain, as they are too complicated >> and not terribly relevant, I am interested in discovering what >> people actually use regular expressions for. >> > > http://xk

Re: Using Regular Expresions to change .htm to .php in files

2007-08-24 Thread J. Cliff Dyer
Tim Williams wrote: On 23/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I have a bunch of files that have changed from standard htm files to php files but all the links inside the site are now broken because they point to the .htm files while they are now .php files. Does anyone h

Re: online doc bug

2007-08-24 Thread O.R.Senthil Kumaran
> hyperlink "site module documentation" in Section 4.1 on page > http://docs.python.org/inst/search-path.html leads to a nonexistent > page. Thank you. Submitted the report and patch at: http://bugs.python.org/issue1012 -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python

Re: How to replace a method in an instance.

2007-08-24 Thread Steven W. Orr
On Friday, Aug 24th 2007 at 12:26 -0400, quoth Steven W. Orr: =>On Friday, Aug 24th 2007 at 09:12 -0700, quoth [EMAIL PROTECTED]: => =>=>On Aug 24, 11:02 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: =>=>> In the program below, I want this instance to end up calling repmeth =>=>> whenever inst.m1

Re: I can't get value of entry box, Tinker

2007-08-24 Thread Matt McCredie
> What/should I, can I do? Fix your code? > def login(): > global e2,e1 > print e2.get() > print e1.get() That should work. Matt -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse - required options

2007-08-24 Thread Robert Dailey
Thank you VERY much for mentioning argparse- this is EXACTLY what I needed! Thank you! On 8/23/07, Steven Bethard <[EMAIL PROTECTED]> wrote: > > Omari Norman wrote: > > On Mon, Aug 20, 2007 at 05:31:00PM -0400, Jay Loden wrote: > >> Robert Dailey wrote: > >>> Well, I don't know what is wrong with

Re: GUI and distrubution

2007-08-24 Thread Kevin Walzer
anders wrote: > So how is the preferably way to distribute software written i Python > My next question is witch is the best GUI to use, also consider > the delivery question above. > These are two of the most-often-asked questions on this list (along with "What's the best Python IDE?"). Search

question

2007-08-24 Thread JYOUNG79
Still trying to learn Python and was hoping some of you might be able to give me some advice on my code below. It works but I'm wondering if there's more efficient ways of doing this than the way I've done it. The first step is I have to loop thru nested folders and find all files that star

Re: How to replace a method in an instance.

2007-08-24 Thread James Stroud
Steven W. Orr wrote: > Ok. I have a collection of classes that are produced by a factory. They > all inherit from a baseclass. One (maybe more) of the classes inherits a > method that he shouldn't. All I want is to be able to change that > particular class so that he will have the special method

  1   2   >