Re: Get bound method by name

2009-03-03 Thread Steve Holden
Graham Breed wrote: > Johannes Bauer wrote: >> Hello group, >> >> I'm looking for a Python function but have forgotten it's name. >> Essentially what I want is: >> >> class Foo(): >> def bar(self): >> pass >> >> x = Foo() >> y = x.MAGIC("bar") >> print(y) >> > >> >> So the question is:

Re: Characters aren't displayed correctly

2009-03-03 Thread Steve Holden
Philip Semanchuk wrote: > > On Mar 2, 2009, at 5:26 PM, John Machin wrote: [...] > I (mostly) agree with your rule. But as I said, there's more than one > way to solve this problem. Or perhaps I should say that there's more > than one way to lead the OP to a solution to this problem. We teach > di

Re: Pickle Problem

2009-03-03 Thread Gabriel Genellina
En Tue, 03 Mar 2009 16:50:25 -0200, Fab86 escribió: On Mar 3, 6:48 pm, "Gabriel Genellina" wrote: En Tue, 03 Mar 2009 16:39:43 -0200, Fab86 escribió: > I am having a bit on an issue getting my program to work. The online > database which I am trying to contact keep timing out meaning I can

Re: Get bound method by name

2009-03-03 Thread Chris Rebert
On Tue, Mar 3, 2009 at 12:54 PM, Steve Holden wrote: > Graham Breed wrote: >> Johannes Bauer wrote: >>> Hello group, >>> >>> I'm looking for a Python function but have forgotten it's name. >>> Essentially what I want is: >>> >>> class Foo(): >>>     def bar(self): >>>         pass >>> >>> x = Foo(

Re: removing duplication from a huge list.

2009-03-03 Thread Adam Olsen
On Feb 27, 9:55 am, Falcolas wrote: > If order did matter, and the list itself couldn't be stored in memory, > I would personally do some sort of hash of each item (or something as > simple as first 5 bytes, last 5 bytes and length), keeping a reference > to which item the hash belongs, sort and i

"run" Package Query

2009-03-03 Thread Rohan Hole
When I write program (.py) with IDLE , I am able to use run package . - - - - start - - - - if __name__ == '__main__': import sys,os import run run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) - - - - end - - - - - above code works simply with the IDLE. But problem

Re: Perl-python regex-performance comparison

2009-03-03 Thread MRAB
Chris Rebert wrote: On Tue, Mar 3, 2009 at 9:05 AM, Ivan wrote: Hello everyone, I know this is not a direct python question, forgive me for that, but maybe some of you will still be able to help me. I've been told that for my application it would be best to learn a scripting language, so I loo

Re: Perl-python regex-performance comparison

2009-03-03 Thread Steve Holden
Ivan wrote: > Hello everyone, > > I know this is not a direct python question, forgive me for that, but > maybe some of you will still be able to help me. I've been told that > for my application it would be best to learn a scripting language, so > I looked around and found perl and python to be t

Re: siple for in expression

