Re: Awkwardness of C API for making tuples

2005-02-03 Thread Fredrik Lundh
Steve Holden wrote: >> in theory, if PyInt_FromLong succeeds, and PyTuple_SetItem fails, you'll leak >> an object. > > And in practice this will only happen during a period when you are relying > critically on it *not* > to ... yeah, but if PyTuple_SetItem fails in this case, you better move th

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
Tim Daneliuk <[EMAIL PROTECTED]> writes: > [other good stuff from Tim snipped] > > Today I think most seeks can be eliminated by just using ram or SSD > > (solid state disks) instead of rotating disks. But yeah, you wouldn't > > do that on a laptop. > > But that still does not solve the latency p

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-03 Thread Fredrik Lundh
Markus Wankus wrote: > Google his name - he has been banned from Netbeans and Eclipse (and > Hibernate, and others...) for > good reason. Can you imagine how much of a Troll you need to be to > *actually* get "banned" from > the newsgroups of open source projects such as those? have Pythonee

Re: Possible additions to the standard library? (WAS: About standard library improvement)

2005-02-03 Thread Fredrik Lundh
Daniel Bickett wrote: > [2] I'm currently unaware if _winreg is a c extension module or pure > python, but I'm assuming it's C, so I don't know how possible it is to > add pure python to it... from the documentation: This module exposes a very low-level interface to the Windows registry;

Re: managing multiple subprocesses

2005-02-03 Thread Donn Cave
Quoth Skip Montanaro <[EMAIL PROTECTED]>: | > "Marcos" == Marcos <[EMAIL PROTECTED]> writes: | | Marcos> I have tried all sorts of popens / excevs / os.systems / | Marcos> commands etc etc. | | I think os.spawn* and os.wait will do what you want. I have trouble with | os.spawn* mysel

Re: exporting mesh from image data

2005-02-03 Thread Fernando Perez
John Hunter wrote: > > I am trying to generate a mesh for a finite volume solver (gambit, > fluent) from 3D image data (CT, MRI). To generate the fluent msh > file, you need not only a list of vertices and polygons, much like > what is available in the vtk file format, but also the volume elemen

Re: Computing class variable on demand?

2005-02-03 Thread fortepianissimo
Thank you so much about this useful tip! I learned the new decorator feature of 2.4 simply because of your post. Unfortunately I don't have luxury right now to run Python 2.4 (for what I'm doing anyways). You mentioned the way to do decorator in 2.3. Still I have a question here. Here is Scott Dav

Re: advice needed for simple python web app

2005-02-03 Thread Paul Rubin
"Dan Perl" <[EMAIL PROTECTED]> writes: > This is exactly the kind of summary that I think should be in a > WebProgrammingShootOut (see another one of my postings in this > thread) but I failed to find such a summary. Thanks, Brian! Anyone > can add to the list? If you're just trying to get a con

Re: IPython colors in windows

2005-02-03 Thread Fernando Perez
Ashot wrote: > I am using IPython in windows and the LightBG setting doesn't correctly > because the background of the text is black even if the console background > is white. Anyone know whats going on? Thanks. It's quite possible that it's a bug in the UNC readline implementation proper. How

Re: advice needed for simple python web app

2005-02-03 Thread Dan Perl
"Brian Beck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > From my experience, this appears to be the order from low-level to > high-level interfaces: > > 1. mod_python: As complex as you need it to be, since you can control > anything about the request & response process. But m

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Tim Daneliuk
Paul Rubin wrote: Tim Daneliuk <[EMAIL PROTECTED]> writes: I worked for an Airline computer reservation system (CRS) for almost a decade. There is nothing about today's laptops that remotely comes close to the power of those CRS systems, even the old ones. CRS systems are optimized for extremely hi

Re: advice needed for simple python web app

2005-02-03 Thread Paul Rubin
"Dan Perl" <[EMAIL PROTECTED]> writes: > > Be careful of exposing that script to the internet. Spammers will > > exploit it. > > Do you mean publishing the script for other people to copy it or exposing > the web app so that other people may access it? I mean installing the script on a server w

