Looking for suggestions on improving numpy code

2008-02-22 Thread David Lees
I am starting to use numpy and have written a hack for reading in a large data set that has 8 columns and millions of rows. I want to read and process a single column. I have written the very ugly hack below, but am sure there is a more efficient and pythonic way to do this. The file is too

Re: graphing/plotting with python and interface builder

2008-02-22 Thread Peter Wang
On Feb 22, 10:08 pm, Jacob Davis <[EMAIL PROTECTED]> wrote: > Hi. > > I am developing for mac and using Xcode and Interface Builder 3.0. I > can make a simple application, but I am having a hard time trying to > figure out a good way to create a graph orplotfor a class project. > > Does anybody ha

Re: global variables: to be or not to be

2008-02-22 Thread John Henry
On Feb 22, 9:20 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 22 Feb 2008 19:11:01 -0800 (PST), icarus <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > But how do I get around it? How do I update and access a variable > > anytime I want? Any easy-to-follow e

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-22 Thread 7stud
On Feb 21, 11:50 pm, est <[EMAIL PROTECTED]> wrote: > > class SmartRequest(): > You should always define a class like this: class SmartRequest(object): unless you know of a specific reason not to. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Plot always comes to focus on redraw

2008-02-22 Thread Jacob Davis
Thanks for the reply. This is something that I tried. The documentation for SetFocus() says that it is for keyboard input and that Show() is supposed to show the window. I guess I was misusing the terminology. I tried your suggestion with SetFocus(), Show() and Raise(), with no joy. I th

Re: Equivalent of system()?

2008-02-22 Thread Max
Thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Plot always comes to focus on redraw

2008-02-22 Thread Jacob Davis
Thanks for the reply. The parent is a notebook. (the Plotcanvas is a page in the notebook) I tried to make the page of the notebook a panel, and then make the PlotCanvas a child of this panel, but the Plot would not show up when drawn. I may have time to make a mini program to duplicate th

Re: Equivalent of system()?

2008-02-22 Thread Jeff Schwab
Max wrote: > Is there a Python equivalent of C++'s system()? More or less. You probably want subprocess.Popen: >>> import subprocess >>> subprocess.Popen("echo hello", shell=True) hello http://docs.python.org/lib/node533.html#CHILD_LINKS -- http://mail.python.org/mailman/listinfo/python-lis

Re: Equivalent of system()?

2008-02-22 Thread Grant Edwards
On 2008-02-23, Max <[EMAIL PROTECTED]> wrote: > Is there a Python equivalent of C++'s system()? The closest thing is probably system(). It's in the os module. -- Grant -- http://mail.python.org/mailman/listinfo/python-list

Equivalent of system()?

2008-02-22 Thread Max
Is there a Python equivalent of C++'s system()? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables: to be or not to be

2008-02-22 Thread subeen
Another way to avoid using global variables is to return more than one values from the function. Here is an example that may help you to understand it: def foo(a, b, c): a += c b += c return a, b a = 5 b = 10 c = 2 print a, b a, b = foo(a, b, c) print a, b regards, Subeen. http://l

graphing/plotting with python and interface builder

2008-02-22 Thread Jacob Davis
Hi. I am developing for mac and using Xcode and Interface Builder 3.0. I can make a simple application, but I am having a hard time trying to figure out a good way to create a graph or plot for a class project. Does anybody have any tips on where to get started, or on how to do this? I ha

Re: Return value of an assignment statement?

