Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread John Nagle
[EMAIL PROTECTED] wrote: > but in any case, I believe there are several reasons why type > inference scalability is actually not _that_ important (as long as it > works and doesn't take infinite time): > > -I don't think we want to do type inference on large Python programs. > this is indeed askin

Re: vim python: substitute 'spaces' indent to 'tabs'?

2007-04-02 Thread forgems
On Apr 2, 7:30 am, "Rocky Zhou" <[EMAIL PROTECTED]> wrote: > I am accustomed to vi my pthon scripts with 'tab' indent. But when I > copy some code to my script, the indent may be 'spaces'. So I wanna a > way to substitute those 'spaces' to be 'tabs' conveniently. > > For example, I: > expand -t4 te

Re: Clean "Durty" strings

2007-04-02 Thread Diez B. Roggisch
Ulysse wrote: > Hello, > > I need to clean the string like this : > > string = > """ > bonne mentalité mec!:) \nbon pour > info moi je suis un serial posteur arceleur dictateur ^^* > \nmais pour avoir des resultats probant il > faut pas faire les m

Re: Extract information from HTML table

2007-04-02 Thread anjesh
On Apr 2, 12:54 am, "Dotan Cohen" <[EMAIL PROTECTED]> wrote: > On 1 Apr 2007 07:56:04 -0700, Ulysse <[EMAIL PROTECTED]> wrote: > > > I have seen the Beautiful Soup online help and tried to apply that to > > my problem. But it seems to be a little bit hard. I will rather try to > > do this with regu

frame of Qt program

2007-04-02 Thread Marco
Hi, I want to write a PyQt4 program, which like a graph-ssh. One side user choose server moder, and other side(s) user choose client mode. Both of them have a GUI, they can connect via socket. I have study PyQt4 for a while and learn a little socket(from W.R Stevens Unix Networking Programming).

Question about text in Python

2007-04-02 Thread Steve
Hi, I've created a Python program that a user enteres one line of text which will then create an acronym from that text. What I want to add to the program is the abilty to rerun this process (where the user enteres another line of text) until the user has had enough and enters a blank line whi

Re: How can i compare a string which is non null and empty

2007-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2007 01:35:17 +0200, Georg Brandl wrote: > [EMAIL PROTECTED] schrieb: >> Hi, >> >> how can i compare a string which is non null and empty? >> >> >> i look thru the string methods here, but cant find one which does it? >> >> http://docs.python.org/lib/string-methods.html#string-m

Re: frame of Qt program

2007-04-02 Thread Phil Thompson
On Monday 02 April 2007 9:45 am, Marco wrote: > Hi, > I want to write a PyQt4 program, which like a graph-ssh. One side > user choose server moder, and other side(s) user choose client mode. > Both of them have a GUI, they can connect via socket. > > I have study PyQt4 for a while and learn a lit

Web App Framework with PostgreSQL + fast + easy

2007-04-02 Thread Ben
I'm looking for a web application framework with a good interface to PostgreSQL. The app I'm developing is relatively simple, but I'm new to coding, so it needs to be easy. What I'm making is a wiki-like system that could be thought of as similar to MediaWiki, but with each word editable separate

Re: Web App Framework with PostgreSQL + fast + easy

2007-04-02 Thread Thomas Krüger
Ben schrieb: > I'm looking for a web application framework with a good interface to > PostgreSQL. You may check out Django: http://www.djangoproject.com/ Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about text in Python

2007-04-02 Thread Thomas Krüger
Steve schrieb: > I've created a Python program that a user enteres one line of text which > will then create an acronym from that text. > > What I want to add to the program is the abilty to rerun this process > (where the user enteres another line of text) until the user has had > enough and ente

Re: Question about text in Python

2007-04-02 Thread Amit Khemka
On 4/2/07, Steve <[EMAIL PROTECTED]> wrote: > Hi, > > I've created a Python program that a user enteres one line of text which > will then create an acronym from that text. > > What I want to add to the program is the abilty to rerun this process (where > the user enteres another line of text) unti

Re: Question about text in Python

2007-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2007 18:48:00 +1000, Steve wrote: > Hi, > > I've created a Python program that a user enteres one line of text which > will then create an acronym from that text. > > What I want to add to the program is the abilty to rerun this process (where > the user enteres another line of

Parallel ping problems python puzzler

2007-04-02 Thread amaccormack
I wrote a quick script to check the "up-ness" of a list of machines, and timeout after 1 second. However, with a lot of timeouts, the script takes a logn time, so I thought to parallelise it. However, as soon as I do, the pings that do not get a response never return, so their threads block forever

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread Paul Boddie
On 2 Apr, 09:17, John Nagle <[EMAIL PROTECTED]> wrote: > > Something else worth trying: type inference for separately > compiled modules using the test cases for the modules. I mentioned such possibilities once upon a time: http://blog.amber.org/2004/12/23/static-typing-and-python/ Note the

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread Kay Schluehr
On Apr 2, 9:17 am, John Nagle <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > but in any case, I believe there are several reasons why type > > inference scalability is actually not _that_ important (as long as it > > works and doesn't take infinite time): > > > -I don't think we want to

Proxying object memory for synchronous update.

2007-04-02 Thread Chris McCormick
Hi, I'm looking for a solution to a concurrency problem I have. I would like to have multiple objects with an Update() method. This Update method might access the contents of other objects. I would like there to be a proxy so that if object A's Update method is run before object B, and object A mo

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread bearophileHUGS
Paul Boddie: > the author's frustration with the state of the standard library: > something which almost always gets mentioned in people's pet Python > hates, but something mostly ignored in the wider enthusiasm for > tidying up the language. There is some possibility that Python 3.1 will have wha

Re: Web App Framework with PostgreSQL + fast + easy

2007-04-02 Thread [EMAIL PROTECTED]
On 2 avr, 11:23, Ben <[EMAIL PROTECTED]> wrote: > I'm looking for a web application framework with a good interface to > PostgreSQL. > > The app I'm developing is relatively simple, but I'm new to coding, so it > needs to be easy. > > What I'm making is a wiki-like system that could be thought of a

BUG?: Saving empty array in shelve

2007-04-02 Thread iwl
Hi, I've tryed to save some data containing empty arrays (array('f')) in a shelve. It looks like the shelve has some problems with empty arrays, get allways: TypeError: ("'NoneType' object is not iterable", , ('f', None))- Messages when dealing with the readed back shelve. Seems like I have to avo

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread Paul Boddie
On 2 Apr, 13:05, [EMAIL PROTECTED] wrote: > > There is some possibility that Python 3.1 will have what you ask > for:http://www.python.org/dev/peps/pep-3108/ Prior to that PEP being written/published, I made this proposal: http://wiki.python.org/moin/CodingProjectIdeas/StandardLibrary/Restructur

Re: Any "consumer review generators" available?

2007-04-02 Thread Octo
On 29 Mar, 20:00, Uri Guttman <[EMAIL PROTECTED]> wrote: > > "a" == aralsky <[EMAIL PROTECTED]> writes: > > a> I am looking for a fake consumer review generator that could > a> generate realistic looking reviews for any products, kind of like > a> on amazon.com but generated by Artificia

Re: Any "consumer review generators" available?

2007-04-02 Thread nullified
On 2 Apr 2007 04:48:10 -0700, "Octo" <[EMAIL PROTECTED]> wrote: >On 29 Mar, 20:00, Uri Guttman <[EMAIL PROTECTED]> wrote: >> > "a" == aralsky <[EMAIL PROTECTED]> writes: >> >> a> I am looking for a fake consumer review generator that could >> a> generate realistic looking reviews for any

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* Leo Kislov (1 Apr 2007 14:24:17 -0700) > On Apr 1, 8:47 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > I guess the culprit is this snippet from optparse.py: > > > > # used by test suite > > def _get_encoding(self, file): > > encoding = getattr(file, "encoding", None) > > if not encodin

Re: BUG?: Saving empty array in shelve

2007-04-02 Thread Peter Otten
iwl wrote: > I've tryed to save some data containing empty arrays (array('f')) in a > shelve. > It looks like the shelve has some problems with empty arrays, get > allways: > TypeError: ("'NoneType' object is not iterable", , > ('f', None))- > Messages when dealing with the readed back shelve. > S

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* Jarek Zgoda (Sun, 01 Apr 2007 22:02:15 +0200) > Thorsten Kampe napisa?(a): > > >>> Under Windows I get " File "G:\program files\python\lib\encodings > >>> \cp1252.py", line 12, in encode > >>>return codecs.charmap_encode(input,errors,encoding_table)" > >> I'm not very experienced with intern

Re: Question about text in Python

2007-04-02 Thread Bjoern Schliessmann
Steve wrote: > What I want to add to the program is the abilty to rerun this > process (where the user enteres another line of text) until the > user has had enough and enters a blank line which would then end > the program. Homework? Regards, Björn -- BOFH excuse #106: The electrician didn

Problem with global variables

2007-04-02 Thread Ed Jensen
I'm having a vexing problem with global variables in Python. Please consider the following Python code: #! /usr/bin/env python def tiny(): bar = [] for tmp in foo: bar.append(tmp) foo = bar if __name__ == "__main__": foo = ['hello', 'world'] tiny() When I try to run

Re: Clean "Durty" strings

2007-04-02 Thread rzed
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Ulysse wrote: > >> Hello, >> >> I need to clean the string like this : >> >> string = >> """ >> bonne mentalité mec!:) \nbon >> pour info moi je suis un serial posteur arceleur dictateur ^^* >> \n

