Re: Unicode list

2007-03-31 Thread Paul Boddie
Rehceb Rotkiv wrote: > Hello, > > I have this little grep-like program: > > ++snip++ > #!/usr/bin/python > > import sys > import re > > pattern = sys.argv[1] > inputfile = file(sys.argv[2], 'r') > > for line in inputfile: > matches = re.findall(pattern, line) > if matches: >

Re: Character set woes with binary data

2007-04-01 Thread Paul Boddie
Michael B. Trausch wrote: > > I never said it did. It just happens to be the context with which I am > working. I said I wanted to concatenate materials without regard for > the character set. I am mixing binary data with ASCII and Unicode, for > sure, but I should be able to do this. The probl

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

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

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

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

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

Standard Library Structure (was Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed)

2007-04-03 Thread Paul Boddie
On 2 Apr, 20:17, "Kay Schluehr" <[EMAIL PROTECTED]> wrote: > > Note that the conflict of putting modules on top level or better > within separate packages is not an either-or decision from a > programmers point of view who just wants to access those modules. A > top level module like lib or std can

Re: XML DTD analysis, diffing ...

2007-04-03 Thread Paul Boddie
On 3 Apr, 15:52, "olive" <[EMAIL PROTECTED]> wrote: > > I know all of these tools and I already suspected xmlproc as a good > candidate. > > The problem is I can't download it for the moment since Lars website > is blocked here at my work and PyXML is dead. > > Maybe there is an alternative downloa

Re: BeautifulSoup vs. real-world HTML comments

2007-04-04 Thread Paul Boddie
John Nagle wrote: > The syntax that browsers understand as HTML comments is much less > restrictive than what BeautifulSoup understands. I keep running into > sites with formally incorrect HTML comments which are parsed happily > by browsers. Here's yet another example, this one from > "http://ww

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Paul Boddie
erikcw wrote: > > I'm trying to build a SQL string > > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", > (cid, ag, self.data[parent][child]['results']['test']) This makes a tuple, though: the first element is the SQL string; the second element contains a tuple of parameters.

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Paul Boddie
Lenard Lindstrom wrote: > > > > I'm trying to build a SQL string > > > > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", > > (cid, ag, self.data[parent][child]['results']['test']) > > I am guessing you want the string formatting operator here: > > sql = """...""" % (cid, ...)

Re: AttributeError: 'tuple' object has no attribute 'encode'

2007-04-05 Thread Paul Boddie
erikcw wrote: > > Here is the full error: (sorry) No problem! It's easier to comment with these details... > Traceback (most recent call last): > File "/home/erik/Desktop/wa.py", line 178, in ? > curHandler.walkData() > File "/home/erik/Desktop/wa.py", line 91, in walkData > sql = """INSERT INT

Re: tuples, index method, Python's design

2007-04-06 Thread Paul Boddie
C.L. wrote: > > That doesn't change the fact that this is unfriendly design. It's an ugly > inconsistent chunk of a Python's past in which built-in types didn't behave > like > objects. It sticks out like a sore thumb, maybe just not very often. When this topic last appeared on my radar, I ended

Re: tuples, index method, Python's design

2007-04-08 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Carsten Haese: > > Adding useless features always makes a product worse. What's your use > > case for tuple.index? > > Ruby is a bit younger than Python, it has shown that few things may be > better done in a different way. I think the Ruby way is just to add a ton of me

Re: tuples, index method, Python's design

2007-04-10 Thread Paul Boddie
On 10 Apr, 11:48, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-10, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > There is a cost to every new language feature: it has to be implemented, > > documented, maintained, and above all learned by the users. Good design > > involves, in part, not a

Re: tuples, index method, Python's design

2007-04-10 Thread Paul Boddie
On 10 Apr, 15:57, Steve Holden <[EMAIL PROTECTED]> wrote: > > The point I am trying to make is that circumstances alter cases, and that we > can't always rely on our intuition to determine how specific methods > work, let alone whether they are available. But it's telling that by adopting precisel

Re: tuples, index method, Python's design