2008-02-22 Thread George Sakkis
On Feb 22, 1:16 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Fri, 22 Feb 2008 08:19:07 -0800, Carl Banks wrote: > > (The perl example wasn't using an assignment operator.) > > Hmmm... I see. Obviously I didn't pretend to understand Perl well enough. > > (I assume you're i

Re: global variables: to be or not to be

2008-02-22 Thread Matt Nordhoff
icarus wrote: > I've read 'global variables' are bad. The ones that are defined as > 'global' inside a function/method. > > The argument that pops up every now and then is that they are hard to > keep track of. I don't know Python well enough to argue with that. > Just started learning it a few

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread George Sakkis
On Feb 22, 2:15 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Nicola Musatti wrote: > > The real sad thing is that nobody is likely to convince Guido to turn > > CPython into C++Python ;-) > > How difficult would that be? Could it be done in stages? I would be > willing to spend some time on that

global variables: to be or not to be

2008-02-22 Thread icarus
I've read 'global variables' are bad. The ones that are defined as 'global' inside a function/method. The argument that pops up every now and then is that they are hard to keep track of. I don't know Python well enough to argue with that. Just started learning it a few days ago, so I won't get i

Re: Return value of an assignment statement?

2008-02-22 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Personally, I think the confusion of augmented assignments is not worth > the benefit of saving typing a couple of characters. I think Guido's > first decision, to leave += etc out of the language, was the right > decision. It quite helpful to be ab

Re: Why must implementing Python be hard unlike Scheme?

2008-02-22 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Certainly, "(almost) everything is an object" is a good start. Are > there any other axiom like statements one can hang their hat on when > trying to wrap their brain around Python's architecture? As John Nagle put it, the data store is a tree of

Re: Globals or objects?

2008-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2008 18:53:54 +, tinnews wrote: >> > But you're not comparing what the OP posted. He was comparing a >> > global with an object with a single variable inside it. Either would >> > work with the y = spam(arg) example above. >> >> What do you mean by "an object with a single va

Re: Return value of an assignment statement?

2008-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2008 11:00:17 -0800, Aahz wrote: > In article <[EMAIL PROTECTED]>, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: >> >>FWIW, it's IMHO a real wart - given Python's pretention at readability - >>that augmented assignement has been implemented that way for lists. > > This was deba

Re: Why must implementing Python be hard unlike Scheme?

2008-02-22 Thread Robert Brown
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > I'm learning Scheme and I am amazed how easy it is to start building a > half baked Scheme implementation that somewhat works. > > After knowing Python for *years* I have no idea how to actually > implement the darn thing. Since you know Scheme, pe

Re: Professional Grant Proposal Writing Workshop (April 2008: Vancouver, British Columbia)

2008-02-22 Thread Michael L Torrie
Anthony Jones wrote: > The Grant Institute's Grants 101: Professional Grant Proposal Writing > Workshop > will be held in Vancouver, British Columbia, April 14 - 16, 2008. Interested > development professionals, researchers, faculty, and graduate students should > register as soon as possible,

Re: Order in which modules are imported

2008-02-22 Thread Dave Hansen
On Feb 22, 5:21 pm, [EMAIL PROTECTED] wrote: > I imported two modules (random and matplotlib), and found that the > functions available to me from the random module depended on the order > in which the imports occured. In particular, if I import random first, [...] > > >>> import random > >>> from

Re: Order in which modules are imported

2008-02-22 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I imported two modules (random and matplotlib), and found that the > functions available to me from the random module depended on the order > in which the imports occured. In particular, if I import random first, > none of its functions

Re: Order in which modules are imported

2008-02-22 Thread Tim Chase
import random from pylab import * x = random.uniform(0,1) > > Traceback (most recent call last): I suspect that >>> 'random' in dir(pylab) returns True...this would be one of those reasons that "from import *" is scowled upon. You have to know what is dumping into your names

Re: Web Development Project

2008-02-22 Thread Jonathan Gardner
On Feb 21, 3:34 pm, john_sm3853 <[EMAIL PROTECTED]> wrote: > Hey guys, I am interested in knowing, what new Web Development projects you > are doing, curious to know, what data base you use, and if you are using > Linux or Windows platform. Also, will like to know, if there are any > alternatives

Re: Web Development Project

2008-02-22 Thread Berco Beute
linux lighttpd fastcgi django sqlite3 ...rocking combo :) -- http://mail.python.org/mailman/listinfo/python-list

Order in which modules are imported

