Re: Python Imaging Library download link broken?

2009-06-29 Thread Tim Harig
On 2009-06-29, Lawrence D'Oliveiro wrote: > "apt-get install python-imaging", anybody? C:\>apt-get install python-imaging Bad command or file name Nope. 01:10,501$ apt-get install python-imaging bash: apt-get: command not found Not quite; but, it does give me an idea. Debian usually keeps the

Re: validating HTTPS certificates?

2009-06-29 Thread Andras.Horvath
On Fri, Jun 26, 2009 at 07:01:24PM +0200, Nobody wrote: > For a urllib-style interface, there's not much point in performing > verification after the fact. Either the library performs verification or > it doesn't. If it doesn't, you've just sent the (potentially confidential) > request to an unkno

Re: Flexible warning system

2009-06-29 Thread Simon Forman
On Sun, Jun 28, 2009 at 2:31 PM, Shrutarshi Basu wrote: > I'm writing a Python package where I have an underlying object model that is > manipulated by a runtime control layer and clients that interface with this > runtime. As I'm developing this i'm realizing that there are going to be a > number

Re: The Python Way for module configuration?

2009-06-29 Thread Simon Forman
On Sun, Jun 28, 2009 at 1:22 PM, kj wrote: > In <87fxdlujds@benfinney.id.au> Ben Finney > writes: > >>(Even if you don't want to receive email, could you please give your >>actual name in the ‘From’ field instead of just initials? It makes >>conversation less confusing.) > > I don't know why,

Re: Good books in computer science?

2009-06-29 Thread Simon Forman
On Sat, Jun 13, 2009 at 11:49 AM, koranthala wrote: > Hi all, >    I do understand that this is not a python question and I apologize > for that straight up. >    But I am a full time follower of this group and I have seen very > very brilliant programmers and solutions. >    I also want to be a go

Re: Fast Dictionary Access

2009-06-29 Thread Paul Rubin
Duncan Booth writes: > The suggested alternative: > >value = data.get(key, None) > > also has two dictionary lookups:... dg = data.get ... (inside loop): value = dg(key,None) -- http://mail.python.org/mailman/listinfo/python-list

Abort SimpleXMLRPCServer request prematurely?

2009-06-29 Thread Joseph Turian
With SimpleXMLRPCServer, if the server is taking too long, how can I use the client to kill the request and have the server abort prematurely? Thanks, Joseph -- http://mail.python.org/mailman/listinfo/python-list

pythonware.com down?

2009-06-29 Thread C. Feldmann
Hi, I am trying to get a hold of PIL, but pythonware.com seems to be down. Are there mirrors out there? I get a 502 Error "Bad Gateway - The proxy server received an invalid response from an upstream server." Does anyone else get that error? Thanks Casper -- http://mail.python.org/mailman/listin

Re: creating garbage collectable objects (caching objects)

2009-06-29 Thread News123
Dave Angel wrote: > News123 wrote: >> Hi. >> >> I started playing with PIL. >> >> I'm performing operations on multiple images and would like compromise >> between speed and memory requirement. >> . . . >> >> The question, that I have is whether there is any way to tell python, >> that certain obje

whizBase vs. Python

2009-06-29 Thread NurAzije
Hi, I am working on a study and I need expert opinion, I did not work with Python before, can anyone help me with a comparison between WhizBase (www.whizbase.com) and Python please. Thank you in advance, Ashraf Gheith -- http://mail.python.org/mailman/listinfo/python-list

Re: whizBase vs. Python

2009-06-29 Thread Chris Rebert
On Mon, Jun 29, 2009 at 1:24 AM, NurAzije wrote: > Hi, > I am working on a study and I need expert opinion, I did not work with > Python before, can anyone help me with a comparison between WhizBase > (www.whizbase.com) and Python please. Python is a popular, open-source, cross-platform, general-p

Re: No trees in the stdlib?

2009-06-29 Thread Nobody
On Sun, 28 Jun 2009 20:54:11 -0700, Paul Rubin wrote: > João Valverde writes: >> Could you clarify what you mean by immutable? As in... not mutable? As >> in without supporting insertions and deletions? > > Correct. > >> That's has the same performance as using binary search on a sorted >>

ANN: eGenix mxODBC Connect 1.0.2 - Python Database Interface

2009-06-29 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Connect Python Database Interface Version 1.0.2 Our new client-server product for connecting Python applications

Spam? Re: whizBase vs. Python

2009-06-29 Thread Tim Harig
On 2009-06-29, NurAzije wrote: > Hi, > I am working on a study and I need expert opinion, I did not work with > Python before, can anyone help me with a comparison between WhizBase > (www.whizbase.com) and Python please. Given posts like: http://groups.google.com/group/Server-side-programing/brow

Re: urllib2.URLError: error using twill with python

2009-06-29 Thread amadain
On Jun 8, 12:58 pm, Steven D'Aprano wrote: > On Mon, 08 Jun 2009 12:14:18 +0100, Mark Devine wrote: > > Hi > > I wonder if someone could point me in the right direction. I used the > > following code to access gmail but I got a > >          urllib2.URLError: > > error when I ran it. I have includ

Timeout when connecting to sybase DBS

2009-06-29 Thread eranlevi
Hi All, I'm using the Sybase module for connecting and using a sybase DBS. When I try to connect when the DBS is down, it take approximately 4 minutes for the function (conn.ct_connect) to return with an error. I have looked for a timeout parameter to limit the 4 minutes to something more reasonab

Re: pep 8 constants

2009-06-29 Thread Rhodri James
On Mon, 29 Jun 2009 06:07:19 +0100, Eric S. Johansson wrote: Rhodri James wrote: Reject away, but I'm afraid you've still got some work to do to convince me that PEP 8 is more work for an SR system than any other convention. [snip sundry examples] Yes, yes, recognition systems need bot

Re: pythonware.com down?

2009-06-29 Thread Tim Harig
On 2009-06-29, C. Feldmann wrote: > I am trying to get a hold of PIL, but pythonware.com seems to be down. > Are there mirrors out there? > I get a 502 Error "Bad Gateway - The proxy server received an invalid > response from an upstream server." > Does anyone else get that error? Yes, more info

Re: validating HTTPS certificates?

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 09:18:20 +0200, Andras.Horvath wrote: >> For a urllib-style interface, there's not much point in performing >> verification after the fact. Either the library performs verification or >> it doesn't. If it doesn't, you've just sent the (potentially confidential) >> request to an

Re: Advantages of Python (for web/desktop apps)?

2009-06-29 Thread Marek Kubica
On 28 Jun 2009 11:45:06 -0700 a...@pythoncraft.com (Aahz) wrote: > Perhaps I was unclear: I already knew what LMGTFY stands for, and I > think that using a site that requires JavaScript is anti-social. Maybe they could just redirect to Google if JS wasn't detected. regards, Marek -- http://mail

Re: pythonware.com down?

2009-06-29 Thread C. Feldmann
On 29 Jun., 11:07, Tim Harig wrote: > On 2009-06-29, C. Feldmann wrote: > > > I am trying to get a hold of PIL, but pythonware.com seems to be down. > > Are there mirrors out there? > > I get a 502 Error "Bad Gateway - The proxy server received an invalid > > response from an upstream server." >

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Sun, 28 Jun 2009 21:25:13 +, Benjamin Peterson wrote: >> > The email module is, yes, broken. You can recover the bytestrings of >> > command-line arguments and environment variables. >> >> 1. Does Python offer any assistance in doing so, or do you have to >> manually convert the surrogates

Re: pythonware.com down?

2009-06-29 Thread Godson Gera
way back machine,comes to rescue. http://web.archive.org/web/20071011003451/www.pythonware.com/products/pil/index.htm On Mon, Jun 29, 2009 at 4:01 PM, C. Feldmann wrote: > On 29 Jun., 11:07, Tim Harig wrote: > > On 2009-06-29, C. Feldmann wrote: > > > > > I am trying to get a hold of PIL, but

Re: creating garbage collectable objects (caching objects)

2009-06-29 Thread Dave Angel
News123 wrote: Dave Angel wrote: News123 wrote: Hi. I started playing with PIL. I'm performing operations on multiple images and would like compromise between speed and memory requirement. . . . The question, that I have is whether there is any way to tell python, that certain object

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Sun, 28 Jun 2009 14:36:37 +0200, Martin v. Löwis wrote: >> That's a significant improvement. It still decodes os.environ and sys.argv >> before you have a chance to call sys.setfilesystemencoding(), but it >> appears to be recoverable (with some effort; I can't find any way to re-do >> the enco

Re: What does Guido want in a GUI toolkit for Python?

2009-06-29 Thread Lawson English
Martin v. Löwis wrote: I sorta' wish he'd just come out and say, "This is what I think would be suitable for a GUI toolkit for Python: ...". He is not in the business of designing GUI toolkits, but in the business of designing programming languages. So he abstains from specifying (or even

python extend c++ module

2009-06-29 Thread ���m�ۤv...@����
I have written a c++ extend module and I use distutils to build. setup.py from distutils.core import setup, Extension setup(name="noddy", version="1.0", ext_modules=[ Extension("noddy3", ["noddy3.cpp", "a.cpp"]) ]) I found it's quite strange when compilin

Re: Python Imaging Library download link broken?

2009-06-29 Thread Lawrence D'Oliveiro
In message , Tim Harig wrote: > On 2009-06-29, Lawrence D'Oliveiro > wrote: > >> "apt-get install python-imaging", anybody? > > C:\>apt-get install python-imaging > Bad command or file name Sounds more like broken OS with no integrated package management. -- http://mail.python.org/mailman/lis

Re: pythonware.com down?

2009-06-29 Thread Tim Harig
On 2009-06-29, C. Feldmann wrote: > On 29 Jun., 11:07, Tim Harig wrote: >> On 2009-06-29, C. Feldmann wrote: >> >> > I am trying to get a hold of PIL, but pythonware.com seems to be down. >> > Are there mirrors out there? >> > I get a 502 Error "Bad Gateway - The proxy server received an invalid

Re: pep 8 constants

2009-06-29 Thread Tim Chase
Reject away, but I'm afraid you've still got some work to do to convince me that PEP 8 is more work for an SR system than any other convention. Name name higher than normal recognition error rate. can require multiple tries or hand correction MultiWordName mulitwordname ver

Running Invisible console Application

2009-06-29 Thread Elf Scripter
Hi, i have a console application that i want to ran (invisible) as a daemon, how can i do that? Thank you in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: python extend c++ module

2009-06-29 Thread Christian Heimes
找尋自己的一片天 schrieb: > I found it's quite strange when compiling. I didn't use extern "C" at all > , how can python get the right c++ funciton name without any compile error?? > > I found that it first use gcc to compile noddy3.cpp and then link by g++. > > Could anyone explain what

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Antoine Pitrou
Nobody nowhere.com> writes: > > This results in an internal error: > > > "\udce4\udceb\udcef\udcf6\udcfc".encode("iso-8859-1", "surrogateescape") > Traceback (most recent call last): > File "", line 1, in > SystemError: Objects/bytesobject.c:3182: bad argument to internal function Please rep

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Hallvard B Furuseth
Nobody writes: >On Sun, 28 Jun 2009 14:36:37 +0200, Martin v. Löwis wrote: >> See PEP 383. > > Okay, that's useful, except that it may have some bugs: > (...) > Assuming that this gets fixed, it should make most of the problems with > 3.0 solvable. OTOH, it wouldn't have killed them to have added

Re: No trees in the stdlib?

2009-06-29 Thread Tim Wintle
On Sat, 2009-06-27 at 06:03 +0100, João Valverde wrote: > To answer the question of what I need the BSTs for, without getting > into too many boring details it is to merge and sort IP blocklists, > that is, large datasets of ranges in the form of (IP address, IP > address, string). > As an anecd

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Paul Moore
2009/6/29 Antoine Pitrou : > As for a bytes version of sys.argv and os.environ, you're welcome to propose a > patch (this would be a separate issue on the aforementioned issue tracker). But please be aware that such a proposal would have to consider: 1. That on Windows, the native form is the cha

Re: Good books in computer science?

2009-06-29 Thread rustom
This thread has thrown up some interesting suggestions but they all seem to fall into one of two categories: - the high-ground: Dijkstra, Knuth etc - the low-ground: write (any-which-how) a lot of code And both these 'grounds' seem to cause more argument and less suggestions for good books. Let

Re: Python Imaging Library download link broken?

2009-06-29 Thread Tim Harig
On 2009-06-29, Lawrence D'Oliveiro wrote: > Sounds more like broken OS with no integrated package management. Package managers with dependency tracking were all the rage when I first started using Linux. So I tried Red Hat and everything worked great until the depency database corrupted itself.

Re: Running Invisible console Application

2009-06-29 Thread MRAB
Elf Scripter wrote: Hi, i have a console application that i want to ran (invisible) as a daemon, how can i do that? Change the extension from ".py" to ".pyw". -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-29 Thread Anul
On Jun 29, 5:08 pm, rustom wrote: > > Want to study TDD?  Read unittest and doctest and then go on to > reading (and practising) Kent Beck etc > Want to get into unix system programming?  Nothing like playing around > with os.path and stat before burining your hands with C. > Networking protocols?

Re: fork, threads and proper closing

2009-06-29 Thread Francesco Bochicchio
On 29 Giu, 07:10, OdarR wrote: > On 28 juin, 23:26, Tomasz Pajor wrote: > > > Hello, > > > Configuration is as follows. > > > I have a starter process which creates 3 sub processes (forks) and each > > of this processes creates a number of threads. > > Threads in that processes have semaphore so

Re: Python Imaging Library download link broken?

2009-06-29 Thread peter
Whilst this is an interesting discussion about installers, I'm still trying to find a copy of PIL. Any ideas? -- http://mail.python.org/mailman/listinfo/python-list

problems with mysql db

2009-06-29 Thread golu
here i have posted my code...plz tell why am i getting the error "int argument required" on the hash marked line(see below) although i am giving an int value #the code import os import string import MySQLdb import stopcheck conn = MySQLdb.connect(host='localhost',user='root',db='urdb') def file_ex

Re: validating HTTPS certificates?

2009-06-29 Thread Andras.Horvath
> validation. Validation should just be a matter of passing > cert_reqs=CERT_REQUIRED and ca_certs= to ssl.wrap_socket(), then checking > that SSLSocket.getpeercert() returns a non-empty dictionary. That'd be cool unless I can't use an already-open socket (by SSL, for verification) in any of the b

Re: Advantages of Python (for web/desktop apps)?

2009-06-29 Thread Aahz
In article <20090629121940.42b88...@halmanfloyd.lan.local>, Marek Kubica wrote: >On 28 Jun 2009 11:45:06 -0700 >a...@pythoncraft.com (Aahz) wrote: >> >> Perhaps I was unclear: I already knew what LMGTFY stands for, and I >> think that using a site that requires JavaScript is anti-social. > >Maybe

Re: Python Imaging Library download link broken?

2009-06-29 Thread Tim Harig
On 2009-06-29, peter wrote: > Whilst this is an interesting discussion about installers, I'm still > trying to find a copy of PIL. Any ideas? I alluded to a source version below. It will compile on Windows as well as on *nix. Google finds what looks like older versions here: http://sping.sour

Re: problems with mysql db

2009-06-29 Thread Petr Messner
Hi, use %s instead of %d in SQL statements, because (AFAIK) conversions (including SQL escaping) from Python values to SQL values are done before the % operator is called - that value is not a number by that point. I hope you understood it, sorry for my English :-) You can also check MySQLdb modu

Re: Running Invisible console Application

2009-06-29 Thread Charles Yeomans
On Jun 29, 2009, at 7:28 AM, Elf Scripter wrote: Hi, i have a console application that i want to ran (invisible) as a daemon, how can i do that? Search the web for python + daemon. I found plenty of code, including mostly prewritten solutions, for my own work. Charles Yemans -- http:/

Re: creating garbage collectable objects (caching objects)

2009-06-29 Thread Gabriel Genellina
En Mon, 29 Jun 2009 08:01:20 -0300, Dave Angel escribió: News123 wrote: What I was more concerned is a group of output images depending on TWO or more input images. Depending on the platform (and the images) I might not be able to preload all two (or more images) So, as CPython's garbage c

Configuring Python for Tcl/Tk in UNIX

2009-06-29 Thread Chris Marshall
My goal is to use Tkinter on a ScientificLinux machine for a GUI I wrote. I installed Python 2.6.2, then built Tcl and Tk 8.5.7 from source. The final step is to configure Python 2.6 to run Tk. When I use the "make" command in the Python 2.6.2 directory, all is well until it tries to built _t

Re: problems with mysql db

2009-06-29 Thread Gabriel Genellina
En Mon, 29 Jun 2009 10:32:40 -0300, Petr Messner escribió: use %s instead of %d in SQL statements, because (AFAIK) conversions (including SQL escaping) from Python values to SQL values are done before the % operator is called - that value is not a number by that point. I hope you understood

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Peter Otten wrote: > Eric S. Johansson wrote: > >> MultiWordName mulitwordname >> very high error rate. many retries or hand hurting typing. > > Can you define macros in your speech recognition software? > > multiwordname > > might slightly lower the error rate. > Yes it would. I think it w

Python-URL! - weekly Python news and links (Jun 29)

2009-06-29 Thread Gabriel Genellina
QOTW: "Fortunately, I have assiduously avoided the real wor[l]d, and am happy to embrace the world from our 'bot overlords. Congratulations on another release from the hydra-like world of multi-head development." - Scott David Daniels, on release of 3.1 http://groups.google.com/group/comp.lan

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:57:49 +0200, Hallvard B Furuseth wrote: >> Okay, that's useful, except that it may have some bugs: >> (...) >> Assuming that this gets fixed, it should make most of the problems with >> 3.0 solvable. OTOH, it wouldn't have killed them to have added e.g. >> sys.argv_bytes and

Find the name of a setup tools plugin when its class is known.

2009-06-29 Thread Mr SZ
Hi, Using pkg_resources, I can iterate through the plugins in an entrypoint and note down the plugin classes and all using "pkg_resources.iter_entry_points(ENTRYPOINT)" Now, when the plugin is loaded, I want to know it's entrypoint name as I have to load a bunch of settings identified by the

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 11:41:11 +, Antoine Pitrou wrote: > Nobody nowhere.com> writes: >> >> This results in an internal error: >> >> > "\udce4\udceb\udcef\udcf6\udcfc".encode("iso-8859-1", "surrogateescape") >> Traceback (most recent call last): >> File "", line 1, in >> SystemError: Objec

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
alex23 wrote: > "Eric S. Johansson" wrote: >> no, I know the value if convention when editors can't tell you anything about >> the name in question. I would like to see more support for disabled >> programmers >> like myself and the thousands of programmers injured every year and forced to >> le

Re: problems with mysql db

2009-06-29 Thread Scott David Daniels
golu wrote: here i have posted my code...plz tell why am i getting the error "int argument required" on the hash marked line(see below) although i am giving an int value ... url_count += 1 curse.execute("INSERT INTO URL_TABLE VALUES(%d,%s)", (url_count,file_path)

Using Python for file packing

2009-06-29 Thread Aaron Scott
I'm working on a Python application right now that uses a large number of audio assets. Instead of having a directory full of audio, I'd like to pack all the audio into a single file. Is there any easy way to do this in Python? My first instinct was to attempt to pickle all the audio data, but some

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Tim Chase wrote: It sounds like the issue should be one of making your screen-reader > smarter, not dumbing down Python conventions. I don't know what SR > you're using (Jaws? Window Eyes? yasr? screeder? speakup? Naturally speaking is speech recognition (speech in text out) it is not text

Re: creating garbage collectable objects (caching objects)

2009-06-29 Thread Dave Angel
Gabriel Genellina wrote: En Mon, 29 Jun 2009 08:01:20 -0300, Dave Angel escribió: News123 wrote: What I was more concerned is a group of output images depending on TWO or more input images. Depending on the platform (and the images) I might not be able to preload all two (or more images) S

Creating an Instance Messenger type of application

2009-06-29 Thread Elf Scripter
Hello,Has anyone created an Instance Messenger in Python before, i mean a simple or Complex GUI based instance messenger? I thought about something like, the client also act as server, has it`s own listening port, but how can i handle uer auth? and adding visual effects to it. Please i am not try

Re: [RELEASED] Python 3.1 final

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:05:51 +0100, Paul Moore wrote: >> As for a bytes version of sys.argv and os.environ, you're welcome to >> propose a patch (this would be a separate issue on the aforementioned >> issue tracker). > > But please be aware that such a proposal would have to consider: > > 1. Th

Ctypes, pthreads and pthread_mutex_t

2009-06-29 Thread Doug
Has any converted the structure pthread_mutex_t to a ctypes structure class ? I looking at some C code that is using pthreads and need to translate pthreads_mutex_t structure into python (via ctypes) Thanks -- http://mail.python.org/mailman/listinfo/python-list

Making code run in both source tree and installation path

2009-06-29 Thread Javier Collado
Hello, I would like to be able to run the main script in a python project from both the source tree and the path in which it's installed on Ubuntu. The script, among other things, imports a package which in turns makes use of some data files that contains some metadata that is needed in xml format

Re: Using Python for file packing

2009-06-29 Thread Kushal Kumaran
On Mon, Jun 29, 2009 at 9:17 PM, Aaron Scott wrote: > I'm working on a Python application right now that uses a large number > of audio assets. Instead of having a directory full of audio, I'd like > to pack all the audio into a single file. Is there any easy way to do > this in Python? My first in

Re: Using Python for file packing

2009-06-29 Thread Aaron Scott
> Do you mean like a zip or tar file? > > http://docs.python.org/library/zipfile.htmlhttp://docs.python.org/library/tarfile.html > I had no idea you could access a single file from a ZIP or TAR without explicitly extracting it somewhere. Thanks. -- http://mail.python.org/mailman/listinfo/python-l

Re: Creating an Instance Messenger type of application

2009-06-29 Thread Simon Forman
On Mon, Jun 29, 2009 at 12:18 PM, Elf Scripter wrote: > Hello, > Has anyone created an Instance Messenger in Python before, i mean a simple > or Complex GUI based instance messenger? > I thought about something like, the client also act as server, has it`s own > listening port, but how can i handle

Re: pythonware.com down?

2009-06-29 Thread bunnybones
I'm having the same problem accessing pythonware or effbot. I can't find any news about their server status. I can ping both addresses just fine. Does anyone know what is going on? Maybe the ghosts of celebrities recently passed are mucking with the tubes. RIP Billy Mays -- http://mail.python.org

Re: Creating an Instance Messenger type of application

2009-06-29 Thread Simon Forman
On Mon, Jun 29, 2009 at 12:44 PM, Elf Scripter wrote: > Thank you for correcting my mistake. > I checked google but nothing close. did you have any idea? > > On Mon, Jun 29, 2009 at 5:42 PM, Simon Forman wrote: >> >> On Mon, Jun 29, 2009 at 12:18 PM, Elf Scripter >> wrote: >> > Hello, >> > Has any

Re: fork, threads and proper closing

2009-06-29 Thread OdarR
On 29 juin, 14:44, Francesco Bochicchio wrote: > On 29 Giu, 07:10, OdarR wrote: > > > > > On 28 juin, 23:26, Tomasz Pajor wrote: > > > > Hello, > > > > Configuration is as follows. > > > > I have a starter process which creates 3 sub processes (forks) and each > > > of this processes creates a n

python library call equivalent to `which' command

2009-06-29 Thread destroooooy
Hi, I'm looking for a Python library function that provides the same functionality as the `which' command--namely, search the $PATH variable for a given string and see if it exists anywhere within. I currently examine the output from `which' itself, but I would like something more portable. I loo

Re: pep 8 constants

2009-06-29 Thread Ethan Furman
Eric S. Johansson wrote: yup how long will i[t] be before you become disablesd? maybe not as badly as I am but you should start feeling some hand problems in your later 40's to early 50's and it goes down hill from there. self preservation/interest comes to mind as a possible motive for acti

Re: validating HTTPS certificates?

2009-06-29 Thread Heikki Toivonen
andras.horv...@cern.ch wrote: > I'm in the process of picking a language for a client application that > accesses a HTTPS (actually SOAP) server. This would be easy enough in > Python, but I came across a strange fact: neither httplib nor urllib > offer the possibility to actually verify the serve

Re: Python Imaging Library download link broken?

2009-06-29 Thread geo
On Jun 29, 2:54 pm, peter wrote: > Whilst this is an interesting discussion about installers, I'm still > trying to find a copy of PIL.  Any ideas? Hello, I had the very same problem and found this: http://www.portablepython.com/ It contains PIL and some other cool stuff. Hope it helps. Georg

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 12:54 PM, destroy wrote: > Hi, > I'm looking for a Python library function that provides the same > functionality as the `which' command--namely, search the $PATH > variable for a given string and see if it exists anywhere within. I > currently examine the output from `

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Golden
Tim Pinkawa wrote: On Mon, Jun 29, 2009 at 12:54 PM, destroy wrote: Hi, I'm looking for a Python library function that provides the same functionality as the `which' command--namely, search the $PATH variable for a given string and see if it exists anywhere within. I currently examine the o

TWiki Python API Wrapper

2009-06-29 Thread ma
Has anyone come across a decent python API wrapper for TWiki? I'm trying to automate some reports and logs to automatically post, create topics, and re-arrange a few things on our TWiki, but my googleFu has failed me :( I did find an interesting module in Perl, http://cpanratings.perl.org/dist/WWW

Re: No trees in the stdlib?

2009-06-29 Thread Terry Reedy
Paul Rubin wrote: The idea is you can accomplish the equivalent of insertion or deletion by allocating a new root, along with the path down to the place you want to insert, i.e. O(log n) operations. So instead of mutating an existing tree, you create a new tree that shares most of its structure

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Ethan Furman wrote: > Eric S. Johansson wrote: >> >> yup how long will i[t] be before you become disablesd? maybe not as >> badly as I am >> but you should start feeling some hand problems in your later 40's to >> early 50's >> and it goes down hill from there. self preservation/interest comes t

Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Pascal Chambon
Hello everyone I've had real issues with subprocesses recently : from a python script, on windows, I wanted to "give control" to a command line utility, i.e forward user in put to it and display its output on console. It seems simple, but I ran into walls : - subprocess.communicate() only deal

Re: python library call equivalent to `which' command

2009-06-29 Thread Christian Heimes
Tim Pinkawa wrote: > def which(file): > for path in os.environ["PATH"].split(":"): > if file in os.listdir(path): > print "%s/%s" % (path, file) "if file in os.list()" is slow and not correct. You have to check if the file is either a real file or a symlink to a

Re: Q: finding distance between 2 time's

2009-06-29 Thread John Gordon
In <023130ef$0$19421$c3e8...@news.astraweb.com> Steven D'Aprano writes: > > if time_difference < 3601: > That's a potential off-by-one error. [...] The right test is: > if time_difference <= 3600: Aren't those two comparisons the same? -- John Gordon A is for Amy,

Re: pep 8 constants

2009-06-29 Thread Eric S. Johansson
Rhodri James wrote: > On Mon, 29 Jun 2009 06:07:19 +0100, Eric S. Johansson > wrote: > >> Rhodri James wrote: >> >>> Reject away, but I'm afraid you've still got some work to do to >>> convince me that PEP 8 is more work for an SR system than any other >>> convention. >> > > [snip sundry example

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: > "if file in os.list()" is slow and not correct. You have to check if the > file is either a real file or a symlink to a file and not a directory or > special. Then you have to verify that the file has the executable bit, too. I realize fou

Re: python library call equivalent to `which' command

2009-06-29 Thread Tim Pinkawa
On Mon, Jun 29, 2009 at 2:31 PM, Tim Pinkawa wrote: > I am curious about it being slow, though. Is there a faster way to get > the contents of a directory than os.listdir() or is there a faster way > to see if an element is in a list other than "x in y"? I believe > 'which' will terminate once it f

Re: python library call equivalent to `which' command

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 13:53:30 -0500, Tim Pinkawa wrote: >> I'm looking for a Python library function that provides the same >> functionality as the `which' command--namely, search the $PATH >> variable for a given string and see if it exists anywhere within. I >> currently examine the output from

Re: python library call equivalent to `which' command

2009-06-29 Thread Robert Kern
On 2009-06-29 14:31, Tim Pinkawa wrote: On Mon, Jun 29, 2009 at 2:17 PM, Christian Heimes wrote: "if file in os.list()" is slow and not correct. You have to check if the file is either a real file or a symlink to a file and not a directory or special. Then you have to verify that the file has t

Re: python library call equivalent to `which' command

2009-06-29 Thread Christian Heimes
Tim Pinkawa wrote: > I realize four lines of Python does not replicate the functionality of > which exactly. It was intended to give the original poster something > to start with. Agreed! > I am curious about it being slow, though. Is there a faster way to get > the contents of a directory than o

Re: Tutorials on Jinja

2009-06-29 Thread wwwayne
On Thu, 25 Jun 2009 07:17:42 -0700 (PDT), Saurabh wrote: >On Jun 25, 2:04 am, Wayne Brehaut wrote: >> On Wed, 24 Jun 2009 11:46:55 -0700 (PDT), Saurabh >> >> wrote: >> >Hi All, >> >> >I am trying to move my application on a MVC architecture and plan to >> >use Jinja for the same. Can anyone pro

Re: Q: finding distance between 2 time's

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 19:15:08 +, John Gordon wrote: >> > if time_difference < 3601: > >> That's a potential off-by-one error. [...] The right test is: > >> if time_difference <= 3600: > > Aren't those two comparisons the same? Not if time_difference is a float. -- http://mail.pyth

Re: Q: finding distance between 2 time's

2009-06-29 Thread Scott David Daniels
John Gordon wrote: In <023130ef$0$19421$c3e8...@news.astraweb.com> Steven D'Aprano writes: if time_difference < 3601: That's a potential off-by-one error. [...] The right test is: if time_difference <= 3600: Aren't those two comparisons the same? Only if time_difference is an integ

Re: python library call equivalent to `which' command

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 14:31:25 -0500, Tim Pinkawa wrote: >> "if file in os.list()" is slow and not correct. You have to check if the >> file is either a real file or a symlink to a file and not a directory or >> special. Then you have to verify that the file has the executable bit, too. > > I reali

Re: Advantages of Python (for web/desktop apps)?

2009-06-29 Thread Michael Torrie
iceangel89 wrote: > i am mainly a PHP (mainly using Zend Framework MVC now) Web Developer. used > .NET (VB & C#) for Desktop apps. i nv used Python and am looking at Python > now (for desktop apps since its open source and just want to try what it > offers, but will like to know what good it has fo

Re: python library call equivalent to `which' command

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 21:53:42 +0200, Christian Heimes wrote: >> I am curious about it being slow, though. Is there a faster way to get >> the contents of a directory than os.listdir() or is there a faster way >> to see if an element is in a list other than "x in y"? I believe >> 'which' will termin

Re: What does Guido want in a GUI toolkit for Python?

2009-06-29 Thread Terry Reedy
Martin v. Löwis wrote: I sorta' wish he'd just come out and say, "This is what I think would be suitable for a GUI toolkit for Python: ...". He is not in the business of designing GUI toolkits, but in the business of designing programming languages. So he abstains from specifying (or even

Re: Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Nobody
On Mon, 29 Jun 2009 21:15:52 +0200, Pascal Chambon wrote: > I've had real issues with subprocesses recently : from a python script, > on windows, I wanted to "give control" to a command line utility, i.e > forward user in put to it and display its output on console. Are you talking about a pope

Re: Python Imaging Library download link broken?

2009-06-29 Thread peter
Thanks for this - looks promising. But I've just tried pythonware again and it's back up - so it was just a glitch after all. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: alternative to JoinableQueue's please

2009-06-29 Thread Ethan Furman
ps: Thanks Raymond for the quick reply... and I feel rather apologetic for having bothered the list with this :S No need to feel that way -- many of us still learn from simple looking problems! :) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python for file packing

2009-06-29 Thread Scott David Daniels
Aaron Scott wrote: Do you mean like a zip or tar file? http://docs.python.org/library/zipfile.htmlhttp://docs.python.org/library/tarfile.html I had no idea you could access a single file from a ZIP or TAR without explicitly extracting it somewhere. Thanks. You will find the zip format works

  1   2   >