2007-04-10 Thread Paul Boddie
On 10 Apr, 17:29, Steve Holden <[EMAIL PROTECTED]> wrote: > > You can call something non-controversial when it generates a thread like > this? :-) It's really a storm in a teacup. The acid test would be to > generate a patch that added the method and then see if you could get a > committer to commi

Re: tuples, index method, Python's design

2007-04-10 Thread Paul Boddie
On 10 Apr, 17:44, Carsten Haese <[EMAIL PROTECTED]> wrote: > > You have a point. Here is my revised solution: > > assert current_player in p > opponents = tuple(x for x in p if x is not current_player) > > The added advantage is that AssertionError is better than IndexError for > conveying that a s

Re: installing pyqt4 on ubuntu 6.06

2007-04-11 Thread Paul Boddie
On 10 Apr, 20:48, "Joshua J. Kugler" <[EMAIL PROTECTED]> wrote: > On Tuesday 10 April 2007 07:35, Pradnyesh Sawant wrote: > > > Any pointers regarding what packages should i install to get the > > system into working condition would be very helpful > > It's next to impossible, due to conflicts with

Re: tuples, index method, Python's design

2007-04-11 Thread Paul Boddie
On 10 Apr, 20:04, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > This is a rare enough use case and is easy enough to work around (convert it > to > a list, write a helper function) that I don't think it's worth any > language change overhead at all. It isn't a language change: it's a change to th

Re: About Trolltech QT OpenSource license.

2007-04-11 Thread Paul Boddie
On 11 Apr, 11:51, "king kikapu" <[EMAIL PROTECTED]> wrote: > > Ok, i see...So i can use Qt OS edition and earn money from this as > long as i explicitly say (is a reference to a GPL in a readme text > file enough for this ?) that this software is under the GPL lisence > and i have the obligation to

Re: Connection problems with irclib

2007-04-11 Thread Paul Boddie
On 11 Apr, 15:31, "Dropkick Punt" <[EMAIL PROTECTED]> wrote: > Hi. I've written a bot in python, using the irclib by Joel Rosdahl. > > Works fine from my linux box at home, but when I upload it to my shell at > veritynet.net, can't seem to get it to connect to an irc server. It may well be the cas

Re: tuples, index method, Python's design

2007-04-11 Thread Paul Boddie
On 11 Apr, 16:14, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > If you want a language that just adds whatever methods anyone thinks > of, along with whatever aliases for it any can think of, to every data > type, you know where to find Ruby. Nobody is asking for Ruby, as far as I can see. I even

Re: tuples, index method, Python's design

2007-04-12 Thread Paul Boddie
On 12 Apr, 09:37, Antoon Pardon <[EMAIL PROTECTED]> wrote: > > Why then does python itself provide immutables? I find this reasoning > more than baffling. There has been all these arguments about why > it is best to use immutables as dictionary keys. You've answered your own question. If you had a

Re: OverflowError: mktime argument out of range ???

2007-04-16 Thread Paul Boddie
John Machin wrote: > > Maybe it does. It sure would be nice to get a definite answer. Pity > nobody documented the time module. "The epoch is the point where the time starts. On January 1st of that year, at 0 hours, the ``time since the epoch'' is zero. For Unix, the epoch is 1970. To find out wha

Re: Python Feature Request: Add the "using" keyword which works like "with" in Visual Basic

2007-04-16 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Please check for sanity and approve for posting at python-dev. Technically, you can post it yourself to python-dev, but you'll just get bounced back here to discuss it with us. ;-) > In Visual Basic there is the keyword "with" which allows an object- > name to be declar

ANNOUNCE: pprocess 0.3

2007-09-16 Thread Paul Boddie
Announcing the release of pprocess 0.3 (previously known as parallel/ pprocess), available from... http://www.python.org/pypi/pprocess/0.3 Note that only POSIX-like platforms are supported in this release, although improvements in portability and all other areas are welcome. What is it?

Re: SVG to raster conversion.

2007-09-17 Thread Paul Boddie
On 16 Sep, 19:50, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > > Thanks. I can't find a gimp-python package for gimp-2.x anywhere > though. Does such a thing exist? I noticed that my copy of The GIMP has Python extensions, and looking at the package details... http://packages.ubuntu.com/feisty/