Re: advice needed for simple python web app

2005-02-03 Thread Dan Perl
"Michele Simionato" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Perl: >> The application is just something I'm playing with to learn a little > bit on >> web apps. It uses an HTML form to send an email. The form takes > inputs >> like the From:, To: and Subject: fields and

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 20:50:16 -0800, Paul Rubin wrote: > I understood the Twisted suggestion as meaning avoiding database > traffic by keeping both user and server state resident in the > application. Yes, if you use a database for that, you get multiple > app servers instead of a heavily loaded ce

Re: advice needed for simple python web app

2005-02-03 Thread Brian Beck
Dan Perl wrote: Basically, what I'm looking for is a web server that accepts an HTTP request and invokes a python script. But I would like a "pythonic" solution so a web server like Apache is a solution that I would like to avoid. The server should also be as simple as possible to administrate

Re: advice needed for simple python web app

2005-02-03 Thread Dan Perl
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Dan Perl" <[EMAIL PROTECTED]> writes: >> The application is just something I'm playing with to learn a little bit >> on >> web apps. It uses an HTML form to send an email. The form takes inputs >> like the From:

Re: Printing Filenames with non-Ascii-Characters

2005-02-03 Thread vincent wehren
Marian Aldenhövel wrote: Hi, > Python's drive towards uncompromising explicitness pays off big time when you're dealing with multilingual data. Except for the very implicit choice of 'ascii' as an encoding when it cannot make a good guess of course :-). Since 'ascii' is a legal subset Unicode and

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
aurora <[EMAIL PROTECTED]> writes: > I'm lost. So what do you compares against when you said LAMP is slow? > What is the reference point? Is it just a general observation that > slashdot is slower than we like it to be? Yes, that's the basic observation, not specifically Slashdot but for lots of

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
"M.E.Farmer" <[EMAIL PROTECTED]> writes: > To emulate a table you use the div and span tag. > (really you can do just about anything with div and span) Hmm, that's pretty interesting, I didn't realize you could specify width's with CSS. Thanks. http://glish.com/css/9.asp shows a 2-column example

Re: OT: why are LAMP sites slow?

2005-02-03 Thread aurora
aurora <[EMAIL PROTECTED]> writes: Slow compares to what? For a large commerical site with bigger budget, better infrastructure, better implementation, it is not surprising that they come out ahead compares to hobbyist sites. Hmm, as mentioned, I'm not sure what the commercial sites do that's diff

Re: advice needed for simple python web app

2005-02-03 Thread Paul Rubin
"Dan Perl" <[EMAIL PROTECTED]> writes: > The application is just something I'm playing with to learn a little bit on > web apps. It uses an HTML form to send an email. The form takes inputs > like the From:, To: and Subject: fields and a text field. Be careful of exposing that script to the in

Re: advice needed for simple python web app

2005-02-03 Thread Michele Simionato
Dan Perl: > The application is just something I'm playing with to learn a little bit on > web apps. It uses an HTML form to send an email. The form takes inputs > like the From:, To: and Subject: fields and a text field. It is difficult to beat CGI + CGIHTTPServer for conceptual simplificity and

Re: advice needed for simple python web app

2005-02-03 Thread Dan Perl
"M.E.Farmer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am no web expert but have recently used cherrypy to 'webify' a > script. It is very easy to get going and has its own server or can be > run behind Apache. > The only real problem I see is that the docs are still a little

Re: advice needed for simple python web app

2005-02-03 Thread Dan Perl
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Dan Perl" <[EMAIL PROTECTED]> writes: >> Basically, what I'm looking for is a web server that accepts an HTTP >> request and invokes a python script. But I would like a "pythonic" >> solution so a web server like

Re: OT: why are LAMP sites slow?

2005-02-03 Thread M.E.Farmer
Paul Rubin wrote: > Yes, good point about html tables, though I'm concerned primarily > about server response. (It's off-topic, but how do you use CSS to get > the effect of tables?) To emulate a table you use the div and span tag. (really you can do just about anything with div and span) Div is a

