Re: converting html escape sequences to unicode characters

2004-12-10 Thread Craig Ringer
On Fri, 2004-12-10 at 08:36, harrelson wrote: I have a list of about 2500 html escape sequences (decimal) that I need to convert to utf-8. Stuff like: I'm pretty sure this somewhat horrifying code does it, but is probably an example of what not to do: escapeseq = '#48708;' uescape = (\\u%x

Re: converting html escape sequences to unicode characters

2004-12-10 Thread Craig Ringer
On Fri, 2004-12-10 at 16:09, Craig Ringer wrote: On Fri, 2004-12-10 at 08:36, harrelson wrote: I have a list of about 2500 html escape sequences (decimal) that I need to convert to utf-8. Stuff like: I'm pretty sure this somewhat horrifying code does it, but is probably an example of

Re: threading problem

2004-12-10 Thread Egor Bolonev
On Fri, 10 Dec 2004 00:12:16 GMT, Steven Bethard [EMAIL PROTECTED] wrote: I think if you change the call to look like: threading.Thread(target=run, args=(os.path.join('c:\\', path),)).start() oh i see now. thanks s='sdgdfgdfg' s == (s) True s == (s,) False --

Re: exec'ing functions

2004-12-10 Thread Peter Otten
Mel Wilson wrote: The thing is, that once you drop local-namespace optimization, the entire function gets slowed down, possibly by 40%: It's not that bad as most of the extra time is spend on compiling the string. def fib5(n): a, b, i = 0, 1, n while i 0: a, b = b, a+b

Re: VC++ 6.0 and 2.4

2004-12-10 Thread Martin v. Löwis
Jive wrote: Theoretically, if I messed around with the 2.4 project until I got it to build under MS VC++ 6.0, would the python.exe play correctly with version 2.4 .pyd extensions? My initial answer was no, as 2.4 .pyd extensions are build with VC 7.1, and that uses a different CRT. However, as

Re: Python 2.3.5 ?

2004-12-10 Thread Fuzzyman
Hello Peter, Sorry to confuse you. It was actually a reply to Stefans dig about top posting. Regards, Fuzzy -- http://mail.python.org/mailman/listinfo/python-list

Re: building python extensions with .net sdk compiler?

2004-12-10 Thread Zuurcool
Anthony Baxter wrote: I'm trying to build a binary of fastaudio (the wrapper for the PortAudio library, from http://www.freenet.org.nz/python/pyPortAudio/) for Python 2.3. There's a lot of FAQs and the like out there that give some simple directions, involving fetching the .net sdk from MSDN and

Re: samba/windows shares (with python?)

2004-12-10 Thread Eino Mäkitalo
I.V. Aprameya Rao wrote: hi does anybody know how to access samba/windows shares on a network? is there any module that does this? i am running linux and i thought of using the mount command to mount that remote share and then access it, but i was wondering whether that is the right way?

Re: samba/windows shares

2004-12-10 Thread Martin Franklin
On Thu, 9 Dec 2004 20:03:55 +0530 (IST), I.V. Aprameya Rao [EMAIL PROTECTED] wrote: hi does anybody know how to access samba/windows shares on a network? is there any module that does this? i am running linux and i thought of using the mount command to mount that remote share and then access

Re: PIL for Windows for Python 2.4

2004-12-10 Thread Robin Becker
Fuzzyman wrote: So you've built PIL for windows, Python 2.4 ? Any chance of sharing it ? What compiler have you configured distutils to use ? Regards, Fuzzyman I have compiled 1.1.4's _imaging _imagingft for 2.4 and have placed them at http://www.reportlab.org/ftp/win32-dlls/2.4 Don't have a

Re: Wrapper objects

2004-12-10 Thread Nick Coghlan
Simon Brunning wrote: On 9 Dec 2004 06:11:41 -0800, Egil M?ller [EMAIL PROTECTED] wrote: Is there any way to create transparent wrapper objects in Python? This work - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52295? Only for old-style classes, though. If you inherit from object or

Building Windows debug distribution

2004-12-10 Thread Mark English
I have a Windows build of Python 2.4 core with all the extensions, both debug and release. The release installer is built by msi.py Is there a way to build a debug distribution other than rewriting msi.py ? --- The information

Re: Rationale behind the deprecation of __getslice__?

2004-12-10 Thread Nick Coghlan
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). I don't think that

Re: Rationale behind the deprecation of __getslice__?

