Re: newbie Q: sequence membership

2007-11-18 Thread MonkeeSage
On Nov 19, 12:32 am, saccade <[EMAIL PROTECTED]> wrote: > I am not a programmer so I feel odd commenting about language design > decisions. When my Prof. introduced python the first question that > popped into mind was that since "x=9; y=9; print x is y and x == y" > prints "True" is there a way t

Re: python application dll

2007-11-18 Thread Gabriel Genellina
En Sat, 17 Nov 2007 12:04:49 -0300, <[EMAIL PROTECTED]> escribi�: > Is there a way to create a .dll from a python program which includes > the python runtime? > > I'm building a Windows application (C# VisualStudio2005) and I'd like > to utilize some of the functionality available in a Python modu

Re: Python too complex ?!?!?!

2007-11-18 Thread MonkeeSage
On Nov 17, 7:46 am, Brian <[EMAIL PROTECTED]> wrote: > Had a unsettling conversation with a CS instructor that > teaches at local high schools and the community > college. This person is a long-term Linux/C/Python > programmer, but he claims that the install, config, and > library models for C# hav

Re: newbie Q: sequence membership

2007-11-18 Thread saccade
On Nov 17, 3:40 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > You can write your own membership test based on identity ('is'): > Thank you for the practical (usable) advice and explanation of the '==' operator. On Nov 17, 4:35 am, John Machin <[EMAIL PROTECTED]> wrote: > > And that can

Re: Getting name of control under mouse in Windows?

2007-11-18 Thread Gabriel Genellina
En Sun, 18 Nov 2007 21:10:18 -0300, Shane Clark <[EMAIL PROTECTED]> escribió: >> From: [EMAIL PROTECTED] >> >> En Fri, 16 Nov 2007 16:16:25 -0300, Shane Clark >> escribió: >> >>> I am trying to get my python app to output the name of the control >>> under >>> the mouse each time it is clicked.

Re: regular expression

2007-11-18 Thread MonkeeSage
On Nov 18, 3:54 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > What the heck is that format? XML's retarded cousin living in the attic? ROFL...for some reason that makes me think of wierd Ed Edison from maniac mansion, heh ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple eval

2007-11-18 Thread MonkeeSage
As I see it, just as a matter of common sense, there will be no way to match the performance of the backend eval() with any interpreted code. At best, performance-wise, a preprocessor for the built-in eval() would be in order, filtering out the "unsafe" cases and passing the rest through. But what

Re: Python beginner!

2007-11-18 Thread Asun Friere
On Nov 17, 12:41 am, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > It is true that I could have been way more polite. I don't see how. You said "please" read it. You didn't make fun of the poor spelling and said nothing rude. I can't agree that the response "reeks of arrogance." I've seen

Re: Learning Python : >>> import math doesn't work ?

2007-11-18 Thread Asun Friere
On Nov 19, 3:46 pm, windspy <[EMAIL PROTECTED]> wrote: > use it like: x = math.sqrt (100) and math.sin(x) alternatively import like this: from math import sqrt, sin ... and use it like you have. -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python : >>> import math doesn't work ?

2007-11-18 Thread windspy
On Nov 19, 10:48 am, [EMAIL PROTECTED] wrote: > Have carefully installed Python 2.5.1 under XP in dir E:\python25 . > ran set path = %path% ; E:\python25 > Python interactive mode works fine for simple arithmetic . > Then tried >>> import math > >>> x = sqrt(100) >Get error

Re: sockets: why doesn't my connect() block?

2007-11-18 Thread 7stud
On Nov 18, 3:08 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > ...listen() gets > the initial connect() packet. accept() then is used to transfer the > connection onto a /new/ work socket (freeing the listen socket to catch > more connections) > Thanks. -- http://mail.python.org/mailman/lis

Re: which Python ? asks beginner

2007-11-18 Thread Donn Ingle
>> You know, I've always wanted ask; if plans are afoot, what are hands? > The answer, seeing as it's late, is that whisky is at hand. Ha. Brilliant answer! It also explains decorators :D /d -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python : >>> import math doesn't work ?

