Re: GUIs: wxPython vs. Tkinter (and others)

2004-12-10 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > I've never tried doing animation in TkInter. Qt provides timer devices > that you can use to drive animations. I suspect that doing the same in > TkInter would be noticably more difficult. Tkinter supports some kind of event that runs n millisecond (n is a

Re: New versions breaking extensions, etc.

2004-12-10 Thread Mike Meyer
"Jive" <[EMAIL PROTECTED]> writes: > "Nick Coghlan" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> To this date, no-one has cared enough about the problem to put in the > effort >> required to make the C API version agnostic. Given that the API almost > always >> remains *source*

Re: Deadlock detection

2004-12-10 Thread Mike Meyer
Adam DePrince <[EMAIL PROTECTED]> writes: > On Mon, 2004-12-06 at 06:21, Duncan Grisby wrote: >> Hi, >> >> Does anyone know of a deadlock detector for Python? I don't think it >> would be too hard to hook into the threading module and instrument >> mutexes so they can be tested for deadlocks. I

Re: New versions breaking extensions, etc.

2004-12-10 Thread JanC
Jive schreef: > P.s. Does anyone know how to make Outlook Express leave my damned > line-ends alone? If I want line-ends. I know where to find the ENTER > key. Google for "oe-quotefix", but the best solution is to use a proper newsreader. ;-) -- JanC "Be strict when sending and tolerant

Re: GUIs: wxPython vs. Tkinter (and others)

2004-12-10 Thread Mike Meyer
"Erik Johnson" <[EMAIL PROTECTED]> writes: > I am looking for some input on GUI libraries. Since you said others, I'll recommend PyQt. Major downside with it is that it costs money on Windows. > o What features does wxPython offer that Tkinter cannot (and vice > versa)? I don't know abo

Re: String operations

2004-12-10 Thread Terry Hancock
On Wednesday 01 December 2004 04:20 pm, Anoop Rajendra wrote: > os.execvp("condor_q",["condor_q","-l","-constraint",'"ProjectId==\\\"anoopr_samadams.fnal.gov_161903_30209\\\""']) > > doesnt work. Its definately a problem with one of the million > backslashes and quotes present, but I'm not able to

Re: Drawing Cogwheels and Combinatoric diagrams

2004-12-10 Thread Terry Hancock
On Wednesday 01 December 2004 10:39 am, Andrew James wrote: > Gentlemen, > I'm looking for a graphing or drawing python package that will allow me > to draw complex geometric shapes. I need to be able to create shapes > like cogwheels and Venn diagrams: > > http://encyclopedia.thefreedictionary.

Re: New versions breaking extensions, etc.

2004-12-10 Thread Jive
P.s. Does anyone know how to make Outlook Express leave my damned line-ends alone? If I want line-ends. I know where to find the ENTER key. -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie questions

2004-12-10 Thread Mike Meyer
Adam DePrince <[EMAIL PROTECTED]> writes: > Alright. Now, as Erik pointed out if you assign to the variable the > computer will add that to the local name space. This happens at > "compile" time (which is right after you hit enter twice at the CPython > command line.) > > For an example of this

Re: New versions breaking extensions, etc.

2004-12-10 Thread Jive
"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jive wrote: > > Can someone explain to me why Python 2.4 on MS Windows has these backward > > compatibility problems? What am I missing? > > The problem is the Python C/API. At the moment, it exposes things directly (lik

Re: Help beautify ugly heuristic code

2004-12-10 Thread Stuart D. Gathman
On Fri, 10 Dec 2004 22:03:20 +, JanC wrote: > Stuart D. Gathman schreef: > >> I have a function that recognizes PTR records for dynamic IPs. There > Did you also think about ISPs that use such a PTR record for both dynamic > and fixed IPs? There seems to be a lot of misunderstanding about

htmldata 1.0.4 - Manipulate HTML documents via data structure

2004-12-10 Thread C. Barnes
htmldata 1.0.4 is available. http://oregonstate.edu/~barnesc/htmldata/ The htmldata module allows one to translate HTML documents back and forth to list data structures. This allows for programmatic reading and writing of HTML documents, with much flexibility. Functions are also available for e

