Re: List Moderator

2007-05-19 Thread Dotan Cohen
On 18/05/07, Steve Holden <[EMAIL PROTECTED]> wrote: > Dotan Cohen wrote: > > Is this list not moderated? I'm really not interested in Britney > > Spears boobs. All the spam on this list is from the same place, it > > should be very easy to filter. > > > Is it a list, is it a newsgroup? No, it's c.

Re: Compiling Python code within a module

2007-05-19 Thread Gabriel Genellina
En Fri, 18 May 2007 20:49:33 -0300, Mitko Haralanov <[EMAIL PROTECTED]> escribió: > On 18 May 2007 15:51:40 -0700 > ici <[EMAIL PROTECTED]> wrote: > >> exec it :) > > Thank you! That works when I compile/exec it in the main body of the > program. However, when I try to do that in a separate modu

Re: pyodbc.Error Crash

2007-05-19 Thread Gabriel Genellina
En Fri, 18 May 2007 20:48:49 -0300, Joe Salmeri <[EMAIL PROTECTED]> escribió: > I believe this bug is also related to the other problem I just reported. I think you'll get best results reporting them to the author(s) directly: http://pyodbc.sourceforge.net/ and click on "Bug tracker" -- Gab

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread Martin v. Löwis
> Providing a method that would translate an arbitrary string into a > valid Python identifier would be helpful. It would be even more > helpful if it could provide a way of converting untranslatable > characters. However, I suspect that the translate (normalize?) routine > in the unicode module wi

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread Martin v. Löwis
>> But you're making a strawman argument by using extended ASCII >> characters that would work anyhow. How about debugging this (I wonder >> will it even make it through?) : >> >> class 6자회담관련론조 >>6자회 = 0 >>6자회담관련 고귀 명=10 > >That would be invalid syntax since the third line is an assig

Re: Uninstall speed with Python 2.4 MSI

2007-05-19 Thread Martin v. Löwis
David Bolen wrote: > I'm in the process of uninstalling 2.4a2 to install 2.4a3 and the > uninstall is running absolutely dog slow and burning 100% cpu while > doing it (all going to mshta.exe). Watching the progress bar it > almost seems to be doing a whole bunch of operations per file or > someth

Re: fun with unicode files

2007-05-19 Thread Martin v. Löwis
Thomas Heller wrote: > I wonder: do I really have to check for the BOM manually, or is there a > Python function which does that? If it can also be ASCII (or ansi?), then yes, you need to manually check for the BOM. This is because you need to make an explicit decision in the fallback case - Pytho

Re: Python compared to other language

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 03:24:15 -0300, walterbyrd <[EMAIL PROTECTED]> escribió: > My guess is that some of the C code used to develop Python is the same > between the different Python distros, but much of the code is unique > to the particular platform. If that is the case, then the C code may > no

Re: RFC - n-puzzle.py

2007-05-19 Thread Raymond Hettinger
On May 18, 4:15 pm, Phoe6 <[EMAIL PROTECTED]> wrote: > Hi All, > I would like to request a code and design review of one of my program. > n-puzzle.pyhttp://sarovar.org/snippet/detail.php?type=snippet&id=83 > Its a N-puzzle problem solver ( Wikipedia page > andhttp://norvig.com/ltd/test/n-puzzle.li

Re: (Modular-)Application Framework / Rich-Client-Platform in Python

2007-05-19 Thread Stef Mientki
Jarek Zgoda wrote: > Stef Mientki napisał(a): > >> I took a look at some of the examples build with eclipse, >> and I might be wrong, but it's just another IDE, >> (like Delphi, Lazarus, Visual Basic, Kylix, Pida, Envisage, VisualWX, >> wxGlade, ...) >> what am I missing ? > > I think you miss th

dislin titlin and string decode

2007-05-19 Thread luis
Hello! I have an unespectedn result with dislin titlin dislin.metafl ('WMF') dislin.disini () a="Andrés or Ramón" dislin.titlin (a.encode("Latin-1"), 1) # not error raised, is ok dislin.disfin () In the output file all is ok but the title is Andr s or Ram n Thanks in advance! --

Re: Anti-Aliasing in wxPython?