2008-02-22 Thread tkpmep
I imported two modules (random and matplotlib), and found that the functions available to me from the random module depended on the order in which the imports occured. In particular, if I import random first, none of its functions seem to be available, while if I import it after matplotlib, I seem

Re: ANN: NUCULAR B3 Full text indexing (now on Win32 too)

2008-02-22 Thread Paul Rubin
Aaron Watters <[EMAIL PROTECTED]> writes: > [apologies to the list: I would have done this offline, > but I can't figure out Paul's email address.] > > 1) Paul please forward your email address Will send it privately. I don't have a public email address any more (death to spam!!!). My general p

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul Rubin
Paul McGuire <[EMAIL PROTECTED]> writes: > I'm still getting used to 'any' and 'all' as new Python built-ins - > but they'll do the short-circuiting as well as a for-loop-with-break. > But I think a set- or dict-based solution will still surpass a list- > based one for the OP. I guess I don't unde

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-22 Thread 7stud
On Feb 21, 11:50 pm, est <[EMAIL PROTECTED]> wrote: > Hi all, > > I need urllib2 do perform series of HTTP requests with cookie from > PREVIOUS request(like our browsers usually do ). > Cookies from a previous request made in the currently running program? Or cookies from requests that were made

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul McGuire
On Feb 22, 3:38 pm, Paul Rubin wrote: > Paul McGuire <[EMAIL PROTECTED]> writes: > > I think you have this backwards.  Should be: > > >      if not any(x[0]==element[0] for x in a): > >         a.append(element) > > I think you are right, it was too early for me to be rea

Re: [ANN] Python 2.5.2 released

2008-02-22 Thread Ben Finney
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > On behalf of the Python development team and the Python community, I'm > happy to announce the release of Python 2.5.2 (FINAL). Hooray! Thanks Martin, and the entire Python-dev team. -- \"The best mind-altering drug is truth." -- Jane Wa

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul Rubin
Paul McGuire <[EMAIL PROTECTED]> writes: > I think you have this backwards. Should be: > > if not any(x[0]==element[0] for x in a): > a.append(element) I think you are right, it was too early for me to be reading code when I posted that ;-) -- http://mail.python.org/mailman/listinf

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-22 Thread 7stud
On Feb 21, 11:50 pm, est <[EMAIL PROTECTED]> wrote: > Hi all, > > I need urllib2 do perform series of HTTP requests with cookie from > PREVIOUS request(like our browsers usually do ). Many people suggest I > use some library(e.g. pycURL) instead but I guess it's good practise > for a python beginne

Re: Pydev, Eclipse

2008-02-22 Thread Boris Ozegovic
Preston Landers wrote: > Shift-Tab does it for me. It can also dedent whole blocks if you have > them selected. Excellent. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Python 2.5.2 released

2008-02-22 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.5.2 (FINAL). This is the second bugfix release of Python 2.5. Python 2.5 is now in bugfix-only mode; no new features are being added. According to the release notes, over 100 bugs and p

Re: Is there any python lib for NAT transversal?

2008-02-22 Thread VanL
Jean-Paul Calderone wrote: > Divmod Vertex is such a library (it does a few other things as well), but > it is not nearly complete and has little documentation. Can you comment on the differences and similarities between Q2Q and Jingle? They appear to be targeting similar problems. Thanks, Van

Re: Pydev, Eclipse

2008-02-22 Thread Preston Landers
Boris Ozegovic([EMAIL PROTECTED])@2008.02.22 19:59:28 +0100: > Hi > > Suppose I have three blocks: > if 1: > if 2: > if 3: > # here I want my cursor go back to second block (if 2:) > > What is the standard shortcut for this? ctrl+arrow keys aren't, arrow keys > alone

Re: advanced usage of python threads

2008-02-22 Thread Chris Mellon
On Fri, Feb 22, 2008 at 12:32 PM, hyperboreean <[EMAIL PROTECTED]> wrote: > Well, I will be writing the application server of a three-tier > architecture system. I will be using Twisted for the communication with > the client but from there I have to make several calls to a database and > this a