Re: New versions breaking extensions, etc.

2004-12-10 Thread Nick Coghlan
Jive wrote: Can someone explain to me why Python 2.4 on MS Windows has these backward compatibility problems? What am I missing? The problem is the Python C/API. At the moment, it exposes things directly (like data structures) that may change size between major version releases. The other issue

Re: New versions breaking extensions, etc.

2004-12-10 Thread News M Claveau /Hamster-P
Hi ! But, if Python is as much sensitive to the passage of an external software, version 6 (obsolete) with a version 7 (obsolete also), it is worrying. Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideas for projects

2004-12-10 Thread John Hunter
> "Phillip" == Phillip Bowden <[EMAIL PROTECTED]> writes: Phillip> I feel that I've learned the language pretty well, but Phillip> I'm having trouble thinking of a medium to large project Phillip> to start. Some of these may be on the "large" side, but - Provide a full-feature

Re: sources for DOS-16bit

2004-12-10 Thread Adam DePrince
On Fri, 2004-12-10 at 16:30, Peter Hansen wrote: > McBooCzech wrote: > > I am looking for Python binaries for DOS-16bit > > Not for Win-16bit or DOS-32 which are the only DOS availabele sources > > on Python official site and on the other sites as well!!! > > I will prefere sources for Borland

Re: Wrapper objects

2004-12-10 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: The wrapper objects needs to work as dictionary keys, to support printing, concatenation/addition, getitem/setitem and such things... In that case, identifying exactly which operations you want to support, and using a metaclass based approach like mine or Bengt's should wo

Re: building python extensions with .net sdk compiler?

2004-12-10 Thread Grumman
I got this insane message, how did you solve this "problem" ? running install running build running build_py running build_ext error: The .NET Framework SDK needs to be installed before building extensions for Python. - Or does anyone know why i get this message, the .net

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Grumman
Jody Burns > wrote: Hi all, I've been wondering if there's anything on the drawing board about patching distutils/msvccompiler.py so that it can compile Python extensions using the free Visual C++ toolkit instead of the entire Visual C++ development environment. I know it's possible, because I

Re: newbie questions