2007-05-19 Thread sturlamolden
On May 18, 8:20 pm, Alexander Dünisch <[EMAIL PROTECTED]> wrote: > i haven't found anything like this in wxPython yet. > Thanks wxPython uses native widgets, so it is OS dependent. You will have to turn it in Windows, MacOSX (on by default?) or GNOME. -- http://mail.python.org/mailman/listinfo

Re: converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2

2007-05-19 Thread James Stroud
John Machin wrote: > The approach that I've adopted is to test the values in a column for all > types, and choose the non-text type that has the highest success rate > (provided the rate is greater than some threshold e.g. 90%, otherwise > it's text). > > For large files, taking a 1/N sample ca

Re: Execute commands from file

2007-05-19 Thread Martin Blume
"Steve Holden" schrieb > > > > [ difference between exec open(fname).read() > >and for line in open(fname): exec line ] > > > > So it seems to depend on the way the file is read. > > > It depends on the way the lines of the file are executed, > not how they are read. > Could you elaborate

Re: Typed named groups in regular expression

2007-05-19 Thread Paul McGuire
On May 19, 12:32 am, Paddy <[EMAIL PROTECTED]> wrote: > On May 16, 6:58 pm, "Hugo Ferreira" <[EMAIL PROTECTED]> wrote: > > > Hi! > > > Is it possible to "automagically" coerce the named groups to python types? > > e.g.: > > > >>> type(re.match('(?P\d*)', '123').groupdict()['x']) > > > > > > But w

Re: (Modular-)Application Framework / Rich-Client-Platform in Python

2007-05-19 Thread Wildemar Wildenburger
Ben Finney wrote: > You already have Python, and can embed it in your program. The only > missing piece seems to be the primitive operations at the core, which > surely depend on what exactly it is you have in mind for your program > and can't really be provided in a generic form by some other part

Re: dislin titlin and string decode

2007-05-19 Thread luis
the code is: #!/usr/bin/env python def try_dislin(): ...import dislin ...dislin.metafl ('WMF') ...dislin.errdev ('FILE') ...dislin.disini () ...dislin.errmod('PROTOCOL','ON') ...dislin.hwfont () ...dislin.pagera () ...dislin.pagfll (255) ...dislin.color('BLACK') ...dislin.axspos (500, 1600) ...d

Writelines() a bit confusing

2007-05-19 Thread aiwarrior
If file.WriteLines( seq ) accepts a list and it says it writes lines, why does it write the whole list in a single line. Be cause of that the reverse of file.writelines(seq) is not file.readlines(). Are the assumptions i made correct? If yes why is this so? I find a function called writelines not

Re: RFC - n-puzzle.py

2007-05-19 Thread Phoe6
On May 19, 2:23 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > On May 18, 4:15 pm, Phoe6 <[EMAIL PROTECTED]> wrote: > > I would like to request a code and design review of one of my program. > > n-puzzle.pyhttp://sarovar.org/snippet/detail.php?type=snippet&id=83 > > Nice job, this doesn't look

Re: pyodbc.Error Crash

2007-05-19 Thread Joe Salmeri
Thanks, I reported them there first and then posted here in case they monitor the forum more frequently and so others would be aware of the problems found. Joe "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > En Fri, 18 May 2007 20:48:49 -0300, Joe Salmeri <[

Re: which is the comprehencive module for postgresql?

2007-05-19 Thread Steve Holden
Gabriel Genellina wrote: > En Sat, 19 May 2007 02:25:11 -0300, krishnakant Mane > <[EMAIL PROTECTED]> escribió: > >> some times having many choices often confuses the users. >> can some one plese tell me which is the most comprehencive, well >> documented and widely used and tested module to con

Re: docs patch: dicts and sets

2007-05-19 Thread Alan Isaac
I submitted the language based on Bill and Carsten's proposals: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1721372&group_id=5470 That language has been rejected. You many want to read the discussion and see if acceptible language still seems discoverable. Alan Isaac -- http:

Re: List Moderator

2007-05-19 Thread Steve Holden
Dotan Cohen wrote: > On 18/05/07, Steve Holden <[EMAIL PROTECTED]> wrote: >> Dotan Cohen wrote: >>> Is this list not moderated? I'm really not interested in Britney >>> Spears boobs. All the spam on this list is from the same place, it >>> should be very easy to filter. >>> >> Is it a list, is it a

