Re: Injecting code into a function

2005-04-25 Thread George Sakkis
> I'm not clear on what your real goal is, but if you just want a snapshot > of what locals() is just before exiting func, that could be done with > a byte-code-hacking decorator with usage looking something like > > #func defined before this > func_locals = {} > @getlocals(func, func_l

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Bengt Richter
On Mon, 25 Apr 2005 16:48:46 -0400, Bill Mill <[EMAIL PROTECTED]> wrote: >On 25 Apr 2005 23:33:48 +0300, Ville Vainio <[EMAIL PROTECTED]> wrote: >> > "Jeremy" =3D=3D Jeremy Bowers <[EMAIL PROTECTED]> writes: >>=20 >> Jeremy> On Sun, 24 Apr 2005 22:59:12 -0700, Robert Kern wrote: >> >>

Re: web based file manager in python

2005-04-25 Thread Ksenia Marasanova
> Ksenia - I recently came across this python web-based FM: > > http://snakelets.sourceforge.net/filemgr/index.html > > It is by Irmen De Jong, the author of Snakelets. > Looks good! Thank you very much :) -- Ksenia -- http://mail.python.org/mailman/listinfo/python-list

Re: Import DiscID on Windows

2005-04-25 Thread Do Re Mi chel La Si Do
Hi ! Look ctypes, for call the DLLs @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Injecting code into a function

2005-04-25 Thread George Sakkis
> Oh, I overlooked this. Then the solution becomes simple: > >sys._getframe().f_trace > > Test: > > >>> an = Analyzer() > >>> sys.settrace(an.trace_returns) > >>> sys._getframe().f_trace > 0x010015D0>> Does this work for you non-interactively ? I tried running it from a script or importing it

3046 monografia 3046

2005-04-25 Thread monografia
Monografias completas a partir de 250,00 ! monografia administração direito turismo economia letras pedagogia monografias teses tese. Sua monografia a partir de 250,00 http://monografiadireta.rg3.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Injecting code into a function

2005-04-25 Thread Bengt Richter
On 25 Apr 2005 03:32:38 -0700, "George Sakkis" <[EMAIL PROTECTED]> wrote: >Is there a general way of injecting code into a function, typically >before and/or after the existing code ? I know that for most purposes, >an OO solution, such as the template pattern, is a cleaner way to get >the same ef

create python process

2005-04-25 Thread [EMAIL PROTECTED]
Hello, I would like to create python processes instead of thread. Can anyone give me an example or site which shows a tutorial about how to create processes ? Sincerely Yours, Pujo -- http://mail.python.org/mailman/listinfo/python-list

Re: Injecting code into a function

2005-04-25 Thread Kay Schluehr
Lonnie Princehouse wrote: > I don't know of a way to get the current global trace function. This > could certainly cause trouble if you're trying to be compatible with > other packages that want to use their own trace functions (like psyco, > or debuggers). Does anyone know how to get the globa

Re: Object oriented storage with validation

2005-04-25 Thread Ilpo Nyyssönen
Ville Vainio <[EMAIL PROTECTED]> writes: >> "Ilpo" == Ilpo Nyyssönen writes: > > Ilpo> Pickle doesn't have validation. I am not comfortable for > Ilpo> using it as storage format that should be reliable over > Ilpo> years when the program evolves. It also doesn't tell me if > > Th

Re: Python or PHP?

2005-04-25 Thread John Bokma
Mike Meyer wrote: > Yeah, but I'm having fun. What's the point of usenet, if it's not fun? :-D. I am always amazed how people now the opinion of "the bystanders", I mean, are they having secret polls I am not aware of? -- John MexIT: http://johnbokma.com/mexit/

Re: Object oriented storage with validation

2005-04-25 Thread Ilpo Nyyssönen
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Ilpo Nyyssönen wrote: > >> What is the point in doing validation if it isn't done every time? Why >> wouldn't I do it every time? It isn't that slow thing to do. > > DTD validation is useful in two cases: [...] I didn't mention DTD validation. Yes, I

Re: Python or PHP?

2005-04-25 Thread John Bokma
Mike Meyer wrote: > John Bokma <[EMAIL PROTECTED]> writes: >> You already showed code like: > > Actually, I never showed you this code. hence *like*, and yes you did, in a footnote. > In this case, the good rewrite invokes the well-known logical operator > "not": > > if not condition then >

