Re: python on mac os 10.4.x

2007-04-02 Thread Stephen Hansen
Check out: http://www.pythonmac.org/packages/ for the latest version of Python, which will run the latest version of wxPython fine. (I'm using wxPython 2.8 on Python 2.4) On 2 Apr 2007 22:00:55 -0700, 7stud <[EMAIL PROTECTED]> wrote: Hi, Python 2.3.5 comes pre-installed on mac os 10.4.7, and

pyc file [Newbie Question]

2007-04-02 Thread Jim Aikin
Just starting to learn Python and going through the Tutorial in the Help file. FWIW, I'm a hobbyist programmer -- not extremely knowledgeable, but not entirely clueless. In 6.1.2 of the Tutorial, I find this: "The modification time of the version of spam.py used to create spam.pyc is recorded i

Re: exit to interpreter?

2007-04-02 Thread belinda thom
On Mar 24, 2007, at 4:30 AM, Dennis Lee Bieber wrote: > On Fri, 23 Mar 2007 10:52:09 -0700, belinda thom <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Hi, >> >> I'm writing a function that polls the user for keyboard input, >> looping until it has determined that the use

Re: Testing functions via command line

2007-04-02 Thread Steven D'Aprano
On Mon, 02 Apr 2007 22:32:26 -0700, pelon wrote: > There must be a couple of lines that will replace the following: Yes, because otherwise the terrorists will have won. *wink* > From the shell command line I wanted to send data to a specific > function inside my module and execute that functio

Testing functions via command line

2007-04-02 Thread pelon
There must be a couple of lines that will replace the following: >From the shell command line I wanted to send data to a specific function inside my module and execute that function in order to test it separately from the rest of the module. I know pdb will allow me to insert data into a running p

Numeric compiling problem under QNX 4.25