2004-12-10 Thread Adam DePrince
On Fri, 2004-12-10 at 22:17, Erik Johnson wrote: > > do yo have any idea of what is causing this problem? > > is it possible to do self.SortiesAnimeTitreLabel = [] to reset the var? > (it > > seems to work outside of the sub, but I believe that the var I'm erasing > is > > not the one I want but a

RE: CGI zombies with Apache 1.3 on Linux

2004-12-10 Thread Robert Brewer
I wrote: > I've Googled extensively, but can't figure out what might be > causing my Python CGI app to zombie (yes, Tibia, the one I > just announced ;). Never mind for now. I think it was a mistake in my httpd.conf. My TransferLog didn't pipe to the correct handler, which meant access & error ev

Re: Deadlock detection

2004-12-10 Thread Adam DePrince
On Mon, 2004-12-06 at 06:21, Duncan Grisby wrote: > Hi, > > Does anyone know of a deadlock detector for Python? I don't think it > would be too hard to hook into the threading module and instrument > mutexes so they can be tested for deadlocks. I've googled around but I > haven't found anything.

Re: Civilization IV uses Python for scripting

2004-12-10 Thread Carl Banks
Terry Ready wrote: > "*Civilization IV* [Sid Meier's latest, due out next year] has been > designed to fully support the mod community. The game is written using > flexible XML data files and the Python scripting language so modders will > have no trouble at all creating their own personalized worl

Re: newbie questions

2004-12-10 Thread Erik Johnson
> do yo have any idea of what is causing this problem? > is it possible to do self.SortiesAnimeTitreLabel = [] to reset the var? (it > seems to work outside of the sub, but I believe that the var I'm erasing is > not the one I want but a local copy. Yeah. I'm no Python guru, but I have a pre

RE: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
Gabriel Cooper wrote: > Robert Brewer wrote: > > >I assume you're using the demo? My copy of Firefox has an > error browser > >under Tools->Javascript Console. Does the double-click > report any error > >there? Make sure you clear the list before trying, since > errors from all > >other webpage

Re: collaborative editing

2004-12-10 Thread Mike Meyer
Robert Kern <[EMAIL PROTECTED]> writes: > Personally, I loathe writing at any length inside a Web browser and > prefer to use a real editor at all times. :-). w3m invokes $VISUAL on a temp file when you edit a TEXTAREA. It's *so* nice to be able to insert a file instead of cutting and pasting it.

Re: New versions breaking extensions, etc.

2004-12-10 Thread Robert
VS7 is a really a vastly different beastie than VS6. On 12/10/04 9:31 PM, in article [EMAIL PROTECTED], "Jive" <[EMAIL PROTECTED]> wrote: > Can someone explain to me why Python 2.4 on MS Windows has these backward > compatibility problems? What am I missing? Why won't extensions compiled > to

New versions breaking extensions, etc.

2004-12-10 Thread Jive
Can someone explain to me why Python 2.4 on MS Windows has these backward compatibility problems? What am I missing? Why won't extensions compiled to run with 2.3 also work with 2.4? Why does it matter whether a component was compiled with VC++ 6.0 or 7.1? I've been using MS stuff for 6 years.

RE: CGI zombies with Apache 1.3 on Linux

2004-12-10 Thread Robert Brewer
Erik Max Francis wrote: > Robert Brewer wrote: > > > I've Googled extensively, but can't figure out what might > be causing my > > Python CGI app to zombie (yes, Tibia, the one I just > announced ;). The > > cgi bit looks like this: > > Zombies are caused by forking a subprocess and the parent

Civilization IV uses Python for scripting

2004-12-10 Thread Terry Reedy
According to PCGamer, Jan05, p52: "*Civilization IV* [Sid Meier's latest, due out next year] has been designed to fully support the mod community. The game is written using flexible XML data files and the Python scripting language so modders will have no trouble at all creating their own perso

Re: socket.makefile & AF_UNIX

2004-12-10 Thread Jamie Saker
>If you're trying to create a Unix socket then mknod() isn't what >you need.  You probably want to create a socket and bind() it to >the log file: >filename = 'snort_alert' > s = socket(AF_UNIX, SOCK_DGRAM) > s.bind(filename) Interesting - I tried this with a local test_log and it worked, creatin

Re: Distutils vs. Extension header files

2004-12-10 Thread Mike Meyer
[EMAIL PROTECTED] (David M. Cooke) writes: > vincent has the solution (you need to specify them in MANIFEST.in), > but I'll add my 2 cents. Yup. That solved the problem. > depends = [...] is used in building (it's like dependencies in make). > If one of those files change, distutils will rebuild

Re: PIL for Windows for Python 2.4

2004-12-10 Thread Steve Holden
Fuzzyman wrote: If you're determined enough there are instructions here : http://www.vrplumber.com/programming/mstoolkit/ These will get you the Visual Studio 7 tools (free releases of) and tell you how to configure distutils to use it. Hefty downloads though, do not attempt this without broadband

GUIs: wxPython vs. Tkinter (and others)

2004-12-10 Thread Erik Johnson
I am looking for some input on GUI libraries. I want to build a Python-driven GUI, but don't really understand the playing field very well. I have generally heard good things about wxPython. I happen to already own John Grayson's book about Tkinter programming, so that is rather handy if I dec

OT-Test

2004-12-10 Thread frau_Gertrude
Ver si aparece la frau -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (Dec 10)

2004-12-10 Thread Josiah Carlson
QOTW: "I still think this is a silly idea, but at least it doesn't track mud all over Python's nice clean rugs." -- Michael J. Fromberger http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/dde861393aa5a68/eb3a5e53f9743413 "Basically, in tk, canvases are for vector draw

newbie questions