Re: OT: why are LAMP sites slow?

2005-02-03 Thread M.E.Farmer
Paul Rubin wrote: > Yes, good point about html tables, though I'm concerned primarily > about server response. (It's off-topic, but how do you use CSS to get > the effect of tables?) To emulate a table you use the div and span tag. (really you can do just about anything with div and span) Div is a

Re: OT: why are LAMP sites slow?

2005-02-03 Thread M.E.Farmer
Paul Rubin wrote: > Yes, good point about html tables, though I'm concerned primarily > about server response. (It's off-topic, but how do you use CSS to get > the effect of tables?) To emulate a table you use the div and span tag. (really you can do just about anything with div and span) Div is a

Re: OT: why are LAMP sites slow?

2005-02-03 Thread M.E.Farmer
Paul Rubin wrote: > Yes, good point about html tables, though I'm concerned primarily > about server response. (It's off-topic, but how do you use CSS to get > the effect of tables?) To emulate a table you use the div and span tag. (really you can do just about anything with div and span) Div is a

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
Jeremy Bowers <[EMAIL PROTECTED]> writes: > > Hmm, I'm not familiar with Nevow. Twisted is pretty neat, though > > confusing. I don't see how to scale it to multiple servers though. > > Same way you'd scale any webserver, load balancing in hardware, store all > user state in a database, and tell

Re: Where are list methods documented?

2005-02-03 Thread Terry Reedy
"Nelson Minar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You're not the only one with a hard time finding the list > documentation. It's even crazier for string docs. To repeat the advice I gave someone asking about dict methods: Read or at least skim thru chapter 2 of the L

Re: advice needed for simple python web app