Re: how to flush child_stdin

2008-02-22 Thread [EMAIL PROTECTED]
On Feb 22, 2:01 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 22 Feb 2008 08:35:03 -0800 (PST), "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > I don't think that is the problem, I'm feeding it newline characters. > > It wasn't shown

ILeo (IPython-Leo bridge); a marriage made in heaven?

2008-02-22 Thread Ville Vainio
Here is something cool that will rock your world (ok, excuse the slight hyperbole): Introduction The purpose of ILeo, or leo-ipython bridge, is being a two-way communication channel between Leo and IPython. The level of integration is much deeper than conventional integration in IDEs

Re: Return value of an assignment statement?

2008-02-22 Thread Jeff Schwab
George Sakkis wrote: > On Feb 22, 12:26 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >>> On the other hand, "a = b" does always the same thing; unlike C++, '=' >>> is not an operator and therefore it cannot be overriden by the class >>> of 'a'. >> "Not an operator?" Then what is it? > > In this

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Jeff Schwab
Carl Banks wrote: > On Feb 22, 12:23 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Carl Banks wrote: >>> On Feb 21, 7:17 pm, Jeff Schwab <[EMAIL PROTECTED]> wrote: Carl Banks wrote: > On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: >> There are other downsides to garbage

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Jeff Schwab
Nicola Musatti wrote: > The real sad thing is that nobody is likely to convince Guido to turn > CPython into C++Python ;-) How difficult would that be? Could it be done in stages? I would be willing to spend some time on that kind of project. Since I know almost nothing about Python internal

Re: Tkinter Menu Item Activation

2008-02-22 Thread MartinRinehart
Rob Wolfe wrote: > But I think that you should read this: > http://effbot.org/zone/vroom.htm Rob, may the gods shower you with gold coins! -- http://mail.python.org/mailman/listinfo/python-list

Re: Return value of an assignment statement?

2008-02-22 Thread Aahz
In article <[EMAIL PROTECTED]>, Jeff Schwab <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Jeff Schwab <[EMAIL PROTECTED]> wrote: >>> [EMAIL PROTECTED] wrote: There's nothing like a variable "storing" anything in Python. All you have are names to (ref

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul McGuire
On Feb 22, 12:54 pm, Paul Rubin wrote: > Paul Rubin writes: > >     if any(x==element[0] for x in a): > >       a.append(element) > > Should say: > >      if any(x[0]==element[0] for x in a): >         a.append(element) I think you have this ba

Re: Return value of an assignment statement?

2008-02-22 Thread Aahz
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >FWIW, it's IMHO a real wart - given Python's pretention at readability - >that augmented assignement has been implemented that way for lists. This was debated extensively when augmented assignment was created, and

Pydev, Eclipse

2008-02-22 Thread Boris Ozegovic
Hi Suppose I have three blocks: if 1: if 2: if 3: # here I want my cursor go back to second block (if 2:) What is the standard shortcut for this? ctrl+arrow keys aren't, arrow keys alone aren't either. -- http://mail.python.org/mailman/listinfo/python-li

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul Rubin
Paul Rubin writes: > if any(x==element[0] for x in a): > a.append(element) Should say: if any(x[0]==element[0] for x in a): a.append(element) -- http://mail.python.org/mailman/listinfo/python-list

Re: Globals or objects?

2008-02-22 Thread tinnews
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 22 Feb 2008 12:01:20 +, tinnews wrote: > > > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> >> > but you do keep having to use a longer reference to the value > >> >> >so what have you won? > >> >> > >> >> Clarity, simplicity, robustne

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul Rubin
rh0dium <[EMAIL PROTECTED]> writes: > found = False > for item in a: > if item[0] == element[0] > found = True > break > if not found: > a.append(element) > > But this is just ugly - Is there a simpler way to interate over all > items in a without using a found flag? Untested and I'm

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > >a = [f(x) + g(y) for x,y in izip(m1, m2) if h(x,y).frob() == 7] > > > > Consider how many intermediate objects are being allocated in figuring > > out that listcomp. Do you REALLY want to manage all the deallocation > > with something like RAII? >