2004-12-10 Thread houbahop
Hello everyone, I'm new to python dev, and there are some things I don't understand about arrays and subs In my code, I have an array of strings (in the main function) self.SortiesAnimeTitreLabel = [] then I pass this array to a sub that fill it it ( using.append('blabla') : self.Ins

thread/queue bug

2004-12-10 Thread phil
>You have the source to Queue.py in your standard library >folder. Why not throw a few more print statements into >its __init__ and see what you learn? Yeah I put some print statements in init and it seems to complete. >Are you by any chance running on a new version of the >Linux kernel, where the

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Jody Burns
My bad, I misread his post. I don't know how to compile Python without Visual Studio. --Jody Mike C. Fletcher wrote: Jody Burns wrote (with Peter): See Mike C. Fletcher's post and http://www.vrplumber.com/programming/mstoolkit/ for a way to do it very easily (you have to be able to use the GNU

Re: from vb6 to Python

2004-12-10 Thread stevev
Try PythonCard. It should provide the easiest learning curve given your VB background. -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with datetime

2004-12-10 Thread Bob
Thanks. That did it. And I know better than to use the module name. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideas for projects

2004-12-10 Thread Terry Hancock
On Wednesday 08 December 2004 09:29 pm, Phillip Bowden wrote: > I feel that I've learned the language pretty well, but I'm having > trouble thinking of a medium to large project to start. What are some > projects that you have written in the past with Python? I would recommend going to Sourcefo

Re: socket.makefile & AF_UNIX

2004-12-10 Thread Michael Fuhr
Jamie Saker <[EMAIL PROTECTED]> writes: > In the makefile operation on socket (pydoc socket.socket.makefile... using > AF_UNIX, allowing you to create a file object to correspond to a socket) I've > got an sample program (goal: open up unix file socket object for snort's > alert_unixsock output

Re: Unicode docstrings in PyMethodDef?

2004-12-10 Thread "Martin v. Löwis"
Craig Ringer wrote: > For the use of anybody asking the same question later: There doesn't appear to be a nice way to make docstrings unicode, or not one I could find. I don't know whether you'ld consider it "nice": you need to put an __doc__ attribute into the function object. There is currently

Re: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Carl Banks
> From my point of view, they're basically identical, and > although I find Carl's approach slightly less explicit > and harder to read (mainly the uncommon __import__ call, > but it's not a big deal), I can't see why either of them > would be considered evil. Of course, when I said evil, I didn't

Re: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Peter Hansen
Carl Banks wrote: It's a bit more honest to set module attributes using setattr than dict access, I would say. Granted. But I think it's also more honest to change a module's dict by using globals() than by using a setattr call. <0.500 wink> -Peter -- http://mail.python.org/mailman/listinfo/pytho

Re: thread/queue bug

2004-12-10 Thread Peter Hansen
phil wrote: Uses no locks. It does use locks implicitly, though, since even just importing threading will do that, and creating a Queue does too. I am mystified, I have written probably 100,000 lines of Python and never seen a thread just lock up and quit running. It happens on a Queue() statement

Re: Wrapper objects

2004-12-10 Thread redhog
>Well, that could be a feature, depending on what your use case is. >Or you could make a method for adding methods, I suppose. >A perfectly transparent wrap of obj would be to do nothing ;-) >What do you actually want to do? Actually, the very best would if only type(), isinstance() and the is-key

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Mike C. Fletcher
Jody Burns wrote (with Peter): See Mike C. Fletcher's post and http://www.vrplumber.com/programming/mstoolkit/ for a way to do it very easily (you have to be able to use the GNU patch tool, but that's not difficult at all). --Jody ... not been able to get into hacking on the core of Python beca

ANNOUNCE: PyPHP, Python programming using the PHP web framework

2004-12-10 Thread Antony Lesuisse
PyPHP the python php bridge === Download it at http://lesuisse.net/pyphp-0.1.tgz WARNING this is experimental ! Summary: PyPHP enables Python programming in the PHP web framework. PyPHP is not yet another Python Web framework, it is the PHP web framework made av

request for book-recommendation