Re: SimpleXMLRPCServer - client address

2007-04-02 Thread c james
Jan Danielsson wrote: > Hello all, > >I writing an application based on the SimpleXMLRPCServer class. I > would like to know the IP address of the client performing the RPC. Is > that possible, without having to abandon the SimpleXMLRPCServer class? > I did this a long time ago so it's not li

p2p chat framework

2007-04-02 Thread Ghirai
Hello python-list, Are there any p2p chat/filetransfer frameworks/examples floating around? If not, can someone give me some rough directions towards writing my own? Thanks. -- Best regards, Ghirai. -- http://mail.python.org/mailman/listinfo/python-list

IDLE problem

2007-04-02 Thread Urban, Gabor
Hi, I have a strange problem with the latest 2.4.4 on MS XP. If I rrun a test script in DOS window, it is ok. From the Python shell I got error: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.

Re: Problem with global variables

2007-04-02 Thread hg
Ed Jensen wrote: > #! /usr/bin/env python > > def tiny(): > bar = [] > for tmp in foo: > bar.append(tmp) > foo = bar > > if __name__ == "__main__": > foo = ['hello', 'world'] > tiny() Like this ? #! /usr/bin/env python def tiny():     bar = [] gobal foo     for tmp in foo:         bar.ap

Re: Clean "Durty" strings