Re: n00b with urllib2: How to make it handle cookie automatically?

2008-02-22 Thread Rob Wolfe
est <[EMAIL PROTECTED]> writes: > Hi all, > > I need urllib2 do perform series of HTTP requests with cookie from > PREVIOUS request(like our browsers usually do ). Many people suggest I > use some library(e.g. pycURL) instead but I guess it's good practise > for a python beginner to DIY something

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Paul Rubin
Nicola Musatti <[EMAIL PROTECTED]> writes: > > Partial guarantees are like being a little bit pregnant. > > Yes, and I'm sure your tests cover all possible paths through your code. That is the point of type checking. With a sound type system, "int x" makes sure, at compile time, that x stays an

Re: advanced usage of python threads

2008-02-22 Thread hyperboreean
Well, I will be writing the application server of a three-tier architecture system. I will be using Twisted for the communication with the client but from there I have to make several calls to a database and this asks threading. The tables will be filled by another system that gathers some data

bus error/segfault from PyArg_ParseTuple in initproc with incorrect arg number

2008-02-22 Thread Miles Lubin
I am using PyArg_ParseTuple to parse the arguments (ignoring the keyword arguments) to my initproc for a type I define. It seems that something goes wrong inside PyArg_ParseTuple when it gets the wrong number of arguments (my format string is "OO"); if the function isn't given exactly two argumen

Re: Return value of an assignment statement?

