Saving an audio file's waveform into an image

2008-05-09 Thread Julien
Hi, I would like to pull out the waveform of an audio file and save it into an image file, for example in GIF format. Is that achievable, and if so, how? I heard about the Snack module, but the project looks dead and un- maintained. Your advice would be greatly appreciated. Thanks! Julien -- h

Re: threading - race condition?

2008-05-09 Thread John Nagle
skunkwerk wrote: i'm getting the wrong output for the 'title' attributes for this data. the queue holds a data structure (item name, position, and list to store results in). each thread takes in an item name and queries a database for various attributes. from the debug statements the item name

Re: The Importance of Terminology's Quality

2008-05-09 Thread J�rgen Exner
"Waylen Gumbal" <[EMAIL PROTECTED]> wrote: > so why not just skip the thread or toss the OP in your >killfile so you don't see his postings. Done years ago. >If others want to discuss his >topics, who are you or I to tell them not to? They are very welcome to do so in an appropriate NG for th

Re: python vs. grep

2008-05-09 Thread Ville Vainio
On May 8, 8:11 pm, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > All these examples assume your regular expression will not span multiple > lines, but this can easily be the case. How would you process the file > with regular expressions that span multiple lines? re.findall/ finditer, as I said earl

Re: anagram finder / dict mapping question

2008-05-09 Thread cokofreedom
>>> key = ''.join(sorted(word)) I tend to strip and lower the word as well, otherwise "Hello" and "hello" do not compare...depends on what you want though! Plus you might get a lot of "word\n" as keys... My technique is the this way def anagram_finder(words): anagrams = {} for word in wo

Re: explain this function to me, lambda confusion

2008-05-09 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Indeed, there are many ways this could be done. Some are more > concise, some are more efficient. As I said, I did it the way I did > it to try out lambdas. Your way achieves the result, rather elegantly > I think, but teaches me nothing about using lambdas. Unfortun

Re: PHP + TinyButStrong Python replacement

2008-05-09 Thread Bruno Desthuilliers
pistacchio a écrit : [EMAIL PROTECTED] ha scritto: On 7 mai, 16:17, pistacchio <[EMAIL PROTECTED]> wrote: George Sakkis ha scritto: (snip) What does it matter if it's a single file or a dozen under a package ? "Installation" for pure Python packages can be as simple as copying the package und

Re: slicing lists

2008-05-09 Thread castironpi
On May 9, 1:23 am, "Ian Kelly" <[EMAIL PROTECTED]> wrote: > On Wed, May 7, 2008 at 5:29 PM, Yves Dorfsman <[EMAIL PROTECTED]> wrote: > > Is there a way to do: > > x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > > x[0,2:6] > > > That would return: > > [0, 3, 4, 5, 6] > > > I am surprised this notation is not

Re: Python GUIs and custom controls

2008-05-09 Thread Diez B. Roggisch
Joe P. Cool schrieb: So far I have a little experience with Tkinter and wxPython. I wonder which of the numerous Python GUI kits would be the best choice for a multi platform application that makes heavy use of custom controls, 3D views and the like? Thanks in advance for your hints and advice.

Re: Am I missing something with Python not having interfaces?

2008-05-09 Thread Bruno Desthuilliers
Daniel Marcel Eichler a écrit : Am Donnerstag 08 Mai 2008 00:12:26 schrieb [EMAIL PROTECTED]: very often sees do-nothing catch-all try/catch blocks in Java - which is way worse than just letting the exception propagate. I find all this totally pointless, because there's just no way for a compi

Re: Which way is faster for a simple web reporting system: django, web.py or cgi

2008-05-09 Thread Bruno Desthuilliers
idev a écrit : Hi all, May be this is a dump question, but it makes me crazy in my research. I am not a developer but I have experience with web development (PHP) in a past. Most my activities are around database administration and design. For most database administration tasks I am using Python

Re: "prove"