Re: Python compared to other language

2007-05-19 Thread Steve Holden
walterbyrd wrote: > On May 18, 8:28 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Surely the fact that Python is available on so many platforms implies >> that C is a fairly portable language. > > Unless it's the same C code, I don't see how that means anything. If I > write an app on Windows

Re: Writelines() a bit confusing

2007-05-19 Thread Stefan Sonnenberg-Carstens
aiwarrior schrieb: > If file.WriteLines( seq ) accepts a list and it says it writes lines, > why does it write the whole list in a single line. Be cause of that > the reverse of file.writelines(seq) is not file.readlines(). > Are the assumptions i made correct? If yes why is this so? > > I find a f

Re: Execute commands from file

2007-05-19 Thread Steve Holden
Martin Blume wrote: > "Steve Holden" schrieb >>> [ difference between exec open(fname).read() >>>and for line in open(fname): exec line ] >>> >>> So it seems to depend on the way the file is read. >>> >> It depends on the way the lines of the file are executed, >> not how they are read. >>

Re: Writelines() a bit confusing

2007-05-19 Thread Steve Holden
aiwarrior wrote: > If file.WriteLines( seq ) accepts a list and it says it writes lines, > why does it write the whole list in a single line. Be cause of that > the reverse of file.writelines(seq) is not file.readlines(). > Are the assumptions i made correct? If yes why is this so? > > I find a fu

Re: RFC - n-puzzle.py

2007-05-19 Thread Steve Holden
Phoe6 wrote: > On May 19, 2:23 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> On May 18, 4:15 pm, Phoe6 <[EMAIL PROTECTED]> wrote: >>> I would like to request a code and design review of one of my program. >>> n-puzzle.pyhttp://sarovar.org/snippet/detail.php?type=snippet&id=83 >> Nice job, thi

Re: Writelines() a bit confusing

2007-05-19 Thread Gre7g Luterman
"aiwarrior" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If file.WriteLines( seq ) accepts a list and it says it writes lines, > why does it write the whole list in a single line. Be cause of that > the reverse of file.writelines(seq) is not file.readlines(). > Are the assumptions

Creating a sub folder in the pythons LIB Directory

2007-05-19 Thread [EMAIL PROTECTED]
Hi, I am creating a library of functions. I would like to have them saved in a sub folder of pythons LIB folder, but I cannot get it to work. I have a script called test.py I stored it in LIB folder and typed Import test, work fine. I store the script in lib/ted Then type Import lib\ted I get a

_PyObject_New / PyObject_Init / PyInstance_New / etc?

2007-05-19 Thread Gre7g Luterman
(My apologies if this appears twice. It did not post the first time.) I'm so confuzzled! How do I instantiate my new C Python object from C? After flailing helplessly with my own code, and searching tirelessly with Google, I stepped back to the classic noddy2.c example in the Python help files an

ANN: Pyro 3.7 (remote objects)

2007-05-19 Thread Irmen de Jong
I'm happy to announce Pyro 3.7 -- Python's own powerful remote method invocation technology! You can get it via http://pyro.sourceforge.net, then go to the SF project homepage download area. This is a small improvement release since Pyro 3.6. New stuff: - bdist_rpm typo fix in setup.cfg - rena

Re: Creating a sub folder in the pythons LIB Directory

2007-05-19 Thread Gre7g Luterman
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am creating a library of functions. I would like to have them saved > in a sub folder of pythons LIB folder, but I cannot get it to work. > > I have a script called test.py > I stored it in LIB folder and typed > Import test,

Re: Execute commands from file

2007-05-19 Thread Martin Blume
"Steve Holden" schrieb > > I simply meant that the whole source has to be presented > to the exec statement and not chunked into lines. > That's what I meant: With exec open(f).read() it is not broken into several exec invocations. > > I was probably just a little over-zealous in pursuing >

Re: docs patch: dicts and sets

2007-05-19 Thread Steven Bethard
Alan Isaac wrote: > I submitted the language based on Bill and Carsten's proposals: > > https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1721372&group_id=5470 > > That language has been rejected. > You many want to read the discussion and see if > acceptible language still seems disco

Start

2007-05-19 Thread Nautilus
Can anybody halp me start using Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Start

