Re: Semaphore or what should I use?

2004-12-06 Thread Pierre Barbier de Reuille
Sergei Organov a ecrit : Pierre Barbier de Reuille <[EMAIL PROTECTED]> writes: Ville Vainio a ecrit : "Bastian" == Bastian Hammer <[EMAIL PROTECTED]> writes: Bastian> Now I have to make sure, that both threads are Bastian> synchronal, 1 thread edits something and the other is Bastian> bl

Re: convert string to raw string?

2004-12-06 Thread Terry Reedy
"Phd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm writing a regex related program that lets the user supplies the regex > definition. Is there an easy way to convert a string into a raw string? There ain't no such thing as raw strings. Just 'raw' string *literals*

[pywin32] windows shares, was os.listdir("\\\\delta\\public")

2004-12-06 Thread Egor Bolonev
Try grabbing the output of os.popen(r"net view \\delta") and parse it to get a list of the shares: c:\>net view \\monolith Shared resources at \\monolith Share name Type Used as Comment --- Printer Print M

Re: convert string to raw string?

2004-12-06 Thread Duncan Booth
Phd wrote: > I'm writing a regex related program that lets the user supplies the > regex definition. Is there an easy way to convert a string into a raw > string? A raw string is a feature of the syntax of Python. Python gives you several ways to write strings: single quoted, double quoted, tri

Re: teaching OO

2004-12-06 Thread Alan Gauld
On 24 Nov 2004 18:31:13 GMT, Gabriel Zachmann <[EMAIL PROTECTED]> wrote: > You know, I keep wondering exactly what we will be teaching as programming > languages become easier and easier to learn. > > Programming itself? -- won't be enough for a whole semester. Oh no way. You could teach a whole

PDF count pages

2004-12-06 Thread Jose Benito Gonzalez Lopez
Hi there, Does anyone know how I could do in order to get/count the number of pages of a PDF file? (from python of course ;) ) Thanks beforehand. Cheers, Jose -- Jose Benito Gonzalez Lopez CERN Document Server ** ** InDiCo Project ** ** CDScon

Re: installing wxPython on Linux and Windows

2004-12-06 Thread rido dodol
Install ubuntu linuxget wxpython with synaptic...is easy!!! On Thu, 02 Dec 2004 10:19:12 +0100, Peter Maas <[EMAIL PROTECTED]> wrote: > Recently I replaced Win2k with Linux on my desktop computer. Using mostly > multi-platform software I thought this would be easy. It was not as > easy as exp

Re: pre-PEP generic objects

2004-12-06 Thread Jacek Generowicz
Jp Calderone <[EMAIL PROTECTED]> writes: > When the class object is created, the namespace is scanned for > instances of . For those and only those, a > descriptor is created which will produce bound and unbound methods. This isn't quite correct. A descriptior is any object which has callable at

Re: Quixote+Nevow+LivePage

2004-12-06 Thread mirnazim
I m still without any helpful answers. -- http://mail.python.org/mailman/listinfo/python-list

Recursive list comprehension

2004-12-06 Thread Timothy Babytch
Hi all. I have a list that looks like [['N', 'F'], ['E'], ['D']] I try to make it flat one: ['N', 'F', 'E', 'D'] How can I archieve such an effect with list comprehension? Two cycles did the job, but that way did not look pythonic.. I tried print [x for x in y for y in c_vars] and got NameError: na

Re: Recursive list comprehension