2009-03-03 Thread Mark Wooding
"Matko" writes: > Can someone help me to understand the following code: > > uv_face_mapping = [[0,0,0,0] for f in faces] It constructs a fresh list, with the same number of elements as are in the iterable object referred to by `faces', and where each element is a distinct list of four zero-value

Re: Perl-python regex-performance comparison

2009-03-03 Thread Vlastimil Brom
2009/3/3 MRAB wrote: >> > Python 2.7's regex will include possessive quantifiers, atomic groups, > variable-length lookbehinds, and Unicode properties (at least the common > ones), amongst other things. > -- > http://mail.python.org/mailman/listinfo/python-list > Wow, that's excellent news! Many

Re: Indentifying types?

2009-03-03 Thread Terry Reedy
Oltmans wrote: I'm reading from a file that contains text like 5 google_company apple_fruit pencil_object 4 test_one tst_two When I read the integer 5 I want to make sure it's an integer. Likewise, for strings, I want to make sure if something is indeed a string. So how do I check typ

Re: Python Launcher.app on OS X

2009-03-03 Thread kp8
Looks like the instructions found on http://wiki.python.org/moin/MacPython/Leopard have been updated. Who ever did that: Thanks! -kevin -- http://mail.python.org/mailman/listinfo/python-list

Re: Perl / python regex / performance comparison

2009-03-03 Thread Terry Reedy
Ivan wrote: Hello everyone, I know this is not a direct python question, forgive me for that, but maybe some of you will still be able to help me. I've been told that for my application it would be best to learn a scripting language, so I looked around and found perl and python to be the nice. T

Re: best way to parse a function-call-like string?

2009-03-03 Thread mh
Paul McGuire wrote: > Pyparsing will easily carve up these function declarations, and will I didn't know about this module, it looks like what I was looking for... Thanks!!! -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list

Re: Opening for Python Programmer at Newport Beach

2009-03-03 Thread Mike Driscoll
On Mar 3, 2:17 pm, Cool Dude wrote: > Hello , > This is Aniket from Techclique, a New Jersey based software > development and IT consulting firm providing top quality technical and > software professionals on a permanent and contractual basis to > Government and commercial customer including fortu

Re: Python 2.6.1 urllib error on Mac os x PPC

2009-03-03 Thread Ned Deily
In article <1236111699.4546.4.ca...@localhost>, ati wrote: > I recompiled Python-2.6.1 with MACOSX_DEPLOYMENT_TARGET=10.3, but no > change.. > I updated developertools to xcode312_2621, no change.. > > Btw.. Python-2.5.4 compiled from scratch works fine. > > I forgot to mention the ppc computer

Re: Perl-python regex-performance comparison

2009-03-03 Thread python
>> Python 2.7's regex will include possessive quantifiers, atomic groups, >> variable-length lookbehinds, and Unicode properties (at least the common >> ones), amongst other things. > Wow, that's excellent news! > Many thanks for all your efforts to enhance the re capabilities in > Python! +1 !!

geospatial python and how to convert multilinestrings to kml

2009-03-03 Thread Danny Shevitz
Howdy, I need to do some geospatial work and am a complete newbie at this. I have access to a PostGIS database and there are lots of MultiLineString objects. I want to run a python algorithm that determines a group of these MultiLineString objects and creates a KML file of the results. Is there

pexpect on solaris 10

2009-03-03 Thread Chris Pella
Has anybody had success getting pexpect to work well on solaris 10 (x86)? I am trying to do some test automation which involves controlling some other processes. Soon after I spawn the process I am trying to control a message comes up on stdout telling me that a tty has been closed. If there is som

Re: Opening for Python Programmer at Newport Beach

2009-03-03 Thread Diez B. Roggisch
Is your email program broken or what? Why are you sending the same exact message 5 times!? Not to mention that the name "Cool Dude" isn't exactly convincing me that I should apply for a job there... Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Shared library Python on Mac OS X 64-bit

2009-03-03 Thread Graham Dumpleton
On Mar 4, 2:29 am, Uberman wrote: > Graham Dumpleton wrote: > > Why don't you want to use MacOS X Framework libraries? It is the > > better installation method. > > Because I'm not installing Python, I'm building it.  If I were just interested > in installing Python, I wouldn't care whether it was

Re: RichCompare and RichCompareBool

2009-03-03 Thread Aaron Brady
On Mar 3, 6:01 am, "Gabriel Genellina" wrote: > En Tue, 03 Mar 2009 04:42:02 -0200, Aaron Brady   > escribió: > > > Also, did not receive Gabriel's post. > > That's because I replied a month ago - and probably you had no idea what I   > was talking about by that time. > > (Sorry, I inadvertedly s

Re: geospatial python and how to convert multilinestrings to kml

2009-03-03 Thread Terry Reedy
Danny Shevitz wrote: Howdy, I need to do some geospatial work and am a complete newbie at this. I have access to a PostGIS database and there are lots of MultiLineString objects. I want to run a python algorithm that determines a group of these MultiLineString objects and creates a KML file of

Re: Pickle Problem

2009-03-03 Thread Fab86
On Mar 3, 8:59 pm, "Gabriel Genellina" wrote: > En Tue, 03 Mar 2009 16:50:25 -0200, Fab86 escribió: > > > > > On Mar 3, 6:48 pm, "Gabriel Genellina" wrote: > >> En Tue, 03 Mar 2009 16:39:43 -0200, Fab86   > >> escribió: > > >> > I am having a bit on an issue getting my program to work. The onli

Re: qt, gtk, wx for py3 ?

2009-03-03 Thread Peter Billam
>> Peter Billam wrote: >> > I've been trying (newbie warning still on) tkinter with python3.0, >> > and I'm getting to that stage where I'm beginning to think there >> > must be a better a way to do this...  But I'm unsure if the >> > big names Qt, Gtk and Wx are available for Py3 yet - e.g. >> >ht

Re: Multiple conditional expression

2009-03-03 Thread Mel
bearophileh...@lycos.com wrote: > Chris Rebert: >> That seems to just be an overly complicated way of writing: >> spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1) > Better: > spaces = bool(('spaces' in form) and form.getvalue('spaces') == 1) Is it still necessary to convert

Re: Pickle Problem

2009-03-03 Thread Tim Wintle
On Tue, 2009-03-03 at 15:33 -0800, Fab86 wrote: > I have been trying except SearchError: however I get the error: > > Traceback (most recent call last): > File "C:\Downloads\MoS\yws-2.12\Python\pYsearch-3.1\timeDelay.py", > line 19, in > except SearchError: > NameError: name 'SearchError' i

Re: Python AppStore / Marketplace

2009-03-03 Thread Steve Holden
Marcel Luethi wrote: > Hi Steve > [I've probably replied to this once already, but here's another try] > I really appreciate your feedback! > Certainly I'm no expert "for the many differences in package formats and > install requirements between the different platforms". > > But let me explain a

Re: Pickle Problem

2009-03-03 Thread MRAB
Fab86 wrote: On Mar 3, 8:59 pm, "Gabriel Genellina" wrote: En Tue, 03 Mar 2009 16:50:25 -0200, Fab86 escribió: On Mar 3, 6:48 pm, "Gabriel Genellina" wrote: En Tue, 03 Mar 2009 16:39:43 -0200, Fab86 escribió: I am having a bit on an issue getting my program to work. The online databas

Re: Chandler, Python, speed

2009-03-03 Thread Alan G Isaac
On Mar 2, 1:11 am, Paul Rubin wrote: Mitch Kapor (of Lotus 1-2-3 fame) spent a lot of money hiring very sharp Python programmers to write an email client called Chandler, but from what I understand, progress so far has been disappointing, at least in part for performance reasons. Paul McGui

Re: Python 2.6.1 urllib error on Mac os x PPC

2009-03-03 Thread ati
On Tue, 2009-03-03 at 14:10 -0800, Ned Deily wrote: > Ah, "OS X Server" and "2.5.4 works fine"! For 2.6, I see that the > getproxies code in urllib was re-written to eliminate use of the > deprecated python mac Carbon interfaces and instead use ctypes to call > the SystemConfiguration framework

Re: Multiple conditional expression

2009-03-03 Thread John Machin
On Mar 4, 10:53 am, Mel wrote: > bearophileh...@lycos.com wrote: > > Chris Rebert: > >> That seems to just be an overly complicated way of writing: > >> spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1) > > Better: > > spaces = bool(('spaces' in form) and form.getvalue('spaces

Re: Python AppStore / Marketplace

2009-03-03 Thread David Lyon
Hi all, I only just noticed this thread... :-( At the moment, I am working on a Python Package Manager project on Sourceforge. http://sourceforge.net/projects/pythonpkgmgr/ Firstly, I would welcome any developers who are willing to assist. Secondly, I think there is much work to be done with

Re: Python parser

2009-03-03 Thread Alan G Isaac
This reminds me: the SimpleParse developers ran into some troubles porting to Python 2.6. It would be great if someone could give them a hand. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Pickle Problem

2009-03-03 Thread Fab86
On Mar 4, 12:00 am, MRAB wrote: > Fab86 wrote: > > On Mar 3, 8:59 pm, "Gabriel Genellina" wrote: > >> En Tue, 03 Mar 2009 16:50:25 -0200, Fab86 escribió: > > >>> On Mar 3, 6:48 pm, "Gabriel Genellina" wrote: > En Tue, 03 Mar 2009 16:39:43 -0200, Fab86   > escribió: > > I am havin

Re: Python parser

2009-03-03 Thread Gabriel Genellina
En Tue, 03 Mar 2009 22:39:19 -0200, Alan G Isaac escribió: This reminds me: the SimpleParse developers ran into some troubles porting to Python 2.6. It would be great if someone could give them a hand. Do you mean the simpleparser project in Sourceforge? Latest alpha released in 2003? Or

Re: Pickle Problem

2009-03-03 Thread Gabriel Genellina
En Tue, 03 Mar 2009 23:11:30 -0200, Fab86 escribió: On Mar 4, 12:00 am, MRAB wrote: Fab86 wrote: > On Mar 3, 8:59 pm, "Gabriel Genellina" wrote: >> How to "spell" exactly the exception name should appear in the   >> documentation; might be yahoo.SearchError, or yahoo.search.SearchError,

Re: Opening for Python Programmer at Newport Beach

2009-03-03 Thread Craig Allen
On Mar 3, 10:17 am, Cool Dude wrote: > Hello , > This is Aniket from Techclique, a New Jersey based software > development and IT consulting firm providing top quality technical and > software professionals on a permanent and contractual basis to > Government and commercial customer including fort

looking for template package

2009-03-03 Thread Neal Becker
I'm looking for something to do template processing. That is, transform text making various substitutions. I'd like to be able to do substitutions that include python expressions, to do arithmetic computations within substitutions. I know there are lots of template packages, but most seem aim

What does self.grid() do?

2009-03-03 Thread chuck
I am learning python right now. In the lesson on tkinter I see this piece of code from Tkinter import * class MyFrame(Frame): def __init__(self): Frame.__init__(self) self.grid() My question is what does "self.grid()" do? I understand that the grid method registers widgets wit

Re: looking for template package

2009-03-03 Thread David Lyon
> I know there are lots of template packages, but most seem aimed at web > use. > This is just text processing, not part of any web stuff. > > Any suggestions? It doesn't matter if it is web or not. it's worth using a template package. You might very much like Cheatah... only takes a day to

Re: Looking for a General Method to Configure Tkinter Widgets

2009-03-03 Thread Rhodri James
On Tue, 03 Mar 2009 18:58:47 -, W. eWatson wrote: I'm probably confused too. Let's try this. In s=dialog.stopVar.get() I'd like to eliminate the statement and replace it with something like: s="dialog." + "stopV.get()" )and execute that--I'm aware of the exec

Re: looking for template package

2009-03-03 Thread Philip Semanchuk
On Mar 3, 2009, at 9:06 PM, Neal Becker wrote: I'm looking for something to do template processing. That is, transform text making various substitutions. I'd like to be able to do substitutions that include python expressions, to do arithmetic computations within substitutions. I know th

Re: Looking for a General Method to Configure Tkinter Widgets

2009-03-03 Thread W. eWatson
W. eWatson wrote: odeits wrote: On Mar 2, 7:14 am, "W. eWatson" wrote: I'm modifying a Tkinter Python program that uses hard coded initial values for several widgets. For example, latitude = 40. My plan is to put the names and values for configuration purposes into a file. For example, a pse

Re: siple for in expression

2009-03-03 Thread alex23
On Mar 4, 2:05 am, "Matko" wrote: > Can someone help me to understand the following code: > uv_face_mapping = [[0,0,0,0] for f in faces] As others have mentioned, this is a list comprehension, which is a simpler way of writing the following: uv_face_mapping = [] for f in faces: uv_face_m

Re: Newbie - pass variable to cscript

2009-03-03 Thread Rhodri James
On Tue, 03 Mar 2009 15:22:20 -, wrote: It's not firing off the vbs script. Have I got the syntax correct? Thanks. My latest attempt: vBS = "C:\\Program Files\\nasa\\nmail.vbs" os.system('cscript /from:wrk-...@pittcountync.gov / to:plsulli...@pittcountync.gov /sub:TEST /msg:hello ' + vBS)

random module gives same results across all configurations?

2009-03-03 Thread Amir Michail
Hi, Is it the case that the random module will always give the same results if given the same seed across all configurations (e.g., architectures, compilers, etc.)? Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: random module gives same results across all configurations?

2009-03-03 Thread Chris Rebert
On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: > Hi, > > Is it the case that the random module will always give the same > results if given the same seed across all configurations (e.g., > architectures, compilers, etc.)? Your question is vague. Define what you mean by "same results" in this

Re: random module gives same results across all configurations?

2009-03-03 Thread Amir Michail
On Mar 3, 10:05 pm, Chris Rebert wrote: > On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: > > Hi, > > > Is it the case that the random module will always give the same > > results if given the same seed across all configurations (e.g., > > architectures, compilers, etc.)? > > Your question is

Re: random module gives same results across all configurations?

2009-03-03 Thread Chris Rebert
On Tue, Mar 3, 2009 at 7:11 PM, Amir Michail wrote: > On Mar 3, 10:05 pm, Chris Rebert wrote: >> On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: >> > Hi, >> >> > Is it the case that the random module will always give the same >> > results if given the same seed across all configurations (e.g

Re: What does self.grid() do?

2009-03-03 Thread Marc 'BlackJack' Rintsch
On Tue, 03 Mar 2009 18:06:56 -0800, chuck wrote: > I am learning python right now. In the lesson on tkinter I see this > piece of code > > from Tkinter import * > > class MyFrame(Frame): >def __init__(self): >Frame.__init__(self) >self.grid() > > My question is what does "s

Re: Python parser

2009-03-03 Thread Kay Schluehr
On 2 Mrz., 23:14, Clarendon wrote: > Thank you, Lie and Andrew for your help. > > I have studied NLTK quite closely but its parsers seem to be only for > demo. It has a very limited grammar set, and even a parser that is > supposed to be "large" does not have enough grammar to cover common > words

Re: A Simple Menu , Stretching the Window Width--Tkinter

2009-03-03 Thread W. eWatson
John Posner wrote: >> >> I'd like to create a simple Menu bar with one item in it, >> say, called "My >> Menu", and have a few submenu items on it like "Change >> Data" and "Exit". I >> can do that but I'd like the title I put on the enclosing >> window to be >> completely visible.

Configuration Files and Tkinter--Possible?

2009-03-03 Thread W. eWatson
I'm converting a Tkinter program (Win XP) that uses widgets that allows the user to change default values of various parameters like start and stop time in hh:mm:ss, time of exposure in seconds, and whether certain options should be on or off. The initial values are set in the code. I can pretty

Re: Python alternatives to Text::SimpleTable?

2009-03-03 Thread Ethan Furman
Ray Van Dolson wrote: So I'm looking for an easy (read: lazy) way to generate output in nice ASCII tables like the Text::SimpleTable[1] module in perl. I've come across two so far in the Python world that look promising[2][3] but I'm wondering if anyone else out there has some recommendations fo

Re: easy_install with MySQL-python

2009-03-03 Thread Ske
Mike Driscoll wrote: > > On Mar 3, 7:44 am, Ske wrote: >> Let me apologise in advance if I’m missing something obvious, I’m still >> very >> new to this! >> >> I’m attempting to install MySQL-python in Python2.6 on Windows. On >> running >> "easy_install MySQL-python" I get a "The system cannot

Packaging modules with Bundlebuilder

2009-03-03 Thread DLitgo
Hello everyone, I'm curious about creating .app files for the mac using bundlebuilder (or py2app or even py2exe). I'm just about done creating a GUI for a little set of scripts which basically perform batch image editing. If I send this app to friends and family will they be able to use it? Or wo

Re: random module gives same results across all configurations?

2009-03-03 Thread Carl Banks
On Mar 3, 6:59 pm, Amir Michail wrote: > Hi, > > Is it the case that the random module will always give the same > results if given the same seed across all configurations (e.g., > architectures, compilers, etc.)? If you need a repeatable sequence, such as for unit testing, you can subclass ran

Re: Opening for Python Programmer at Newport Beach

2009-03-03 Thread Hendrik van Rooyen
"Diez B. Roggisch" wrote: > > > > Is your email program broken or what? Why are you sending the same > > exact message 5 times!? > > Not to mention that the name "Cool Dude" isn't exactly convincing me > that I should apply for a job there... Quite so. The only name that could possibly be w

String Identity Test

2009-03-03 Thread Avetis KAZARIAN
After reading the discussion about the same subject ( From: "Thomas Moore" Date: Tue, 1 Nov 2005 21:45:56 +0800 ), I tried myself some tests with some confusing results (I'm a beginner with Python, I'm coming from PHP) # 1. Short alpha-numeric String without space a = "b747" b = "b747" >>> a

Re: random module gives same results across all configurations?

2009-03-03 Thread Diez B. Roggisch
Amir Michail schrieb: On Mar 3, 10:05 pm, Chris Rebert wrote: On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: Hi, Is it the case that the random module will always give the same results if given the same seed across all configurations (e.g., architectures, compilers, etc.)? Your question

Re: Packaging modules with Bundlebuilder

2009-03-03 Thread Diez B. Roggisch
DLitgo schrieb: Hello everyone, I'm curious about creating .app files for the mac using bundlebuilder (or py2app or even py2exe). I'm just about done creating a GUI for a little set of scripts which basically perform batch image editing. If I send this app to friends and family will they be abl

Re: random module gives same results across all configurations?

2009-03-03 Thread Amir Michail
On Mar 4, 2:26 am, "Diez B. Roggisch" wrote: > Amir Michail schrieb: > > > On Mar 3, 10:05 pm, Chris Rebert wrote: > >> On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail wrote: > >>> Hi, > >>> Is it the case that the random module will always give the same > >>> results if given the same seed across

Re: String Identity Test

2009-03-03 Thread Gary Herron
Avetis KAZARIAN wrote: After reading the discussion about the same subject ( From: "Thomas Moore" Date: Tue, 1 Nov 2005 21:45:56 +0800 ), I tried myself some tests with some confusing results (I'm a beginner with Python, I'm coming from PHP) # 1. Short alpha-numeric String without space a =

<    1   2