2007-04-02 Thread Diez B. Roggisch
> > If the OP is constrained to standard libraries, then it may be a > question of defining what should be done more clearly. The extraneous > spaces can be removed by tokenizing the string and rejoining the > tokens. Replacing portions of a string with equivalents is standard > stuff. It might be

Re: Problem with global variables

2007-04-02 Thread Laurent Pointal
Ed Jensen a écrit : > I'm having a vexing problem with global variables in Python. Please > consider the following Python code: > > #! /usr/bin/env python > > def tiny(): > bar = [] > for tmp in foo: > bar.append(tmp) > foo = bar > > if __name__ == "__main__": > foo = ['

Cascading ifs

2007-04-02 Thread Ernesto García García
Hi experts, How would you do this without the more and more indenting cascade of ifs?: match = my_regex.search(line) if match: doSomething(line) else: match = my_regex2.search(line) if match: doSomething2(line) else: match = my_regex3.search(line) if match: doSom

Re: Cascading ifs

2007-04-02 Thread Wojciech Muła
Ernesto García García wrote: > Hi experts, > > How would you do this without the more and more indenting cascade of ifs?: > > match = my_regex.search(line) > if match: > doSomething(line) > else: > match = my_regex2.search(line) > if match: > doSomething2(line) > else: > match = m

Re: Cascading ifs