2007-05-19 Thread Paddy
On May 19, 4:18 pm, Nautilus <[EMAIL PROTECTED]> wrote: > Can anybody halp me start using Python. http://wiki.python.org/moin/BeginnersGuide And welcome :-) - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: module organisation

2007-05-19 Thread Rainer Grimm
[EMAIL PROTECTED] wrote: > Hello :) > > I am new to python and I don't have much expirience in object-oriented > technologies neither. > > The problem is the following: I have to create a simple python > template script that will always follow the same algorithm, let's say: > - read a mesh > - tr

Re: Python compared to other language

2007-05-19 Thread Alex Martelli
walterbyrd <[EMAIL PROTECTED]> wrote: > On May 18, 10:24 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > > > > > I think that Ruby, which roughly speaking sits somewhere between Python > > and Perl, is closer to Python than Perl is. > > I don't know much about Ruby, but it does not seem to be com

Re: RFC - n-puzzle.py

2007-05-19 Thread Peter Otten
Steve Holden wrote: > Phoe6 wrote: >> On May 19, 2:23 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >>> Instead of: >>> short_path = mdists[0] >>> if mdists.count(short_path) > 1: >>> write: >>> short_path = mdists[0] >>> if short_path in mdists[1:]: >> >> I would like to under

Re: Start

2007-05-19 Thread Glich
I got started here: http://showmedo.com/videos/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compared to other language

2007-05-19 Thread walterbyrd
On May 19, 7:23 am, Steve Holden <[EMAIL PROTECTED]> wrote: > The reason you can do this with Python is precisely because the > developers have ironed out the wrinkles between platforms by putting the > requisite conditionals in the C source. But that is my point. With Python, the language itself

Re: Writelines() a bit confusing

2007-05-19 Thread aiwarrior
On May 19, 2:46 pm, "Gre7g Luterman" <[EMAIL PROTECTED]> wrote: > "aiwarrior" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > If file.WriteLines( seq ) accepts a list and it says it writes lines, > > why does it write the whole list in a single line. Be cause of that > > the r

Can't embed python in C++(Mingw[3.*] compiler)

2007-05-19 Thread Arjun Narayanan
For thr program, #include "E:\Python25\include\Python.h" #include int main(int argc, char* argv[]){ Py_Initialise(); Py_Finalise(); return 0; } I get the errors, main.cpp:7: `Py_Initialise' undeclared (first use this function) main.cpp:7: (Each undeclared identifier is reported only on

Re: Python compared to other language

2007-05-19 Thread walterbyrd
On May 19, 9:36 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > > From these numbers it would seem that Ruby (and PHP) aren't really more > web-specific than Perl (and Python). > Excellent find, nice work. However, if it is found that there are "X" many PHP programs running payroll applications, do

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread Richard Hanson
On Fri, 18 May 2007 06:28:03 +0200, Martin v. Löwis wrote: [excellent as always exposition by Martin] Thanks, Martin. > P.S. Anybody who wants to play with generating visualisations > of the PEP, here are the functions I used: [code snippets] Thanks for those functions, too -- I've been explo

Many-to-many pattern possiable?

2007-05-19 Thread Jia Lu
Hi all I see dict type can do 1-to-1 pattern, But is there any method to do 1-to-many, many-to-1 and many-to-many pattern ? What about using some Serialized objects? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: module organisation

2007-05-19 Thread 7stud
On May 14, 7:09 am, [EMAIL PROTECTED] wrote: > Hello :) > > I am new to python and I don't have much expirience in object-oriented > technologies neither. > > The problem is the following: I have to create a simple python > template script that will always follow the same algorithm, let's say: > -

Re: docs patch: dicts and sets

2007-05-19 Thread 7stud
On May 19, 9:06 am, Steven Bethard <[EMAIL PROTECTED]> wrote: > Alan Isaac wrote: > > I submitted the language based on Bill and Carsten's proposals: > > >https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1721372&;... > > > That language has been rejected. > > You many want to read the d

Re: No Python for Blackberry?

2007-05-19 Thread David Boddie
On Saturday 19 May 2007 03:19, walterbyrd wrote: > I could not find a version of Python that runs on a Blackberrry. > > I'm just amazed. A fairly popular platform, and no Python > implementation? If you can get the hardware into the hands of capable developers, they'll put Python on it. ;-) Dav