Re: Pythonic way to do static local variables?

2005-04-25 Thread Charles Krug
On Mon, 25 Apr 2005 21:30:18 -0500, Jaime Wyant <[EMAIL PROTECTED]> wrote: > Well, if you're a c++ programmer, Well, my forte is embedded systems and device controls . . . > then you've probably ran into > `functors' at one time or another. You can emulate it by making a > python object that is

Re: bytecode non-backcompatibility

2005-04-25 Thread Maurice LING
It is a nuisance. It's more of a nuisance when third part modules with 'c' components are compiled for the new version of python (a windows specific problem). I did find that the last upgrade forced me to evaluate which extensions I actually used. The answer was 'a few less than I thought'. It beca

Re: Pickle an image?

2005-04-25 Thread M.E.Farmer
GMane Python wrote: > Hey all. > I have a ( list | tuple | dictionary ) with several graphics in it. > Trying to cPickle it to a file, I get errors. For instance, > UnpickleableError: Cannon pickle objects. > > Anyone know of a way to get around this? I'd like to pickle a list or > dictionar

TypeError: ssl() argument 1 must be _socket.socket, not _socketobject

2005-04-25 Thread Huzaifa Tapal
I am getting this error from python 2.3.5 when making secure socket connections from my mod_python based application. It is very odd because we cannot replicate this in the development environment, only in production on a cluster of 2 debian boxes with Apache2 MPM Worker w/ Mod Python 3.13. D

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Jeremy Bowers
On Mon, 25 Apr 2005 23:00:57 -0500, Mike Meyer wrote: > Why do we have to wait for Python 3.0 for this? Couldn't list > comprehensions and generator expression be unified without breaking > existing code that didn't deserve to be broken? We don't; my mentioning 3.0 was just in reference to a previ

Re: Pythonic way to do static local variables?

2005-04-25 Thread Mike Meyer
Charles Krug <[EMAIL PROTECTED]> writes: > I've a function that needs to maintain an ordered sequence between > calls. > > In C or C++, I'd declare the pointer (or collection object) static at > the function scope. > > What's the Pythonic way to do this? > > Is there a better solution than putting

Re: Pythonic way to do static local variables?

2005-04-25 Thread Nicolas Fleury
Charles Krug wrote: I've a function that needs to maintain an ordered sequence between calls. In C or C++, I'd declare the pointer (or collection object) static at the function scope. What's the Pythonic way to do this? Is there a better solution than putting the sequence at module scope? Thanks. Y

Re: Python documentation moronicities (continued)

2005-04-25 Thread Steve Holden
Xah Lee wrote: Dear Steve Holden, the rewrite of the regex doc is instigated by your offer. it is published and announced here on April 18th. I'll have to take your word for that. If you deem it proper, paypal me. It will be to your credit and easier to incorporate into the main doc. I still await

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Mike Meyer
Jeremy Bowers <[EMAIL PROTECTED]> writes: > On Mon, 25 Apr 2005 16:48:46 -0400, Bill Mill wrote: > generalizing anyways, which is the right approach. I doubt that Python 3.0 > would have two radically different implementations; they'll just have the > genexp implementation, and an optimization for

Re: Python or PHP?

2005-04-25 Thread Mike Meyer
Jeremy Bowers <[EMAIL PROTECTED]> writes: > On Mon, 25 Apr 2005 23:26:56 +, John Bokma wrote: > >> Mike Meyer wrote: >> >>> John Bokma <[EMAIL PROTECTED]> writes: > > Nobody ever changed their mind as a result of a 20-thread endless > reply-fest. As usual, the posters aren't about to admit an

Re: Python or PHP?

2005-04-25 Thread Mike Meyer
John Bokma <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> John Bokma <[EMAIL PROTECTED]> writes: > [ unless ] >> Yeah - unless is a bad idea. > LOL, because you don't like it? Oh, come on. You say something, I agree with it, so you remove your original comment so you can argue with me? You'

Weekly Python Patch/Bug Summary

2005-04-25 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 316 open ( +2) / 2831 closed ( +7) / 3147 total ( +9) Bugs: 908 open (+10) / 4941 closed (+20) / 5849 total (+30) RFE : 178 open ( +1) / 153 closed ( +2) / 331 total ( +3) New / Reopened Patches __ package_d

Re: key binding with mac

2005-04-25 Thread James Stroud
If I remember correctly, the Mac OS X python (circa OS X 10.3.2) had this "probelm". I'm not sure about the state of affairs now--I'm doing Linux only these days so I'm kind of out of touch with the Mac scene. I installed the one from fink (fink.sf.net) and used that. Well worth your time and yo

python on mac keystroke

2005-04-25 Thread Eric Texier
I am testing python on a mac. In the python console, none of the control as the arrow to scroll back to a preview line are working. How can I fix this. Thanks eric Following is an example: python Python 2.4.1 (#1, Apr 22 2005, 21:15:26) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darw

Re: what is the best way to determine system OS?

2005-04-25 Thread googleboy
Thanks for the edifying responses. I will try out these things and figure out if I have enough to solve my problem. What this script does is use take the output of vmstat to report idle cpu cycles (or memory stuff, etc.) over a period specified by a parameter, all the better to be a plugin for a

Re: Python callbacks & PyGILState_Release()

2005-04-25 Thread Randall Hopper
David E. Konerding DSD staff: |Randall Hopper wrote: |> Is there a clean way to save the full exception state in the callback |> before the PyGILState_Release(), and restore it when we return across the |> C++ wrapper? ... |I saved the exception state by retrieveing it from sys.exc_info(), whi

7474 monografia administração - monografia direito 7474

2005-04-25 Thread monografia
Monografias completas a partir de 250,00 ! monografia administração direito turismo economia letras pedagogia monografias teses tese. Sua monografia a partir de 250,00 http://monografiadireta.rg3.net -- http://mail.python.org/mailman/listinfo/python-list

key binding with mac

2005-04-25 Thread Eric Texier
I am just starting to use python on the mac. How do I get backspace, the arrows up/down and all the control like ctrl-a to work nicely under the console. for now I am getting a bunch of ^? ^[[A when I use any tcsh type of control. thanks, -- http://mail.python.org/mailman/listinfo/python-list

Import DiscID on Windows

2005-04-25 Thread Jeffrey Barish
Has anyone gotten DiscID (and CDDB) to work on Windows? I installed python2.4 and CDDB-1.4 on Win98SE. When I import DiscID I get DLL load failed: One of the library files needed to run this application cannot be found. Python is complaining about mci.dll. It is surely finding it because it is

Re: Quote-aware string splitting

2005-04-25 Thread George Sakkis
> import re > regex = re.compile(r''' >'.*?' | # single quoted substring >".*?" | # double quoted substring >\S+ # all the rest >''', re.VERBOSE) Oh, and if your strings may span more than one line, replace re.V

Re: Quote-aware string splitting

2005-04-25 Thread Jeffrey Froman
J. W. McCall wrote: > For example, given the string: > > 'spam "the life of brian" 42' > > I'd want it to return: > > ['spam', 'the life of brian', '42'] The .split() method of strings can take a substring, such as a quotation mark, as a delimiter. So a simple solution is: >>> x = 'spam "the

Re: Quote-aware string splitting

2005-04-25 Thread George Sakkis
> "J. W. McCall" <[EMAIL PROTECTED]> writes: > > > > I need to split a string as per string.strip(), but with a > > modification: I want it to recognize quoted strings and return them as > > one list item, regardless of any whitespace within the quoted string. > > > > For example, given the string:

Re: Pythonic way to do static local variables?

2005-04-25 Thread Jaime Wyant
Well, if you're a c++ programmer, then you've probably ran into `functors' at one time or another. You can emulate it by making a python object that is `callable'. class functor: def __init__(self): self.ordered_sequence = [1, 2, 3, 4, 5] def __call__(self, arg1, a

RE: Quote-aware string splitting

2005-04-25 Thread Tony Meyer
> I need to split a string as per string.strip(), but with a > modification: > I want it to recognize quoted strings and return them as one > list item, > regardless of any whitespace within the quoted string. See the recent python-tutor thread starting here:

Re: Pythonic way to do static local variables?

2005-04-25 Thread George Sakkis
> I've a function that needs to maintain an ordered sequence between > calls. > > In C or C++, I'd declare the pointer (or collection object) static at > the function scope. > > What's the Pythonic way to do this? > > Is there a better solution than putting the sequence at module scope? Yes, there

Re: Quote-aware string splitting

2005-04-25 Thread Tim Heaney
"J. W. McCall" <[EMAIL PROTECTED]> writes: > > I need to split a string as per string.strip(), but with a > modification: I want it to recognize quoted strings and return them as > one list item, regardless of any whitespace within the quoted string. > > For example, given the string: > > 'spam "th

Re: HTML cleaner?

2005-04-25 Thread Terry Hancock
On Sunday 24 April 2005 06:25 pm, Ivan Voras wrote: > Is there a HTML clean/tidy library or module written in pure python? I > found mxTidy, but it's a interface to command-line tool. > > What I'm searching is something that will accept a list of allowed tags > and/or attributes and strip the re

Re: Python or PHP?

2005-04-25 Thread John Bokma
Steve Holden wrote: > Yup. Even aol in this group... -- John MexIT: http://johnbokma.com/mexit/ personal page: http://johnbokma.com/ Experienced programmer available: http://castleamber.com/ Happy Customers:

Re: Python or PHP?

2005-04-25 Thread John Bokma
Jeremy Bowers wrote: > On Mon, 25 Apr 2005 23:26:56 +, John Bokma wrote: > >> Mike Meyer wrote: >> >>> John Bokma <[EMAIL PROTECTED]> writes: > > Nobody ever changed their mind as a result of a 20-thread endless > reply-fest. As usual, the posters aren't about to admit anything, and > none

Re: Do I need a nested lambda to do this?

2005-04-25 Thread Bill Mill
On 4/25/05, R. C. James Harlow <[EMAIL PROTECTED]> wrote: > On Tuesday 26 April 2005 00:34, raoul wrote: > > I can't figure this one out. Trying to be unnecessarily functional I > > suspect. > > With list comprehensions: > > Python 2.3.4 (#1, Mar 26 2005, 20:54:10) > [GCC 3.3.4 20040623 (Gentoo L

7303 monografia monografias teses dissertações trabalhos escolares 7303

2005-04-25 Thread monografia
Monografias completas a partir de 250,00 ! monografia administração direito turismo economia letras pedagogia monografias teses tese. Sua monografia a partir de 250,00 http://monografiadireta.rg3.net -- http://mail.python.org/mailman/listinfo/python-list

Quote-aware string splitting

2005-04-25 Thread J. W. McCall
Hello, I need to split a string as per string.strip(), but with a modification: I want it to recognize quoted strings and return them as one list item, regardless of any whitespace within the quoted string. For example, given the string: 'spam "the life of brian" 42' I'd want it to return: ['spa

Re: a=[ lambda t: t**n for n in range(4) ]

2005-04-25 Thread Terry Hancock
On Saturday 23 April 2005 02:43 am, Mage wrote: > Scott David Daniels wrote: > > See, the body of your anonymous function just looks for "the current > > value of n" when it is _invoked_, not when it is _defined_. > > The "lambda functions" was an unclear part of the tutorial I read. > Should I us

Re: Python documentation moronicities (continued)

2005-04-25 Thread Xah Lee
Dear Steve Holden, the rewrite of the regex doc is instigated by your offer. it is published and announced here on April 18th. If you deem it proper, paypal me. It will be to your credit and easier to incorporate into the main doc. Xah [EMAIL PROTECTED] â http://xahlee.org/ -- http://mail.pyt

Pythonic way to do static local variables?

2005-04-25 Thread Charles Krug
I've a function that needs to maintain an ordered sequence between calls. In C or C++, I'd declare the pointer (or collection object) static at the function scope. What's the Pythonic way to do this? Is there a better solution than putting the sequence at module scope? Thanks. -- http://mai

Re: Python or PHP?

2005-04-25 Thread Steve Holden
Jeremy Bowers wrote: On Mon, 25 Apr 2005 23:26:56 +, John Bokma wrote: Mike Meyer wrote: John Bokma <[EMAIL PROTECTED]> writes: Nobody ever changed their mind as a result of a 20-thread endless reply-fest. As usual, the posters aren't about to admit anything, and none of the bystanders are r

Re: select() on pipe

2005-04-25 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Brad Murdoch <[EMAIL PROTECTED]> wrote: > im trying to run the select.selct() on a unix pipe, my expectation is > that it will block untill there is something there to read, then > continue. It seems to do this untill the pipe is written to once, then i > get a

Re: Python or PHP?

2005-04-25 Thread Jorey Bump
"Lad" <[EMAIL PROTECTED]> wrote in news:1114254894.512656.297040 @l41g2000cwc.googlegroups.com: > Is anyone capable of providing Python advantages over PHP if there are > any? As you learn Python, you will find that your PHP code will improve, possibly becoming more and more concise until it dis

Re: Do I need a nested lambda to do this?

2005-04-25 Thread R. C. James Harlow
On Tuesday 26 April 2005 00:34, raoul wrote: > I can't figure this one out. Trying to be unnecessarily functional I > suspect. With list comprehensions: Python 2.3.4 (#1, Mar 26 2005, 20:54:10) [GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on linux2 Type "help", "copyright"

Re: Python or PHP?

2005-04-25 Thread Jeremy Bowers
On Mon, 25 Apr 2005 23:26:56 +, John Bokma wrote: > Mike Meyer wrote: > >> John Bokma <[EMAIL PROTECTED]> writes: Nobody ever changed their mind as a result of a 20-thread endless reply-fest. As usual, the posters aren't about to admit anything, and none of the bystanders are reading any mor

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Jeremy Bowers
On Mon, 25 Apr 2005 16:48:46 -0400, Bill Mill wrote: > On 25 Apr 2005 23:33:48 +0300, Ville Vainio <[EMAIL PROTECTED]> wrote: >> Still, list comprehensions should be implemented in terms of genexps to >> get rid of the LC variable that is visible outside the scope of the LC. >> >> > +1 . I thin

select() on pipe

2005-04-25 Thread Brad Murdoch
im trying to run the select.selct() on a unix pipe, my expectation is that it will block untill there is something there to read, then continue. It seems to do this untill the pipe is written to once, then i get a busy while loop. shouldnt this stop each time, to wait for something to be writte

Do I need a nested lambda to do this?

2005-04-25 Thread raoul
I can't figure this one out. Trying to be unnecessarily functional I suspect. I have the following lists. vals = [1.000,2.344,4.2342] tab = [((0,1),(0,3),(0,4)), ((2,2),(3,0),(3,9)), ((3,4),(6,3),(7,1))] I'm trying to create a one liner using map/reduce/lambda/zip(* etc to do repla

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread bearophileHUGS
Then you can probably use something like this: . def boxesArea(m, foreground=1, background=0): . maxr = len(m) . maxc = len(m[0]) . newCol = 2 . oldCol = foreground . for r,row in enumerate(m): . for c,e in enumerate(row): . if e == oldCol: .

Re: Python or PHP?

2005-04-25 Thread John Bokma
Mike Meyer wrote: > John Bokma <[EMAIL PROTECTED]> writes: [ unless ] > Yeah - unless is a bad idea. LOL, because you don't like it? You already showed code like: if condition then nothing else something unless IMNSHO improves readability. >> I doubt that features have been added to Pe

Re: Injecting code into a function

2005-04-25 Thread Lonnie Princehouse
I don't know of a way to get the current global trace function. This could certainly cause trouble if you're trying to be compatible with other packages that want to use their own trace functions (like psyco, or debuggers). Does anyone know how to get the global trace? On the other hand, the lo

Re: Parsing data from URL

2005-04-25 Thread Kartic
"The Great 'Harlin Seritt' uttered these words" on 4/24/2005 8:24 PM: How can I make sure that I get the actual html data instead of the data from redirected URL? thanks, Harlin Harlin, I am not sure I understand what you are asking but please see if the below mentioned link will help you. I am ju

Re: web based file manager in python

2005-04-25 Thread Kartic
"The Great 'Ksenia Marasanova' uttered these words" on 4/25/2005 1:04 PM: Hi, I didn't suceed in finding any kind of standard web based file manager, written in Python. There are quite a lot for PHP (the nicest Any hints? Thanks! Ksenia - I recently came across this python web-based FM: http://s

Re: Injecting code into a function

2005-04-25 Thread Kay Schluehr
George Sakkis wrote: > Thanks, that's the closest to what I wanted. A minor point I didn't > quite get from the documentation is how to set a local trace instead of > a global (sys) trace. You never do. "Local" in this context only means that those local trace functions are called inside the one

Re: Python or PHP?

2005-04-25 Thread Mike Meyer
John Bokma <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >> John Bokma <[EMAIL PROTECTED]> writes: >>> Mike Meyer wrote: > > [ snip ] > >>> do you really think that for / foreach and things like if / unless >>> bloat a language processor? I think you take your "pure programming >>> lanuage" wa

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread Lonnie Princehouse
def floodFill4(m, r, c, newCol, oldCol): stack = [ (r, c) ] while stack: r, c = stack.pop() if c >=0 and c < maxc and r >=0 and r< maxr and m[r][c]==oldCol: m[r][c] = newCol stack += [ (r+1, c), (r-1, c), (r, c+1), (r, c-1) ] -- http://mail.python.org/mailman/listinfo/pyth

Re: what is the best way to determine system OS?

2005-04-25 Thread Mike Meyer
[EMAIL PROTECTED] (Cameron Laird) writes: > In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: >>What you should do instead is check on how to use the features you >>want. If you watch a typical autoconf script, you'll see it groveling >>through libraries, include files, and va

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread [EMAIL PROTECTED]
Bearophile,I have written the floodfill in python with stack. But i think I am making something wrong I dont get what i need.Need your opinion.the code follows def connected(m, foreground=1, background=0): def floodFill4(m, r,c, newCol, oldCol): if newCol == oldCol: print "

pygtk, gtk.treeview and virtuallist ?

2005-04-25 Thread manatlan
Hello, I'm new to pygtk (but i know wxpython very well) I'm trying to play with this example : http://www.pygtk.org/pygtk2tutorial/sec-CellRenderers.html#filelistingfig (the code is here : http://www.pygtk.org/pygtk2tutorial/examples/filelisting.py) I'd like to be able to use a virtual list (like

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Bill Mill
On 25 Apr 2005 23:33:48 +0300, Ville Vainio <[EMAIL PROTECTED]> wrote: > > "Jeremy" == Jeremy Bowers <[EMAIL PROTECTED]> writes: > > Jeremy> On Sun, 24 Apr 2005 22:59:12 -0700, Robert Kern wrote: > >> Never. If you really need a list > >> > >> list(x*x for x in xrange(10)) >

Re: Python or PHP?

2005-04-25 Thread John Bokma
Steve Holden wrote: > John Bokma wrote: >> Alan Little wrote: >> >> >>>Steve Holden <[EMAIL PROTECTED]> wrote: >>> >>> Your statement then becomes select * from foo where bar=1; drop table foo which is clearly not such a good idea. >>> >>>I'm sure Steve is very well aware o

Re: Python, Perl & PDF files

2005-04-25 Thread rbt
Philippe C. Martin wrote: This is highly frustrating !! Did Athena come to help or not ? Christos TZOTZIOY Georgiou wrote: On Mon, 25 Apr 2005 10:32:11 -0400, rumours say that rbt <[EMAIL PROTECTED]> might have written: I do not seek to provoke. Sorry if my question comes across that way to you

Re: Python, Perl & PDF files

2005-04-25 Thread Philippe C. Martin
This is highly frustrating !! Did Athena come to help or not ? Christos TZOTZIOY Georgiou wrote: > On Mon, 25 Apr 2005 10:32:11 -0400, rumours say that rbt > <[EMAIL PROTECTED]> might have written: > >>I do not seek to provoke. Sorry if my question comes across that way to >>you. > > Thank

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Ville Vainio
> "Jeremy" == Jeremy Bowers <[EMAIL PROTECTED]> writes: Jeremy> On Sun, 24 Apr 2005 22:59:12 -0700, Robert Kern wrote: >> Never. If you really need a list >> >> list(x*x for x in xrange(10)) >> >> Sadly, we can't remove list comprehensions until 3.0. Jeremy> Why

Re: ANN: PyDev 0.9.3 released

2005-04-25 Thread Philippe C. Martin
I forced the installation and it worked I'm using 2.4.1 Regards, Philippe James wrote: > It does for me. I just installed through it. > > http://pydev.sourceforge.net/updates/ > > I am having some other problems though. When I run it, I get ... > > sys:1: DeprecationWarning: Non-ASCII ch

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Robert Kern
Jeremy Bowers wrote: On Sun, 24 Apr 2005 22:59:12 -0700, Robert Kern wrote: Never. If you really need a list list(x*x for x in xrange(10)) Sadly, we can't remove list comprehensions until 3.0. Why "remove" them? Instead, we have these things called "comprehensions" (which, now that I say that, see

Re: Pickle an image?

2005-04-25 Thread Michael Hoffman
GMane Python wrote: I have a ( list | tuple | dictionary ) with several graphics in it. Trying to cPickle it to a file, I get errors. For instance, UnpickleableError: Cannon pickle objects. Anyone know of a way to get around this? I'd like to pickle a list or dictionary of about 5 .JPG image

Re: ANN: PyDev 0.9.3 released

2005-04-25 Thread James
It does for me. I just installed through it. http://pydev.sourceforge.net/updates/ I am having some other problems though. When I run it, I get ... sys:1: DeprecationWarning: Non-ASCII character '\x90' in file C:\Python24\python.exe on line 1, but no encoding declared; see http://www.python.org/

Re: Injecting code into a function

2005-04-25 Thread George Sakkis
"Lonnie Princehouse" wrote: > I expect you could combine the following with decorators as an easy way > to grab a function's locals just before it exits... you could also use > exec or eval to execute code in the function's local namespace. > --- > > # Try it:

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Jeremy Bowers
On Sun, 24 Apr 2005 22:59:12 -0700, Robert Kern wrote: > Never. If you really need a list > > list(x*x for x in xrange(10)) > > Sadly, we can't remove list comprehensions until 3.0. Why "remove" them? Instead, we have these things called "comprehensions" (which, now that I say that, seems a rath

Re: Python or PHP?

2005-04-25 Thread Steve Holden
John Bokma wrote: Alan Little wrote: Steve Holden <[EMAIL PROTECTED]> wrote: Your statement then becomes select * from foo where bar=1; drop table foo which is clearly not such a good idea. I'm sure Steve is very well aware of this and was just providing a simple and obvious example, nevertheless

Re: ANN: PyDev 0.9.3 released

2005-04-25 Thread Philippe C. Martin
Hi, For some reason, Eclipse automatic search for updating existing features does not see it Regards, Philippe Fabio Zadrozny wrote: > Hi All, > > PyDev - Python IDE (Python development enviroment for Eclipse) version > 0.9.3 has just been released. > > Check the homepage (http://py

Re: cross platform printing - using a GUI ?

2005-04-25 Thread Philippe C. Martin
If you're in need of a GUI, then wxPython might be your cross-platform printing solution. Regards, Philippe David Isaac wrote: >> Alan Isaac wrote: >> > What is the current best practice for cross platform printing of > PostScript >> > files from Python? > > "Warren Postma" <[EMAIL PROTECTED

Re: what is the best way to determine system OS?

2005-04-25 Thread Philippe C. Martin
Well, At least I discovered os.uname :-) Thanks, Philippe Sion Arrowsmith wrote: > Philippe C. Martin <[EMAIL PROTECTED]> wrote: >>How about popen of 'uname -r' ? > > os.uname()[2] is probably a better way (ie it doesn't spawning > another process) of getting this information. I don't think

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread bearophileHUGS
In my first post you can find two URLs with better flood filling algorithms. You can also modify the easy recursive function, using a list-based stack intead of recursive calls. Bye, Bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Python or PHP?

2005-04-25 Thread John Bokma
Alan Little wrote: > Steve Holden <[EMAIL PROTECTED]> wrote: > >>Your statement then becomes >> >>select * from foo where bar=1; drop table foo >> >>which is clearly not such a good idea. > > I'm sure Steve is very well aware of this and was just providing a > simple and obvious example, neverth

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread [EMAIL PROTECTED]
Just was wondering how to integrate the floodfill with the stack.I guess it will get rid of recursion problem. You mean read all the elements of the array to a stack and then push and pop based on conditions? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python or PHP?

2005-04-25 Thread John Bokma
Ville Vainio wrote: >> "John" == John Bokma <[EMAIL PROTECTED]> writes: > > John> Who told you Perl can't do exceptions? > > Back when I learned (heh, I never 'really' learned, but knew enough to > write programs in it) perl, almost every function call was followed by > > or die("blah")

Re: Python or PHP?

2005-04-25 Thread John Bokma
Mike Meyer wrote: > John Bokma <[EMAIL PROTECTED]> writes: >> Mike Meyer wrote: [ snip ] >> do you really think that for / foreach and things like if / unless >> bloat a language processor? I think you take your "pure programming >> lanuage" way to far, and really don't understand your choice of

Re: Is this a bug?

2005-04-25 Thread Matthew Dixon Cowles
On 2005-04-24 10:52:36 -0500, "Fredrik Lundh" <[EMAIL PROTECTED]> said: mapping += to extend is a design mistake (I guess someone got a little carried away). I agree. I think that + and += should be the same except for the target of the assignment. But I discussed that with the Timbot a little whi

Pickle an image?

2005-04-25 Thread GMane Python
Hey all. I have a ( list | tuple | dictionary ) with several graphics in it. Trying to cPickle it to a file, I get errors. For instance, UnpickleableError: Cannon pickle objects. Anyone know of a way to get around this? I'd like to pickle a list or dictionary of about 5 .JPG images. Thanks

Wanted: Freedom Force game mod community looking for Python developers

2005-04-25 Thread ?pim?th?e
Hi, Sorry for the slightly off-topic post. Freedom Force and its recent follow-up, Freedom Force vs the Third Reich, are 3D RPG/TRS games using Python for higher-level programming, such as mission scripting. As such, the game has gotten quite a few people to discover Python (a prodigious languag

Re: Bounding box on clusters in a 2D list

2005-04-25 Thread [EMAIL PROTECTED]
bearphile, Is there a way I could do the floodfill rather iteratively than recursive. It somehow breaks although I made some optimisations to the code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation moronicities (continued)

2005-04-25 Thread Steve Holden
Robert Kern wrote: Xah Lee wrote: I have produced my doc. ( http://xahlee.org/perl-python/python_re-write/lib/module-re.html ) isn't there a hundred dollars due to me? No. [Steve Holden] The condition for winning the prize is that at least five regular posters to c.l.py have to mail me and saythey

Re: Python documentation moronicities (continued)

2005-04-25 Thread Robert Kern
Xah Lee wrote: I have produced my doc. ( http://xahlee.org/perl-python/python_re-write/lib/module-re.html ) isn't there a hundred dollars due to me? No. [Steve Holden] The condition for winning the prize is that at least five regular posters to c.l.py have to mail me and saythey think your version

Re: Python documentation moronicities (continued)

2005-04-25 Thread James Stroud
On Monday 25 April 2005 11:48 am, so sayeth Xah Lee: > I have produced my doc. > ( http://xahlee.org/perl-python/python_re-write/lib/module-re.html ) > > isn't there a hundred dollars due to me? > Yes, we have put it in an envelop that is sitting between the dumpster and the Dairy Queen in Dalhart

Re: Python documentation moronicities (continued)

2005-04-25 Thread Xah Lee
I have produced my doc. ( http://xahlee.org/perl-python/python_re-write/lib/module-re.html ) isn't there a hundred dollars due to me? Xah [EMAIL PROTECTED] â http://xahlee.org/PageTwo_dir/more.html Steve Holden wrote: > Xah Lee wrote: > [mountains of irrelevant drivel which normal people woul

Re: What is situation with threads in Python

2005-04-25 Thread Jp Calderone
On Mon, 25 Apr 2005 10:46:57 -0700, "Leonard J. Reder" <[EMAIL PROTECTED]> wrote: Hello Mark, I took your three day course here at JPL and recall that you said something was wrong with the implementation of threads within Python but I cannot recall what. So what is wrong with threads in Python?

Re: What is situation with threads in Python

2005-04-25 Thread Jp Calderone
On Mon, 25 Apr 2005 14:10:28 -0400, Bill Mill <[EMAIL PROTECTED]> wrote: On 4/25/05, Leonard J. Reder <[EMAIL PROTECTED]> wrote: Hello Mark, I took your three day course here at JPL and recall that you said something was wrong with the implementation of threads within Python but I cannot recall wha

Re: What is situation with threads in Python

2005-04-25 Thread Bill Mill
On 4/25/05, Leonard J. Reder <[EMAIL PROTECTED]> wrote: > Hello Mark, > > I took your three day course here at JPL and recall that you said > something was wrong with the implementation of threads within Python > but I cannot recall what. So what is wrong with threads in Python? I'm going to gue

C++ app. with python scripting IDE ?

2005-04-25 Thread Gonzalo
Hi everyone! I want to develop a C++ application, which must be scriptable (I'm considering to use Python or Lua). The end users should develop and run their scripts in an IDE, and the scripting language must be extended with specific functions related to my application. The IDE should have debuggi

Re: ACCU Conference (PyUK) 2005

2005-04-25 Thread Michele Simionato
The previous post was getting too long, so I decided to put my impressions on the technical talks here. You may also want to read what our chairman Andy Robinson has to say: http://www.reportlab.org/~andy/accu2005/accu2005.html There you can find the materials of the conference (slides etc.) ACCU

  1   2   3   >