2007-11-18 Thread David Sanders
On Nov 18, 8:48 pm, [EMAIL PROTECTED] wrote: > Have carefully installed Python 2.5.1 under XP in dir E:\python25 . > ran set path = %path% ; E:\python25 > Python interactive mode works fine for simple arithmetic . > Then tried >>> import math > >>> x = sqrt(100) >Get error

Re: What is python?????

2007-11-18 Thread Cope
On Nov 18, 8:41 pm, rzed <[EMAIL PROTECTED]> wrote: > Cope <[EMAIL PROTECTED]> wrote in news:7ab5b781-3c6c- > [EMAIL PROTECTED]: > > > please tell me what is python.This group is so crowded. > > I see nobody has chosen to answer your question seriously. I'll > give you an answer, but it is probably

Re: which Python ? asks beginner

2007-11-18 Thread Hendrik van Rooyen
"Donn Ingle" wrote: > > plans are afoot > You know, I've always wanted ask; if plans are afoot, what are hands? > > :D > > Sorry, it's late. The answer, seeing as it's late, is that whisky is at hand. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: What is python?????

2007-11-18 Thread Cope
On Nov 19, 4:42 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 18 Nov 2007 14:37:08 -0800 (PST), Zentrader > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Damn! I joined this group because I thought it was a pie-a-thon. All > > that practice has now gone to wa

Re: Troubleshooting garbage collection issues

2007-11-18 Thread Hendrik van Rooyen
(Dave) wrote: 8<- description of horrible problem -- Faced with this, I would: 1 - identify the modules that import gc to separate the sheep from the goats. 2 - do my best to change gc importing goats back to sheep. 3 - amongst the remaining goats, identify the ones

Re: Simple eval

2007-11-18 Thread George Sakkis
On Nov 18, 8:24 pm, greg <[EMAIL PROTECTED]> wrote: > Tor Erik Sønvisen wrote: > > Comments, speedups, improvements in general, etc are appreciated. > > You're doing a lot of repeated indexing of token[0] > and token[1] in your elif branches. You might gain some > speed by fetching these into loca

Learning Python : >>> import math doesn't work ?

2007-11-18 Thread pdlemper
Have carefully installed Python 2.5.1 under XP in dir E:\python25 . ran set path = %path% ; E:\python25 Python interactive mode works fine for simple arithmetic . Then tried >>> import math >>> x = sqrt(100) Get errorName error : name 'sqrt' is not defined Same th

Re: Python too complex ?!?!?!

2007-11-18 Thread John Salerno
Brian wrote: > Had a unsettling conversation with a CS instructor that > teaches at local high schools and the community > college. This person is a long-term Linux/C/Python > programmer, but he claims that the install, config, and > library models for C# have proved to be less > problematic t

embed ipython in wxPython app

2007-11-18 Thread chewie54
Hi All, I'm evaluting IPython to see if I can it use like Tcl and Tk. If I start wish8.4, I get a command line interpreter in xterm, then I can source tcl progams that draw tk graphics on a canvas in another window. Is there a way to embed IPython in a wxPython app to do that? When I do as

Re: Help with sympy, please

2007-11-18 Thread Dick Moores
At 05:33 PM 11/18/2007, Fredrik Johansson wrote: >On Nov 19, 2007 2:23 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > > OK, I tried mpmath again, and to my surprise, it went well! > > > > === > > #!/usr/bin/env python > > #coding=utf-8 > > from mpmath import * > > mpf.

Re: Help with sympy, please

2007-11-18 Thread Dick Moores
At 05:24 PM 11/18/2007, Fredrik Johansson wrote: >On Nov 19, 2007 2:03 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > > At 04:26 PM 11/18/2007, Fredrik Johansson wrote: > > >On Nov 19, 2007 1:05 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > > >Hi Dick, I recognize you from python-list, where you had a

Re: Help with sympy, please

2007-11-18 Thread Fredrik Johansson
On Nov 19, 2007 2:23 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > OK, I tried mpmath again, and to my surprise, it went well! > > === > #!/usr/bin/env python > #coding=utf-8 > from mpmath import * > mpf.dps = 50 > n = 1 > k = 0 > prod = mpf(1) > while k < 10: >