Re: zipfile stupidly broken

2007-05-19 Thread Martin Maney
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > To search 64k for all zip files would slow down the opening of all zip > files whereas most zipfiles don't have comments. No, actually it would only slow down for files which do have comments, assuming I understand the code correctly. IME most zipfiles

Re: zipfile [module and file format, both] stupidly broken

2007-05-19 Thread Martin Maney
Larry Bates <[EMAIL PROTECTED]> bristled: > Are you serious? A zipfile with a comment > 4Kbytes. I've never encountered > such a beast. If I hadn't run into one I would never have had a clue that Python's zipfile module had this silly bug. > As with any open source product it is much better to r

Re: Python-URL! - weekly Python news and links (May 16)

2007-05-19 Thread Fred Pacquier
[EMAIL PROTECTED] (Cameron Laird) said : > I'll make a few personal comments. > > I knew the choice of quotes was in questionable taste. I was > out to be provocative without being offensive, though. My > apologies to Mr. Beliavsky and anyone else I disappointed. On > the whole, I still think

Re: Many-to-many pattern possiable?

2007-05-19 Thread Gre7g Luterman
"Jia Lu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I see dict type can do 1-to-1 pattern, But is there any method to do > 1-to-many, many-to-1 and many-to-many pattern ? Dict objects can do many-to-1 relationships. Dict[Key1] = Obj Dict[Key2] = Obj Dict[Key3] = Obj 1-to-man

Structuring the code of a wiki parsing engine