Re: Extracting xml from html

2007-09-17 Thread Paul Boddie
On 17 Sep, 22:31, [EMAIL PROTECTED] wrote: > > What's the best way to get at the XML? Do I need to somehow parse it > using the HTMLParser and then parse that with minidom or what? Probably easiest is to use an XML processing toolkit or library which supports HTML parsing. Since the libxml2 librar

Re: Extracting xml from html

2007-09-18 Thread Paul Boddie
On 17 Sep, 23:14, [EMAIL PROTECTED] wrote: > > I have lxml installed and I appear to also have libxml2dom installed. > I know lxml has decent docs, but I don't see much for yours. Is this > the only place to go:http://www.boddie.org.uk/python/libxml2dom.html > ? Unfortunately yes, with regard to o

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-19 Thread Paul Boddie
On 19 Sep, 03:09, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > How much faster/slower would Greg Stein's code be on today's > processors versus CPython running on the processors of the late > 1990's? And if you decide to answer, please add a true/false response > to this statement - "CPython in

Re: compile for ARM

2007-09-19 Thread Paul Boddie
On 19 Sep, 20:36, Paul McGuire <[EMAIL PROTECTED]> wrote: > > The gumstix buildroot requires a Linux platform - I was able to build > Python for gumstix using a Debian environment. The gumstix mailing > list and wiki were very helpful. The inquirer might also consider crosstool, which is good at

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-20 Thread Paul Boddie
On 20 Sep, 00:59, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > Paul it's a pleasure to see that you are not entirely against > complaints. Well, it seems to me that I'm usually the one making them. ;-) > The very fastest Intel processor of the last 1990's that I found came > out in October 19

Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread Paul Boddie
On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote: > > That was for M2Crypto 0.17. > > It's still broken in M2Crypto 0.18. > > And there's no RPM or Windows binary. > > Nobody actually uses this stuff, do they? I can find Ubuntu packages for 0.16 and 0.17: http://packages.ubu

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 11:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Generally speaking, I think the real problem here is the clash > between "cultures" of dependency-handling. But it's certainly beyond > setuptools scope to cope with every imaginable package management system > out there, and provi

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 12:48, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [Quoting me...] > > However, the argument that a dependency manager cannot deal with > > different system packages is a weak one: apt and Smart have shown that > > dependency management can be decoupled from package management. > >

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 13:44, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Do I understand that correctly that essentially you're saying: if you want > your software released for a certain distro, package it up for it the way > it's supposed to be? I can understand that and said so myself - but then, > th

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 14:23, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > P.S. Of course, the package maintainer problem manifests itself most > > prominently on Windows where you often see people asking for pre-built > > packages or installers. > >

Re: How do I get the value out of a DOM Element

2007-09-27 Thread Paul Boddie
On 27 Sep, 07:50, kj7ny <[EMAIL PROTECTED]> wrote: > I have been able to get xml.dom.minidom.parse('somefile.xml') and then > dom.getElementsByTagName('LLobjectID') to work to the point where I > get something like: [] which I > can get down to but then I > can't find any way to just get the value

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Paul Boddie
On 2 Okt, 04:54, bramble <[EMAIL PROTECTED]> wrote: > > Maybe the key I'm missing is this: maybe GvR and company think that a > language absolutely should come off-the-shelf with GUI toolkit > bindings. So, given that, they feel they've gotta pick just one, and > they've already got Tkinter and it

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Paul Boddie
On 2 Okt, 22:35, bramble <[EMAIL PROTECTED]> wrote: > > Ahh... Ok. Thanks, that explains it. At first, it hadn't ocurred to me > that anyone would want to provide a GUI toolkit binding along with a > popular general purpose programming language implementation. Moreover, > it *really* wouldn't occur

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Paul Boddie
On 3 Okt, 11:30, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > > Thank you for confirming this, I did manage a work around. When > reading back the XML file, I strip it off it's whitespaces before I > parse it. Then when writing it back no excessive whitespaces are > appended. My best guess is that t

Re: Cross platform way of finding number of processors on a machine?