Re: Simple eval

2007-11-18 Thread greg
Tor Erik Sønvisen wrote: > Comments, speedups, improvements in general, etc are appreciated. You're doing a lot of repeated indexing of token[0] and token[1] in your elif branches. You might gain some speed by fetching these into locals before entering the elif chain. Also you could try ordering

Re: Help with sympy, please

2007-11-18 Thread Fredrik Johansson
On Nov 19, 2007 2:09 AM, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 18 Nov 2007 16:05:15 -0800, Dick Moores <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > TypeError: unsupported operand type(s) for /: 'float' and 'Float' > > > > > What restrict

Re: Help with sympy, please

2007-11-18 Thread Fredrik Johansson
On Nov 19, 2007 2:03 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > At 04:26 PM 11/18/2007, Fredrik Johansson wrote: > >On Nov 19, 2007 1:05 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > >Hi Dick, I recognize you from python-list, where you had a question > >about mpmath. > > > >Your code still won't

Re: Help with sympy, please

2007-11-18 Thread Dick Moores
At 04:26 PM 11/18/2007, Fredrik Johansson wrote: >Basically, sympy.numerics is an old version of mpmath. The >sympy.numerics module is not very well integrated in SymPy, slower >than mpmath, and has a couple bugs that have subsequently been fixed >in mpmath. In sympycore (http://code.google.com/p/

Re: A proposal for attribute lookup failures

2007-11-18 Thread MonkeeSage
On Nov 18, 5:59 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote: > No need to excuse. I think Ruby provides a nice context for discussing > the semantics of top level "open classes". But I think those are > entirely different than your contextual bindings. Note I find your > proposal somewhat confusing

Re: sockets: why doesn't my connect() block?

2007-11-18 Thread greg
7stud wrote: > If my platform accepted the connection, then why does my server > program have to call accept()? By making the listen() call, you've indicated your willingness to accept connections. The accept() call just gives you a file descriptor for the accepted connection (it's perhaps a littl

Re: Help with sympy, please

2007-11-18 Thread Dick Moores
At 04:26 PM 11/18/2007, Fredrik Johansson wrote: >On Nov 19, 2007 1:05 AM, Dick Moores <[EMAIL PROTECTED]> wrote: >Hi Dick, I recognize you from python-list, where you had a question >about mpmath. > >Your code still won't work if you convert the numbers to Floats >because the Float type in sympy.n

Re: Log Search code is not working

2007-11-18 Thread Aaron Watters
This might be a perfect application for nucular. http://nucular.sourceforge.net If you need help using it I can help a bit by email (not on the list). If you want to build your own solution, what you have might be fixable, but you need to take out the lowest level loops by using dictionaries and

Re: Help with sympy, please

2007-11-18 Thread Fredrik Johansson
On Nov 19, 2007 1:05 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > At 03:42 PM 11/18/2007, Dennis Lee Bieber wrote: > >On Sun, 18 Nov 2007 13:02:01 -0800, Dick Moores <[EMAIL PROTECTED]> > >declaimed the following in comp.lang.python: > > > > > > > > This gets: > > > Traceback (most recent call last

Re: Help with sympy, please

2007-11-18 Thread Dick Moores
At 03:42 PM 11/18/2007, Dennis Lee Bieber wrote: >On Sun, 18 Nov 2007 13:02:01 -0800, Dick Moores <[EMAIL PROTECTED]> >declaimed the following in comp.lang.python: > > > > > This gets: > > Traceback (most recent call last): > >File "E:\PythonWork\Untitled 5.py", line 20, in > > term = (e*

RE: Getting name of control under mouse in Windows?

2007-11-18 Thread Shane Clark
> To: python-list@python.org > From: [EMAIL PROTECTED] > Subject: Re: Getting name of control under mouse in Windows? > Date: Sun, 18 Nov 2007 13:32:54 -0300 > > En Fri, 16 Nov 2007 16:16:25 -0300, Shane Clark > escribi�: > >> I am trying to get my pyt

Re: A proposal for attribute lookup failures

2007-11-18 Thread Kay Schluehr
On 19 Nov., 00:02, MonkeeSage <[EMAIL PROTECTED]> wrote: > Ps. Just for kicks, here is a simple ruby 1.8 mock-up of the proposal > (sorry for using ruby, but I don't know enough C to start hacking the > CPython backend; I think that a higher-level example is conceptually > clearer anyhow). No need

Re: regular expression

2007-11-18 Thread gardsted
Ups - got it - there are no flags in finditer;-) So rtfm, once again, jorgen! gardsted wrote: > I just can't seem to get it: > I was having some trouble with finding the first following with this regex: > > Should these two approaches behave similarly? > I used hours before I found the second on

Re: Troubleshooting garbage collection issues

2007-11-18 Thread Rhamphoryncus
On Nov 17, 10:34 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi folks - wondering if anyone has any pointers on troubleshooting > garbage collection. My colleagues and I are running into an > interesting problem: > > Intermittently, we get into a situation where the garbage collection > c

Re: A proposal for attribute lookup failures

2007-11-18 Thread MonkeeSage
Ps. Just for kicks, here is a simple ruby 1.8 mock-up of the proposal (sorry for using ruby, but I don't know enough C to start hacking the CPython backend; I think that a higher-level example is conceptually clearer anyhow). Reference cycles are not detected in the example. #!/usr/bin/ruby class

Re: What is python?????

2007-11-18 Thread Zentrader
Damn! I joined this group because I thought it was a pie-a-thon. All that practice has now gone to waste/waist. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python too complex ?!?!?!

2007-11-18 Thread John Nagle
Paddy wrote: > On Nov 17, 1:46 pm, Brian <[EMAIL PROTECTED]> wrote: >> Had a unsettling conversation with a CS instructor that >> teaches at local high schools and the community >> college. This person is a long-term Linux/C/Python >> programmer, but he claims that the install, config, and >> libra

Re: Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-18 Thread robert
Neal Becker wrote: > robert wrote: > >> In a makefile I want to locate the .so for a dynamically linked >> Python on Linux. (for cx_Freeze's --shared-lib-name) >> e.g. by running a small script with that Python. How to? >> >> Robert > > How about run python -v yourscript and filter the output? >

Re: Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-18 Thread robert
James Stroud wrote: > robert wrote: >> In a makefile I want to locate the .so for a dynamically linked Python >> on Linux. (for cx_Freeze's --shared-lib-name) >> e.g. by running a small script with that Python. How to? >> >> Robert > > def findaso(aso): > import os > for apath in os.sys.path:

Re: A proposal for attribute lookup failures

2007-11-18 Thread MonkeeSage
On Nov 18, 5:27 am, James Stroud <[EMAIL PROTECTED]> wrote: > It would be unoriginal of me to suggest that this violates the explicit > is better than implicit maxim. But it does. That's what I meant about hiding the complexity of an attribute failure. Though, sometimes implicit is acceptable (e.

Re: regular expression

2007-11-18 Thread Diez B. Roggisch
gardsted schrieb: > I just can't seem to get it: > I was having some trouble with finding the first following with this regex: > > Should these two approaches behave similarly? > I used hours before I found the second one, > but then again, I'm not so smart...: > > kind retards > jorgen / de men

Re: Python too complex ?!?!?!

2007-11-18 Thread Berco Beute
On Nov 17, 3:21 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > programmer, but he claims that the install, config, and > > library models for C# have proved to be less > > problematic than Python. So both his courses (intro, > > data structs, algorithms) are taught in C#. > > A little anecdotal compa

regular expression

2007-11-18 Thread gardsted
I just can't seem to get it: I was having some trouble with finding the first > > """ print "The First approach - flags in finditer" rex = re.compile(r'^<(?P[a-zA-Z0-9_]*)') for i in rex.finditer(TESTTXT,re.MULTILINE): print i,i.groups() print "The Second approach - flags in pa

Help with sympy, please

2007-11-18 Thread Dick Moores
from __future__ import division Here's what I'm trying to do, but using sympy: = from math import e n = 1 prod = 1 k = 0 while k < 1000: k += 1 term = (e**(1.0/n))/(e**(1.0/(n+1))) prod *= term n += 2 print prod, term

Re: how to resize a window with a specific name with python-xlib

2007-11-18 Thread santogiuseppe
my apologies..:-( the answer is in the shortest python-xlib example, profilex.py -- http://mail.python.org/mailman/listinfo/python-list

Re: keyword parameter order

2007-11-18 Thread Anthon
Hi Tim, Thanks for the comments, I obviously hadn't thought beyond the simple case. I am happy I wrote (and that you Martin answered) instead of trying to program myself into a halffunctional implementation %-) Regards Anthon On Nov 18, 1:40 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I am look

Re: keyword parameter order

2007-11-18 Thread Anthon
Martin, Thanks for pointing this out. I might have found that code eventualy but it would have taken me quite sometime. There was a request from a user to make ordereddict more of drop-in replacement for dict. That can be already be done by specifying the relax keyword parameter (or defining a su

Simple eval

2007-11-18 Thread Tor Erik Sønvisen
Hi, A while ago I asked a question on the list about a simple eval function, capable of eval'ing simple python constructs (tuples, dicts, lists, strings, numbers etc) in a secure manner: http://groups.google.com/group/comp.lang.python/browse_thread/thread/58a01273441d445f/ >From the answers I got

Re: sockets: why doesn't my connect() block?

2007-11-18 Thread 7stud
On Nov 18, 10:40 am, 7stud <[EMAIL PROTECTED]> wrote: > If it accepted > the connection, then why do I have to call accept()? That should read: If my platform accepted the connection, then why does my server program have to call accept()? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python beginner!

2007-11-18 Thread John Salerno
[EMAIL PROTECTED] wrote: > On Nov 15, 2:38 pm, "SMALLp" <[EMAIL PROTECTED]> wrote: >> Could someone please paste some program in wxPython that uses inharitance. I >> would be very thankfull. > > Most examples of wxPython use inheritance. I would recommend going to > their website and downloading t

Re: Book: Python Power!: The Comprehensive Guide

2007-11-18 Thread John Salerno
Maurice LING wrote: > John Salerno wrote: >> Anyone know anything about this book? I've read a few intro Python books >> already, but I'm always interested in reading more to reinforce the >> language. No reviews on Amazon yet so I'm not sure if it's good or not. >> >> Thanks. > > > A cursory g

Re: SOAPpy port reuse

2007-11-18 Thread Gabriel Genellina
En Sun, 18 Nov 2007 11:17:42 -0300, Maurice LING <[EMAIL PROTECTED]> escribi�: > Diez B. Roggisch wrote: >> Maurice LING schrieb: >>> My question is: How can I shutdown this server and reuse port 35021 >>> when my functionlist changes? >> >> Shutting down gracefully might speed up things I gues

Re: Python Design Patterns - composition vs. inheritance

2007-11-18 Thread Odalrick
On 17 Nov, 19:58, Carl Banks <[EMAIL PROTECTED]> wrote: > Google for Liskov Substitutability if you are interested. I didn't pull > this idea out of my hat. In fact I learned the term from reading a post > by GvR himself, though the idea was intuitive to me long before that. > > Carl Banks Inte

Re: sockets: why doesn't my connect() block?

2007-11-18 Thread 7stud
On Nov 18, 8:18 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 17 Nov 2007 21:32:50 -0800 (PST), 7stud <[EMAIL PROTECTED]> wrote: > >According to "Python in a Nutshell(2nd)", p. 523: > > >connect: s.connect((host, port)) > >... > >Blocks until the server accepts or rejects the conne

Looking for a event-message-qeue framework

2007-11-18 Thread Eric von Horst
Hi, I am looking for a kind of framework that let's me send events between systems. What I had in mind is common event bus that can be spread over multiple systems. On each system, there should be sort of an 'agent' that listens to the events on the bus and acts upon them if they are destined for

Re: Which uses less memory?

2007-11-18 Thread Gabriel Genellina
En Sat, 17 Nov 2007 19:30:04 -0300, Nick Craig-Wood <[EMAIL PROTECTED]> escribi�: >> I'm working on an application that is very memory intensive, so we're >> trying to reduce the memory footprint of classes wherever possible. I > > I'd guess that if you __slot__-ed the Domain class then you'l

Re: Getting name of control under mouse in Windows?

2007-11-18 Thread Gabriel Genellina
En Fri, 16 Nov 2007 16:16:25 -0300, Shane Clark <[EMAIL PROTECTED]> escribi�: > I am trying to get my python app to output the name of the control under > the mouse each time it is clicked. Currently, I am trying to do this > with a combination of pyhook and pyAA, but pyAA gives me "pyAA.Err

how to resize a window with a specific name with python-xlib

2007-11-18 Thread santogiuseppe
The python-xlib documentation is confusing for me..and the examples are too few :-( I need simply to resize a window (named "firefox" for example), but before I need the window's id, how can i obtain this id? thanks in advance and please excuse me for my bad english.. -- http://mail.python.org/m

Re: What is python?????

2007-11-18 Thread rzed
Cope <[EMAIL PROTECTED]> wrote in news:7ab5b781-3c6c- [EMAIL PROTECTED]: > please tell me what is python.This group is so crowded. > I see nobody has chosen to answer your question seriously. I'll give you an answer, but it is probably not to the question you are asking, either. Python is not

Re: sys.arg whitespace problem

2007-11-18 Thread Diez B. Roggisch
bryan rasmussen schrieb: > Hi, > > Basically I want to get sys.argv[1: ] but the problem is that actually > the argument should maintain whitespace. Thus if the arguments are > something something with only one space between them, or something > something with three spaces between them I should be

sys.arg whitespace problem

2007-11-18 Thread bryan rasmussen
Hi, Basically I want to get sys.argv[1: ] but the problem is that actually the argument should maintain whitespace. Thus if the arguments are something something with only one space between them, or something something with three spaces between them I should be able to maintain the exact whitespac

Re: sockets: why doesn't my connect() block?

2007-11-18 Thread Jean-Paul Calderone
On Sat, 17 Nov 2007 21:32:50 -0800 (PST), 7stud <[EMAIL PROTECTED]> wrote: >According to "Python in a Nutshell(2nd)", p. 523: > >connect: s.connect((host, port)) >... >Blocks until the server accepts or rejects the connection attempt. > >However, my client program ends immediately after the call

Re: SOAPpy port reuse

2007-11-18 Thread Piet van Oostrum
> Maurice LING <[EMAIL PROTECTED]> (ML) wrote: >ML> Hi, >ML> I have a problem: >ML> 1. Assuming that my application is a SOAP server that uses SOAPpy, >ML> 2. I am given port 35021 for use. >ML> What I normally do (simply) is: >ML> functionlist = [] >ML> import SOAPpy >ML> server = SOAPpy.S

Re: Auto locate Python's .so on Linux (for cx_Freeze's --shared-lib-name)

2007-11-18 Thread Neal Becker
robert wrote: > In a makefile I want to locate the .so for a dynamically linked > Python on Linux. (for cx_Freeze's --shared-lib-name) > e.g. by running a small script with that Python. How to? > > Robert How about run python -v yourscript and filter the output? -- http://mail.python.org/mailm

Re: Commentary on Python 411 - Web 3.0 and Nanoprogramming

2007-11-18 Thread SamFeltus
"""I work right across from the Nanosystems Institute, and now this! You know, having studied a lot of microbiology in college, I can't fathom the thought of being outdone. So I'm going to start doing femtoruminating, which reduces thought to its most fundamental particle, the mor-on. """ Perhaps,

Re: SOAPpy port reuse

2007-11-18 Thread Maurice LING
Diez B. Roggisch wrote: > Maurice LING schrieb: >> Hi, >> >> I have a problem: >> >> 1. Assuming that my application is a SOAP server that uses SOAPpy, >> 2. I am given port 35021 for use. >> >> What I normally do (simply) is: >> >> functionlist = [] >> import SOAPpy >> server = SOAPpy.SOAPServer((

Re: Python beginner!

2007-11-18 Thread Brandon Sandrowicz
On 11/16/07, Shawn Milochik <[EMAIL PROTECTED]> wrote: > I completely support Wildemar. Lazy questions like that deserve absolutely > nothing. > > I agree that cushioning the reply with a brief explanation of why that > question sucks would have helped the original poster, but he doesn't deserve >

Re: SOAPpy port reuse

2007-11-18 Thread Diez B. Roggisch
Maurice LING schrieb: > Hi, > > I have a problem: > > 1. Assuming that my application is a SOAP server that uses SOAPpy, > 2. I am given port 35021 for use. > > What I normally do (simply) is: > > functionlist = [] > import SOAPpy > server = SOAPpy.SOAPServer((, 35021)) > for func in functionli

Re: A proposal for attribute lookup failures

2007-11-18 Thread Arnaud Delobelle
On Nov 18, 4:07 am, MonkeeSage <[EMAIL PROTECTED]> wrote: > Proposal: > > When an attribute lookup fails for an object, check the top-level > (and local scope?) for a corresponding function or attribute and apply > it as the called attribute if found, drop through to the exception > otherwise. Th

Re: keyword parameter order

2007-11-18 Thread Tim Chase
> I am looking for a way to determine the order of keyword parameters > passed on to a class method. I'm fairly certain it's not possible, as how would code like this behave: def my_func(**kwd): kwd = OrderedDict(kwd) #magic happens here? return do_something(kwd) my_dict = {'hello':

Re: Commentary on Python 411 - Web 3.0 and Nanoprogramming

2007-11-18 Thread James Stroud
SamFeltus wrote: > Here's an interesting Podcast musing on the possible future of Python > and computing, illustrated and commentated by SonomaSunshine... > > Enjoy... > > http://samfeltus.com/kudzu/Nanoprogramming_podcast.html I work right across from the Nanosystems Institute, and now this! Yo

Re: A proposal for attribute lookup failures

2007-11-18 Thread James Stroud
MonkeeSage wrote: > Proposal: > > When an attribute lookup fails for an object, check the top-level > (and local scope?) for a corresponding function or attribute and apply > it as the called attribute if found, drop through to the exception > otherwise. This is just syntactic sugar. > > > Exa

Re: keyword parameter order

2007-11-18 Thread Martin v. Löwis
> I am not sure if this kind of info is available internally to the > interpreter (ordereddict is in C, so I would even prefer that). Has > anyone done this or anything like it? It's not available. See ceval.c:do_call; this fills the dictionary. >From then on, information about the order of keywor

keyword parameter order

2007-11-18 Thread Anthon
I am looking for a way to determine the order of keyword parameters passed on to a class method. In the source code the keyword parameters are ordered, an ordering that is lost by putting them into a dictionary and then accessing them by using **kw. If I had this order (either of the keyword+value

Re: how can i return a image in mod python ?

2007-11-18 Thread Arnaud Delobelle
On Nov 18, 6:46 am, Abandoned <[EMAIL PROTECTED]> wrote: > Hi.. > I want to show the pictures with mod python directly. > > def showimage(req): > some process... > open /var/www/a.jpg and print > > for example if i open: > domain.com/a.py/showimage > It must show me image directly (no redir

Re: Book: Python Power!: The Comprehensive Guide

2007-11-18 Thread Maurice LING
John Salerno wrote: > Anyone know anything about this book? I've read a few intro Python books > already, but I'm always interested in reading more to reinforce the > language. No reviews on Amazon yet so I'm not sure if it's good or not. > > Thanks. A cursory glance while standing in the book

Re: Variable-width lookbehind

2007-11-18 Thread Gary Herron
OKB (not okblacke) wrote: > Paul Rubin wrote: > > >> "OKB (not okblacke)" <[EMAIL PROTECTED]> writes: >> >>> For years now Python has not supported variable-length >>> lookbehinds. >>> >> I'm not sure what that is and the perl links you gave don't work, >> but it