2007-05-19 Thread Michiel Sikma
Hello everybody. I'm kind of new to Python. I'm working on a simple text parser that will allow me to transform a certain syntax into a certain output. I find wikis interesting, so wiki to HTML parsing is one of the things that I want to accomplish (I'm not actually writing a whole wiki, th

Re: Many-to-many pattern possiable?

2007-05-19 Thread Raymond Hettinger
On May 19, 9:33 am, Jia Lu <[EMAIL PROTECTED]> wrote: > I see dict type can do 1-to-1 pattern, But is there any method to do > 1-to-many, many-to-1 and many-to-many pattern ? >>> mm = {'a': ['A', 'B', 'C'], 'c': ['C', 'D', 'E'], 'b': ['A', 'D']} >>> # Now, invert the relation >>> mmr = {} >>> fo

regex matching question

2007-05-19 Thread bullockbefriending bard
first, regex part: I am new to regexes and have come up with the following expression: ((1[0-4]|[1-9]),(1[0-4]|[1-9])/){5}(1[0-4]|[1-9]),(1[0-4]|[1-9]) to exactly match strings which look like this: 1,2/3,4/5,6/7,8/9,10/11,12 i.e. 6 comma-delimited pairs of integer numbers separated b

Re: Beginner question: module organisation

2007-05-19 Thread 7stud
On May 19, 10:45 am, 7stud <[EMAIL PROTECTED]> wrote: > > refineModule.py: > --- > def refine(userfunc, mesh): > #process mesh > func(mesh) > The last line should be: userfunc(mesh) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compared to other language

2007-05-19 Thread Steve Holden
walterbyrd wrote: > On May 19, 7:23 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >> The reason you can do this with Python is precisely because the >> developers have ironed out the wrinkles between platforms by putting the >> requisite conditionals in the C source. > > But that is my point. Wit

Re: No Python for Blackberry?

2007-05-19 Thread Tommy Nordgren
On 19 maj 2007, at 03.19, walterbyrd wrote: > I could not find a version of Python that runs on a Blackberrry. > > I'm just amazed. A fairly popular platform, and no Python > implementation? > Download the sources and try compiling it yourself. On most platforms Expand the archive. Then e

Re: RFC - n-puzzle.py

2007-05-19 Thread Steve Holden
Peter Otten wrote: > Steve Holden wrote: > >> Phoe6 wrote: >>> On May 19, 2:23 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: Instead of: short_path = mdists[0] if mdists.count(short_path) > 1: write: short_path = mdists[0] if short_path in mdists[1:

Re: docs patch: dicts and sets

2007-05-19 Thread Steve Holden
7stud wrote: > On May 19, 9:06 am, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Alan Isaac wrote: >>> I submitted the language based on Bill and Carsten's proposals: >>> https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1721372&;... >>> That language has been rejected. >>> You many want

Re: Many-to-many pattern possiable?

2007-05-19 Thread 7stud
On May 19, 10:33 am, Jia Lu <[EMAIL PROTECTED]> wrote: > Hi all > > I see dict type can do 1-to-1 pattern, But is there any method to do > 1-to-many, many-to-1 and many-to-many pattern ? How about: one_to_many = {"a":[10, "red", 2.5]} many_to_1 = {("red", 2.5, 3):"hello"} many_to_many = {("red

getting thread object from SocketServer.ThreadingTCPServer

2007-05-19 Thread Brad Brock
Hi list. I have a little problem when using SocketServer.ThreadingTCPServer. I want to make a list of thread-objects generated by the ThreadingTCPServer. How can I get the thread object? Thank you. Lookin

Re: docs patch: dicts and sets

2007-05-19 Thread 7stud
On May 19, 11:38 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Except in those instances where users added information that was > explicitly wrong. It's a self correcting mechanism. Other reader's will spot the error and post corrections. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python compared to other language

2007-05-19 Thread Michael Torrie
On Fri, 2007-05-18 at 22:28 -0400, Steve Holden wrote: > Surely the fact that Python is available on so many platforms implies > that C is a fairly portable language. I realise that you have to take > platform specifics into account much more than you do in Python, but I > do feel you are being

Re: Writelines() a bit confusing

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 10:31:50 -0300, Stefan Sonnenberg-Carstens <[EMAIL PROTECTED]> escribió: > so you'd want this: > > f.writelines([x+os.linesep for x in strings]) > > or something similar. You would use os.linesep *only* if the file was opened in binary mode - unusual if you want to write l

Re: regex matching question

2007-05-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, bullockbefriending bard wrote: > first, regex part: > > I am new to regexes and have come up with the following expression: > ((1[0-4]|[1-9]),(1[0-4]|[1-9])/){5}(1[0-4]|[1-9]),(1[0-4]|[1-9]) > > to exactly match strings which look like this: > > 1,2/3,4/5,6/7,8

Re: docs patch: dicts and sets

2007-05-19 Thread Steve Holden
7stud wrote: > On May 19, 11:38 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> Except in those instances where users added information that was >> explicitly wrong. > > It's a self correcting mechanism. Other reader's will spot the error > and post corrections. > The last thing I want to read in

Re: docs patch: dicts and sets

2007-05-19 Thread 7stud
On May 19, 12:36 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > The last thing I want to read in a language's documentation is an > ill-informed and sometimes interminable argument about a particular feature. > Yet some readers will be able to get to the bottom of an issue they are having by readin

Re: RFC - n-puzzle.py

2007-05-19 Thread Peter Otten
Phoe6 wrote: > I would like to request a code and design review of one of my program. > n-puzzle.py > I have used OO Python for the above program and would like comments on > my approach as I am just starting with OOP. [The following has nothing to do with OOP, I just read Raymond's post and got

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread René Fleschenberg
Martin v. Löwis schrieb: > I've reported this before, but happily do it again: I have lived many > years without knowing what a "hub" is, and what "to pass" means if > it's not the opposite of "to fail". Yet, I have used their technical > meanings correctly all these years. I was not speaking of t

Re: Python-URL! - weekly Python news and links (May 16)

2007-05-19 Thread Grant Edwards
On 2007-05-17, Beliavsky <[EMAIL PROTECTED]> wrote: > >> QOTW: "Sometimes you just have to take the path of least >> distaste". - Grant Edwards >> >> "I want to choose my words carefully here, so I'm not misunderstood. > > > > I think Cameron Laird does a good job with the Python digest > but blu

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread René Fleschenberg
Martin v. Löwis schrieb: >>> Then get tools that match your working environment. >> Integration with existing tools *is* something that a PEP should >> consider. This one does not do that sufficiently, IMO. > > What specific tools should be discussed, and what specific problems > do you expect? S

Re: docs patch: dicts and sets

2007-05-19 Thread Steven Bethard
7stud wrote: > On May 19, 9:06 am, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Alan Isaac wrote: >>> I submitted the language based on Bill and Carsten's proposals: >>> https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1721372&;... >>> That language has been rejected. >>> You many want

Re: docs patch: dicts and sets

2007-05-19 Thread Robert Kern
7stud wrote: > On May 19, 12:36 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> The last thing I want to read in a language's documentation is an >> ill-informed and sometimes interminable argument about a particular feature. > > Yet some readers will be able to get to the bottom of an issue they >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread Peter Maas
Martin v. Löwis wrote: > Python code is written by many people in the world who are not familiar > with the English language, or even well-acquainted with the Latin > writing system. I believe that there is a not a single programmer in the world who doesn't know ASCII. It isn't hard to learn the l

Re: List Moderator

2007-05-19 Thread Dotan Cohen
On 19/05/07, Steve Holden <[EMAIL PROTECTED]> wrote: > I'm sorry, but you have no idea what you are talking about. Most of what > can be done *is* being done, which is why you see the relatively low > spam volumes you do. > I hope that I don't. I receive no less than 700 spams a day to my regular

Re: _PyObject_New / PyObject_Init / PyInstance_New / etc?

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 10:54:32 -0300, Gre7g Luterman <[EMAIL PROTECTED]> escribió: > I'm so confuzzled! How do I instantiate my new C Python object from C? > I tried inserting some code with _PyObject_New and PyObject_Init: > > Then I compiled, went into the Python interpreter and tried it. I wou

Re: Can't embed python in C++(Mingw[3.*] compiler)

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 13:14:40 -0300, Arjun Narayanan <[EMAIL PROTECTED]> escribió: > For thr program, > #include "E:\Python25\include\Python.h" > #include Configure your environment so using: #include works (you may need to add E:\Python25\include to some list of searched directories, maybe

Re: List Moderator

2007-05-19 Thread Steve Holden
Dotan Cohen wrote: > On 19/05/07, Steve Holden <[EMAIL PROTECTED]> wrote: >> I'm sorry, but you have no idea what you are talking about. Most of what >> can be done *is* being done, which is why you see the relatively low >> spam volumes you do. > > I hope that I don't. I receive no less than 700

Re: getting thread object from SocketServer.ThreadingTCPServer

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 14:40:55 -0300, Brad Brock <[EMAIL PROTECTED]> escribió: > Hi list. I have a little problem when using > SocketServer.ThreadingTCPServer. I want to make a list > of thread-objects generated by the > ThreadingTCPServer. How can I get the thread object? If getting the list of

Re: zipfile [module and file format, both] stupidly broken

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 14:00:01 -0300, Martin Maney <[EMAIL PROTECTED]> escribió: > BTW, thanks for the pointer someone else gave to the proper place for > posting bugs. I'd had the silly idea that I would be able to find that > easily at www.python.org, but if I had then I'd not have posted here

Re: [Bulk] Re: Python compared to other language

2007-05-19 Thread scott
Michael Torrie wrote: > I think the original poster will find Python, and may wxPython, > satisfies the bulk of his development needs. True, I like how Python is a general language that can be used for many different purposes and hope to learn wxPython as well. I have read through the archives

Re: dislin titlin and string decode

2007-05-19 Thread luis
On 19 mayo, 12:56, luis <[EMAIL PROTECTED]> wrote: > Hello! > > I have an unespectedn result with dislin titlin > > dislin.metafl ('WMF') > dislin.disini () > > > a="Andrés or Ramón" > dislin.titlin (a.encode("Latin-1"), 1) > # not error raised, is ok > > > dislin.disfin () > > In the out

Re: dislin titlin and string decode

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 18:28:51 -0300, luis <[EMAIL PROTECTED]> escribió: > The problem was the value of dislin.chacod. This must be 'ISO1' not > the default ('STANDAR') I used to use DISLIN some time ago, but now I use PyChart most of the time. Its convoluted interfase (mostly due to Fortran supp

Re: docs patch: dicts and sets

2007-05-19 Thread 7stud
>Actually, it would just move the "endless, petty discussions about what >minutiae are more important" into the docs. I don't see how that's an >improvement. Because it highlights the issues you will be faced with when using the described functions. People will post about an issue they had with a

Re: regex matching question

2007-05-19 Thread bullockbefriending bard
thanks for your suggestion. i had already implemented the all pairs different constraint in python code. even though i don't really need to give very explicit error messages about what might be wrong with my data (obviously easier to do if do all constraint validation in code rather than one regex)

Re: regex matching question

2007-05-19 Thread Gabriel Genellina
En Sat, 19 May 2007 19:40:39 -0300, bullockbefriending bard <[EMAIL PROTECTED]> escribió: > from my cursory skimming of friedl, i get the feeling that the all > pairs different constraint would give rise to some kind of fairly > baroque expression, perhaps likely to bring to mind the following >

mod_python performs several magnitudes slower than PHP?

2007-05-19 Thread chris . monsanto
Recently I've had to move my site to a new dedicated server running FreeBSD 6.1. After installing apache 2.0.59, python 2.4.4 and mod_python 3.3.1, I decided to bench a script in PHP vs one in Python. I found out that for some reason, my mod_python was performing extremely slow - magnitudes slower

Re: regex matching question

2007-05-19 Thread John Machin
On 20/05/2007 3:21 AM, bullockbefriending bard wrote: > first, regex part: > > I am new to regexes and have come up with the following expression: > ((1[0-4]|[1-9]),(1[0-4]|[1-9])/){5}(1[0-4]|[1-9]),(1[0-4]|[1-9]) > > to exactly match strings which look like this: > > 1,2/3,4/5,6/7,8/9

Inverse of id()?

2007-05-19 Thread Paul McGuire
Is there an inverse function to the builtin 'id'? The poster who asked about 1-to-1, 1-to-n, etc. relationships (presumably in CS terms - I hope I didn't misread some porn spam by mistake), got me thinking about containers and ids, and what kind of a container would implement a many-to-many. I ha

Re: regex matching question

2007-05-19 Thread bullockbefriending bard
> Backslash? Your example uses a [forward] slash. correct.. my mistake. i use forward slashes. > Are you sure you don't want to allow for some spaces in the data, for > the benefit of the humans, e.g. > 1,2 / 3,4 / 5,6 / 7,8 / 9,10 / 11,12 you are correct. however, i am using string as a co

Re: mod_python performs several magnitudes slower than PHP?

2007-05-19 Thread John Nagle
That's puzzling, because with mod_python, you're only invoking the compiler once per Apache restart. With CGI programs, you pay the loading penalty on every request. John Nagle [EMAIL PROTECTED] wrote: > Recently I've had to move my site to a new dedicated ser

Re: converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2

2007-05-19 Thread John Machin
On 19/05/2007 9:17 PM, James Stroud wrote: > John Machin wrote: >> The approach that I've adopted is to test the values in a column for >> all types, and choose the non-text type that has the highest success >> rate (provided the rate is greater than some threshold e.g. 90%, >> otherwise it's te

Re: regex matching question

2007-05-19 Thread bullockbefriending bard
> Instead of the "or match.group(0) != results" caper, put \Z (*not* $) at > the end of your pattern: > mobj = re.match(r"pattern\Z", results) > if not mobj: as the string i am matching against is coming from a command line argument to a script, is there any reason why i cannot get away wi

Re: regex matching question

2007-05-19 Thread bullockbefriending bard
> Here "all pairs different" means "for each pair, both numbers must be > different", but they may appear in another pair. That is, won't flag > "1,2/3,4/3,5/2,6/8,3/1,2" as invalid, but this wasn't clear from your > original post. > > -- > Gabriel Genellina thanks! you are correct that the

Re: python shell

2007-05-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Paddy <[EMAIL PROTECTED]> wrote: >On May 16, 6:38 pm, Krypto <[EMAIL PROTECTED]> wrote: >> I have been using python shell to test small parts of the big program. >> What other ways can I use the shell effectively. My mentor told me >> that you can virtually do anyth

Re: How to convert a number to binary?

2007-05-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Lyosha <[EMAIL PROTECTED]> wrote: . . . >While I agree with this general statement, I think remembering a >particular one-liner to convert a number to a binary is more valuable >to my brain than

Re: converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2

2007-05-19 Thread John Machin
On 19/05/2007 3:14 PM, Paddy wrote: > On May 19, 12:07 am, py_genetic <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I'm importing large text files of data using csv. I would like to add >> some more auto sensing abilities. I'm considing sampling the data >> file and doing some fuzzy logic scoring on

  1   2   >