2004-12-10 Thread patrick c.d.
hi, does here anyone of ya geeks know a book teaching you how to handle gtk, web-dev with mysql-db-connection and scripting under gnu/linux with phyton? i'm german (hhaarr) but due to my efficiency-course in english (shool) i want to learn english by learning phyton ;-) thx.. -- http://mail.pyt

Re: from vb6 to Python

2004-12-10 Thread Gerhard Häring
MarcoL wrote: Hello, I am a VB6 programmer and I would like to learn a new high level language (instead of restarting from scratch with .NET), wich is opensource and cross-platform, in order to develop cross-platform business applications I think Python is the most suitable language for the

thread/queue bug

2004-12-10 Thread phil
And sorry I got ticked, frustrating week >And I could help more, being fairly experienced with >threading issues and race conditions and such, but >as I tried to indicate in the first place, you've >provided next to no useful (IMHO) information to >let anyone help you more than this This is about 5

Re: Zip with a list comprehension

2004-12-10 Thread Carl Banks
Matt Gerrans wrote: > This is probably so easy that I'll be embarrassed by the answer. While > enhancing and refactoring some old code, I was just changing some map()s to > list comprehensions, but I couldn't see any easy way to change a zip() to a > list comprehension.Should I just let those s

Re: Help beautify ugly heuristic code

2004-12-10 Thread JanC
Stuart D. Gathman schreef: > I have a function that recognizes PTR records for dynamic IPs. There > is no hard and fast rule for this - every ISP does it differently, and > may change their policy at any time, and use different conventions in > different places. Nevertheless, it is useful to app

Re: collaborative editing

2004-12-10 Thread Doug Holton
Michele Simionato wrote: Suppose I want to write a book with many authors via the Web. The book has a hierarchical structure with chapter, sections, subsections, subsubsections, etc. At each moment it must be possible to print the current version of the book in PDF format. There must be automati

Re: UrlLib2 Proxy and Https

2004-12-10 Thread j_belbo
I have made some tests with Curl and this proxy setting is correct It's seems that there is a problem with HTTPS and urllib2 + proxy Bye, Jacobo "Tom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I would like to access an HTTPS site via a proxy > > The following code is working f

from vb6 to Python

2004-12-10 Thread MarcoL
Hello, I am a VB6 programmer and I would like to learn a new high level language (instead of restarting from scratch with .NET), wich is opensource and cross-platform, in order to develop cross-platform business applications I think Python is the most suitable language for the scope. My questio

Re: Distutils vs. Extension header files

2004-12-10 Thread David M. Cooke
Mike Meyer <[EMAIL PROTECTED]> writes: > I've got a package that includes an extension that has a number of > header files in the directory with the extension. They are specified > as "depends = [...]" in the Extension class. However, Distutils > doesn't seem to do anything with them. > > If I do

Re: Rationale behind the deprecation of __getslice__?

2004-12-10 Thread Steven Bethard
Nick Coghlan wrote: Steven Bethard wrote: Carl Banks wrote: Wouldn't it work to have __getslice__ call __getitem__? And, since that would be too much of a performance hit, have it check whether its type is list (or str or tuple), and only call __getitem__ if it is not (i.e., only for subclasses).

Re: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Peter Hansen
Carl Banks wrote: Nick Coghlan wrote: to that module is far more evil than playing with globals() ;) I'd say using globals() is far eviler. I don't understand either of you. ;-) From my point of view, they're basically identical, and although I find Carl's approach slightly less explicit and hard

Re: thread/queue bug

2004-12-10 Thread Peter Hansen
phil wrote: I've never before on any group seen anyone told they had a mental block, because they were fishing for info. I'm sorry if I offended you by using that term. That wasn't my intention. Communications can be difficult in an online forum. For example, I would normally find the phrase "fi

Re: collaborative editing

2004-12-10 Thread MMM
Michele Simionato wrote: > Suppose I want to write a book with many authors via the Web. The book has > a hierarchical structure with chapter, sections, subsections, subsubsections, > etc. At each moment it must be possible to print the current version of the > book in PDF format. There must be aut

Re: sources for DOS-16bit