2007-04-02 Thread Duncan Booth
Ernesto García García <[EMAIL PROTECTED]> wrote: > Hi experts, > > How would you do this without the more and more indenting cascade of > ifs?: > > match = my_regex.search(line) > if match: >doSomething(line) > else: >match = my_regex2.search(line) >if match: > doSomething2(lin

Re: p2p chat framework

2007-04-02 Thread Miki
Hello Ghirai, > Are there any p2p chat/filetransfer frameworks/examples floating > around? http://divmod.org/projects/shtoom HTH, -- Miki <[EMAIL PROTECTED]> http://pythonwise.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel ping problems python puzzler

2007-04-02 Thread Miki
Hello, >def run(self): > # -w 1 option to ping makes it timeout after 1 second > pingcmd="/bin/ping -c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip Not sure, but "ip" should be "self.ip", this might cause the problem. HTH, -- Miki <[EMAIL PROTECTED]> http://pythonwise.blogspot.com -- h

Re: Sorting a multidimensional array by multiple keys

2007-04-02 Thread Steven Bethard
Thomas Krüger wrote: > Alex Martelli schrieb: >> Thomas Krüger <[EMAIL PROTECTED]> wrote: >>> def sorter(a, b): >>> return cmp(a.id, b.id) >>> >>> obj_lst.sort(sorter) >> A MUCH better way to obtain exactly the same semantics would be: >> >> def getid(a): >> return a.id >> >> obj_list.sort(

Re: Mastering Python (OT)

2007-04-02 Thread Steve Holden
Hendrik van Rooyen wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote: > > >> Hendrik van Rooyen wrote: > >>> It comes out something like "Chum-lee", with the ch like chicken... >>> >>> (that's what I have heard - but who knows - It may have been >>> a regional dialect, a case of the blind lea

Re: YouTube showing repr() of a tuple

2007-04-02 Thread Steve Holden
Leif K-Brooks wrote: > Leif K-Brooks wrote: >> Thought this might amuse some of you: >> >> > > Better example: > > Both fixed by the time I managed to follow the links.

Re: Mastering Python (OT)

2007-04-02 Thread Tim Golden
Steve Holden wrote: > Speaking of which, here's a limerick To read it you need to know not > only that Hampshire is colloquially know as Hants, but also that > Salisbury's ancient Roman name is Sarum. > > There once was a young man of Salisbury > Whose manners were most halisbury-scalisbury > H

Re: Sorting a multidimensional array by multiple keys

2007-04-02 Thread bearophileHUGS
Steven Bethard: > there's almost never a reason to use the cmp= argument to > sort() anymore. It's almost always better to use the key= argument. I always use key now, but maybe cmp uses less memory. There can be few situations where cmp is better still. Bye, bearophile -- http://mail.python.o

Re: socket read timeout

2007-04-02 Thread Steve Holden
Hendrik van Rooyen wrote: > "Steve Holden" <[EMAIL PROTECTED]> > > >> Hendrik van Rooyen wrote: >>> <[EMAIL PROTECTED]> wrote: >>> >>> hg> My issue with that is the effect on write: I only want a timeout on hg> read ... but anyway ... So set a long timeout when you

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread bearophileHUGS
Paul Boddie: > Prior to that PEP being written/published, I made this proposal: > http://wiki.python.org/moin/CodingProjectIdeas/StandardLibrary/Restru... On first sight it looks good. Python 3.0-3.1 is the best and probably only possibility for such improvement (I have said 3.1 too because I thin

Re: Problem with global variables

2007-04-02 Thread Bjoern Schliessmann
Laurent Pointal wrote: > And so the solution to add "global foo" before using it. Didn't you read his final question? | All of a sudden, tiny() can see the global variable "foo". Very | confusing! Why is it that tiny() sometimes can, and sometimes | can't, see the global variable "foo"? I hav

Re: socket read timeout

2007-04-02 Thread Steve Holden
Bryan Olson wrote: > Steve Holden wrote: >> Hendrik van Rooyen wrote: >>> Are sockets full duplex? >>> >> Yes. But you have to use non-blocking calls in your application to use >> them as full-duplex in your code. > > Hmmm... I'm missing something. Suppose I have one thread (or > process) reading

Re: Problem with global variables

2007-04-02 Thread Steve Holden
Bjoern Schliessmann wrote: > Laurent Pointal wrote: > >> And so the solution to add "global foo" before using it. > > Didn't you read his final question? > > | All of a sudden, tiny() can see the global variable "foo". Very > | confusing! Why is it that tiny() sometimes can, and sometimes > |

Re: Problem with global variables

2007-04-02 Thread Roel Schroeven
Bjoern Schliessmann schreef: > Laurent Pointal wrote: > >> And so the solution to add "global foo" before using it. > > Didn't you read his final question? > > | All of a sudden, tiny() can see the global variable "foo". Very > | confusing! Why is it that tiny() sometimes can, and sometimes >

Re: I18n issue with optik

2007-04-02 Thread Jarek Zgoda
Thorsten Kampe napisał(a): > I can't see the "solution" here. Is the optparse "print_help" function > wrong? Why should there even be errors if I use "unicode = True" with > gettext.install? > > I have ISO-8859-15 gettext translations and I want optparse to display > them correctly. What do I

Re: Problem with global variables

2007-04-02 Thread irstas
On Apr 2, 5:29 pm, Bjoern Schliessmann wrote: > Laurent Pointal wrote: > > And so the solution to add "global foo" before using it. > > Didn't you read his final question? > > | All of a sudden, tiny() can see the global variable "foo". Very > | confusing! Why is it that tiny() sometimes can, an

Re: Sorting a multidimensional array by multiple keys

2007-04-02 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > Thomas Krüger wrote: > > Alex Martelli schrieb: > >> Thomas Krüger <[EMAIL PROTECTED]> wrote: > >>> def sorter(a, b): > >>> return cmp(a.id, b.id) > >>> > >>> obj_lst.sort(sorter) > >> A MUCH better way to obtain exactly the same semantics would be:

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600) > Thorsten Kampe wrote: > I'm not very experienced with internationalization, but if you change:: > > gettext.install('test') > > to:: > > gettext.install('test', unicode=True) > > what happens? Actually, this is the solution. But t

Re: Cascading ifs

2007-04-02 Thread irstas
On Apr 2, 4:20 pm, Ernesto García García <[EMAIL PROTECTED]> wrote: > Hi experts, > > How would you do this without the more and more indenting cascade of ifs?: > > match = my_regex.search(line) > if match: >    doSomething(line) > else: >    match = my_regex2.search(line) >    if match: >      doS

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* Jarek Zgoda (Mon, 02 Apr 2007 17:52:34 +0200) > Thorsten Kampe napisa?(a): > > > I can't see the "solution" here. Is the optparse "print_help" function > > wrong? Why should there even be errors if I use "unicode = True" with > > gettext.install? > > > > I have ISO-8859-15 gettext translation

Re: YouTube showing repr() of a tuple

2007-04-02 Thread Paul Boddie
On 2 Apr, 16:19, Steve Holden <[EMAIL PROTECTED]> wrote: > > Both fixed by the time I managed to follow the links. There wasn't much to see, and putting apostrophes into the input didn't seem to cause "proper" repr() behaviour. So I suspect that the Python resemblance was coincidental. Paul --

Antigen Notification: Antigen found a message matching a filter

2007-04-02 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Purged. Message: "Python_list Digest_ Vol 43_ Issue 24" Filter name: "KEYWORD= spam: horrible" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrati

Re: I18n issue with optik

2007-04-02 Thread paul
Thorsten Kampe schrieb: [snipp] > I got the tip to set a different encoding by > sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8') > > but unfortunately this does not change the encoding of any Terminal. > So my question is: how can I set a different encoding to sys.stdout > (or why can I set

Re: wx textctrl font style

2007-04-02 Thread kyosohma
On Mar 31, 3:13 am, Pom <[EMAIL PROTECTED]> wrote: > Hello > > I have a tuple of strings which I must show in a textctrl, each item in > the tuple representing one line of text. > > The first three lines of text should each have another style (fontsize > and color) > > i'm using this code to achiev

Re: frame of Qt program

2007-04-02 Thread Damjan
> Look at the network examples included with PyQt4. Particularly > fortuneclient.py and fortuneserver.py. > > PyQt4 has its own network classes that are fully integrated with the event > loop making it easy to write GUI/network applications. As threads also > have an event loop its also easy to pu

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* paul (Mon, 02 Apr 2007 17:49:15 +0200) > Thorsten Kampe schrieb: > [snipp] > > I got the tip to set a different encoding by > > sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8') > > > > but unfortunately this does not change the encoding of any Terminal. > > So my question is: how can I set

Re: Parallel ping problems python puzzler

2007-04-02 Thread amaccormack
On 2 Apr, 15:03, "Miki" <[EMAIL PROTECTED]> wrote: > Hello, > > >def run(self): > > # -w 1 option topingmakes ittimeoutafter 1 second > > pingcmd="/bin/ping-c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip > > Not sure, but "ip" should be "self.ip", this might cause theproblem. Sorry, that w

Re: Clean "Durty" strings

2007-04-02 Thread irstas
On Apr 2, 4:05 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > If the OP is constrained to standard libraries, then it may be a > > question of defining what should be done more clearly. The extraneous > > spaces can be removed by tokenizing the string and rejoining the > > tokens. Replacing

RSS feed parser

2007-04-02 Thread Florian Lindner
Hello, I'm looking for python RSS feed parser library. Feedparser http://feedparser.org/ does not seem to maintained anymore. What alternatives are recommendable? Thanks, Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: I18n issue with optik

2007-04-02 Thread Damjan
> Actually rxvt, Poderosa and console have the ability to display non- > ASCII characters. I use the dejavu fonts that support non-ASCII, too. > > But the problem is even simpler: I can't even set the standard Windows > console ("cmd") to Windows 1252 in Python. Although directly executing > "chc

Re: RSS feed parser

2007-04-02 Thread irstas
On Apr 2, 7:22 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > I'm looking for python RSS feed parser library. > Feedparserhttp://feedparser.org/does not seem to maintained anymore. > > What alternatives are recommendable? > > Thanks, > > Florian Well, even if it's not maintained anymor

Re: can a method access/set another's variables?

2007-04-02 Thread wswilson
On Apr 2, 1:04 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > asdf1234234 <[EMAIL PROTECTED]> wrote: > > My code is: > > -a.py- > > import b > > > class A: > > def __init__(self): > > pass > > Incidentally, these last two lines are totally, utterly useless. Do NOT > define special m

Re: can a method access/set another's variables?

2007-04-02 Thread wswilson
On Apr 2, 11:01 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 1 Apr 2007 18:36:04 -0700, "asdf1234234" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > My code is: > > -a.py- > > import b > > > class A: > > def __init__(self): > > pass > > Dele

Re: Is any way to split zip archive to sections?

2007-04-02 Thread Larry Bates
Tim Williams wrote: > On 30/03/07, Durumdara <[EMAIL PROTECTED]> wrote: >> Hi! >> >> I want to create some backup archives with python (I want to write a >> backup >> application in Python). >> Some package managers (7z, arj, winzip) can create splitted archives (1 >> mega, 650, 700 mega, etc). >>

Re: Python Based API

2007-04-02 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I work on a project that is built entirely using python and Tkinter. > We are at the point where we would like to give access to our > functionality to others via some sort of API. People who would use > our API develop in all kinds of languages from C/C++ to Pa

Need SW Quality Engineers (with Digital Imaging / ePublishing exp.) in Silicon Valley, CA

2007-04-02 Thread Global Infotech Corporation
Hi We have the following two positions open at one of our Client's site in the Silicon Valley, CA area. Our client, apart from being a pioneer in desktop publishing software provider, also makes web publishing products. We are looking for two individuals with thorough understanding of the Qual

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* Damjan (Mon, 02 Apr 2007 18:29:06 +0200) > > Actually rxvt, Poderosa and console have the ability to display non- > > ASCII characters. I use the dejavu fonts that support non-ASCII, too. > > > > But the problem is even simpler: I can't even set the standard Windows > > console ("cmd") to Window

Re: Parallel ping problems python puzzler

2007-04-02 Thread Matimus
I wouldn't use threads for system calls. Checkout the subprocess module instead. You can run multiple pipes at the same time (subprocess.Popen). The python documentation for subprocess is pretty good. There are a few examples. Actually, you don't even _need_ the subprocess module, you can use os.po

Re: Clean "Durty" strings

2007-04-02 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, irstas wrote: > I'd like to see how this transformation can be done with > BeautifulSoup. Well, the last two regexps can be replaced with this: > > unicode(BeautifulStoneSoup(s,convertEntities=BeautifulStoneSoup.HTML_ENTITIES).contents[0]) Completely without regular expre

Re: Pygame Q (linux) beginner

2007-04-02 Thread hlubenow
enquiring mind wrote: > Thank you very much. A buddy installed SUSE 10 in Dec. for me so I > shall ask him to look for rpm which I understand from your post includes > pygame. You have no idea how much I appreciate your information. My pleasure. By the way: It would be quite easy to install i

Re: wx textctrl font style

2007-04-02 Thread Pom
[EMAIL PROTECTED] wrote: > On Mar 31, 3:13 am, Pom <[EMAIL PROTECTED]> wrote: >> Hello >> >> I have a tuple of strings which I must show in a textctrl, each item in >> the tuple representing one line of text. >> >> The first three lines of text should each have another style (fontsize >> and color)

Re: YouTube showing repr() of a tuple

2007-04-02 Thread Leif K-Brooks
Paul Boddie wrote: > On 2 Apr, 16:19, Steve Holden <[EMAIL PROTECTED]> wrote: >> Both fixed by the time I managed to follow the links. > > There wasn't much to see, and putting apostrophes into the input > didn't seem to cause "proper" repr() behaviour. So I suspect that the > Python resemblance w

Re: I18n issue with optik

2007-04-02 Thread Thorsten Kampe
* Thorsten Kampe (Mon, 2 Apr 2007 16:05:25 +0100) > * Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600) > > Thorsten Kampe wrote: > > I'm not very experienced with internationalization, but if you change:: > > > > gettext.install('test') > > > > to:: > > > > gettext.install('test', unic

Re: Launch script on Linux using Putty

2007-04-02 Thread ihccab
On Apr 2, 1:51 pm, "Ulysse" <[EMAIL PROTECTED]> wrote: > On Apr 2, 12:56 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > > > > > Ulysse wrote: > > > Hello, > > > > I have a python script which runs all the time (using of library > > > threading). I would like this scipt to run on a remote linux Os

Re: Problem with global variables

2007-04-02 Thread Ed Jensen
Ed Jensen <[EMAIL PROTECTED]> wrote: > I'm having a vexing problem with global variables in Python. Thanks to everyone who replied. The peculiar way Python handles global variables in functions now makes sense to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Launch script on Linux using Putty

2007-04-02 Thread ihccab
On Apr 2, 2:07 pm, "ihccab" <[EMAIL PROTECTED]> wrote: > On Apr 2, 1:51 pm, "Ulysse" <[EMAIL PROTECTED]> wrote: > > > > > On Apr 2, 12:56 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > > > > Ulysse wrote: > > > > Hello, > > > > > I have a python script which runs all the time (using of library >

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-02 Thread Kay Schluehr
On Apr 2, 1:27 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 2 Apr, 13:05, [EMAIL PROTECTED] wrote: > > > > > There is some possibility that Python 3.1 will have what you ask > > for:http://www.python.org/dev/peps/pep-3108/ > > Prior to that PEP being written/published, I made this proposal: >

Re: Launch script on Linux using Putty

2007-04-02 Thread Michael Hoffman
[Michael Hoffman] >> 1. The easiest is to run nohup on your script in the background: >> >> $ nohup myscript.py > output.txt 2> error.txt & >> >> Then you can disconnect but your script will keep running. Try man nohup >> for more information. >> >> 2. Use GNU screen on your remote terminal, and

Re: zip files as nested modules?

2007-04-02 Thread tsuraan
and b.py has some method (let's call it d) within it. I can, from python, do: That should be c.py, of course. Is this message getting no replies because it's confusing, it's poorly worded, it's a dumb question, or is it just that nobody knows the answer? I'm stuck on this, so any suggestions

Re: Error when trying to pass list into function.

2007-04-02 Thread Bruno Desthuilliers
erikcw a écrit : > Hi, > > I'm getting the following error when I try to pass a list into a > function. > > My List: crea =[(u'218124172', u'536', u'32394'), (u'218320282', > u'1323', u'77931')] > > Traceback (most recent call last): > File "wa.py", line 118, in ? > curHandler.walkData() >

Re: Error when trying to pass list into function.

2007-04-02 Thread kyosohma
On Apr 2, 1:43 pm, "erikcw" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm getting the following error when I try to pass a list into a > function. > > My List: crea =[(u'218124172', u'536', u'32394'), (u'218320282', > u'1323', u'77931')] > > Traceback (most recent call last): > File "wa.py", line 118,

Re: Error when trying to pass list into function.

2007-04-02 Thread Stargaming
erikcw schrieb: > Hi, > > I'm getting the following error when I try to pass a list into a > function. > > My List: crea =[(u'218124172', u'536', u'32394'), (u'218320282', > u'1323', u'77931')] > > Traceback (most recent call last): > File "wa.py", line 118, in ? > curHandler.walkData() >

Re: Launch script on Linux using Putty

2007-04-02 Thread Michael Hoffman
[Michael Hoffman] >> If you are running bash, you can do this: [Grant Edwards] > He's not running bash. He's running busybox's shell. There's a nohup applet for busybox. > [He'd be far better off asking his question in an OpenWRT or > Busybox forum, since it's got absolutely nothing to do with

Re: Launch script on Linux using Putty

2007-04-02 Thread Grant Edwards
On 2007-04-02, Michael Hoffman <[EMAIL PROTECTED]> wrote: >>> 1. The easiest is to run nohup on your script in the background: >>> >>> $ nohup myscript.py > output.txt 2> error.txt & >>> >>> Then you can disconnect but your script will keep running. Try man nohup >>> for more information. >>> >>

Re: How can i compare a string which is non null and empty

2007-04-02 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi, > > how can i compare a string which is non null and empty? Compare with what ?-) > > i look thru the string methods here, but cant find one which does it? > > http://docs.python.org/lib/string-methods.html#string-methods > > In java,I do this: > if (str != n

Re: Launch script on Linux using Putty

2007-04-02 Thread Ulysse
On Apr 2, 12:56 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Ulysse wrote: > > Hello, > > > I have a python script which runs all the time (using of library > > threading). I would like this scipt to run on a remote linux Os using > > Putty. The problem is, when I close Putty command line windo

Error when trying to pass list into function.

2007-04-02 Thread erikcw
Hi, I'm getting the following error when I try to pass a list into a function. My List: crea =[(u'218124172', u'536', u'32394'), (u'218320282', u'1323', u'77931')] Traceback (most recent call last): File "wa.py", line 118, in ? curHandler.walkData() File "wa.py", line 49, in walkData

Re: Clean "Durty" strings

2007-04-02 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > But it could be that he just wants all HTML tags to disappear, like in > his example. A code like this might be sufficient then: re.sub(r'<[^>] > +>', '', s). Won't work for, say, this: -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Math with unicode strings?

2007-04-02 Thread erikcw
Hi, I'm parsing xml data with xml.sax and I need to perform some arithmetic on some of the xml attributes. The problem is they are all being "extracted" as unicode strings, so whenever I try to perform math operations on the variables, I get this error: cr[0] = data['cls1']/data['ims1']; TypeErr

Re: Math with unicode strings?

2007-04-02 Thread irstas
On Apr 2, 10:09 pm, "erikcw" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm parsing xml data with xml.sax and I need to perform some > arithmetic on some of the xml attributes. The problem is they are all > being "extracted" as unicode strings, so whenever I try to perform > math operations on the varia

Re: Launch script on Linux using Putty

2007-04-02 Thread Ulysse
On Apr 2, 8:54 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote: > [Michael Hoffman] > > >> If you are running bash, you can do this: > > [Grant Edwards] > > > He's not running bash. He's running busybox's shell. > > There's a nohup applet for busybox. > > > [He'd be far better off asking his questio

Re: Clean "Durty" strings

2007-04-02 Thread irstas
On Apr 2, 10:08 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > But it could be that he just wants all HTML tags to disappear, like in > > his example. A code like this might be sufficient then: re.sub(r'<[^>] > > +>', '', s). > > Won't work for, say, this: > > > -- >

Re: RSS feed parser

2007-04-02 Thread Florian Lindner
[EMAIL PROTECTED] wrote: > On Apr 2, 7:22 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: >> Hello, >> I'm looking for python RSS feed parser library. >> Feedparserhttp://feedparser.org/does not seem to maintained anymore. >> >> What alternatives are recommendable? >> >> Thanks, >> >> Florian > >

  1   2   >