2008-05-09 Thread Bruno Desthuilliers
Lucas Prado Melo a écrit : Hello, How could I "prove" to someone that python accepts this syntax using the documentation (I couldn't find it anywhere): classname.functionname(objectname) Why do you need the documentation ? Just fire up your python shell and hack a Q&D example: Python 2.5.1 (

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. Err... You saw a Python helloworld and a Java helloworld and you found them "very similar" ??? What's different (except syntax) ? dynamism (and not only w

Re: Best technology for agent/web server architecture

2008-05-09 Thread Florencio Cano
I have control over agent and client but I'm not sure how to use pickle for this task. Do you suggest to pickle the objects that I want to send and send it over a usual socket? I have searched a bit in Google and I have seen that Pickle is insecure by default. What do you think about this? 2008/5/

Re: "prove"

2008-05-09 Thread Duncan Booth
"Lucas Prado Melo" <[EMAIL PROTECTED]> wrote: > Hello, > How could I "prove" to someone that python accepts this syntax using > the documentation (I couldn't find it anywhere): > classname.functionname(objectname) Language reference, mostly section 5.3 Primaries call ::= primary "

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Bruno Desthuilliers
pistacchio a écrit : (snip) Technically speaking, it (Python) is not, for example, strongly typed, You're confusing "strong" typing with static typing. Somewhat orthogonal issues. -- http://mail.python.org/mailman/listinfo/python-list

Re: python newbie: some surprises

2008-05-09 Thread Bruno Desthuilliers
v4vijayakumar a écrit : When I started coding in python, these two things surprised me. 1. my code is inconsistently indented with the combination of tabs and spaces. Even lines looked intended, but it is not. Then you have a problem with your code editor - not with Python. 2. python require

Re: python newbie: some surprises

2008-05-09 Thread Bruno Desthuilliers
Yves Dorfsman a écrit : Mensanator wrote: 2. python requires to pass "self" to all instance methods Who uses methods? Is this a joke ? Very probably. What are the alternatives ? Err... functions ?-) -- http://mail.python.org/mailman/listinfo/python-list

Re: python newbie: some surprises

2008-05-09 Thread Bruno Desthuilliers
Yves Dorfsman a écrit : (snip) I see the point of the OP. Couldn't the new-line be used as an equivalent of ':', Technically, yes. OTHO, the ':' helps editors doing proper indentation. -- http://mail.python.org/mailman/listinfo/python-list

the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread XLiIV
I started playing with Python and love it since the very beginning, programming using Python is so ...human-like? but one thing returns to me almost everytime when I see/write the code Let's take a look at two ways of thinking... the standard one which is well-known and loved by almost everyone :

xml.etree Syntax of path?

2008-05-09 Thread Thomas Guettler
Hi, I think the documentation of xml.etree is missing something[1]. {{{ find(path) Finds the first toplevel element with given tag. Same as getroot().find(path). path is the element to look for. }}} According to the source etree has limited support for xpath. I think it should be document

Grabbing previous iteration in a dict

2008-05-09 Thread dannywebster
Hello all, I have a dictionary of which i'm itervalues'ing through, and i'll be performing some logic on a particular iteration when a condition is met with trusty .startswith('foo'). I need to grab the previous iteration if this condition is met. I can do something with an extra var to hold eve

Re: RELEASED Python 2.6a3 and 3.0a5

2008-05-09 Thread Christian Heimes
Kay Schluehr schrieb: > http://www.python.org/ftp/python/3.0/python-3.0a5.msi > Error 404: File Not Found > http://www.python.org/ftp/python/3.0/python-3.0a5.amd64.msi > Error 404: File Not Found The Windows binaries usually take a while. I'm adding Martin to the CC list. His is most like build

Re: Free Memory

2008-05-09 Thread Christian Heimes
Dark Wind schrieb: > Hi, > > How can I free all the memory in python by deleting all variables. I am > looking for the equivalent of 'clear' from Matlab. > > I know del x deletes a variable x, but it doesn't free all the available > memory. del doesn't free an object. It only removes one referen

Re: pickle problem

2008-05-09 Thread Hrvoje Niksic
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes: >> Of course, if it makes sense to pickle sockets in the application, one >> is can do so by defining __getstate__ and __setstate__: > > When does it make sense!? When recreating the object from on-disk state requires reestablishing the communi

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I have a dictionary of which i'm itervalues'ing through, and i'll be > performing some logic on a particular iteration when a condition is > met with trusty .startswith('foo'). I need to grab the previous > iteration if this condition is met. I can do something with an

Re: Scanning through Windows registry...

2008-05-09 Thread Unknown Hero
On 7 touko, 14:25, Unknown Hero <[EMAIL PROTECTED]> wrote: > I'll post my code here once I have time to write it, currently I'm > rather busy. That is merely for optimization suggestions and for > others who might need the same sort of code I did. > > Thank you once again. Finally managed to get i

Re: the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread Marc 'BlackJack' Rintsch
On Fri, 09 May 2008 02:13:34 -0700, XLiIV wrote: > Let's take a look at two ways of thinking... > the standard one which is well-known and loved by almost everyone :) > and that crazy concept below which suprised evan me :wacko: > > > import time > > ftime = time.time() > localtime = time.local

Re: range with variable leading zeros

2008-05-09 Thread yhvh
> > x = [0010, 0210] > > You do realize that this is octal, right? It's unfortunate I choose that, the numbers go beyond octal > len is undefined for integers.  Perhaps you meant "len(str(x[1]))". Yes sorry it was late at night :P > You can, however, do this: > >>> '%0*d' % (5, 123) > '00123' T

Re: xml.etree Syntax of path?

2008-05-09 Thread Stefan Behnel
Thomas Guettler wrote: > I think the documentation of xml.etree is missing something[1]. > > {{{ > find(path) > Finds the first toplevel element with given tag. Same as > getroot().find(path). path is the element to look for. > }}} > > According to the source etree has limited support for xpa

simple question about Python list

2008-05-09 Thread dmitrey
hi all, suppose I have 2 lists list1 = ['elem0', 'elem1', 'elem2', 'elem3', 'elem4', 'elem5'] and list2 = [0, 2, 4] # integer elements howto (I mean most simple recipe, of course) form list3 that contains elements from list1 with indexes from list2, i.e. list3 = ['elem0', 'elem2', 'elem4']? Than

Reusing IDLE file editor

2008-05-09 Thread Russell Blau
I have a need for some simple text-editing capabilities in a Tkinter program, and it occurred to me that IDLE is a Tkinter app that already has what I need in its file editor windows. I thought it would be nice if I could just use one of those windows as a widget in my application, in place of

here is the coolest site in the world, what I've talked about last time: http://tinyurl.com/4e4smx

2008-05-09 Thread kiskeke
here is the coolest site in the world, what I've talked about last time: http://tinyurl.com/4e4smx -- http://mail.python.org/mailman/listinfo/python-list

Re: How to kill Python interpreter from the command line?

2008-05-09 Thread spectrumdt
Thanks for all the replies. On May 8, 5:50 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Ctrl+C often works with Python, but as with any language, it's possible > to write a program which will not respond to it.  You can use Ctrl+\ > instead (Ctrl+C sends SIGINT which can be masked or other

Re: simple question about Python list

2008-05-09 Thread Paul Hankin
On May 9, 11:04 am, dmitrey <[EMAIL PROTECTED]> wrote: > list1 = ['elem0', 'elem1', 'elem2', 'elem3', 'elem4', 'elem5'] > and > list2 = [0, 2, 4] # integer elements > > howto (I mean most simple recipe, of course) form list3 that contains > elements from list1 with indexes from list2, i.e. list3 =

Re: How to kill Python interpreter from the command line?

2008-05-09 Thread spectrumdt
Thanks for the replies. On May 8, 5:50 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Ctrl+C often works with Python, but as with any language, it's possible > to write a program which will not respond to it.  You can use Ctrl+\ > instead (Ctrl+C sends SIGINT which can be masked or otherwis

Re: How to kill Python interpreter from the command line?

2008-05-09 Thread dmitrey
in addition to killall and kill funcs mentioned above you could be interested in pkill see "man pkill" from terminal for more details pkill python or pkill pyt or pkill py -- http://mail.python.org/mailman/listinfo/python-list

Re: simple question about Python list

2008-05-09 Thread dmitrey
Ok, I use Python 2.5 but I try my code to remain Python 2.4 and (preferable) 2.3 compatible. Are there other solutions? D. On 9 Тра, 13:17, Paul Hankin <[EMAIL PROTECTED]> wrote: > On May 9, 11:04 am, dmitrey <[EMAIL PROTECTED]> wrote: > > > list1 = ['elem0', 'elem1', 'elem2', 'elem3', 'elem4', 'e

Pythonwin

2008-05-09 Thread Clive_S
Hi I am trying to use Python with ArcGIS. I have installed Python 2.4. I have an icon for IDLE and command line. I do not see Python PythonWin. How do you install or launch pythonwin?? Thanks Clive -- http://mail.python.org/mailman/listinfo/python-list

Re: source beautifier

2008-05-09 Thread Stefan Behnel
Marco Mariani wrote: > Is there a program (free, payware, whatever) like polystyle for > linux/python? > > http://www.polystyle.com/features/python-beautifier.jsp > > I've never used it, but the example is quite clear. I tend to believe that running these tools on some average Python code would

Re: simple question about Python list

2008-05-09 Thread Russell Blau
On May 9, 6:25 am, dmitrey <[EMAIL PROTECTED]> wrote: > Ok, I use Python 2.5 but I try my code to remain Python 2.4 and > (preferable) 2.3 compatible. > Are there other solutions? > D. > > On 9 ôÒÁ, 13:17, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > On May 9, 11:04šam, dmitrey <[EMAIL PROTECTED]>

Re: simple question about Python list

2008-05-09 Thread Duncan Booth
dmitrey <[EMAIL PROTECTED]> wrote: > On 9 ôÒÁ, 13:17, Paul Hankin <[EMAIL PROTECTED]> wrote: >> On May 9, 11:04šam, dmitrey <[EMAIL PROTECTED]> wrote: >> >> > list1 = ['elem0', 'elem1', 'elem2', 'elem3', 'elem4', 'elem5'] >> > and >> > list2 = [0, 2, 4] # integer elements >> >> > howto (I mean mos

Re: Pythonwin

2008-05-09 Thread Niklas Norrthon
On 9 Maj, 12:30, Clive_S <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to use Python with ArcGIS. > > I have installed Python 2.4. I have an icon for IDLE and command line. > I do not see Python PythonWin. > > How do you install or launch pythonwin?? There is a distribution of PythonWin bundled

Re: simple question about Python list

2008-05-09 Thread dmitrey
Hmm... I thought this issue is available from Python2.5 only. I have no other interpreters in my recently installed KUBUNTU 8.04. Thanks all, D. On 9 Тра, 13:41, Duncan Booth <[EMAIL PROTECTED]> wrote: > dmitrey <[EMAIL PROTECTED]> wrote: > > On 9 ôÒÁ, 13:17, Paul Hankin <[EMAIL PROTECTED]> wrote

multiple Python versions, but on Windows (how to handle registry updates)

2008-05-09 Thread Banibrata Dutta
Hi, I already have Python25, and need to install Python24. I would prefer not to remove Python25, but each Python version seems to update the registry, I guess (not sure), overwriting each other's entries. Any way to have both versions ? -- regards, Bani -- http://mail.python.org/mailman/listinf

Re: simple question about Python list

2008-05-09 Thread Bjoern Schliessmann
dmitrey wrote: > Hmm... I thought this issue is available from Python2.5 only. I > have no other interpreters in my recently installed KUBUNTU 8.04. "aptitude install python2.4" helps. Regards, Björn -- BOFH excuse #10: hardware stress fractures -- http://mail.python.org/mailman/listinfo/p

Re: simple question about Python list

2008-05-09 Thread Arnaud Delobelle
dmitrey wrote: > Ok, I use Python 2.5 but I try my code to remain Python 2.4 and > (preferable) 2.3 compatible. > Are there other solutions? > D. > > On 9 ���, 13:17, Paul Hankin <[EMAIL PROTECTED]> wrote: > > On May 9, 11:04�am, dmitrey <[EMAIL PROTECTED]> wrote: > > > > > list1 = ['elem0', 'ele

Re: Pythonwin

2008-05-09 Thread Roy H. Han
Hi Clive, For ArcGIS, I use plain old VIM, IPython and IDLE. If you really want PythonWin, then you can download Mark Hammond's Python for Windows extensions: http://sourceforge.net/projects/pywin32/ Note also that with the pywin32 extensions, you can also use Python 2.5 to access ArcGIS using

Re: Scanning through Windows registry...

2008-05-09 Thread Unknown Hero
On 9 touko, 12:51, Unknown Hero <[EMAIL PROTECTED]> wrote: > Finally managed to get it to work (heh, I was pretty darn lost even > though I had the best help) but as promised, I'll post my code here > for those who might be interested in it. The biggest of thanks to Tim > Golden, who basically wal

Re: How to kill Python interpreter from the command line?

2008-05-09 Thread Floris Bruynooghe
On May 9, 11:19 am, [EMAIL PROTECTED] wrote: > Thanks for the replies. > > On May 8, 5:50 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > > Ctrl+C often works with Python, but as with any language, it's possible > > to write a program which will not respond to it.  You can use Ctrl+\ > > ins

Re: Pythonwin

2008-05-09 Thread ivan
Not related (except that it is about python and ArcGIS): Remember you can set PYTHONINSPECT to enter interactive mode at the end of a script. With a script set as an ArcGIS tool, you can then enter interactive to play around or debug with all the ArcGIS stuff loaded. Is there a better way people d

Re: xml.etree Syntax of path?

2008-05-09 Thread Thomas Guettler
Stefan Behnel schrieb: Thomas Guettler wrote: I think the documentation of xml.etree is missing something[1]. {{{ find(path) Finds the first toplevel element with given tag. Same as getroot().find(path). path is the element to look for. }}} According to the source etree has limited support

Function creation (what happened?)

2008-05-09 Thread Viktor
Can somebody give me an explanation what happened here (or point me to some docs)? Code: HMMM = None def w(fn): print 'fn:', id(fn) HMMM = fn print 'HMMM:', id(HMMM) def wrapper(*v, **kw): fn(*v, **kw) wrapper.i = fn print 'wrapper:', id(wrapper) return wrappe

Re: Scanning through Windows registry...

2008-05-09 Thread Unknown Hero
Ah, never mind, got it to work. Here's the code now. I hope I won't run into another problems later :D #Goes through all keys and subkeys in the selected hive (defined as root) and replaces the value 'old' with the value 'new' # #IMPORTANT! You should always back up the registry before attemptin

Re: Function creation (what happened?)

2008-05-09 Thread Chris Hulan
On May 9, 8:25 am, Viktor <[EMAIL PROTECTED]> wrote: > Can somebody give me an explanation what happened here (or point me to > some docs)? > > Code: > > HMMM = None > > def w(fn): > print 'fn:', id(fn) > HMMM = fn > print 'HMMM:', id(HMMM) > def wrapper(*v, **kw): > fn(*v,

Re: Function creation (what happened?)

2008-05-09 Thread Duncan Booth
Viktor <[EMAIL PROTECTED]> wrote: > Can somebody give me an explanation what happened here (or point me to > some docs)? > > Code: > > HMMM = None > > def w(fn): > print 'fn:', id(fn) > HMMM = fn > print 'HMMM:', id(HMMM) > def wrapper(*v, **kw): > fn(*v, **kw) > wra

Re: Function creation (what happened?)

2008-05-09 Thread Peter Otten
Viktor wrote: > Can somebody give me an explanation what happened here (or point me to > some docs)? > > Code: > > HMMM = None > > def w(fn): > print 'fn:', id(fn) > HMMM = fn > print 'HMMM:', id(HMMM) This prints the id() of the local (to the function w()) HMMM variable > def

Re: Function creation (what happened?)

2008-05-09 Thread Viktor
This completely slipped of my mind... :) I'm trying to change the: http://wordaligned.org/svn/etc/echo/echo.py So if the function is method it prints ClassName.MethodName instead of MethodName(self|klass|cls=<... ClassName>). But it turned out that in the decorator, the wrapped function is alway

ANN: Pyrex 0.9.7

2008-05-09 Thread greg
Pyrex 0.9.7 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ Highlights of this version: * I have streamlined the integer for-loop syntax. Instead of the loop variable redundantly appearing in two places, it's now just for x < i < y: ... * If you dec

Re: Pythonwin

2008-05-09 Thread Mike Driscoll
On May 9, 5:30 am, Clive_S <[EMAIL PROTECTED]> wrote: > Hi > > I am trying to use Python with ArcGIS. > > I have installed Python 2.4. I have an icon for IDLE and command line. > I do not see Python PythonWin. > > How do you install or launch pythonwin?? > > Thanks > > Clive I have PythonWin insta

Re: How to kill Python interpreter from the command line?

2008-05-09 Thread Banibrata Dutta
Any chance that there is a "catch-all" in the code. As per PEP8 and I'm sure common knowledge of all the folks programming in Python for a while -- a >>>catch: could just lead to this problem. On 5/9/08, Floris Bruynooghe <[EMAIL PROTECTED]> wrote: > > On May 9, 11:19 am, [EMAIL PROTECTED] wrote:

Re: Pythonwin

2008-05-09 Thread Banibrata Dutta
if one has installed ActiveState Python 2.5, I think it'd have been Start Menu --> Programs --> ActiveSte ActivePython 2.5 --> and I think it delivers IDLE, not PythonWin. On 5/9/08, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > On May 9, 5:30 am, Clive_S <[EMAIL PROTECTED]> wrote: > > Hi > > >

Re: Function creation (what happened?)

2008-05-09 Thread George Sakkis
On May 9, 9:02 am, Viktor <[EMAIL PROTECTED]> wrote: > This completely slipped of my mind... :) > > I'm trying to change the:http://wordaligned.org/svn/etc/echo/echo.py > > So if the function is method it prints ClassName.MethodName instead of > MethodName(self|klass|cls=<... ClassName>). > > But i

Re: "prove"

2008-05-09 Thread Lucas Prado Melo
On Fri, May 9, 2008 at 5:32 AM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Why do you need the documentation ? Just fire up your python shell and hack > a Q&D example: I agree. I said it to this person, but he insisted I should use documentation... -- http://mail.python.org/mailman/listinfo/p

Re: How can I add spaces where ever I have capital letters?

2008-05-09 Thread MRAB
On May 9, 3:04 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote: > Something like this. I'm sure there are other ways to do it. > > import re > > def addspace(m) : > return ' ' + m.group(0) > > strng = "ModeCommand" > > newstr = re.sub('[A-Z]',addspace,strng) > Alternatively: newstr = re.sub

Re: Pythonwin

2008-05-09 Thread Banibrata Dutta
oops moment! I was wrong. indeed, you should find PythonWin there, if you installed ActiveState Python. On 5/9/08, Banibrata Dutta <[EMAIL PROTECTED]> wrote: > > if one has installed ActiveState Python 2.5, I think it'd have been > Start Menu --> Programs --> ActiveSte ActivePython 2.5 --> >

Re: "prove"

2008-05-09 Thread Lucas Prado Melo
Thanks for all the answers. I bet I will convince this guy! -- http://mail.python.org/mailman/listinfo/python-list

Re: how to pass C++ object to another C++ function via Python function

2008-05-09 Thread grbgooglefan
Yes, that worked. I "protected" the variable which I did not want to get freed. I incremented reference for that variable & it started working. Thanks for all your guidance. On May 3, 5:23 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > Python will do nothing with the pointer inside a PyCObj

Re: Function creation (what happened?)

2008-05-09 Thread Viktor
I figured out the first two solutions, but the third looks like the most cleaner, think I'll use that one... Thank you everyone. :) On May 9, 3:24 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > The decorator does receive the correct function. The problem is that > at this point __init__ is still

Web Framework suggestions for a RIA type application for managing lab specimens

2008-05-09 Thread rynt
Hello all. I'm Looking for suggestions for which Python web framework(e.g. Django, Turbogears,etc.) would work best to develop a cross platform browser based system to manage lab specimens. Requirements are: a. highly secure b. run on internet or intranet e. RDBMS read/write intensive d. be able

Re: python newbie: some surprises

2008-05-09 Thread v4vijayakumar
On May 9, 1:48 pm, Bruno Desthuilliers wrote: > v4vijayakumar a écrit : > > > When I started coding in python, these two things surprised me. > > > 1. my code is inconsistently indented with the combination of tabs and > > spaces. Even lines looked intended, but it is not. > > Then you have a prob

Re: Pythonwin

2008-05-09 Thread Clive_S
Hi all I downloaded (from Python) and installed python-2.4.4.msi I have python and pythonw.exe in the Python 24 folder (but not in my start menu). When I click on the pythonw.exe it is not launched?? Thanks Clive On 9 May, 14:09, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On May 9, 5:30 am, C

How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread grbgooglefan
I am creating functions, the return result of which I am using to make decisions in combined expressions. In some expressions, I would like to inverse the return result of function. E.g. function contains(source,search) will return true if "search" string is found in source string. I want to make

bytes1.shuffle( )

2008-05-09 Thread castironpi
random.shuffle( bytes1 ) if random == bytes: repunctuate( sentence ) else: random.shuffle( [ random ] ) sincerely exit, () -- http://mail.python.org/mailman/listinfo/python-list

回复: Re: Pythonwin

2008-05-09 Thread <潍坊风筝>
In arcgis dvd , you can find a "desktop" file ,open the file ,then a "pythonwin" file,open the file ,then you install "pywin32-207.win32-py2.4.exe" THIS IS OK! Banibrata Dutta <[EMAIL PROTECTED]> 写道: if one has installed ActiveState Python 2.5, I think it'd have been Start Menu --> Pro

RE: Pythonwin

2008-05-09 Thread Ahmed, Shakir
You need to install the same version on your pc, if you have 2.5 already installed you need to download 2.5 pythonwin from http://sourceforge.net Hope it will work for you. Thanks sk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clive_S Sent: Friday,

help needed!

2008-05-09 Thread drjekil
i have a script which will do a specific task for a file in a folder,now i would like to do the same task for the all files in that folder(25 files).how can i do that? Thanks in advance. -- View this message in context: http://www.nabble.com/help-needed%21-tp17148388p17148388.html Sent from t

observer pattern (notification chain synchronization)

2008-05-09 Thread Alan Isaac
A question related to the observer pattern... Suppose I have a variant: there are stocks, mutual funds, and investors. Let us say that funds are observers for multiple stocks, and investors are observers for funds. Once a "month" all stocks notify their observing funds of their end-of-month pri

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Ivan Voras
grbgooglefan wrote: > I am creating functions, the return result of which I am using to make > decisions in combined expressions. > In some expressions, I would like to inverse the return result of > function. > > E.g. function contains(source,search) will return true if "search" > string is found

Re: Pythonwin

2008-05-09 Thread Gabriel Genellina
En Fri, 09 May 2008 10:40:38 -0300, Clive_S <[EMAIL PROTECTED]> escribió: > I downloaded (from Python) and installed python-2.4.4.msi > > I have python and pythonw.exe in the Python 24 folder (but not in my > start menu). > When I click on the pythonw.exe it is not launched?? pythonw.exe is NOT P

Dynamic generation of images (was Re: Custom Classes?)

2008-05-09 Thread J. Cliff Dyer
On Thu, 2008-05-08 at 10:33 -0500, Victor Subervi wrote: > Okay, trying this again with everything working and no ValueError or > any other errors, here we go: > > Load this code. Unless you use a similar login() script, you will want > to edit your own values into the user, passwd, db and host: >

RE: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of grbgooglefan > Sent: Friday, May 09, 2008 9:41 AM > To: python-list@python.org > Subject: How to modify meaning of builtin function "not" to "!"? > > I am creating functions, the return result o

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread castironpi
On May 9, 8:41 am, grbgooglefan <[EMAIL PROTECTED]> wrote: > I am creating functions, the return result of which I am using to make > decisions in combined expressions. > In some expressions, I would like to inverse the return result of > function. > > E.g. function contains(source,search) will ret

Re: How to modify meaning of builtin function "not" to "!"?

2008-05-09 Thread Bruno Desthuilliers
grbgooglefan a écrit : I am creating functions, the return result of which I am using to make decisions in combined expressions. In some expressions, I would like to inverse the return result of function. E.g. function contains(source,search) will return true if "search" string is found in sourc

Re: Pythonwin

2008-05-09 Thread Mike Driscoll
On May 9, 9:02 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 09 May 2008 10:40:38 -0300, Clive_S <[EMAIL PROTECTED]> escribió: > > > I downloaded (from Python) and installed python-2.4.4.msi > > > I have python and pythonw.exe in the Python 24 folder (but not in my > > start menu). >

Re: help needed!

2008-05-09 Thread Mike Driscoll
On May 9, 8:54 am, drjekil <[EMAIL PROTECTED]> wrote: > i have a script which will do a specific task for a file in a folder,now i > would like to do the same task  for the all files in that folder(25 > files).how can i do that? > > Thanks in advance. > > -- > View this message in > context:http:/

Can I "delete" the namespace of a module that i import?

2008-05-09 Thread gbin,Zhou
Hi,all. I see from "http://docs.python.org/tut/node11.html"; that "Name spaces are created at different moments and have different lifetimes. The namespace containing the built-in names is created when the Python interpreter starts up, and is never deleted. The global namespace for a module is c

Re: help needed!

2008-05-09 Thread Mike Driscoll
On May 9, 8:54 am, drjekil <[EMAIL PROTECTED]> wrote: > i have a script which will do a specific task for a file in a folder,now i > would like to do the same task  for the all files in that folder(25 > files).how can i do that? > > Thanks in advance. > > -- > View this message in > context:http:/

Re: Newbie to python --- why should i learn !

2008-05-09 Thread hdante
On May 8, 7:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? All the languages have similar "power", in a theoretical sense. If you can solve

Re: multiple Python versions, but on Windows (how to handle registry updates)

2008-05-09 Thread Gabriel Genellina
En Fri, 09 May 2008 07:58:33 -0300, Banibrata Dutta <[EMAIL PROTECTED]> escribió: > I already have Python25, and need to install Python24. I would prefer not to > remove Python25, but each Python version seems to update the registry, I > guess (not sure), overwriting each other's entries. Any way

Re: Web Framework suggestions for a RIA type application for managing lab specimens

2008-05-09 Thread Bruno Desthuilliers
rynt a écrit : Hello all. I'm Looking for suggestions for which Python web framework(e.g. Django, Turbogears,etc.) would work best to develop a cross platform browser based system to manage lab specimens. Requirements are: a. highly secure b. run on internet or intranet e. RDBMS read/write inte

Re: observer pattern (notification chain synchronization)

2008-05-09 Thread J. Cliff Dyer
That looks like a good approach to me. Alternative to a dict would just be a count of reported stocks tested against the total number of stocks, but if one stock reports twice before another reports at all, you'll get funny results. Your method is probably better, in the general case. Cheers, Cl

Re: Grabbing previous iteration in a dict

2008-05-09 Thread dannywebster
On May 9, 10:48 am, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > I have a dictionary of which i'm itervalues'ing through, and i'll be > > performing some logic on a particular iteration when a condition is > > met with trusty .startswith('foo'). I need to grab the p

Re: Can I "delete" the namespace of a module that i import?

2008-05-09 Thread Mike Driscoll
On May 9, 9:06 am, "gbin,Zhou" <[EMAIL PROTECTED]> wrote: > Hi,all. >    I see from "http://docs.python.org/tut/node11.html"; that "Name > spaces are created at different moments and have different lifetimes. > The namespace containing the built-in names is created when the Python > interpreter sta

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Marcelo de Moraes Serpa
I sincerely think that most languages in existence today have its place. Java has some great libraries and programs that were written in it. Try writing an Eclipse clone in Python, I don't think it would go well. On Fri, May 9, 2008 at 11:08 AM, hdante <[EMAIL PROTECTED]> wrote: > On May 8, 7:2

Re: The del statement

2008-05-09 Thread Michael Torrie
George Sakkis wrote: > I think you're trying to imply that it is consistent with setting a > value (same with getting). I guess what bugs me about "del" is that > it's a keyword and not some universally well-known punctuation. Do you > you feel that Python misses a "pop" keyword and respective > ex

Re: Function creation (what happened?)

2008-05-09 Thread Gabriel Genellina
En Fri, 09 May 2008 10:02:01 -0300, Viktor <[EMAIL PROTECTED]> escribió: > This completely slipped of my mind... :) > > I'm trying to change the: > http://wordaligned.org/svn/etc/echo/echo.py > > So if the function is method it prints ClassName.MethodName instead of > MethodName(self|klass|cls=<..

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Gary Herron
[EMAIL PROTECTED] wrote: On May 9, 10:48 am, Paul Rubin wrote: [EMAIL PROTECTED] writes: I have a dictionary of which i'm itervalues'ing through, and i'll be performing some logic on a particular iteration when a condition is met with trusty .startswith('foo')

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Hyuga
On May 9, 5:10 am, [EMAIL PROTECTED] wrote: > I have a dictionary of which i'm itervalues'ing through, and i'll be > performing some logic on a particular iteration when a condition is > met with trusty .startswith('foo'). I need to grab the previous > iteration if this condition is met. I can do

Re: Grabbing previous iteration in a dict

2008-05-09 Thread Yves Dorfsman
[EMAIL PROTECTED] wrote: You cannot rely on the elements of a dictionary being in any particular order (dicts are internally hash tables), so the above is almost certainly ont what you want. Hi - thanks for your reply. How about if I made the dict into a list (of which I have done). How woul

  1   2   >