2007-10-06 Thread Paul Boddie
On 6 Okt, 12:45, [EMAIL PROTECTED] (Lawrence Oluyede) wrote: > > From processing : [...] > num = os.sysconf('SC_NPROCESSORS_ONLN') It's interesting what new (or obscure) standard library functions (and system functions) can be disco

Re: NUCULAR fielded text searchable indexing

2007-10-10 Thread Paul Boddie
On 9 Okt, 22:32, [EMAIL PROTECTED] wrote: > > Well I'd like people to use the software because they think > it's good. If the name is a problem it's probably only the > first of many reasons they won't want to use it or will not > like it because it doesn't match their preconceptions. Please igno

Re: CGI and external JavaScript nightmare

2007-10-16 Thread Paul Boddie
On 11 Okt, 08:23, IamIan <[EMAIL PROTECTED]> wrote: > My website is built from a Python CGI and works great. I'm now > including Google Ads, which requires two pieces of JavaScript; the > first contains the display settings for the ads, and the second piece > is a very lengthy garbled js file > at

Re: CGI and external JavaScript nightmare

2007-10-18 Thread Paul Boddie
On 18 Okt, 17:24, Steve Holden <[EMAIL PROTECTED]> wrote: > allen.fowler wrote: [Quoting IamIan...] > >> One CGI question - since all of my CGIs are spitting out HTML is their > >> source code safe? wget and linking to the source deliver the output > >> HTML. Are there any other methods of trying

Re: Noob: Loops and the 'else' construct

2007-10-19 Thread Paul Boddie
On 19 Okt, 13:39, Dustan <[EMAIL PROTECTED]> wrote: > On Oct 19, 3:12 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > > So a for/else loop is exactly the same thing as a for loop with the > > else clause outside the loop (except for "break")? > > Am I missing something here? It sounds to me like

Re: using "request" variable in python web program

2007-10-20 Thread Paul Boddie
On 21 Okt, 00:21, sami <[EMAIL PROTECTED]> wrote: > > def simple_web_app(request, api_key, secret_key): > fb = Facebook(api_key, secret_key, request.GET['auth_token']) > fb.auth_getSession() > > A Django-based tutorial and source is available > here:http://wiki.developers.facebook.com/inde

Re: using "request" variable in python web program

2007-10-21 Thread Paul Boddie
On 21 Okt, 21:59, sami <[EMAIL PROTECTED]> wrote: > > Thanks a ton Paul for the information. I am using CGI and my host > (nearlyfreespeech.net) does not have django hosting - and being mainly > a C/dekstop apps programmer I really don't want to learn the whole MVC > concept and its implementation

Re: Splitting URLs

2007-10-22 Thread Paul Boddie
On 22 Okt, 03:53, Tim Chase <[EMAIL PROTECTED]> wrote: > > This seems to be intentional, rather than a bug. In my > python2.4/urlparse.py file, there's a uses_netloc list which > clearly does not have 'mailto' in it. I can't give an > explanation/justification for it, but it seems to me (IMHO) th

Re: using "request" variable in python web program

2007-10-22 Thread Paul Boddie
On 22 Okt, 10:34, sami <[EMAIL PROTECTED]> wrote: > > See the library reference for information on how to get the value of > > form/request parameters from the CGI environment: > > >http://docs.python.org/lib/node561.html > > > Paul > > Thanks again Paul - now I can see that the "request" object is

Re: Cross-compiling porting of io.h, distutils compilator argument

2007-10-23 Thread Paul Boddie
On 23 Okt, 15:20, Otacon22 <[EMAIL PROTECTED]> wrote: > > If someone know how i can also directly use the gcc cross-compilator > to build the module, without using distutils, but i need also to know > when i compile it, then howto use on python as library. I think that this bug/patch is the most p

Re: How can i protect text format ?

2007-10-23 Thread Paul Boddie
On 23 Okt, 15:30, Abandoned <[EMAIL PROTECTED]> wrote: > Hi.. > I want to do a forum with python but i have a problem.. > > I have a and i write: > line 1 hi > line 2 how r u > > And then i save to this database ( colomn data type is text) > And than it looks "line 1 hi line 2 how r u".. > How can