2008-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2008 08:19:07 -0800, Carl Banks wrote: > (The perl example wasn't using an assignment operator.) Hmmm... I see. Obviously I didn't pretend to understand Perl well enough. (I assume you're ignoring the assignments $name = chop(\1) etc. Fair enough.) [...] > I can't help but to t

Re: xml escapedness

2008-02-22 Thread Robin Becker
Steve Holden wrote: > Robin Becker wrote: >> Tim van der Leeuw wrote: >>> On Fri, Feb 22, 2008 at 5:17 PM, Robin Becker <[EMAIL PROTECTED]> wrote: >>> A colleague has decided to keep his django database string values (which are xml fragments) in an xml escaped form to avoid having th

Re: Tkinter Menu Item Activation

2008-02-22 Thread Rob Wolfe
[EMAIL PROTECTED] writes: > Tkinter definitely deserves more respect! I'm making rapid progress > and it looks good. > > But am stuck on this: I want the File/Save state to change from > disabled to enabled, depending on whether or not there is something to > save (Text modified). Google returns r

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 5:13 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 22 Feb 2008 04:48:28 -0800, Nicola Musatti wrote: [...] > > As you can see the standard library takes care of all memory > > management. > > Aaah, that's much nicer and easier to understand than the list > comprehensi

Re: Getting stdout from other processes

2008-02-22 Thread Miki
Hello Matthias, > as I found out, it is possible to get the output of other programs > using os.popen() and read from it. However this method is blocking for > server processes and programs that don't stop immediately. Has anyone > an idea how to get the output of such programs? The current "offic

Re: xml escapedness

2008-02-22 Thread Steve Holden
Robin Becker wrote: > Tim van der Leeuw wrote: >> On Fri, Feb 22, 2008 at 5:17 PM, Robin Becker <[EMAIL PROTECTED]> wrote: >> >>> A colleague has decided to keep his django database string values (which >>> are xml >>> fragments) in an xml escaped form to avoid having the problem of escaping >>> th

Re: xml escapedness

2008-02-22 Thread Robin Becker
Tim van der Leeuw wrote: > On Fri, Feb 22, 2008 at 5:17 PM, Robin Becker <[EMAIL PROTECTED]> wrote: > >> A colleague has decided to keep his django database string values (which >> are xml >> fragments) in an xml escaped form to avoid having the problem of escaping >> them >> when they are used in

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Jason
On Feb 22, 10:20 am, rh0dium <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a simple list to which I want to append another tuple if > element 0 is not found anywhere in the list. > > element = ('/smsc/chp/aztec/padlib/5VT.Cat', > '/smsc/chp/aztec/padlib', > '5VT.Cat', (33060)) > > element1 =

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul McGuire
On Feb 22, 11:20 am, rh0dium <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a simple list to which I want to append another tuple if > element 0 is not found anywhere in the list. > > element =  ('/smsc/chp/aztec/padlib/5VT.Cat', >   '/smsc/chp/aztec/padlib', >   '5VT.Cat', (33060)) > > element1 =

Re: Simple - looking for a way to do an element exists check..

2008-02-22 Thread Paul McGuire
On Feb 22, 11:20 am, rh0dium <[EMAIL PROTECTED]> wrote: > > found = False > for item in a: >   if item[0] == element[0] >     found = True >     break > if not found: >   a.append(element) > > But this is just ugly - Is there a simpler way to interate over all > items in a without using a found fla

Simple - looking for a way to do an element exists check..

2008-02-22 Thread rh0dium
Hi all, I have a simple list to which I want to append another tuple if element 0 is not found anywhere in the list. element = ('/smsc/chp/aztec/padlib/5VT.Cat', '/smsc/chp/aztec/padlib', '5VT.Cat', (33060)) element1 = ('/smsc/chp/aztec/padlib/5VT.Cat2', '/smsc/chp/aztec/padlib', '5VT.

Re: Tkinter OSX and "lift"

2008-02-22 Thread Miki
Hello Eric, > >>> Tk.lift doesn't seem to work on OSX (Python 2.5.1). > There is a trick that sometimes works even for interpreted application: > > import Tkinter as tk > root = tk.Tk() > root.withdraw() > # Code building the window... > root.lift() > root.deiconify() > root.mainloop() > > This s

Re: advanced usage of python threads

2008-02-22 Thread Christian Heimes
hyperboreean wrote: > Hi, > Is there a document where I can find some advanced information about > python threads? I know the basic things about them and did some > practice, but when I try to advance I don't know where to go or how to go. What's your application doing? Most people are not aware

Re: Any experience with Python on a PDA ?

2008-02-22 Thread Grant Edwards
On 2008-02-22, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I wonder if anyone has (good ;-) experiences with Python on a PDA ? > And if so, > - what OS > - what GUI Not a PDA per se, but a target platform very similar to a PDA: PXA-255 at 200MHz with a 1/4 VGA LCD, and something like 128M

Re: Return value of an assignment statement?

2008-02-22 Thread Steve Holden
Carl Banks wrote: > On Feb 21, 6:52 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> mrstephengross wrote: What you can't do (that I really miss) is have a tree of assign-and-test expressions: import re pat = re.compile('some pattern') if m = pat.match

Re: Querying a complex website

2008-02-22 Thread schweet1
On Feb 20, 6:06 pm, 7stud <[EMAIL PROTECTED]> wrote: > 7stud wrote: > > schweet1 wrote: > > > On Feb 19, 4:04�pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > schweet1 wrote: > > > > > Greetings, > > > > > > I am attempting to use python to submit a query to the following URL: > > > > > >https://ramps.

Re: how to flush child_stdin

2008-02-22 Thread [EMAIL PROTECTED]
On Feb 22, 12:15 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Thu, 21 Feb 2008 12:34:28 -0800 (PST), "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > I'm opening up a subprocess like this where slave.py is a text based > > app that receives c

Re: xml escapedness

2008-02-22 Thread Tim van der Leeuw
On Fri, Feb 22, 2008 at 5:17 PM, Robin Becker <[EMAIL PROTECTED]> wrote: > A colleague has decided to keep his django database string values (which > are xml > fragments) in an xml escaped form to avoid having the problem of escaping > them > when they are used in templates etc etc. > > Unfortunat

Re: Return value of an assignment statement?

2008-02-22 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > On Fri, 22 Feb 2008 12:32:10 +, Steven D'Aprano wrote: > >> On Fri, 22 Feb 2008 08:12:56 +, Marc 'BlackJack' Rintsch wrote: >> >>> A "variable" in programming languages is composed of a name, a memory >>> location, possibly a type and a value. In C-like la

Re: Return value of an assignment statement?

2008-02-22 Thread Carl Banks
On Feb 22, 9:58 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Fri, 22 Feb 2008 00:45:59 -0800, Carl Banks wrote: > > On Feb 21, 6:52 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > >> mrstephengross wrote: > >> >> What you can't do (that I really miss) is have a tree of > >>

xml escapedness

2008-02-22 Thread Robin Becker
A colleague has decided to keep his django database string values (which are xml fragments) in an xml escaped form to avoid having the problem of escaping them when they are used in templates etc etc. Unfortunately he found that the normal admin doesn't escape on the way through so thought of

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Marc 'BlackJack' Rintsch
On Fri, 22 Feb 2008 04:48:28 -0800, Nicola Musatti wrote: > On Feb 22, 12:07 pm, Paul Rubin wrote: >> Nicola Musatti <[EMAIL PROTECTED]> writes: >> > In C++ memory is just another resource which you can handle just like >> > any other one, possibly using RAII. >> >> Ok,

advanced usage of python threads

2008-02-22 Thread hyperboreean
Hi, Is there a document where I can find some advanced information about python threads? I know the basic things about them and did some practice, but when I try to advance I don't know where to go or how to go. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-22 Thread Preston Landers
On Feb 21, 8:58 pm, zaley <[EMAIL PROTECTED]> wrote: > Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > +)? Eclipse is a good open source IDE for many languages including C/C++ and Python. It includes an interactive debugger. I believe most of it is written in Java, but I'

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Chris Mellon
On Fri, Feb 22, 2008 at 4:56 AM, Nicola Musatti <[EMAIL PROTECTED]> wrote: > On Feb 22, 12:24 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > On Feb 21, 1:22 pm, Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > > > There are other downsides to garbage collection, as the fact that it > > > makes it

Re: Return value of an assignment statement?

2008-02-22 Thread Marc 'BlackJack' Rintsch
On Fri, 22 Feb 2008 12:32:10 +, Steven D'Aprano wrote: > On Fri, 22 Feb 2008 08:12:56 +, Marc 'BlackJack' Rintsch wrote: > >> A "variable" in programming languages is composed of a name, a memory >> location, possibly a type and a value. In C-like languages, where you >> put values in nam

Re: Getting stdout from other processes

2008-02-22 Thread Diez B. Roggisch
Matthias Vogelgesang schrieb: > Hello, > as I found out, it is possible to get the output of other programs > using os.popen() and read from it. However this method is blocking for > server processes and programs that don't stop immediately. Has anyone > an idea how to get the output of such progra

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Nicola Musatti
On Feb 22, 3:25 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > Nicola Musatti <[EMAIL PROTECTED]> wrote: > > > Yet I'm convinced that even such partial guarantee is worth having. > > Partial guarantees are like being a little bit pregnant. Yes, and I'm sure your te

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of Carl Banks > > Sent: Wednesday, February 20, 2008 8:39 PM > > To: python-list@python.org > > Subject: Re: A

Re: ANN: NUCULAR B3 Full text indexing (now on Win32 too)

2008-02-22 Thread Aaron Watters
[apologies to the list: I would have done this offline, but I can't figure out Paul's email address.] 1) Paul please forward your email address 3) Since you seem to know about these things: I was thinking of adding an optional feature to Nucular which would allow a look-up like "given a word find