2004-12-10 Thread Peter Hansen
McBooCzech wrote: I am looking for Python binaries for DOS-16bit Not for Win-16bit or DOS-32 which are the only DOS availabele sources on Python official site and on the other sites as well!!! I will prefere sources for Borland C 3.x. I was trying to use Python 1.0.1 (16python.exe file) for my

Re: Wrapper objects

2004-12-10 Thread redhog
As to what I want to use this for, I today have a huge program in which several objects are wrapped up with comments (made up by some DOMish structre) which are displayed to the user at various times. For example, a list of users may be represented as as comment "List of users" and a python list of

thread/queue bug

2004-12-10 Thread phil
>Wow, amazing! Imagine that... asking for elaboration when >someone posts unclear confusing questions and extraneous >information. The noive! I would be happy to elaborate. No one asked to me to elaborate. I was simply told I didn't give enough information. I wasn't given an idea of what addition

Re: Wrapper objects

2004-12-10 Thread redhog
Ah, thanks. I didn't think of the possibility of creating a list of methods that needed wrapping, and wrapping them uppon creation of the wrapper object. Mainly I think, becaus it seems to me as such an uggly workaround for a misdesign in Python. Also, if the wrapped object gets some extra methods/

Re: Clarification of two concepts (or maybe one?)

2004-12-10 Thread Fredrik Lundh
Eddie Parker wrote: > What I’m looking for, is a way to turn a python ‘application’, into a > ‘stand-alone’ application. i.e., you don’t need the Python interpreter, > libraries, etc, installed on your hard drive. (I’m OK with .py files > existing – I just don’t want to have to bother the user to

A puzzle Re: Decorators for multimethods

2004-12-10 Thread Roman Suzi
For those who want to exercize Python skills, there is a problem below for defining multimethod g with as simple syntax as possible: @MULTIMETHOD def g(x, y): @PART(Foo, Foo) def m1(a, b): return 'foofoo' @PART(Foo, Bar) def m2(a, b): return 'foobar'

Re: Unicode docstrings in PyMethodDef?

2004-12-10 Thread Craig Ringer
On Wed, 2004-12-08 at 13:43, Craig Ringer wrote: > Hi folks > > I'm currently working on a fairly well internationalised app that embeds > a Python intepreter. I'd like to make the docstrings translatable, but > am running into the issue that the translation function returns unicode > data. For t

Re: sources for DOS-16bit

2004-12-10 Thread Paul Rubin
"McBooCzech" <[EMAIL PROTECTED]> writes: > before I decided to bother you by e-mail, I spent days (not kidding) > searching on the Internet. I am looking for Python binaries for > DOS-16bit I think this is hopeless. Python is too memory hungry for that. -- http://mail.python.org/mailman/list

Re: thread/queue bug

2004-12-10 Thread Peter Hansen
phil wrote: You know, I get this all the time on language support groups. All of my Linux support groups, if they don't understand, say why and ask for elaboration. Wow, amazing! Imagine that... asking for elaboration when someone posts unclear confusing questions and extraneous information. Th

Re: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Gabriel Cooper
Robert Brewer wrote: I assume you're using the demo? My copy of Firefox has an error browser under Tools->Javascript Console. Does the double-click report any error there? Make sure you clear the list before trying, since errors from all other webpages gt dumped in the same list. I was using th

Re: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Carl Banks
Nick Coghlan wrote: > Well, aside from the detail that modifying a module's contents via a reference > to that module is far more evil than playing with globals() ;) > > Even if that module is the one you're running in. . . It seems to me that that which makes modifying a module's contents via a r

Zip with a list comprehension

2004-12-10 Thread Matt Gerrans
This is probably so easy that I'll be embarrassed by the answer. While enhancing and refactoring some old code, I was just changing some map()s to list comprehensions, but I couldn't see any easy way to change a zip() to a list comprehension.Should I just let those sleeping dogs lie? (li

Re: Zip with a list comprehension

2004-12-10 Thread Steven Bethard
Matt Gerrans wrote: This is probably so easy that I'll be embarrassed by the answer. While enhancing and refactoring some old code, I was just changing some map()s to list comprehensions, but I couldn't see any easy way to change a zip() to a list comprehension.Should I just let those slee

sources for DOS-16bit

2004-12-10 Thread McBooCzech
Hi all, before I decided to bother you by e-mail, I spent days (not kidding) searching on the Internet. I am looking for Python binaries for DOS-16bit Not for Win-16bit or DOS-32 which are the only DOS availabele sources on Python official site and on the other sites as well!!! I will prefere

Decorators for multimethods

2004-12-10 Thread Roman Suzi
hi! I've found one more nice use case for decorators. I feel multimethods could be made even nicier by defining multimethods inside special class. But I have not figured out how to do it yet. #!/bin/env python2.4 if "We have Neel Krishnaswami module Multimethod.py": import Multimethod

Re: CGI zombies with Apache 1.3 on Linux

2004-12-10 Thread Erik Max Francis
Robert Brewer wrote: I've Googled extensively, but can't figure out what might be causing my Python CGI app to zombie (yes, Tibia, the one I just announced ;). The cgi bit looks like this: Zombies are caused by forking a subprocess and the parent not waiting on it. Does your system (sometimes) sp

Clarification of two concepts (or maybe one?)

2004-12-10 Thread Eddie Parker
Sorry, I’ve tried to search the web on this, but I’m still a little fuzzy. I was hoping a quick e-mail might clear this up. What I’m looking for, is a way to turn a python ‘application’, into a ‘stand-alone’ application. i.e., you don’t need the Python interpreter, libraries, etc, install

Re: Fun with Outlook and MAPI

2004-12-10 Thread Chris
Alas, I dont think that there is much you can do to prevent the confirmation dialogs with Outlook's MAPI dll. MS added them in a service pack as an anti-virus measure, so no work-around. Not all clients show these anoying dialogs though. Thunderbird definately doesn't. There is actually a worka

capwords (WAS: [Newby] question about modules)

2004-12-10 Thread Steven Bethard
Jon wrote: As far as I can tell from the online docs, "capwords" should be defined in the built-in "regex" module. Why is it telling me that capwords is not defined? Hmm... are you looking instead for "capwords" from the string module? >>> s = """\ ... Well, he's... ... he's, ah... ... probably pi

Re: Fun with Outlook and MAPI

2004-12-10 Thread Chris
Will McGugan wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be sending out q

Re: Fun with Outlook and MAPI

2004-12-10 Thread Will McGugan
David Fraser wrote: Alas, I dont think that there is much you can do to prevent the confirmation dialogs with Outlook's MAPI dll. MS added them in a service pack as an anti-virus measure, so no work-around. Not all clients show these anoying dialogs though. Thunderbird definately doesn't. The

thread/queue bug

2004-12-10 Thread phil
> 4. The fact that you have a .pyc file instead of a .py > file very likely has *nothing* to do with any threading > problem you are facing, so I suggest you get past that mental > block and look elsewhere. Well, I tried to make it clear that the ONLY difference between working and not working was

Re: [Newby] question about modules

2004-12-10 Thread Steven Bethard
Jon wrote: The following four lines of code: import sys, os, re sentence = raw_input("Enter a sentence: ") capwords (sentence) print sentence gives me the following error: NameError: name 'capwords' is not defined As far as I can tell from the online docs, "capwords" should be defined in the buil

Re: question about modules

2004-12-10 Thread Reinhold Birkenfeld
Jon wrote: > Hi Jeff, > > That makes sense -- thanks. However now when I use "re.capwords (sentence)" > I get a different error message: > > AttributeError: 'module' object has no attribute 'capwords' > > Each of the other two suggested implimentations produce a similar error > message. Is the

Re: Compiling Python 2.4 extensions with free VC++ Toolkit

2004-12-10 Thread Jody Burns
See Mike C. Fletcher's post and http://www.vrplumber.com/programming/mstoolkit/ for a way to do it very easily (you have to be able to use the GNU patch tool, but that's not difficult at all). --Jody Peter Hansen wrote: None, other than to note that if you and/or others were able to solve this

Re: UrlLib2 Proxy and Https

2004-12-10 Thread Tom
I would like to access an HTTPS site via a proxy The following code is working for HTTP://www.hotmail.com but not for HTTPS I have try with other sites without success l_proxy_info = { 'user' : mylogin, 'pass' : mypassword, 'host' : myproxy, 'port' : 8080 } I have no idea if

Re: question about modules

2004-12-10 Thread Jon
Hi Jeff, That makes sense -- thanks. However now when I use "re.capwords (sentence)" I get a different error message: AttributeError: 'module' object has no attribute 'capwords' Each of the other two suggested implimentations produce a similar error message. Is there something even more basic

Re: [Newby] question about modules

2004-12-10 Thread James Stroud
Is it in "regex" or "re"? If in "re" then: re.capwords(sentence) If in "regex", then: regex.capwords(sentence) You can also do from re import * then you will not have to prefix. But careful not to clutter your namespace. On Friday 10 December 2004 10:29 am, Jon wrote: > Hi, > > The followin

Re: Fun with Outlook and MAPI

2004-12-10 Thread David Fraser
Will McGugan wrote: Chris wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be

Re: Possible to insert variables into regular expressions?

2004-12-10 Thread Steven Bethard
Terry Hancock wrote: And hey, you could probably use a regex to modify a regex, if you were really twisted. ;-) Sorry. I really shouldn't have said that. Somebody's going to do it now. :-P Sure, but only 'cause you asked so nicely. =) >>> import re >>> def internationalize(expr, ...

Re: Find Items & Indices In A List...

2004-12-10 Thread Bengt Richter
On Fri, 10 Dec 2004 16:27:29 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> Hello NG, >> >> I was wondering if there is a faster/nicer method (than a for loop) >> that will allow me to find the elements (AND their indices) in a list that >> verify a certain cond

Re: Fun with Outlook and MAPI

2004-12-10 Thread Will McGugan
Chris wrote: I'm trying to send an e-mail through outlook. So far I've gotten it to work with the mail script at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149461 My only problem is that when I call Resolve() and Send(), I get confirmation dialogs. I will be sending out quite a

Re: style query: function attributes for return codes?

2004-12-10 Thread holger krekel
[Reinhold Birkenfeld Fri, Dec 10, 2004 at 08:42:10PM +0100] > holger krekel wrote: > > class Connection(object): > > def __init__(self, **kw): > > for name in kw: > > assert name in ('good', 'badauth', 'noserver'), name > > setattr(self, n

Re: 2D array

2004-12-10 Thread Adam DePrince
On Wed, 2004-12-08 at 16:22, Steven Bethard wrote: > Adam DePrince wrote: > > The use of None as the default parameter was on purpose; the lack of > > "magic" in python is often cited in religious wars between python and > > perl aficionados. Use of get(something, None) was on purpose, the level

CGI zombies with Apache 1.3 on Linux

2004-12-10 Thread Robert Brewer
I've Googled extensively, but can't figure out what might be causing my Python CGI app to zombie (yes, Tibia, the one I just announced ;). The cgi bit looks like this: def cgi_handler(): import cgi form = cgi.FieldStorage(keep_blank_values=True) params = dict([(key, form[key].val

Re: Wrapper objects

2004-12-10 Thread Bengt Richter
On 10 Dec 2004 09:33:51 -0800, [EMAIL PROTECTED] wrote: >Bengt Richter wrote: >> On 9 Dec 2004 06:11:41 -0800, [EMAIL PROTECTED] (Egil M?ller) wrote: >> >> >So my naive implementation of a wrapper class, >> > >> > >> >class wrapper(object): >> >def __init__(self, value, otherdata): >> >

Re: style query: function attributes for return codes?

2004-12-10 Thread Reinhold Birkenfeld
holger krekel wrote: > Hi George, > > [george young Fri, Dec 10, 2004 at 10:45:47AM -0500] >> [python 2.3.3, x86 linux] >> I recently found myself writing something like: >> >> def get_connection(): >> if tcp_conn(): >> if server_allows_conn(): >> return 'good_conn' >>

  1   2   >