Re: building a linux executable

2007-10-24 Thread Paul Boddie
On 24 Okt, 14:20, Bjoern Schliessmann wrote: > > I'm sorry I cannot help, but how many linux distros have no python > installed or no packages of it? It's not usually the absence of Python that's the problem. What if your application uses various extension modules which in turn rely on various li

Re: building a linux executable

2007-10-24 Thread Paul Boddie
On 24 Okt, 16:10, Bjoern Schliessmann wrote: > Paul Boddie wrote: > > It's not usually the absence of Python that's the problem. What if > > your application uses various extension modules which in turn rely > > on various libraries (of the .so or .a kind)? It may b

Re: "Standard" Full Text Search Engine

2007-10-26 Thread Paul Boddie
On 26 Okt, 19:33, Paul Rubin wrote: > > Ferret is basically a Lucene clone, originally written in Ruby but > with the intensive parts later rewritten in C for speed since the Ruby > version was too slow. There was something similar done in Python > (PyLucene, I think) th

Re: multi-protocol url-based IO -- pure python kioslave-like module?

2007-10-27 Thread Paul Boddie
On 27 Okt, 18:26, Rob McMullen <[EMAIL PROTECTED]> wrote: > Wheel reinvention preemption question: is there an existing pure- > python library with functionality similar to KDE's kio/kioslave > implementation? A multi-protocol, extensible library based on URLs > that abstracts directory listing an

Re: Getting callfunc from ast code.

2007-10-28 Thread Paul Boddie
On 28 Okt, 19:09, Glich <[EMAIL PROTECTED]> wrote: > """Hi, how can I extend the code shown below so that I can identify > any "CallFunc" in "func.code" and identify the value of "node" in > "CallFunc"? Thanks. > > This is my code so far: > """ I tend to use isinstance to work out what kind of AST

Re: problem opening html file with webbrowser.open

2007-10-29 Thread Paul Boddie
On 29 Okt, 11:44, "krishnakant Mane" <[EMAIL PROTECTED]> wrote: > hello all, > as I posted in my previous thread, I am generating html reports for my > client software. > I am yet to find a satisfactory module which can help me actually > create headings, bold and italics etc without merging html w

Re: A Python 3000 Question

2007-10-30 Thread Paul Boddie
On 30 Okt, 15:09, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > [Language "OOness", hand-waving] > I disagree. I think they *do* take away from the overall Object-Oriented > nature of the language, and that is A Very Good Thing Indeed. But everything is an object in Python: not

Re: XML document causes pickle to go into infinite recursion