Re: Getting python docstings

2008-02-22 Thread Marc 'BlackJack' Rintsch
On Fri, 22 Feb 2008 03:53:27 -0800, Rufman wrote: > On Feb 22, 10:36 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> Rufman wrote: >> > Does anyone know how to get docstrings (reStructuredText) out of >> > python source code using docutils? >> >> Depends on what you mean with "get ... out of". The

Re: Acting like button are being pressed (BUT THEY ARE NOT) Please Help

2008-02-22 Thread Marc 'BlackJack' Rintsch
On Fri, 22 Feb 2008 06:48:37 -0800, mcsejung wrote: > [snipped massive bit of code] Sorry but dumping about 900 lines of code at people with no real question in the message body and just sort of a question in the subject won't help much to get answers. Just a quick look at the code tells that it

Re: Globals or objects?

2008-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2008 12:01:20 +, tinnews wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> >> > but you do keep having to use a longer reference to the value >> >> >so what have you won? >> >> >> >> Clarity, simplicity, robustness >> > >> > Clarity - why is it clearer? >> >> Conside

Re: Acting like button are being pressed (BUT THEY ARE NOT) Please Help

2008-02-22 Thread Martin Franklin
> self.entry00.bind('', self.leftClick(self.entry00, > 0, 0)) # bind left mouse click Difficult to say for sure due to excessive code wrapping.. ;) but I would say that these bind methods are calling the left and right Click methods... rather than bind'ing them to the entry widgets. the

Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?