2007-04-02 Thread ZMY
Dear all, I am a real newbie for both python and QNX, but I am still trying to compile Numeric-24.2 under QNX4.25 with python 2.2. I got following error message: $ sudo python setup.py install Password: running install ... building '_numpy' extension skipping Src/_numpymodule.c (build/temp.qnx-O

Re: getattr/setattr q.

2007-04-02 Thread Steven D'Aprano
On Tue, 03 Apr 2007 05:08:42 +0100, Paulo da Silva wrote: > Hi! > > In a class C, I may do setattr(C,'x',10). > > Is it possible to use getattr/setattr for variables not inside > classes or something equivalent? I mean with the same result as > exec("x=10"). Yes, but you shouldn't unless you re

Re: getattr/setattr q.

2007-04-02 Thread 7stud
On Apr 2, 10:08 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote: > Is it possible to use getattr/setattr for variables not inside > classes...? What does the python documentation say about the definition of setattr()? -- http://mail.python.org/mailman/listinfo/python-list

Re: getattr/setattr q.

2007-04-02 Thread Ben Finney
Paulo da Silva <[EMAIL PROTECTED]> writes: > In a class C, I may do setattr(C,'x',10). That would set an attribute on the class C, shared by all instances of that class. If you want to set an attribute on an instance, you need to do so on the instance object:: >>> class Foo(object): ...

python on mac os 10.4.x

2007-04-02 Thread 7stud
Hi, Python 2.3.5 comes pre-installed on mac os 10.4.7, and I've looked around in /System/Library/Frameworks/Python.framework/ and under .../ Versions/2.3/bin/, there is an exec file named 'idle'. I assume that is the Python IDLE I've read about, but I can't figure out what I need to do to use IDL

Re: getattr/setattr q.

2007-04-02 Thread Steven Bethard
Paulo da Silva wrote: > In a class C, I may do setattr(C,'x',10). > > Is it possible to use getattr/setattr for variables not inside > classes or something equivalent? I mean with the same result as > exec("x=10"). If you're at the module level, you can do:: globals()['x'] = 10 If you're i

python installation destination directory

2007-04-02 Thread ZMY
Hi all, I am installing python 2.2 on QNX4.25 but can't get it into /usr/local/ bin/ directory. Here is what I did: 1) untar Python-2.2 into directory /openqnx/Python-2.2/ 2) use command: CONFIG_SHELL=/usr/local/bin/bash CC=cc RANLIB=: ./configure --verbose --without-gcc --with-libm=""

getattr/setattr q.

2007-04-02 Thread Paulo da Silva
Hi! In a class C, I may do setattr(C,'x',10). Is it possible to use getattr/setattr for variables not inside classes or something equivalent? I mean with the same result as exec("x=10"). Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Tkinter <> and bindtags ordering

2007-04-02 Thread bytecolor
I'm trying to extract the text of the current line on the <> event. It doesnt work if I delete a character. If I type 'abc' I get 'abc' in text_changed(). If I hit backspace I still get 'abc'. Backspace once more, I get 'ab'. So the callback is called before the text is changed. But only on a delet

Re: Generic logic/conditional class or library for classification of data

2007-04-02 Thread Basilisk96
Thanks for the help, guys. Dictionaries to the rescue! Steven, it's certainly true that runtime creation of attributes does not fit well here. At some point, an application needs to come out of generics and deal with logic that is specific to the problem. The example I gave was classification of b

Re: *** TV report: all 15 British sailors confess to illegally entering Iranian Waters ***

2007-04-02 Thread equation
Oh pleez, this is a tex / latex group ... do you want any equation typeset ? I know 911 was a big scam but you should found your own newsgroup. Everyone here is familiar with your message. now leave us alone to work on latex / tex. regards equation On Apr 2, 8:28 am, [EMAIL PROTECTED] wrote: > TV

Re: Question about text in Python

2007-04-02 Thread Ben Finney
"Steve" <[EMAIL PROTECTED]> writes: > Yes it is [a homework question]. > > Where else to ask for help but here. That's between you, your teacher, and your teaching institute's plagiarism guidelines. -- \ "I got a postcard from my best friend, it was a satellite | `\ picture of

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 13:48:30 -0700, Steven Howe wrote: > how about just testing it's length? > >>> from types import StringType > > def stringTest(x): > ... if type(x) == StringType: > ... if len(x) == 0: > ... print 'Empty String' > ... else: > ..

Re: Question about text in Python

2007-04-02 Thread Steve
Yes it is. Where else to ask for help but here. Thanks for your help everyone. I figured it out. "Bjoern Schliessmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Steve wrote: > >> What I want to add to the program is the abilty to rerun this >> process (where the user entere

Re: reverse engineering Excel spreadsheet

2007-04-02 Thread Bart Willems
John Machin wrote: > I'm a bit puzzled by your notion of creating a dependency graph > *without* first extracting the "relationships (functions)" [which you > could do only by parsing the formulas and macros]. Not really. The range object in the Excel object model has a Dependents attribute, al

Re: Any "consumer review generators" available?

2007-04-02 Thread DJ Stunks
On Mar 30, 1:46 am, nullified <[EMAIL PROTECTED]> wrote: > On 29 Mar 2007 20:34:26 -0700, "Evil Otto" <[EMAIL PROTECTED]> wrote: > > >On Mar 29, 2:19 pm, [EMAIL PROTECTED] wrote: > >> I am looking for a fake consumer review generator that could generate > >> realistic looking reviews for any produ

Re: Finding a module's sub modules at runtime

2007-04-02 Thread Robert Kern
Joshua J. Kugler wrote: > On Thursday 29 March 2007 17:58, Alex Martelli wrote: >> Sure, pydoc (which help calls under the code) does that, with a nice mix >> of inspect, os, and pkgutil.iter_modules calls. pkgutil.iter_modules >> may in fact be most of what you need: >> > help(pkgutil.iter_mo

Re: Finding a module's sub modules at runtime

2007-04-02 Thread Joshua J. Kugler
On Thursday 29 March 2007 17:58, Alex Martelli wrote: > Sure, pydoc (which help calls under the code) does that, with a nice mix > of inspect, os, and pkgutil.iter_modules calls. pkgutil.iter_modules > may in fact be most of what you need: > help(pkgutil.iter_modules) > Help on function iter

Re: Submit patches for documentation

2007-04-02 Thread Terry Reedy
"Kevin Walzer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | What's the best way to submit patches for Python documentation at the | SourceForge patch tracker if you are not writing LaTeX? I would like to | submit some simple text updates. However, if I do this, I'm not clear | wh

Re: Clean "Durty" strings

2007-04-02 Thread rzed
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: >> >> 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. R

Re: Submit patches for documentation

2007-04-02 Thread Steve Holden
Kevin Walzer wrote: > What's the best way to submit patches for Python documentation at the > SourceForge patch tracker if you are not writing LaTeX? I would like to > submit some simple text updates. However, if I do this, I'm not clear > what files I should run a diff against. > > Or is simpl

Submit patches for documentation

2007-04-02 Thread Kevin Walzer
What's the best way to submit patches for Python documentation at the SourceForge patch tracker if you are not writing LaTeX? I would like to submit some simple text updates. However, if I do this, I'm not clear what files I should run a diff against. Or is simply submitting the updates as a te

Re: doing standart window icons unvisible in python

2007-04-02 Thread Larry Bates
gslm wrote: > Hi! > I want to do close-minimize icons unvisible in python.How can I do > this?I want to do this especially for printing. > And is it possible to provide .exe file for any program in python or > only we can change the file as .pyw? > I don't understand what you mean by close-minimiz

doing standart window icons unvisible in python

2007-04-02 Thread gslm
Hi! I want to do close-minimize icons unvisible in python.How can I do this?I want to do this especially for printing. And is it possible to provide .exe file for any program in python or only we can change the file as .pyw? -- http://mail.python.org/mailman/listinfo/python-list

print the screen shot in python

2007-04-02 Thread gslm
Hi! I want to print an application view in python.I use labels and frames in my program.And ı want to know if it is possible to print all of the view of my program? Thanks a lot... -- http://mail.python.org/mailman/listinfo/python-list

Buy, sell and rent Singapore real estate: private property,

2007-04-02 Thread Spytips
Buy, sell and rent Singapore real estate: private property, residential apartments, commercial and industrial properties. HDB flats for sale and rental. Foreign investors, buyers, tenants or relocating expats can easily find their ideal landed house, bungalow, semi-d, terrace, condominium, townhous

Re: Extract information from HTML table

2007-04-02 Thread Ulysse
On Apr 2, 9:28 pm, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>, > > > > anjesh <[EMAIL PROTECTED]> wrote: > >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 Beaut

Re: curses module

2007-04-02 Thread Martin v. Löwis
Kenneth McDonald schrieb: > I know that the curses module has a long-standing bug wherein cursor > visibility can't be set. > > This isn't criticism, I just know that the curses module is the sort of > thing that probably isn't being maintained consistently, and I for one, > have no idea how well

Re: Problem with global variables

2007-04-02 Thread Bjoern Schliessmann
Laurent Pointal wrote: > Yes, and i replies: "which contains a foo assignment. As foo is > not defined "global", it is considered to be local. " > > Maybe my explanation was not clear enough with variable foo to be > considered local because there is an *assignment* to foo. Yep, thanks for the

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

2007-04-02 Thread Steven Howe
how about just testing it's length? >>> from types import StringType def stringTest(x): ... if type(x) == StringType: ... if len(x) == 0: ... print 'Empty String' ... else: ... print 'Not Empty String' ... else: ...

Python-URL! - weekly Python news and links (Apr 2)

2007-04-02 Thread Cameron Laird
QOTW: "This whole charset mess is not meant to be solved by mere mortals." - Thorsten Kampe, a day or so before solving his symptom with a codecs method: http://groups.google.com/group/comp.lang.python/msg/a2e573ccc54f66db http://groups.google.com/group/comp.lang.python/msg/a2e573ccc54f66

Re: Extract information from HTML table

2007-04-02 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, anjesh <[EMAIL PROTECTED]> wrote: >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 se

curses module

2007-04-02 Thread Kenneth McDonald
I know that the curses module has a long-standing bug wherein cursor visibility can't be set. I'm looking at using the module for certain uses, and this isn't a problems (as long as I hide the cursor offscreen) as I would control visuals to provide a simulated cursor anyway. I'm wondering, thou

Re: How do you escape % when formatting a string?

2007-04-02 Thread Bill Scherer
erikcw wrote: > Hi, > > I'm trying to format a string like so: > > string = "You have a 75% chance of success with %s, don't use %s" %(a, > b) > > This gives me: > TypeError: not enough arguments for format string > > I've tried 75\%, but that doesn't seem to help. What am I missing? > > Thanks! >

Re: Problem with global variables

2007-04-02 Thread Laurent Pointal
Bjoern Schliessmann wrote: > Laurent Pointal wrote: > >> And so the solution to add "global foo" before using it. > > Didn't you read his final question? Yes, and i replies: "which contains a foo assignment. As foo is not defined "global", it is considered to be local. " Maybe my explanation w

Re: How do you escape % when formatting a string?

2007-04-02 Thread Terry Reedy
"erikcw" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi, | | I'm trying to format a string like so: | | string = "You have a 75% chance of success with %s, don't use %s" %(a, | b) | | This gives me: | TypeError: not enough arguments for format string | | I've tried 75\%, but tha

Re: How do you escape % when formatting a string?

2007-04-02 Thread irstas
On Apr 2, 10:52 pm, [EMAIL PROTECTED] wrote: > On Apr 2, 10:50 pm, "erikcw" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I'm trying to format a string like so: > > > string = "You have a 75% chance of success with %s, don't use %s" %(a, > > b) > > > This gives me: > > TypeError: not enough arguments

Re: How do you escape % when formatting a string?

2007-04-02 Thread irstas
On Apr 2, 10:50 pm, "erikcw" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to format a string like so: > > string = "You have a 75% chance of success with %s, don't use %s" %(a, > b) > > This gives me: > TypeError: not enough arguments for format string > > I've tried 75\%, but that doesn't seem

Re: RSS feed parser

2007-04-02 Thread irstas
On Apr 2, 10:20 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: > Some of the question I have but found answered nowhere: > > I have a feedparser object that was created from a string. How can I trigger > a update (from a new string) but the feedparser should treat the new string > like the same fee

How do you escape % when formatting a string?

2007-04-02 Thread erikcw
Hi, I'm trying to format a string like so: string = "You have a 75% chance of success with %s, don't use %s" %(a, b) This gives me: TypeError: not enough arguments for format string I've tried 75\%, but that doesn't seem to help. What am I missing? Thanks! Erik -- http://mail.python.org/mai

DBAPI Loss DB Connection

2007-04-02 Thread Greg Copeland
According to the SQLAlchemy list, the DBAPI specification does not define a standard error reporting mechanism which would allow for generic detection of loss of database connection without DB specific exception handling. For me, this is a requisite for robust error handling. Not to mention, 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 > >

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: 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: 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

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: 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

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: 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

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 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: 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: 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: 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 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: 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: 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: 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 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: 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, 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: 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

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: 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

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: 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: 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: 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: 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

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: 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 --

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: 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
* 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: 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: 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: 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 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: 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: 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 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: 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

  1   2   >