2007-11-01 Thread Paul Boddie
On 1 Nov, 22:25, Orest Kozyar <[EMAIL PROTECTED]> wrote: > > > I'm working on a CGI script that pulls XML data from a public database > > > Ah, I missed that bit on first read. Consider using something different than > > CGI here if you want to do caching. FCGI would allow you to do in-memory > > c

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Paul Boddie
Sean Davis wrote: > > As for the specifics, Oracle data is going to be coming in as a DB-API > 2 cursor in manageable chunks (and at a relatively slow pace). On the > postgres loading side, I wanted to use the pscycopg2 copy_from > function, which expects an open file-like object (that has read an

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Paul Boddie
Dennis Lee Bieber wrote: > > "need"? No... the "copy ... from ..." statement "needs" such, but do > you really "need" to use "copy ... from ..." to load the data -- or is > this just a concept that caught your fancy? In chapter 13 of the PostgreSQL 8.1 documentation ("Performance Tips"), descendi

Re: Parallel Python

2007-01-12 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > The main difference between MPI python solutions and ppsmp is that with > MPI you have to organize both computations > {MPI_Comm_rank(MPI_COMM_WORLD, &id); if id==1 then ... else } and > data distribution (MPI_Send / MPI_Recv) by yourself. While with ppsmp > you jus

Re: Read from database, write to another database, simultaneously

2007-01-12 Thread Paul Boddie
Dennis Lee Bieber wrote: > The problem though, is that the original poster claimed the Oracle > data was being emitted in multiple chunks, not as a single output -- and > they want to avoid collecting the data in a temporary file... I think he wanted to know whether concurrent reads from Oracle a

Re: Parallel Python

2007-01-12 Thread Paul Boddie
robert wrote: > Paul Boddie wrote: > > > > [1] http://www.python.org/pypi/parallel > > I'd be interested in an overview. I think we've briefly discussed the above solution before, and I don't think you're too enthusiastic about anything using interproce

Re: Parallel Python

2007-01-12 Thread Paul Boddie
Konrad Hinsen wrote: > > That's one more project... It seems that there is significant > interest in parallel computing in Python. Perhaps we should start a > special interest group? Not so much in order to work on a single > project; I believe that at the current state of parallel computing we > s

Re: parsing a file name

2007-01-12 Thread Paul Boddie
Chris Mellon wrote: > > I'm trying to think of a good reason to extract the version from the > filename instead of using RPM to get the real version from the > metadata and I can't come up with one. The inquirer doesn't have any RPM handling tools installed/available or is dealing with a lot of ve

Re: Threaded for loop

2007-01-14 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > There is a module in development (processing.py) that provides an API like > the threading module but that uses processes under the covers: > > http://mail.python.org/pipermail/python-dev/2006-October/069297.html > > You might find that an interesting alternative.

Re: check if there is data in stdin without blocking

2007-01-15 Thread Paul Boddie
hg wrote: > import select [...] > File "/home/philippe/Desktop/select.py", line 4, in ? Consider which module Python is trying to import here: the standard library select module or your own program? Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Distributed computation of jobs (was: Parallel Python)

2007-01-17 Thread Paul Boddie
A.T.Hofkamp skrev: > > Let me add a few cents to the discussion with this announcement: [Notes about exec_proxy, batchlib and rthread] I've added entries for these modules, along with py.execnet, to the parallel processing solutions page on the python.org Wiki: http://wiki.python.org/moin/Parall

Re: Distributed computation of jobs

2007-01-18 Thread Paul Boddie
robert wrote: > > as many libs are restriced to certain OS'es, and/or need/rely on > extension modules, few tags would probably improve: OS'es, > pure-python, dependeniess I've added some platform notes, although the library dependencies of various MPI and PVM solutions are sort of obvious, but I'

Re: Is there a better way to implement this:

2007-01-22 Thread Paul Boddie
Michael Yanowitz wrote: > >I guess I am looking for something portable (both > Windows and Linux) where I can abort a function after > a certain time limit expires. Doing a search for "timeout function Python" on Google reveals a number of approaches. Using signals: * http://nick.vargish.o

Re: Python does not play well with others

2007-01-24 Thread Paul Boddie
On 24 Jan, 02:50, John Nagle <[EMAIL PROTECTED]> wrote: >The major complaint I have about Python is that the packages > which connect it to other software components all seem to have > serious problems. As long as you don't need to talk to anything > outside the Python world, you're fine. I t

Re: Python does not play well with others

2007-01-25 Thread Paul Boddie
On 25 Jan, 12:01, "Ben Sizer" <[EMAIL PROTECTED]> wrote: > > Python is quite capable in many areas, such that the people in the > community with the expertise to extend the language and libraries, are > usually the ones who've been happily using the polished features for > years and have found they

Re: Handling empty form fields in CGI

2007-01-26 Thread Paul Boddie
Christopher Mocock wrote: > > Bit of a python newbie so need a little help with a CGI script I'm > trying to write. I've got it working fine as long as the fields of the > form are filled in correctly, however I need to be able to accept blank > entries. Therefore I want to convert any empty entrie

Re: Please take me off the list

2007-01-30 Thread Paul Boddie
On 30 Jan, 16:33, Mikael Olofsson <[EMAIL PROTECTED]> wrote: > >http://mail.python.org/mailman/listinfo/python-list See also the Tutor mailing list, which might be a bit better for starting to learn Python, should you (Daniel) decide to change your mind. Here's the mailing list's Web page:

Re: Ubunu - Linux - Unicode - encoding

2007-02-01 Thread Paul Boddie
On 1 Feb, 16:02, Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: > > The case: > I have a file on a WindowsXP partition which has as contents german > umlauts and the filename itself has umlauts like iÜüäßk.txt > > If I want to append this file to a list, I get somehow latin-1, cannot > decode 'utf-

Re: Python does not play well with others

2007-02-02 Thread Paul Boddie
On 2 Feb, 03:46, Paul Rubin wrote: > > I'd say the functionality that John wants is the same that pretty much > everyone wants, and it's much easier to get for other languages than > for Python. If the hosting provider doesn't want to install MySQLdb then it may not be a

Re: Python does not play well with others

2007-02-02 Thread Paul Boddie
On 2 Feb, 04:56, Ben Finney <[EMAIL PROTECTED]> wrote: > > A bug report should be sent to the bug tracker for the software > against which you're reporting a bug. Only at that point does it > become something on which you can comment about attitude toward bug > reports, because before that point th

Re: Python does not play well with others

2007-02-03 Thread Paul Boddie
Chris Mellon wrote: > On 02 Feb 2007 11:10:04 -0800, Paul Rubin > <"http://phr.cx"@nospam.invalid> wrote: > > "Paul Boddie" <[EMAIL PROTECTED]> writes: > > > If the hosting provider doesn't want to install MySQLdb then it may > > >

Re: Python does not play well with others

2007-02-03 Thread Paul Boddie
Paul Rubin wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > > > Since Python is being touted as good for web apps as a competitor to > > > PHP > > > > Python is being touted as a good language for *many* purposes, not > > just web applications. Python is also a "competitor" to Java, to Ruby, > > t

Re: Python does not play well with others

2007-02-04 Thread Paul Boddie
Kirk Sluder wrote: > In article <[EMAIL PROTECTED]>, > "Paul Boddie" <[EMAIL PROTECTED]> wrote: > > > Quite. I imagine that most GNU/Linux distributions (and various BSDs) > > provide at least some version of MySQLdb as a package. > > Bingo, I

Re: Python does not play well with others

2007-02-04 Thread Paul Boddie
Paul Rubin wrote: > "Paul Boddie" <[EMAIL PROTECTED]> writes: > > Python should only incorporate functionality in order to offer a > > coherent experience (where the omission of functionality would > > otherwise lead to a flawed experience). For example, hav

Re: Python does not play well with others

2007-02-04 Thread Paul Boddie
Jorge Godoy wrote: > "Paul Boddie" <[EMAIL PROTECTED]> writes: > > > And while Python eggs may be useful for people managing additional > > software as some unprivileged user, hosting providers (and virtual > > private server administrators) will want packa

Re: Python does not play well with others

2007-02-04 Thread Paul Boddie
John Nagle wrote: > > The real problems are with integration of modules that > aren't written in Python. Python-only modules don't have the > version compatibility problems which C modules do. Loading > a Python-only module from an external source is usually not > a big deal. Building a C m

Re: Python does not play well with others

2007-02-04 Thread Paul Boddie
Graham Dumpleton wrote: > > Having said all that, perhaps those who are complaining about lack of > support for specific features in mod_python can now clarify what > actually you are talking about. At the moment the brief comments being > made seem to possibly cover some things that mod_python can

Re: Python does not play well with others

2007-02-05 Thread Paul Boddie
On 5 Feb, 18:52, John Nagle <[EMAIL PROTECTED]> wrote: > >Pre-forking doesn't reduce load; it just improves responsiveness. > You still pay for loading all the modules on every request. For > many AJAX apps, the loading cost tends to dominate the transaction. According to the Apache prefork d

Re: XMLRPC Server

2007-02-06 Thread Paul Boddie
On 6 Feb, 12:30, "Lorenzo" <[EMAIL PROTECTED]> wrote: > Unfortunately I have to use Apache. The server implementation will we > very easy, so I'm also considering more efficient solutions than > python You could try mod_python if there isn't an absolute requirement for CGI: http://www.modpython.o

Re: when will python 2.5 take in mainstream?

2007-02-06 Thread Paul Boddie
On 6 Feb, 13:45, "Ben Sizer" <[EMAIL PROTECTED]> wrote: > > Perhaps the C API remains the same but the real > issue is the binary API between extensions and Python changes every > couple of years or so. That's why I run 2.4 anywhere that needs > extensions. > > It would be great if someone could in

Re: multithreading concept

2007-02-07 Thread Paul Boddie
On 7 Feb, 02:53, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > > Python is praised about - me too. But at one instance it fails. It fails to > behave as a true multi-threaded application. That means utilizing all the > CPUs parallely in the SMP efficiently stays as a dream for a Python > Programmer. T

Re: Freeze packaging for Debian

2007-02-13 Thread Paul Boddie
On 13 Feb, 16:48, [EMAIL PROTECTED] (Cameron Laird) wrote: > How is Freeze--freeze.py http://wiki.python.org/moin/Freeze>--packaged > for Debian? *Is* it packaged for Debian? A search for freeze.py in package contents conducted from the Debian packages page [1] indicates that the file in question

Re: threading and multicores, pros and cons

2007-02-15 Thread Paul Boddie
On 15 Feb, 00:14, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Yeah, it's the Window equivalent to fork. Does true copy-on-write, so > you can do efficient multiprocess work. Aside from some code floating around the net which possibly originates from some book on Windows systems programming

Re: Approaches of interprocess communication

2007-02-16 Thread Paul Boddie
On 16 Feb, 14:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > You can't leave WSDL out of SOAP Yes you can, since they're two different things. What you probably meant was that you can't leave WSDL out of "big architecture", W3C standards-intensive Web services. Of course, RPC-style SOAP wit

Re: Approaches of interprocess communication

2007-02-16 Thread Paul Boddie
On 16 Feb, 14:53, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [XMPP, XML messaging] > Didn't know that. Yet I presume it is pretty awful to manually decompose and > compose the method invocations and parameter sets. It depends on how well you like working with XML, I suppose. > I've got no

Re: Complex HTML forms

2007-02-17 Thread Paul Boddie
George Sakkis wrote: > When the form is submitted, the selected options are passed in the server in > some form > that preserves the hierarchy, i.e. not as a flat dict. Is there anything > close to such a beast around ? Yes, I have a framework called XSLForms which generates hierarchical field n

Re: Python-list Digest, Vol 41, Issue 286

2007-02-20 Thread Paul Boddie
On 20 Feb, 11:59, KoDer <[EMAIL PROTECTED]> wrote: > > Subject: Can I reverse eng a .pyc back to .py? [...] > https://svn.cs.pomona.edu/sys/src/konane/pyunparse.py > > Need add new AST nodes if You want to use it with python2.5. The above code seems to need to parse a source file, since it uses

Re: threading and multicores, pros and cons

2007-02-20 Thread Paul Boddie
Nikita the Spider wrote: > > Hmmm, I hadn't thought about that since I've never used the Cheese Shop > myself. What benefits does Cheese > Shop confer to someone looking for a package? I ask because from my > perspective it just adds overhead to package maintenance. The Python Package Index, as I

Re: Python 3.0 unfit for serious work?

2007-02-20 Thread Paul Boddie
Steven Bethard wrote: > > Well, Python 2.4 code will work on Python 2.6 and 2.7 so just because > your code isn't yet compatible with Python 3.0 doesn't mean you should > give up on Python. Perhaps the most important concern in the context of Python 3.0 is what the term "Python" will come to mean

Re: Python 3.0 unfit for serious work?

2007-02-20 Thread Paul Boddie
Jay Tee wrote: > > Paul, thanks for this, I didn't realize the scope of the situation. I > agree with your assessment to the extent that I understand what the > whole python 3.0 thing is about. I don't know if I've delimited the scope of any situation, really. However... [...] > The fact that t

Re: plugin development best practices

2007-02-22 Thread Paul Boddie
On 22 Feb, 16:13, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Darn. You're right of course - I just got the basic idea, and formed in my > mind the "get the modules filename, thus the path, glob over it for *py, > and thus get the subsequent module names"-pattern. Which is trivial of > course

<    1   2   3   4   5   6   7   8   9   10   >