2008-02-22 Thread Jesper
Give PyScripter from http://www.mmm-experts.com/ a try It is for Windows, though it is written in Delphi and not in C/C++ /Jesper "zaley" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] Of course, python scripts debugger On 2ÔÂ22ÈÕ, ÏÂÎç3ʱ22·Ö, zaley <[EMAIL PROTECTED]> wrote

Re: Return value of an assignment statement?

2008-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2008 00:45:59 -0800, Carl Banks wrote: > On Feb 21, 6:52 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> mrstephengross wrote: >> >> What you can't do (that I really miss) is have a tree of >> >> assign-and-test expressions: >> >> import re >> >> pat = re.compile('som

Acting like button are being pressed (BUT THEY ARE NOT) Please Help

2008-02-22 Thread mcsejung
""" - Name:_tkUnderWaterDemolitionRemoval.py Purpose: The classic Under Water Demolition Removal game Author: mcsejung Created: 2008/02/15 RCS-ID: $Id: _tkUnderWaterDemolitionRemoval.py $ Copyrig

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-22 Thread Mike Driscoll
On Feb 22, 2:39 am, "SPE - Stani's Python Editor" <[EMAIL PROTECTED]> wrote: > On Feb 22, 1:41 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > On Feb 20, 4:19 am, Stani <[EMAIL PROTECTED]> wrote: > > > Even without python-pyexiv2 Phatch features read-only EXIF support thanks > > > to > > > PIL.

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Nicola Musatti <[EMAIL PROTECTED]> wrote: > Yet I'm convinced that even such partial guarantee is worth having. Partial guarantees are like being a little bit pregnant. -- http://mail.python.org/mailman/listinfo/python-list

Getting stdout from other processes

2008-02-22 Thread Matthias Vogelgesang
Hello, as I found out, it is possible to get the output of other programs using os.popen() and read from it. However this method is blocking for server processes and programs that don't stop immediately. Has anyone an idea how to get the output of such programs? -- http://mail.python.org/mailman/l

Re: Article of interest: Python pros/cons for the enterprise

2008-02-22 Thread Bruno Desthuilliers
Nicola Musatti a écrit : > On Feb 22, 9:03 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> Nicola Musatti a écrit : > [...] >>> So, yes, your big company is >>> likely to be safer with newbie C++ programmers than with Python newbie >>> programmers. >> Sorry but I don't buy your arguments. >

Re: Globals or objects?

2008-02-22 Thread Steven D'Aprano
On Fri, 22 Feb 2008 03:16:12 -0800, MartinRinehart wrote: > D'Aprano's discussion is persuasive but only in the case where you do > not want multiple actors updating a single value. In my case multiple > actors have legitimate interest in updating the value. (Actors within a > single thread, fortu

  1   2   >