2004-12-06 Thread Peter Otten
Timothy Babytch wrote: > Hi all. > > I have a list that looks like [['N', 'F'], ['E'], ['D']] > I try to make it flat one: ['N', 'F', 'E', 'D'] > > How can I archieve such an effect with list comprehension? > Two cycles did the job, but that way did not look pythonic.. > > I tried > print [x fo

Re: Recursive list comprehension

2004-12-06 Thread Timothy Babytch
Peter Otten wrote: The order of the for expressions is as it would be for nested loops: items = [['N', 'F'], ['E'], ['D']] [y for x in items for y in x] I would still prefer a for loop because it spares you from iterating over the sublist items in python: data = [] for sub in [['N', 'F'], ['E'],

RE: [pywin32] windows shares, was os.listdir("\\\\delta\\public")

2004-12-06 Thread Tim Golden
[Egor Bolonev] | how to get list of shares using pywin32? You want to be looking at the NetShareEnum function in the win32net module. TJG This e-mail has been scanned for all viruses by Star. The service is powered by Mess

suffix .py in IDLE

2004-12-06 Thread p.kosina
Its just for my convienience: When saving new file in IDLE I HAVE to always manually add suffix .py, otherwise it is saved without ANY suffix. Can it be set somewhere? Thank you Pavel -- http://mail.python.org/mailman/listinfo/python-list

Re: PDF count pages

2004-12-06 Thread Andreas Lobinger
Aloha, Jose Benito Gonzalez Lopez wrote: Does anyone know how I could do in order to get/count the number of pages of a PDF file? Like this ? Python 2.2.2 (#3, Apr 10 2003, 17:06:52) [GCC 2.95.2 19991024 (release)] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>

RE: notification for cd insertion

2004-12-06 Thread Tim Golden
[Qiangning Hong] | I want one of my function to execute when a cdrom is | inserted. How can I achieve that? 1) Go to http://groups.google.com 2) Search for python cd insert notification 3) Pick the first result, which is a post by me responding to the same question about a year ago. TJG

Re: python-mode question

2004-12-06 Thread Thomas Heller
Skip Montanaro <[EMAIL PROTECTED]> writes: > Thomas> When I edit a Python script with XEmacs, then hit C-c C-c, the > Thomas> script is executed, the output is shown in a *Python Output* > Thomas> buffer, and the cursor is moved into this buffer. > > Thomas> How can I change the be

xmlrpclib or twisted?

2004-12-06 Thread flupke
Hi, previously i made an application that used sockets to do some network based processing. My next app is again going to be a client/server app and i wanted to see if i can't find an easier way to make the networking going. I bumped into xmlrpclib and also twisted (pb). I'm not sure which on of th

PIL + Zope + resizing images

2004-12-06 Thread KK
Hallo. I have Zope 2-7-0 on Linux platform and the following problem :) I'm sending an image through form on the pythonScript. I want script to resize image and save on the zope folder in 3 different size. OK, I use ExternalMethod which uses PIL library to resize these images. External method: de

Re: Recursive list comprehension

2004-12-06 Thread Peter Nuttall
On Monday 06 Dec 2004 09:26, Timothy Babytch wrote: > Hi all. > > I have a list that looks like [['N', 'F'], ['E'], ['D']] > I try to make it flat one: ['N', 'F', 'E', 'D'] > > How can I archieve such an effect with list comprehension? > Two cycles did the job, but that way did not look pythonic..

Re: New to Python: Features

2004-12-06 Thread dautjics
http://www.ardice.com/Computers/Programming/Graphics/Libraries/OpenGL/Add-on_Libraries/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Curses programming, threads?

2004-12-06 Thread Bartlomiej Rymarski
Michele Simionato <[EMAIL PROTECTED]> wrote: > You don't need curses. Some time ago somebody (I forgot the name) > posted this spinner class: > > class Spinner( threading.Thread ): # a google search should find the author > [...] Great, thanks a lot. -- Bartek Rymarski <[EMAIL PROTECTED]> $ %bl

Re: Curses programming, threads?

2004-12-06 Thread Bartlomiej Rymarski
Carl Banks <[EMAIL PROTECTED]> wrote: > (...) > But I recommend threads for this. It's one of the easiest possible > uses of threads. There's no complex communication involved; locks and > semaphores and stuff aren't required. Just connect to the database in > a subthread, and have it set a glo

Re: Recursive list comprehension

2004-12-06 Thread Nick Coghlan
Peter Nuttall wrote: I think you do it with a generator like this: def flatten(nested): for sublist in nested: for element in sublist: yield element n=[['N', 'F'], ['E'], ['D']] output=[] for value in flatten(n): output.append(value) print output I highly recommend learning about the

CTYPE 0.9.2 porting problems

2004-12-06 Thread Armin Steinhoff
Hi all, I ported ctypes 0.9.2 to QNX6.3 ... 99.9 % is working but only the unittest test_functions.py makes some problem. Here is the code: p = pointer(c_int(99)) result = f(p) self.failUnlessEqual(result.contents.value, 99) #---> works!! # We need to keep the poi

Deadlock detection

2004-12-06 Thread Duncan Grisby
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. Cheers, Duncan. -- -- Duncan Grisby -- -- [EMAI

Re: long number multiplication

2004-12-06 Thread Nick Craig-Wood
I.V. Aprameya Rao <[EMAIL PROTECTED]> wrote: > i have been wondering, how does python store its very long integers and > perform aritmetic on it. > > i needed to implement this myself and was thinking of storing the digits > of an integer in a list. > > however this would be very slow for

Re: Recursive list comprehension

2004-12-06 Thread Peter Otten
Nick Coghlan wrote: > from itertools import chain > n = [['N', 'F'], ['E'], ['D']] > print [chain(*n)] However, [generator] is not the same as list(generator): >>> from itertools import chain >>> n = [['N', 'F'], ['E'], ['D']] >>> print [chain(*n)] [] >>> print list(chain(*n)) ['N', 'F', 'E', 'D

Re: Recursive list comprehension

2004-12-06 Thread Nick Coghlan
Peter Otten wrote: Nick Coghlan wrote: from itertools import chain n = [['N', 'F'], ['E'], ['D']] print [chain(*n)] However, [generator] is not the same as list(generator): Heh - good point. As you say, replacing with list() gives the intended answer. With regards to laziness, my main point was

Re: Quixote+Nevow+LivePage

2004-12-06 Thread Carlos Ribeiro
On 6 Dec 2004 01:15:35 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I m still without any helpful answers. I'm sorry to hear that. There were some answers (including mine) that may have not solved your problem, but at least we did try. That's the best one can ask far while posting on a pu

Float to int conversions (was: int(float(sys.maxint)) buglet)

2004-12-06 Thread Nick Coghlan
A quick check of the source code reveals that this behaviour is deliberate. There is apparently an issue with the corner case breaking badly (potentially raising an exception) on some platforms. So, Python plays it safe and converts the two boundary cases to Python longs instead of Python ints

MySQL-python-1.0.0.win32-...

2004-12-06 Thread Henning Hanusa
Could anybody please provide me with a "compiled" version of the above (MySQLdb 1.0.0 for Python on Win 2000 / XP) for Python version 2.4, as I do not have any possibility of compiling?? Many thanks in advance Henning -- http://mail.python.org/mailman/listinfo/python-list

Problems with calendar products in Plone

2004-12-06 Thread Espen Willersrud
I have a installation with plone-2.0.4-1 and zope-2.7.2-1. I have to use this version, for the reason that the server this will be exportet to have the same installation. I have tested a lot of calendar products with plone, to find one that fitt our needs betther then the standard one. And ever

exec and thread.start_new

2004-12-06 Thread Nick Coghlan
Andr? Roberge wrote: I don't understand why I need to use the global statement within the definition of c() in order for it to know what a() is. If I define exec_code() within test.py and use it there, I do not get any error, with or without the use of a global statement. I get the same behaviou

Re: Recursive list comprehension

2004-12-06 Thread Serhiy Storchaka
Timothy Babytch wrote: I have a list that looks like [['N', 'F'], ['E'], ['D']] I try to make it flat one: ['N', 'F', 'E', 'D'] How can I archieve such an effect with list comprehension? Two cycles did the job, but that way did not look pythonic.. I tried print [x for x in y for y in c_vars] and go

Re: MySQL-python-1.0.0.win32-...

2004-12-06 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
+1 -- http://mail.python.org/mailman/listinfo/python-list

Re: help asap

2004-12-06 Thread Steve Holden
the_proud_family wrote: HELP ME PLEASE!! my email is [EMAIL PROTECTED] I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the past 2 weeks now i give up and call for help. Please if anyone can gide me through i will be

Win32 Libs for 2.4

2004-12-06 Thread Robin Becker
Does anyone know if it is feasible to have static libraries for both 2.3 and 2.4 compatible extensions. I'm worrying about libjpeg etc in a win32 environment. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: Seeking Python + Subversion hosting.

2004-12-06 Thread Roy Smith
[EMAIL PROTECTED] (Tom Locke) wrote: > Anyone know of a good hosting company that offers both server-side > Python and a subversion repository? Panix (www.panix.com) has svn and python installed on their unix hosts. You could certainly do CGI in python. Don't know if they have mod_python avail

Re: Ptyon 2.3.5 probably coming in January; get your bugs/patches reported!

2004-12-06 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Brett C." <[EMAIL PROTECTED]> wrote: > Anthony Baxter, our ever-diligent release manager, mentioned this past week > that Python 2.3.5 will most likely come to fruition some time in January > (this is not guaranteed date). Interesting. Does that mean that 2.3

I need to create the table and I want to edit its content from www level.

2004-12-06 Thread Rootshell
Yo, thanks for help Yeap, wikipedia is one of examples, the wikipedia script includes 'action=edit' command and it edits the file called 'wiki.phtml'. I want to edit the content of casual table. Have no idea how to give the password to a few users, so they can edit this small table. That's all.

Re: exec and global puzzle

2004-12-06 Thread Steve Holden
Andr? Roberge wrote: I have the following two files: #--testexec.py-- def exec_code(co): try: exec co except: print "error" #-- test.py-- import thread import testexec import time code = "def a():\n print 'a'\n\n" +\ "def c():\n a()\n\nc()" code2 = "def a():\n print '

byte code generated under linux ==> bad magic number under windows

2004-12-06 Thread Philippe C. Martin
Hi, I understand from my reading that a .pyc generated by python anywhere should run anywhere else - is that true ? If I generate 'compile.all' a pyc with python 2.3.3 under Linux, I get a 'bad magic number' trying to execute it under windows (2.4). What am I doing wrong ? are the pyc platef

Re: Win32 Libs for 2.4

2004-12-06 Thread Daniel Dittmar
Robin Becker wrote: Does anyone know if it is feasible to have static libraries for both 2.3 and 2.4 compatible extensions. I'm worrying about libjpeg etc in a win32 environment. Could you be a bit more specific: do you want to create a binary python extension that is compatible with both Python

Re: [pywin32] windows shares, was os.listdir("\\\\delta\\public")

2004-12-06 Thread Peter Hansen
Egor Bolonev wrote: Try grabbing the output of os.popen(r"net view \\delta") and parse it to get a list of the shares: c:\>net view \\monolith No doubt you can also do this much more easily with the pywin32 package, or via COM (using pywin32 or ctypes), but I'll leave that response to someone else.

Re: I need to create the table and I want to edit its content from www level.

2004-12-06 Thread Fred Pacquier
[EMAIL PROTECTED] (Rootshell) said : > I need to create the table and I want to edit its content from www > level. > > Here is some example: > > http://www.rootshell.be/~flash44 > > There is a table. > Is there possibilty to edit the content using command? > > Could you show me the way how to

Re: I need to create the table and I want to edit its content from www level.

2004-12-06 Thread Peter Hansen
Rootshell wrote: Yo, thanks for help Yeap, wikipedia is one of examples, the wikipedia script includes 'action=edit' command and it edits the file called 'wiki.phtml'. I want to edit the content of casual table. Have no idea how to give the password to a few users, so they can edit this small table

RPC with Python - Comparison?

2004-12-06 Thread Wolfgang Keller
Hello, has anyone done a comparison of the different RPC protocols & implementations available for Python that is more extensive and exhaustive than the one on http://www-106.ibm.com/developerworks/webservices/library/ws-pyth9/? Topics would be: - Runtime efficiency - Development efficiency - De

Re: Deadlock detection

2004-12-06 Thread Stephen Kellett
>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. Software Verification have Python Thread Validator. Its not pu

Re: byte code generated under linux ==> bad magic number under windows

2004-12-06 Thread Aaron Bingham
Philippe C. Martin wrote: I understand from my reading that a .pyc generated by python anywhere should run anywhere else - is that true ? If I generate 'compile.all' a pyc with python 2.3.3 under Linux, I get a 'bad magic number' trying to execute it under windows (2.4). What am I doing wrong ?

Re: byte code generated under linux ==> bad magic number under windows

2004-12-06 Thread Laszlo Zsolt Nagy
> I understand from my reading that a .pyc generated by python anywhere should > run anywhere else - is that true ? > If I generate 'compile.all' a pyc with python 2.3.3 under Linux, I get a 'bad > magic number' trying to execute it under windows (2.4). > What am I doing wrong ? You should use the

Python parsers for C/C++/Java

2004-12-06 Thread shivaram.upadhyayula
Title: Python parsers for C/C++/Java Hi, I am looking for a parser generator to parse C, C++ and Java (including popular extensions from various compilers) source code; I have come across PLY, SPARK, D-parser (there seems to be a all-python version itself for this one), etc. and am wondering

Re: Book Recommendations

2004-12-06 Thread elbows
Manuzhai wrote: > Check this thread currently going on: > http://groups.google.com/groups?hl=en&lr=&c2coff=1&safe=off&threadm=coqd91%246m2%241%40news.doit.wisc.edu&prev=/groups%3Fhl%3Den%26lr%3D%26c2coff%3D1%26safe%3Doff%26group%3Dcomp.lang.python > The link doesn't work -- maybe because of the n

Re: Recursive list comprehension

2004-12-06 Thread Timothy Babytch
Serhiy Storchaka wrote: >>>sum([['N', 'F'], ['E'], ['D']], []) ['N', 'F', 'E', 'D'] THE BEST! -- Timothy Babytch, PHP-dev Teamleader -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32 Libs for 2.4

2004-12-06 Thread Robin Becker
Daniel Dittmar wrote: Robin Becker wrote: Does anyone know if it is feasible to have static libraries for both 2.3 and 2.4 compatible extensions. I'm worrying about libjpeg etc in a win32 environment. Could you be a bit more specific: do you want to create a binary python extension that is compa

Re: xmlrpclib or twisted?

2004-12-06 Thread Istvan Albert
flupke wrote: I am planning to build a web GUI for the client so if i If you are planning to build a browser based interface then use an available webserver and don't build your own. Istvan. -- http://mail.python.org/mailman/listinfo/python-list

Re: [BUG] IMO, but no opinions? Uncle Tim? was: int(float(sys.maxint)) buglet ?

2004-12-06 Thread jepler
Python 2.2.2: >>> int(float(sys.maxint)) 2147483647 Python 2.3.2: >>> int(float(sys.maxint)) 2147483647L If you're looking for a suspicious change, this should narrow it down. Jeff pgpzFOZE4nYMl.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: long number multiplication

2004-12-06 Thread Michael Hudson
"Terry Reedy" <[EMAIL PROTECTED]> writes: > "I.V. Aprameya Rao" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > i have been wondering, how does python store its very long integers and > > perform aritmetic on it. Well, up until fair recently it used "high school" arithmetic in

Re: Help With Hiring Python Developers

2004-12-06 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: >[EMAIL PROTECTED] (Michael Fuhr) writes: >> >> Indeed. An acquaintance of mine advocates writing code that only >> skilled programmers can maintain (he favors a language that shall >> remain nameless but that has been k

Re: Ptyon 2.3.5 probably coming in January; get your bugs/patches reported!

2004-12-06 Thread Aahz
In article <[EMAIL PROTECTED]>, Roy Smith <[EMAIL PROTECTED]> wrote: >In article <[EMAIL PROTECTED]>, > "Brett C." <[EMAIL PROTECTED]> wrote: >> >> Anthony Baxter, our ever-diligent release manager, mentioned this >> past week that Python 2.3.5 will most likely come to fruition some >> time in Jan

Re: [BUG] IMO, but no opinions? Uncle Tim? was: int(float(sys.maxint)) buglet ?

2004-12-06 Thread Tim Peters
[Bengt Richter] > Peculiar boundary cases: > > >>> 2.0**31-1.0 > 2147483647.0 > >>> int(2147483647.0) > 2147483647L > >>> int(2147483647L ) > 2147483647 > >>> > >>> -2.0**31 > -2147483648.0 > >>> int(-2147483648.0) > -2147483648L > >>> int(-2147483648L ) > -2147483648 > > some kind of one-off err

Re: Ptyon 2.3.5 probably coming in January; get your bugs/patches reported!

2004-12-06 Thread Tim Peters
[Brett C] >> Anthony Baxter, our ever-diligent release manager, mentioned this past week >> that Python 2.3.5 will most likely come to fruition some time in January >> (this is not guaranteed date). [Roy Smith] > Interesting. Does that mean that 2.3 and 2.4 will be maintained in > parallel for a

Re: Help With Hiring Python Developers

2004-12-06 Thread Andrew Koenig
"Aahz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > APL. I've heard programmers making similar comments (including possibly > Michael's nameless acquaintance). Especially programmers who've never used it. To me, grousing about APL's unusual character set sounds a lot like grou

Re: long number multiplication

2004-12-06 Thread Christopher A. Craig
"I.V. Aprameya Rao" <[EMAIL PROTECTED]> writes: > i have been wondering, how does python store its very long integers and > perform aritmetic on it. In CPython, A long integer is a combination of a signed word indicating the sign and the size and an unsigned array of N words where N is the absol

Re: Seeking Python + Subversion hosting.

2004-12-06 Thread Gregory (Grisha) Trubetskoy
On Sun, 5 Dec 2004, Tom Locke wrote: Anyone know of a good hosting company that offers both server-side Python and a subversion repository? This is probably a good opportunity for me to plug OpenHosting.com. It's a virtual server, so you can compile/install/run just about anything. We do have Pyt

Re: How is Python designed?

2004-12-06 Thread Diez B. Roggisch
Hi, > > Not really. You think in this way, maybe because you > know more about AST and less about that technique I > mentioned. I thinked in the opposite > way because I know different things better. > Hehe. So I guess you don't use classic parser techniques then? > Sorry maybe I didn't underst

Re: RPC with Python - Comparison?

2004-12-06 Thread has
Wolfgang Keller wrote: > Candidates could be: > > - Pyro > - Twisted.spread > - OSE (XML-RPC) > - ICE > - ...others? MacPython also supports Apple events (high-level bridge: ) HTH -- http://mail.python.org/mailman/listinfo/python-lis

Re: byte code generated under linux ==> bad magic number underwindows

2004-12-06 Thread Fredrik Lundh
Aaron Bingham wrote: > .pyc files are platform-independant but are incompatible between major Python > versions. "are incompatible" should be "may be incompatible" you can use imp.get_magic() to get a string that identifies the bytecode version supported by the current interpreter; any interpre

Re: efficient intersection of lists with rounding

2004-12-06 Thread Gordon Williams
> Hi, > > I have to lists that I need to find the common numbers (2nd rounded to > nearest integral) and I am wondering if there is a more efficient way of > doing it. > > >>> a= [(123,1.3),(123,2.4),(123,7.8),(123,10.2)] > >>> b= [(123, 0.9), (123, 1.9), (123, 8.0)] > >>> [ (i,round(j)) for i,j

Re: The python2.4 IDLE can't be lanuched.

2004-12-06 Thread Brian Beck
AnkyHe wrote: I downloaded the python 2.4 final from the offical website and installed it on the WindowsXP+SP2 (Chinese version). There was not any problem in this process, but the IDLE can't be lanuched without any warnning. Is there anybody else encount this problem and how to resolve it? Th

Re: The python2.4 IDLE can't be lanuched.

2004-12-06 Thread Brian Beck
Brian Beck wrote: I have the exact same problem. The IDLE window just never opens, and checking the process list shows that is was never even launched. So I can't make much use of Python 2.4 since I use IDLE as my IDE... I forgot to note that I am also using Windows XP SP2 and this happens on

Re: convert string to raw string?

2004-12-06 Thread Steven Bethard
Duncan Booth wrote: If you are getting input from the user, then unless you are doing some processing on it to interpret escape sequences the chances are you already have what you need to use as a regular expression. If you *are* interpreting escape sequences then the answer is you need to not d

Re: The python2.4 IDLE can't be lanuched.

2004-12-06 Thread Abe Mathews
Don't know if this would help or not, but on my Linux 2.3 IDLE, I get the following warning on startup: Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal

Re: Win32 Libs for 2.4

2004-12-06 Thread Daniel Dittmar
Robin Becker wrote: actually I want to build the PIL extension for 2.4 as pyd and include various libraries eg zlib and jpeg. To avoid the missing dlls issue we have done this in the past by incorporating the zlib/jpeg code using static libraries for both zlib and jpeg. It seems I can use the s

Re: help using sockets, and OOP?

2004-12-06 Thread Dfenestr8
On Sun, 05 Dec 2004 22:29:26 +, Jp Calderone wrote: >> > Your problem doesn't seem to have anything to do with "OOP" >> > (whatever that is). Rather, you are trying to use two blocking >> > sockets at once. >> > >> > socket.connect() and socket.recv() are both "blocking" operations b

Re: any good, free web hosts supporting python cgi scripts?

2004-12-06 Thread araspus
please come to my website www.arasp.net You may be qualified. for my hosting plans. -- http://mail.python.org/mailman/listinfo/python-list

Re: Win32 Libs for 2.4

2004-12-06 Thread Robin Becker
Daniel Dittmar wrote: Robin Becker wrote: actually I want to build the PIL extension for 2.4 as pyd and include various libraries eg zlib and jpeg. To avoid the missing dlls issue we have done this in the past by incorporating the zlib/jpeg code using static libraries for both zlib and jpeg. It

Re: The python2.4 IDLE can't be lanuched.

2004-12-06 Thread Brian Beck
Abe Mathews wrote: I'm not running SP 2 on any machines, so I can't test it for you, but it may be that the personal firewall being activated on SP 2 is blocking IDLE from starting up. You might try turning that off and seeing if that helps. IIRC, part of SP 2 was port disabling. I do remember se

Re: The python2.4 IDLE can't be lanuched.

2004-12-06 Thread Jean Brouwers
This is a known problem. More details at /Jean Brouwers In article <[EMAIL PROTECTED]>, AnkyHe <[EMAIL PROTECTED]> wrote: > I downloaded the python 2.4 final from the offical website and installe

Re: help using sockets, and OOP?

2004-12-06 Thread Grant Edwards
On 2004-12-06, Dfenestr8 <[EMAIL PROTECTED]> wrote: >>> Ok, so what if I remove the while loop from the Botling class, and >>> include it in the __main__ ? Might this work as a solution then? >> >> No. > > Ok, so are there other types of sockets that aren't "blocking" ? Yes, non-blocking ones.

Re: help using sockets, and OOP?

2004-12-06 Thread Diez B. Roggisch
> Ok, so are there other types of sockets that aren't "blocking" ? You don' want other types of sockets (they are pretty good the way the are) but other ways of using them. The topics you might need to delve into are threading, the select module and twisted. Which at least in part Jp already sugg

Re: Mean, median, and mode

2004-12-06 Thread Josiah Carlson
[EMAIL PROTECTED] (Sean McIlroy) wrote: > > >>> median = lambda x: (max(x)-min(x))/2 That is /not/ the median in the general case. median = lambda x: x.sort() or x[len(x)//2] - Josiah -- http://mail.python.org/mailman/listinfo/python-list

RE: Mean, median, and mode

2004-12-06 Thread Robert Brewer
Josiah Carlson wrote: > [EMAIL PROTECTED] (Sean McIlroy) wrote: > > > > >>> median = lambda x: (max(x)-min(x))/2 > > That is /not/ the median in the general case. > > median = lambda x: x.sort() or x[len(x)//2] That...is a really sneaky use of null return values. I like. :) Robert Brewer MIS

Re: using cmd.exe as a telnet client

2004-12-06 Thread Donnal Walter
Grant Edwards wrote: You don't have to start from scratch. The telnet module has hooks built-into it1 so that you can have it call your routines to handle option negotiation. I did it once to impliment some extra Telnet protocol features, and it wasn't difficult. Ok, you've inspired me to give it

Re: Deadlock detection

2004-12-06 Thread Josiah Carlson
Duncan Grisby <[EMAIL PROTECTED]> 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. I'm

Re: help using sockets, and OOP?

2004-12-06 Thread Andy Gross
On Dec 6, 2004, at 12:04 PM, Dfenestr8 wrote: Ok, so are there other types of sockets that aren't "blocking" ? Yes, sockets can be either blocking or non-blocking. An I/O operation on a 'blocking' socket will not return until the operation is complete. If you try to read more bytes than are cur

Re: PIL and antialiasing problem

2004-12-06 Thread Fredrik Lundh
Laszlo Zsolt Nagy wrote: > Statement: Sometimes PIL is better than Adobe Photoshop. :-) > > I also found these with the aid of the wonderful dir() function: > > MinFilter, MaxFilter, MedianFilter, ModeFilter, RankFilter, BuiltInFilter > > They do not have a docstring and they are not documented in

Re: using cmd.exe as a telnet client

2004-12-06 Thread Donnal Walter
Grant Edwards wrote: > You don't have to start from scratch. The telnet module has > hooks built-into it1 so that you can have it call your routines > to handle option negotiation. I did it once to impliment some > extra Telnet protocol features, and it wasn't difficult. Ok, you've inspired me to

Re: Mean, median, and mode

2004-12-06 Thread Paul McGuire
This median expression is incorrect. median is *not* the midpoint between max and min values. It is the middle value when all values are sorted (for an odd number of values), or the average of the two middle values when all values are sorted (for an even number of values). In Python 2.4 (needed

Re: asynchat and threading

2004-12-06 Thread Fredrik Lundh
Anthony Baxter wrote: > > AFAICT, the main complaint is that it is tied to the TCP transport, > > the sockets API, and the select/poll API. IOW, it cannot easily: > > - integrate TLS on top of TCP (because TLS might involve no-data > >communications, e.g. when TLS negotation happens in the mid

Re: xmlrpclib or twisted?

2004-12-06 Thread Andy Gross
If you're not concerned about interoperability with other languages and are already using Twisted, I'd go with PB. Especially if you are using complicated datatypes that have to be serialized and sent over the wire - PB has a nice Cacheable type that doesn't serialize the whole object. XMLRPC

Re: Mean, median, and mode

2004-12-06 Thread Josiah Carlson
"Robert Brewer" <[EMAIL PROTECTED]> wrote: > > Josiah Carlson wrote: > > [EMAIL PROTECTED] (Sean McIlroy) wrote: > > > > > > >>> median = lambda x: (max(x)-min(x))/2 > > > > That is /not/ the median in the general case. > > > > median = lambda x: x.sort() or x[len(x)//2] > > That...is a reall

Re: using cmd.exe as a telnet client

2004-12-06 Thread Donnal Walter
Grant Edwards wrote: > You don't have to start from scratch. The telnet module has > hooks built-into it1 so that you can have it call your routines > to handle option negotiation. I did it once to impliment some > extra Telnet protocol features, and it wasn't difficult. Ok, you've inspired me to

Re: using cmd.exe as a telnet client

2004-12-06 Thread Grant Edwards
On 2004-12-06, Donnal Walter <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > > You don't have to start from scratch. The telnet module has > > hooks built-into it1 so that you can have it call your routines > > to handle option negotiation. I did it once to impliment some > > extra Telnet prot

Re: Recursive list comprehension

2004-12-06 Thread Peter Hansen
Timothy Babytch wrote: Serhiy Storchaka wrote: >>>sum([['N', 'F'], ['E'], ['D']], []) ['N', 'F', 'E', 'D'] THE BEST! Hmmm. Maybe, unless readability as in "self-documenting code" is important to you... Preceding the above with "flatten = sum" would perhaps be an adequate improvement. -Peter -- ht

Re: RPC with Python - Comparison?

2004-12-06 Thread Wolfgang Keller
>> Candidates could be: >> >> - Pyro I forgot to mention Corba here: - Omniorb - Orbit - Fnorb BTW: It seems to me that none of these provides an AMI implementation...? >> - Twisted.spread >> - OSE (XML-RPC) >> - ICE >> - ...others? > MacPython also supports Apple events (high-level bridge: >

ANN: eGenix mx Base Package 2.0.6 (mxDateTime, mxTextTools, etc.)

2004-12-06 Thread M.-A. Lemburg
ANNOUNCING eGenix.com mx Base Extension Package Version 2.0.6 Open Source Python extensions providing important and useful services for Python programmers. __

ANN: eGenix mxODBC Python Database Interface Version 2.0.7

2004-12-06 Thread M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Database Interface Version 2.0.7 Full Source Python extension providing ODBC database connectivity to Python applications on Windows and Unix platform

ANN: eGenix mx Experimental Package 0.9.0 (mxNumber, mxTidy, mxURL, etc.)

2004-12-06 Thread M.-A. Lemburg
ANNOUNCING eGenix.com mx Experimental Extension Package Version 0.9.0 Experimental Python extensions providing important and useful services for Python programm

Re: using cmd.exe as a telnet client

2004-12-06 Thread Donnal Walter
I wrote: I've been wanting to get acquainted with Twisted for awhile now, ... BTW, do you know if Twisted's option negotiation uses a callback function? I might download it to take a look, ... Sorry I did not do this earlier, before I posted. It is obvious (now that I have downloaded it) that Twis

  1   2   >