2004-12-10 Thread Nick Coghlan
Steven Bethard wrote: Presumably the numarray code has to do quite a bit of type checking to perform all these slicings right (and I didn't even show you what happens when you use another array as an index). I'm not necessarily saying that all this type checking is a good thing, but because

problem with datetime

2004-12-10 Thread Bob
Relatively new to python. I can get the following to work from the command line: Python 2.3.4 (#2, Aug 18 2004, 21:49:15) [GCC 3.2] on linux2 Type help, copyright, credits or license for more information. import datetime d = datetime.datetime.today() d datetime.datetime(2004, 12, 10, 6, 13,

Re: problem with datetime

2004-12-10 Thread Gerhard Haering
On Fri, Dec 10, 2004 at 04:19:56AM -0800, [EMAIL PROTECTED] wrote: Relatively new to python. I can get the following to work from the command line: Python 2.3.4 (#2, Aug 18 2004, 21:49:15) [GCC 3.2] on linux2 Type help, copyright, credits or license for more information. import datetime

Re: problem with datetime

2004-12-10 Thread Peter Otten
Bob wrote: But when I try to run the following small program I get the following results: import datetime d = datetime.datetime.today() print d Traceback (most recent call last): File datetime.py, line 1, in ? import datetime You are importing your script, not the library module

Re: wxPython bug

2004-12-10 Thread Sion Arrowsmith
Jive [EMAIL PROTECTED] wrote: In wxPython 2.5, run the demo, samples/wxProject/wxProject.py [ ... ] TypeError: TreeCtrl_GetFirstChild() takes exactly 2 arguments (3 given) GetFirstChild() changed from taking 2 arguments in wxPython 2.4 to (the more sensible) 1 in wxPython 2.5. Clearly wxProject

Re: Python for Palm OS?

2004-12-10 Thread Gustavo Niemeyer
Is there any news regarding Python on the Palm OS front? As an interesting side effect of the recently announced PalmOS on Linux, porting Python for that platform will become a lot easier, hopefully. If only I could find Tim's time-machine and bring a unit from the future. ;-) -- Gustavo

Re: collaborative editing

2004-12-10 Thread Robert Kern
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

Re: collaborative editing

2004-12-10 Thread Jeremy Jones
Robert Kern wrote: 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.

Re: Parse XML using Python

2004-12-10 Thread Uche Ogbuji
This is a neat solution. You can parse any well-formed general entitity (e.g. Anil's document with multiple root nodes) in 4Suite 1.0a4: from Ft.Xml.Domlette import EntityReader s = spam1eggs/spam1 spam2more eggs/spam2 docfrag = EntityReader.parseString(s, 'http://foo/test/spam.xml') docfrag

Re: Find Items Indices In A List...

2004-12-10 Thread kaerbuhez
[EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1, 10] I would like to find the indices of the elements in the list that are equal to 1 (in this case, the 1,2,3,4,9 elements are equal

MDaemon Warning - virus found: Returned mail: see transcript for details

2004-12-10 Thread clientes
*** WARNING ** Este mensaje ha sido analizado por MDaemon AntiVirus y ha encontrado un fichero anexo(s) infectado(s). Por favor revise el reporte de abajo. AttachmentVirus name Action taken

Re: Find Items Indices In A List...

2004-12-10 Thread Ola Natvig
[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 condition. For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1,

Re: Find Items Indices In A List...

2004-12-10 Thread Bengt Richter
On Fri, 10 Dec 2004 16:01:26 +0100, [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 condition. For example, assuming that I have a list like:

Re: collaborative editing

2004-12-10 Thread Nick Craig-Wood
Robert Kern [EMAIL PROTECTED] wrote: Personally, I loathe writing at any length inside a Web browser and prefer to use a real editor at all times. Me too! You need mozex... http://mozex.mozdev.org/ Not sure about Mac support though /OT -- Nick Craig-Wood [EMAIL PROTECTED] --

Re: Python 2.3.5 ?

2004-12-10 Thread Brad Tilley
Tim Peters wrote: Not everyone is willing and able to switch to a new 2.j release as soon as it appears. The reason I jumped on 2.4 right away was the msi installer for Windows systems. We can do unattended/automated installs... it's really great... a killer feature for Windows users who need

Re: Help beautify ugly heuristic code

2004-12-10 Thread Stuart D. Gathman
On Thu, 09 Dec 2004 00:01:36 -0800, Lonnie Princehouse wrote: I believe you can still do this with only compiling a regex once and then performing a few substitutions on the hostname. Cool idea. Convert ip matches to fixed patterns before matching a fixed regex. The leftovers like shaw cable

style query: function attributes for return codes?

2004-12-10 Thread george young
[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' else: return 'bad_auth' else: return 'no_server' cn = get_connection() if cn ==

MySQLdb blob and binary data

2004-12-10 Thread Rune Hansen
I'm storing gzipped data in a MySQL blob field. I can fetch the blob and wb write the data to a file. It becomes a file containg gz data. I can't take the same data and do anything sensible with it in python - like say zlib.decompress(data). How can I convert the binary data from the blob

Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
Cross-posted here to encourage comments/discussion. I know there's a big feature or two I'm missing out on ;) Suggestions welcome. Tibia is an in-browser editor for web pages. It allows you to quickly and easily modify the content of your web pages. It allows you to directly view, edit, and save

Re: Find Items Indices In A List...

2004-12-10 Thread Steven Bethard
[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 condition. For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1,

thread/queue bug

2004-12-10 Thread phil
I have a very strange bug. A thread in a .pyc stops dead. This program has many threads and queues and has worked great for months. One thread listens for UDP messages from other programs, and puts the messages in listenq. Procmsgs gets from listenq and for a certain kind of message creates

Re: style query: function attributes for return codes?

2004-12-10 Thread Steven Bethard
george young wrote: This is obviously just evil, since a misspelling in the string return is treacherous. I'm considering function attributes: def get_connection(): if tcp_conn(): if server_allows_conn(): return get_connection.GOOD else: return

Re: style query: function attributes for return codes?

2004-12-10 Thread Steven Bethard
george young wrote: [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' else: return 'bad_auth' else: return 'no_server' cn =

Re: How to set condition breakpoints?

2004-12-10 Thread Christopher J. Bottaro
Colin J. Williams wrote: Christopher J. Bottaro wrote: I have a script with a class in it: class Class: def f(x, y): # do something I start up the debugger like this: python /usr/lib/python2.3/pdb.py myscript.py I want to set a conditional breakpoint: b

Re: Wrapper objects

2004-12-10 Thread Nick Coghlan
Kent Johnson wrote: Nick Coghlan wrote: Simon Brunning wrote: This work - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52295? Only for old-style classes, though. If you inherit from object or another builtin, that recipe fails. Could you explain, please? I thought __getattr__ worked

Re: style query: function attributes for return codes?

2004-12-10 Thread Robert Kern
Steven Bethard wrote: Sorry, I also meant to add that the other obvious way of dealing with this kind of thing is to make the results keyword parameters: def get_connection(GOOD=1, BAD_AUTH=2, NO_SERVER=3): if tcp_conn(): if server_allows_conn(): return GOOD else:

Re: Wrapper objects

2004-12-10 Thread redhog
Bengt Richter wrote: On 9 Dec 2004 06:11:41 -0800, [EMAIL PROTECTED] (Egil M?ller) wrote: Is there any way to create transparent wrapper objects in Python? I thought implementing __getattribute__ on either the wrapper class or its metaclass would do the trick, but it does not work for the

Re: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Dirkjan Ochtman
Stick the single tibia.tba file on your webserver (assuming Python is installed) and you're off and editing files in the same folder or below. Admins can edit any element; non-admins can edit any element for which admins give them permission. - Stuck in /var/www/localhost/cgi-bin/ - Changed

Re: MySQLdb blob and binary data

2004-12-10 Thread Denis S. Otkidach
On Fri, 10 Dec 2004 16:58:56 +0100 Rune Hansen [EMAIL PROTECTED] wrote: I'm storing gzipped data in a MySQL blob field. I can fetch the blob and wb write the data to a file. It becomes a file containg gz data. I can't take the same data and do anything sensible with it in python - like

Re: style query: function attributes for return codes?

2004-12-10 Thread holger krekel
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' else: return 'bad_auth'

Re: Blank ASP pages

2004-12-10 Thread ElCapitan
I have same exact problem and get the sourcecode right back (asp source code) when i right click page and view source code. Not sure what server they are using this is not in my company. Thanks in advance Gordon McMillan wrote: Jason S. Nadler wrote: My server is spitting out blank .asp pages

RE: Tibia 0.1 DOM-based website editor

2004-12-10 Thread Robert Brewer
Gabriel Cooper wrote: Robert Brewer wrote: [...] Tibia is an in-browser editor for web pages. It allows you to quickly and easily modify the content of your web pages. [...] I couldn't get it to work using Firefox on Red Hat Fedora Core 2. From what I garnered from the help you're

Re: Python + Newspipe

2004-12-10 Thread Peter Hansen
kael wrote: Dave Kuhlman wrote: 3. It's looking for a section named NewsPipe in your options/config file. Check your config file. Is that section name misspelled? Is the section missing? Does the NewsPipe documentation tell you where the config file should be and what it's name is?

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

2004-12-10 Thread Peter Hansen
Jody Burns wrote: 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 was able

Re: Python + Newspipe

2004-12-10 Thread kael
Peter Hansen wrote: kael wrote Dave Kuhlman wrote: 3. It's looking for a section named NewsPipe in your options/config file. Check your config file. Is that section name misspelled? Is the section missing? Does the NewsPipe documentation tell you where the config file should be and

Re: style query: function attributes for return codes?

2004-12-10 Thread Steven Bethard
Robert Kern wrote: Steven Bethard wrote: Sorry, I also meant to add that the other obvious way of dealing with this kind of thing is to make the results keyword parameters: def get_connection(GOOD=1, BAD_AUTH=2, NO_SERVER=3): if tcp_conn(): if server_allows_conn(): return

RE: Blank ASP pages

2004-12-10 Thread Robert Brewer
ElCapitan wrote: Gordon McMillan wrote: Jason S. Nadler wrote: My server is spitting out blank .asp pages which use python. If Python is not declared, the asp pages work fine. I just yesterday stepped up to Python 1.52 and the new win32all After the install, the blanks started

Re: collaborative editing

2004-12-10 Thread A.M. Kuchling
On 10 Dec 2004 05:20:42 -0800, Michele Simionato [EMAIL PROTECTED] wrote: welcome. Does something like that already exists? Alternatively, I would need some hierarchical Wiki with the ability of printing its contents in an structured way. At least one book, Eric van der Vlist's RELAX

Yahoo! Auto Response

2004-12-10 Thread plegend2001
THIS IS AN AUTO-RESPONSE SYSTEM FOR PLEGEND2001 We are experiencing an unusual high-volume of e-mail. For questions, please click the link for FAQ page: http://members.ebay.com/ws2/eBayISAPI.dll?ViewUserPageuserid=plegend2001 If you have receive a tracking number, please allow FedEx,UPS,or DHL

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: 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: [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 following four

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

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 the

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.

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

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 pining for

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?

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.

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 additional

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 an sdist,

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 for

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.. --

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

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

newbie questions

2004-12-10 Thread houbahop d.lapasset
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') :

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

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: 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, creating:

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 not

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 run

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 worlds,

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. In

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 local

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: 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: 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 C 3.x.

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, mostly

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

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

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 (like data

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: a = 0

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:

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 figure it out.

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 about

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 when

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: How do I do this? (eval() on the left hand side)

2004-12-10 Thread Nick Coghlan
Carl Banks wrote: Modifying globals() not even necessary for this. When I want to dynamically update the global namespace, I do it this way: mod = __import__(__name__) setattr(mod,symbol,value) Works perfectly unless you're worried about someone modifying the built in __import__. Well, aside

Re: Wrapper objects

2004-12-10 Thread Kent Johnson
Nick Coghlan wrote: Simon Brunning wrote: This work - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52295? Only for old-style classes, though. If you inherit from object or another builtin, that recipe fails. Could you explain, please? I thought __getattr__ worked the same with new-

collaborative editing

2004-12-10 Thread Michele Simionato
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 automatic generation of the

Find Items Indices In A List...

2004-12-10 Thread andrea . gavana
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 condition. For example, assuming that I have a list like: mylist = [0, 1, 1, 1, 1, 5, 6, 7, 8, 1, 10] I would like to

Python + Newspipe

2004-12-10 Thread kael
Hello, I'm trying to run _Newspipe_ but Python returns an error : --- [EMAIL PROTECTED] root]# python2.3 /home/kael/newspipe/newspipe.py newspipe.py - version 1.1.1 revision 1.42, Copyright (C) 2003-2004 Ricardo M. Reyes [EMAIL

Re: exec'ing functions

2004-12-10 Thread Mel Wilson
In article [EMAIL PROTECTED], Peter Otten [EMAIL PROTECTED] wrote: Mel Wilson wrote: The thing is, that once you drop local-namespace optimization, the entire function gets slowed down, possibly by 40%: It's not that bad as most of the extra time is spend on compiling the string. [ ... ] def

socket.makefile AF_UNIX

2004-12-10 Thread Jamie Saker
I think I'm overlooking something assumed in socket's makefile method. Googling several hours and digging thru the python reference didn't help - I think I'm overlooking an assumption between Python and UNIX socket objects neither is explicitely discussing. I think my mknod In the makefile

  1   2   >