2005-02-03 Thread Paul Rubin
"Dan Perl" <[EMAIL PROTECTED]> writes: > Basically, what I'm looking for is a web server that accepts an HTTP > request and invokes a python script. But I would like a "pythonic" > solution so a web server like Apache is a solution that I would like > to avoid. The server should also be as simple

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
Skip Montanaro <[EMAIL PROTECTED]> writes: > It's more than a bit unfair to compare Wikipedia with Ebay or > Google. Even though Wikipedia may be running on high-performance > hardware, it's unlikely that they have anything like the underlying > network structure (replication, connection speed, et

Weekly Python Patch/Bug Summary

2005-02-03 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 284 open ( +4) / 2748 closed ( +1) / 3032 total ( +5) Bugs: 804 open ( +1) / 4812 closed (+13) / 5616 total (+14) RFE : 167 open ( +0) / 142 closed ( +1) / 309 total ( +1) New / Reopened Patches __ Patch for

Re: advice needed for simple python web app

2005-02-03 Thread M.E.Farmer
I am no web expert but have recently used cherrypy to 'webify' a script. It is very easy to get going and has its own server or can be run behind Apache. The only real problem I see is that the docs are still a little lite for the new 2.0 series ,but they do have a newsgroup where the author still

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 19:00:30 -0800, Paul Rubin wrote: > Hmm, I'm not familiar with Nevow. Twisted is pretty neat, though > confusing. I don't see how to scale it to multiple servers though. Same way you'd scale any webserver, load balancing in hardware, store all user state in a database, and te

Re: Is there a market for python developers?

2005-02-03 Thread David Fraser
Mabon Dane wrote: I am new to python and took my first attempts at working with this language today. Is there a market for people who work with Python? Slavery is outlawed in most parts of the world these days :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-03 Thread Jeremy Bowers
On Thu, 03 Feb 2005 22:46:24 -0500, Markus Wankus wrote: > I realize your admirable intentions and the fact that you are simply > trying to help (the beauty of this community), but I beg you all > now...PLEASE...do not feed this troll. Any responses to his posts will > simply snowball into the

Re: IPython colors in windows

2005-02-03 Thread DogWalker
"Ashot" <[EMAIL PROTECTED]> said: >On 3 Feb 2005 19:18:33 -0800, James <[EMAIL PROTECTED]> wrote: > >> >> Ashot wrote: >>> I am using IPython in windows and the LightBG setting doesn't >> correctly >>> because the background of the text is black even if the console >> background >>> is white. Any

Re: IPython colors in windows

2005-02-03 Thread Ashot
On 3 Feb 2005 19:18:33 -0800, James <[EMAIL PROTECTED]> wrote: Ashot wrote: I am using IPython in windows and the LightBG setting doesn't correctly because the background of the text is black even if the console background is white. Anyone know whats going on? Thanks. -- =

advice needed for simple python web app

2005-02-03 Thread Dan Perl
I have a pretty simple python script and I would like to turn it into a web application but web apps are a domain I know very little about. I know that Twisted, CherryPy, Plone and Zope exist but not exactly what they do. I need only advice on a direction to take. For instance a suggestion on

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Skip Montanaro
Paul> I'm talking about the very familiar experience of clicking a link Paul> and then waiting, waiting, waiting for the page to load. You Paul> rarely see that happen with Ebay or Google. It happens all the Paul> time with Wikipedia. It's more than a bit unfair to compare Wikip

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-03 Thread Markus Wankus
OH GOD! I cannot believe Ilias has shown up here... Google his name - he has been banned from Netbeans and Eclipse (and Hibernate, and others...) for good reason. Can you imagine how much of a Troll you need to be to *actually* get "banned" from the newsgroups of open source projects such as t

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-03 Thread Markus Wankus
I highly recommend trying pyDev. 0.9 just came out, and I find 0.85 very usable and quite cool. There is nice debug support, and context-sensitive code completion as well as real-time validation of your code. This is an exciting project with a bright future in my opinion. Markus. Ashot wrote

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Robert Kern
Jorl Shefner wrote: I use a version of 2.3.4 on my Os X system that I installed myself without any apparent loss of functionality. What extra advantages is the Apple installed version supposed to provide? Currently, Apple uses Python and the CoreGraphics wrappers (which aren't in the standard

Possible additions to the standard library? (WAS: About standard library improvement)

2005-02-03 Thread Daniel Bickett
I was reading the thread by Frank Bello[1] about his offered addition to the xmlrpclib module, and it reminded me of a few methods I had made in the past that I considered worthy of being a part of the standard library. Rather than reiterate his question of how one gets one's patch into the standa

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
aurora <[EMAIL PROTECTED]> writes: > Slow compares to what? For a large commerical site with bigger budget, > better infrastructure, better implementation, it is not surprising > that they come out ahead compares to hobbyist sites. Hmm, as mentioned, I'm not sure what the commercial sites do that

Re: IPython colors in windows

2005-02-03 Thread James
Ashot wrote: > I am using IPython in windows and the LightBG setting doesn't correctly > because the background of the text is black even if the console background > is white. Anyone know whats going on? Thanks. > > -- > == > Ashot Petrosian > University of Texas at A

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
Tim Daneliuk <[EMAIL PROTECTED]> writes: > I worked for an Airline computer reservation system (CRS) for almost a > decade. There is nothing about today's laptops that remotely comes close > to the power of those CRS systems, even the old ones. CRS systems are > optimized for extremely high perform

Re: OT: why are LAMP sites slow?

2005-02-03 Thread aurora
Slow compares to what? For a large commerical site with bigger budget, better infrastructure, better implementation, it is not surprising that they come out ahead compares to hobbyist sites. Putting implementation aside, is LAMP inherently performing worst than commerical alternatives like I

Re: [Fwd: [gnu.org #220719] Re: python and gpl]

2005-02-03 Thread John Hunter
> "Paul" == Paul Rubin <"http://phr.cx"@NOSPAM.invalid> writes: Paul> Various possible candidates for such dragging have Paul> apparently decided that their chances weren't too good. Or simply that it wasn't worth the cost to go to court, even if they presumed they would eventually wi

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
Kartic <[EMAIL PROTECTED]> writes: > And the reason for that I probably because of the way the language is > used (PHP) (this is a shot in the dark as I have not looked into > Mediawiki code), and compounded by probably an unoptimized database. I have the idea that the Wikipedia implementers know

Re: [Fwd: [gnu.org #220719] Re: python and gpl]

2005-02-03 Thread Paul Rubin
Tim Churches <[EMAIL PROTECTED]> writes: > See also this article, in which Lawrence Rosen, the attorney for > OSI, admits that it is impossible for anyone to properly interpret > the application of various open source licenses under the various > national laws: http://www.devx.com/opensource/Articl

Re: Finding user's home dir

2005-02-03 Thread Peter Hansen
Nemesis wrote: On my Win2000 box it returns "%USERPROFILE%". That's no surprise because if you look at the code it try to use os.environ["HOME"] (as os.path.expanduser() does). And on my Win2000 system this information points to "%USERPROFILE%" field (I don't know why, I'm not the administrator of

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Kartic
Paul Rubin said the following on 2/3/2005 7:20 PM: LAMP = Linux/Apache/MySQL/P{ython,erl,HP}. Refers to the general class of database-backed web sites built using those components. This being c.l.py, if you want, you can limit your interest to the case the P stands for Python. I notice that lots

Re: [Fwd: [gnu.org #220719] Re: python and gpl]

2005-02-03 Thread Tim Churches
Steve Holden <[EMAIL PROTECTED]> wrote: > > In the absence of other information I Cc'd [EMAIL PROTECTED] to ask their > opinion about the relationship between GPL'd Python modules and > programs that imported them ... > > If a Python program imports a module licensed under the GPL, in your > >

Re: Is there a market for python developers?

2005-02-03 Thread Luis M. Gonzalez
Peter Hansen wrote: > Yes. Man of few words... -- http://mail.python.org/mailman/listinfo/python-list

Re: how to generate SQL SELECT pivot table string

2005-02-03 Thread John Machin
McBooCzech wrote: > Hallo all, > > I am trying to generate SQL SELECT command which will return pivot > table. The number of column in the pivot table depends on the data > stored in the database. It means I do not know in advance how many > columns the pivot table will have. > > For example I will

Re: About standard library improvement

2005-02-03 Thread Steve Holden
BJörn Lindqvist wrote: The process seem slow. I've submitted two patches and haven't gotten any response so far, but it has only been three weeks. Other patches seem to be idling for months. I'm not complaining, just want to know why the process is so slow and what you can do when you submit patche

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Tim Daneliuk
Paul Rubin wrote: Simon Wittber <[EMAIL PROTECTED]> writes: Slow is such an ambiguous term. Do you mean the pages are slow to render in a browser, or slow to be fetched from the server, or the server is slow to respond to requests? What is slow? The server is slow to respond to requests. Browser

Re: [Fwd: [gnu.org #220719] Re: python and gpl]

2005-02-03 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > In the absence of other information I Cc'd [EMAIL PROTECTED] to ask their > opinion about the relationship between GPL'd Python modules and > programs that imported them In the OP's particular case, he got the agreement of the GPL'd module's author, so it

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Dave Brueck
Paul Rubin wrote: How would you go about building such a site? Is LAMP really the right approach? Two major problems I've noticed, don't know if they are universal, but they sure hurt the performance: 1) Some sites have not put any thought into caching - i.e. the application server is serving u

[Fwd: [gnu.org #220719] Re: python and gpl]

2005-02-03 Thread Steve Holden
In the absence of other information I Cc'd [EMAIL PROTECTED] to ask their opinion about the relationship between GPL'd Python modules and programs that imported them Original Message [EMAIL PROTECTED] - Mon Jan 31 15:49:28 2005]: Scott Robinson wrote: > On 30 Jan 2005 21:59:25

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Tim Daneliuk
Paul Rubin wrote: I've only worked on one serious site of this type and it was "SAJO" (Solaris Apache Java Oracle) rather than LAMP, but the concepts are the same. I just feel like something bogus has to be going on. I think even sites like Slashdot handle fewer TPS than a 1960's airline reserva

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
Simon Wittber <[EMAIL PROTECTED]> writes: > Slow is such an ambiguous term. Do you mean the pages are slow to > render in a browser, or slow to be fetched from the server, or the > server is slow to respond to requests? What is slow? The server is slow to respond to requests. Browser rendering is

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Simon Wittber
> I notice that lots of the medium-largish sites (from hobbyist BBS's to > sites like Slashdot, Wikipedia, etc.) built using this approach are > painfully slow even using seriously powerful server hardware. Slow is such an ambiguous term. Do you mean the pages are slow to render in a browser, or

Re: how to generate SQL SELECT pivot table string

2005-02-03 Thread McBooCzech
Thanks for your comment but I am NOT looking for the answer to the question: "Which SQL command will return requested pivot table"(anyway it will be an OFF TOPIC question here). My SQL SELECT statement works fine with Firebird 1.5! What I am looking how to generate this SELECT using Python. Anyway

Re: how to generate SQL SELECT pivot table string

2005-02-03 Thread Michael Spencer
McBooCzech wrote: Hallo all, I am trying to generate SQL SELECT command which will return pivot table. The number of column in the pivot table depends on the data stored in the database. It means I do not know in advance how many columns the pivot table will have. For example I will test the databa

IPython colors in windows

2005-02-03 Thread Ashot
I am using IPython in windows and the LightBG setting doesn't correctly because the background of the text is black even if the console background is white. Anyone know whats going on? Thanks. -- == Ashot Petrosian University of Texas at Austin, Computer Sciences

Re: dict indexed by lists - ?

2005-02-03 Thread Steven Bethard
Alexander Zatvornitskiy wrote: Hello All! I'am trying to make something like this: CPT={ ['b0','c0']:1, ['b0','c1']:0, ['b1','c0']:3, ['b1','c1']:1 } but python says "TypeError: list objects are unhashable" I can replace list with touple: CPT={ ('b0','c0'):1, ('b0','c1'):0, ...and so on. But, where

Re: OT: why are LAMP sites slow?

2005-02-03 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > >I've only worked on one serious site of this type and it was "SAJO" >(Solaris Apache Java Oracle) rather than LAMP, but the concepts are >the same. I just feel like something bogus has to be going on. I >think even s

Re: how to generate SQL SELECT pivot table string

2005-02-03 Thread [EMAIL PROTECTED]
McBooCzech wrote: > Hallo all, > > I am trying to generate SQL SELECT command which will return pivot > table. The number of column in the pivot table depends on the data > stored in the database. It means I do not know in advance how many > columns the pivot table will have. > > For example I will

Re: CGI and HTTP Header Location redirects

2005-02-03 Thread Paul Rubin
Derek Basch <[EMAIL PROTECTED]> writes: > Also, after enabling suEXEC on the apache server the script executes > perfectly with the redirect. Can anyone explain this behavior? I > would guess that it is related to apache user rights but I can't > find any reference to such problems via Google. Apa

dict indexed by lists - ?

2005-02-03 Thread Alexander Zatvornitskiy
Hello All! I'am trying to make something like this: CPT={ ['b0','c0']:1, ['b0','c1']:0, ['b1','c0']:3, ['b1','c1']:1 } but python says "TypeError: list objects are unhashable" I can replace list with touple: CPT={ ('b0','c0'):1, ('b0','c1'):0, ...and so on. But, where is one problem: indexes (o

CGI and HTTP Header Location redirects

2005-02-03 Thread Derek Basch
Hello, I have been dealing with some strange behavior using CGI, python and an HTTP Header "Location:" redirect on an Apache 1.3 server. If I call a CGI script and perform a "Location:" redirect the script seems to silently run off the tracks immediately after the redirect. For example "0.xml" an

OT: why are LAMP sites slow?

2005-02-03 Thread Paul Rubin
LAMP = Linux/Apache/MySQL/P{ython,erl,HP}. Refers to the general class of database-backed web sites built using those components. This being c.l.py, if you want, you can limit your interest to the case the P stands for Python. I notice that lots of the medium-largish sites (from hobbyist BBS's t

how to generate SQL SELECT pivot table string

2005-02-03 Thread McBooCzech
Hallo all, I am trying to generate SQL SELECT command which will return pivot table. The number of column in the pivot table depends on the data stored in the database. It means I do not know in advance how many columns the pivot table will have. For example I will test the database as following:

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-03 Thread John Machin
Leeuw van der, Tim wrote: > > > > > > -Original Message- > > From: [EMAIL PROTECTED] on behalf of John Machin > > Sent: Thu 2/3/2005 12:00 PM > > To: python-list@python.org > > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1,2.4.0) > > > > > > Leeuw van der, Ti

Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1, 2.4.0)

2005-02-03 Thread John Machin
Leeuw van der, Tim wrote: > > > > > > -Original Message- > > From: [EMAIL PROTECTED] on behalf of John Machin > > Sent: Thu 2/3/2005 12:00 PM > > To: python-list@python.org > > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4, 2.3.5rc1,2.4.0) > > > > > > Leeuw van der, Ti

Re: About standard library improvement

2005-02-03 Thread Steven Bethard
Lee Harr wrote: On 2005-02-03, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: The process seem slow. I've submitted two patches and haven't gotten any response so far, but it has only been three weeks. Other patches seem to be idling for months. I'm not complaining, just want to know why the process is

Regular expression match objects - compact syntax?

2005-02-03 Thread Johann C. Rocholl
Hello python-list, I have a question about the match objects that are returned from the match() method of compiled regular expression objects from the 're' module. To parse Postscript T1 fonts that were disassembled into plaintext, I came up with the following code: import re rmoveto = re.compile

Re: Reinstall python 2.3 on OSX 10.3.5?

2005-02-03 Thread Dominique O. Martel
0) compile and install GNU readline 5.0 with the usual ./configure method ftp://ftp.cwru.edu/pub/bash/readline-5.0.tar.gz 1) as an administrator, remove the contents of "/System/Library/Frameworks/Python.framework" 2) install Python from the standard distribution: ./configure --enable-framework=

Re: bytecode obfuscation

2005-02-03 Thread snacktime
On Thu, 3 Feb 2005 17:28:50 -0500, Daniel Bickett <[EMAIL PROTECTED]> wrote: > snacktime wrote: > > How difficult is it to turn python bytecode into it's original source? > > Is it that much different than java (this is what they will probably > > compare it to) ? > > As far as I know, that depen

Re: python-mode tab completion problem

2005-02-03 Thread Fernando Perez
Skip Montanaro wrote: > > test1dellboy3> I am exploring python-mode on emacs. When I open foo.py > test1dellboy3> in emacs and hit C-!, it starts the python interpreter in > test1dellboy3> another window. Next, I execute - > > ... > > That's not really intended to be used as an

Re: Popularizing SimpleHTTPServer and CGIHTTPServer

2005-02-03 Thread Lee Harr
> Does anyone know how to use SimpleHTTPServer to: > > 1. Support virtual hosts? > > 2. Support SSL? > > I'd like to use SimpleHTTPServer to create some simple reporting utilities, > but can't get past these two points. Is there a NotSoSimpleHTTPServer? I think I would point to twisted for that.

Re: List mapping question

2005-02-03 Thread Michael Spencer
Marc Huffnagle wrote: I have a number of variables that I want to modify (a bunch of strings that I need to convert into ints). Is there an easy way to do that other than saying: > a = int(a) > b = int(b) > c = int(c) It may not matter to you, at the moment, but a = int(a) is not strictly '

Re: About standard library improvement

2005-02-03 Thread Lee Harr
On 2005-02-03, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > The process seem slow. I've submitted two patches and haven't gotten > any response so far, but it has only been three weeks. Other patches > seem to be idling for months. I'm not complaining, just want to know > why the process is so slow

Re: List mapping question

2005-02-03 Thread Steven Bethard
Marc Huffnagle wrote: Steve Holden wrote: >>> a,b,c = 1.1, 2.2, 3.3 >>> a,b,c = map(int, (a,b,c)) >>> a,b,c (1, 2, 3) >>> a,b,c = [int(x) for x in (a,b,c)] >>> a,b,c (1, 2, 3) regards Steve Thanks ... so there's no way to pass an actual variable into a list mapping, instead of its value? I

Re: About standard library improvement

2005-02-03 Thread BJörn Lindqvist
The process seem slow. I've submitted two patches and haven't gotten any response so far, but it has only been three weeks. Other patches seem to be idling for months. I'm not complaining, just want to know why the process is so slow and what you can do when you submit patches/bug reports to speed

Re: Where are list methods documented?

2005-02-03 Thread Daniel Bickett
Simply as a general reply to the OP, I've found that some of the most definitive documentation can be found using help() at the command line: Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> he

Re: remove duplicates from list *preserving order*

2005-02-03 Thread Michael Spencer
Steven Bethard wrote: I'm sorry, I assume this has been discussed somewhere already, but I found only a few hits in Google Groups... If you know where there's a good summary, please feel free to direct me there. I have a list[1] of objects from which I need to remove duplicates. I have to mai

Re: python-mode tab completion problem

2005-02-03 Thread Skip Montanaro
test1dellboy3> I am exploring python-mode on emacs. When I open foo.py test1dellboy3> in emacs and hit C-!, it starts the python interpreter in test1dellboy3> another window. Next, I execute - ... That's not really intended to be used as an interactive session with all sorts of b

Re: List mapping question

2005-02-03 Thread Steven Bethard
Marc Huffnagle wrote: I have a number of variables that I want to modify (a bunch of strings that I need to convert into ints). Is there an easy way to do that other than saying: > a = int(a) > b = int(b) > c = int(c) I tried > [i = int(i) for i in [a, b, c]] but that didn't work because it

Re: List mapping question

2005-02-03 Thread Marc Huffnagle
Steve Holden wrote: Marc Huffnagle wrote: I have a number of variables that I want to modify (a bunch of strings that I need to convert into ints). Is there an easy way to do that other than saying: > a = int(a) > b = int(b) > c = int(c) I tried > [i = int(i) for i in [a, b, c]] but that di

Re: List mapping question

2005-02-03 Thread Steve Holden
Marc Huffnagle wrote: I have a number of variables that I want to modify (a bunch of strings that I need to convert into ints). Is there an easy way to do that other than saying: > a = int(a) > b = int(b) > c = int(c) I tried > [i = int(i) for i in [a, b, c]] but that didn't work because it

Re: bytecode obfuscation

2005-02-03 Thread Daniel Bickett
snacktime wrote: > How difficult is it to turn python bytecode into it's original source? > Is it that much different than java (this is what they will probably > compare it to) ? As far as I know, that depends on how much money you're willing to pour into it ;) http://www.crazy-compilers.com/de

RE: Where are list methods documented?

2005-02-03 Thread Tony Meyer
> You're not the only one with a hard time finding the list > documentation. It's even crazier for string docs. > > If you want to see how to strip strings in Python you have to go to > the library docs, then click "sequence types" (betcha don't think of > strings as sequences), then scroll to the

Re: bytecode obfuscation

2005-02-03 Thread Skip Montanaro
snacktime> How difficult is it to turn python bytecode into it's snacktime> original source? Not very. Google for "python decompyle". Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: bytecode obfuscation

2005-02-03 Thread snacktime
> > > Everything except the libraries that actually connect to the > > bank networks would be open source, and those libraries aren't > > something that you would even want to touch anyways. > > This sounds suspicious to me. Really. Normal payment clearance programs > have open-spec API's. > I

mounting a filesystem?

2005-02-03 Thread Dan Stromberg
Is there a python module that can mount a filesystem? More specifically, a loopback filesystem with a particular offset, under linux? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Where are list methods documented?

2005-02-03 Thread Nelson Minar
You're not the only one with a hard time finding the list documentation. It's even crazier for string docs. If you want to see how to strip strings in Python you have to go to the library docs, then click "sequence types" (betcha don't think of strings as sequences), then scroll to the bottom, the

  1   2   3   >