Re: py3k concerns. An example

2008-05-13 Thread Hrvoje Niksic
Paul McGuire <[EMAIL PROTECTED]> writes: > I see that there is some movement to "get rid of bound methods," but > I don't fully understand how this will be done, nor how I will > adjust my code to compensate. Isn't it supposed to get rid of *un*bound methods? That is, Class.method will simply re

Re: how to get information of a running prog in python

2008-05-13 Thread Jimmy
On May 13, 11:18 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On Mon, 12 May 2008 19:19:05 -0700, Jimmy wrote: > > Well, i know it may be a little non-python thing, however, I can think > > of no place better to post this question :) > > > can anyone tell me, in python, how to obtain some infor

Re: Is using range() in for loops really Pythonic?

2008-05-13 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | The reason I even brought this up is because I remember someone saying a | while back (probably here on the newsgroup) that the true use of a for | loop was to iterate through a sequence (for the purpose of using that |

RE: question about python statements

2008-05-13 Thread Ohad Frand
Hi Gary Sorry that I was not clear, I hope that this time I will explain myself better. I can get list of all builtin functions in python by dir(__builtins__). This return a list of string with most known names to python language such as: [... 'issubclass', 'iter', 'len', 'license', 'list', 'loc

Re: passing *args "recursively"

2008-05-13 Thread Mikael Olofsson
Guillermo wrote: This must be very basic, but how'd you pass the same *args several levels deep? def func2(*args) print args # ((1, 2, 3),) # i want this to output (1, 2, 3) as func1! # there must be some better way than args[0]? def func1(*args): print args # (1, 2, 3) func

Re: anonymous assignment

2008-05-13 Thread Terry Reedy
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | "Terry Reedy" <[EMAIL PROTECTED]> writes: | | > "Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message | > news:[EMAIL PROTECTED] | > | > here is a very sophisticated implementation :) | > | def extract(indice

Re: passing *args "recursively"

2008-05-13 Thread Mikael Olofsson
Guillermo wrote: This must be very basic, but how'd you pass the same *args several levels deep? def func2(*args) print args # ((1, 2, 3),) # i want this to output (1, 2, 3) as func1! # there must be some better way than args[0]? def func1(*args): print args # (1, 2, 3) func

Re: anonymous assignment

2008-05-13 Thread Marc 'BlackJack' Rintsch
On Tue, 13 May 2008 03:25:51 +, Yves Dorfsman wrote: > Marc 'BlackJack' Rintsch wrote: y, _, d, _, _, _, _, _, _ = time.localtime() >>> But you still have have a variable that's using memory for nothing. I >>> find this unsatisfactory... >> >> Get over it… > > Than what's the point o

Re: Is using range() in for loops really Pythonic?

2008-05-13 Thread Marc 'BlackJack' Rintsch
On Mon, 12 May 2008 11:23:07 -0700, Carl Banks wrote: > On May 12, 3:42 am, Ben Finney <[EMAIL PROTECTED]> > wrote: >> Because of the precedent of those names, choosing one of those names >> doesn't make it clear to the reader that the value is never used; > > > Why is it even necessary to docum

Re: anonymous assignment

2008-05-13 Thread Bruno Desthuilliers
Yves Dorfsman a écrit : Marc 'BlackJack' Rintsch wrote: y, _, d, _, _, _, _, _, _ = time.localtime() But you still have have a variable that's using memory for nothing. I'm afraid you just don't understand what Python's "variable" are. You're really worrying about a non-issue here. Seriou

Re: question about python statements

2008-05-13 Thread Gary Herron
Ohad Frand wrote: Hi Gary Sorry that I was not clear, I hope that this time I will explain myself better. I can get list of all builtin functions in python by dir(__builtins__). This return a list of string with most known names to python language such as: [... 'issubclass', 'iter', 'len', 'li

RE: question about python statements

2008-05-13 Thread Ohad Frand
Hi Thanks a lot for your reply I think the main uses for it is to study the language and to see that I didn't miss anything else or that something is changed from one version to another. The keyword module will help me Thanks again Ohad Frand -Original Message- From: Gary Herron [mailto

Re: anonymous assignment

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 00:21:06 -0300, Yves Dorfsman <[EMAIL PROTECTED]> escribió: Ben Finney wrote: y, _, d, _, _, _, _, _, _ = time.localtime() But you still have have a variable that's using memory for nothing. No, you have one extra unused name binding. The values that you don't want

Re: how to get information of a running prog in python

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 01:22:52 -0300, Ivan Illarionov <[EMAIL PROTECTED]> escribió: On Mon, 12 May 2008 20:29:46 -0700, George Sakkis wrote: > On Mon, May 12, 2008 at 10:19 PM, Jimmy <[EMAIL PROTECTED]> > wrote: > >  can anyone tell me, in python, how to obtain some information of > >  a running

ANN: pyspread 0.0.5

2008-05-13 Thread Martin Manns
pyspread 0.0.5 has been released. -- New features are: + X, Y, Z for relative cell relations are now pre-processed (easier to use) + Cells can be given a name with =. These names are located in the global namespace + Arrays and matrices within one cell can now easily be spread out to a cell range

ANN: Pyrex 0.9.7.1

2008-05-13 Thread greg
Pyrex 0.9.7.1 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ This version fixes a bug in the new integer indexing optimisation which causes indexing of a non-sequence type with a C int to fail with a TypeError. What is Pyrex? -- Pyrex is a language fo

Re: Sparse Matrix Multiplications

2008-05-13 Thread Peter Otten
Peter Otten wrote: > # use at your own risk > import numpy > > N = 10**4 # I get a MemoryError for a bigger exponent > b = numpy.array(range(N)) > a = numpy.zeros((N, N)) + b > a *= a.transpose() > a[0,0] = (b*b).sum() > print a Sorry, this is nonsense. -- http://mail.python.org/mailman/listin

Re: Python and Flaming Thunder

2008-05-13 Thread Diez B. Roggisch
Dave Parker wrote: > On May 12, 7:20 pm, [EMAIL PROTECTED] wrote: >>Yes, I am trying to visualize something. > > If it is related to making furniture comfortable for humans, have you > considered painting the furniture with thermochromic paint ( > http://en.wikipedia.org/wiki/Thermochromism )? I

Re: Sparse Matrix Multiplications

2008-05-13 Thread Peter Otten
Peter Otten wrote: > Peter Otten wrote: > >> # use at your own risk >> import numpy >> >> N = 10**4 # I get a MemoryError for a bigger exponent >> b = numpy.array(range(N)) >> a = numpy.zeros((N, N)) + b >> a *= a.transpose() >> a[0,0] = (b*b).sum() >> print a > > Sorry, this is nonsense. Mayb

Re: Sparse Matrix Multiplications

2008-05-13 Thread Peter Otten
[EMAIL PROTECTED] wrote: > I was trying to create a sparse matrix using scipy.sparse (10 X > 10) with just the first row and first column filled with ones. > Lets call this matrix Asp. This is how I created Asp > > from scipy import sparse > Asp = scipy.lil_matrix(10,10) > for i i

Some comparison operators gone in Python 3.0?

2008-05-13 Thread wxPythoner
Is that true that this comparison operators are gone in Python 3.0: <(is less than) >(is greater than) <= (is less than or equals) >= (is greater than or equals) Is it true? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 4:18 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Dave Parker wrote: > > On May 12, 7:20 pm, [EMAIL PROTECTED] wrote: > >>Yes, I am trying to visualize something. > > > If it is related to making furniture comfortable for humans, have you > > considered painting the furniture with

Re: passing *args "recursively"

2008-05-13 Thread Gary Duzan
In article <[EMAIL PROTECTED]>, Guillermo <[EMAIL PROTECTED]> wrote: > >Hi, > >This must be very basic, but how'd you pass the same *args several >levels deep? > > >def func2(*args) > >print args # ((1, 2, 3),) ># i want this to output (1, 2, 3) as func1! ># there must be some better w

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

2008-05-13 Thread Pete Forman
I would suggest that using an interface at compile time is not the only approach. Unit tests can be run on classes to check that they do indeed quack. -- Pete Forman-./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent [

Re: Some comparison operators gone in Python 3.0?

2008-05-13 Thread Marco Mariani
[EMAIL PROTECTED] wrote: Is that true that this comparison operators are gone in Python 3.0: <(is less than) (is greater than) <= (is less than or equals) = (is greater than or equals) Is it true? Nope. -- http://mail.python.org/mailman/listinfo/python-list

threads problem in python

2008-05-13 Thread Astan Chee
Hi, I have 2 classes in python, the first one runs first and and then the first one calls the second class. I want it to run the second class as a separate thread but I want the first one to wait until the second class is dead. Im having problem in both killing the second class when its done an

where to get McMillan Installer?

2008-05-13 Thread gsal
There does not seem to be a valid url for the Installer, anywhere. Could anyone provide me with a copy of it? many thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get information of a running prog in python

2008-05-13 Thread Jimmy
On May 13, 4:41 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 01:22:52 -0300, Ivan Illarionov > <[EMAIL PROTECTED]> escribió: > > > > > On Mon, 12 May 2008 20:29:46 -0700, George Sakkis wrote: > >>> > On Mon, May 12, 2008 at 10:19 PM, Jimmy <[EMAIL PROTECTED]> > >>> > wro

Running compiled windows service python script

2008-05-13 Thread Aspersieman
Hi All I have a windows service (attached file). I basically just calls another script every 60 seconds. I can install, start and stop this service as expected with: ParseMailboxService.py install | start | stop The problem is: if I create an exe of this script (all required modules are i

Re: array in class

2008-05-13 Thread Diez B. Roggisch
alefajnie wrote: > class A: >this_is_original_variable_only_for_one_inctance = 0 > >def __init__(self, v): >self.this_is_original_variable_only_for_one_inctance = v > > > class B: > this_is_common_for_all_instances = [] > > def __init__(self, v): > self.this_is_common_for_a

Re: array in class

2008-05-13 Thread Marco Mariani
alefajnie wrote: class B: this_is_common_for_all_instances = [] def __init__(self, v): self.this_is_common_for_all_instances.append(v) now I can create some instances of B, but all of them have the same array, why Because you didn't reassign the attribute 'this_is_

array in class

2008-05-13 Thread alefajnie
class A: this_is_original_variable_only_for_one_inctance = 0 def __init__(self, v): self.this_is_original_variable_only_for_one_inctance = v class B: this_is_common_for_all_instances = [] def __init__(self, v): self.this_is_common_for_all_instances.append(v)

The 'is' identity operator checking immutable values caution

2008-05-13 Thread wxPythoner
We have to avoid the use of the 'is' identity operator with basic, immutable values such as numbers and strings. The result is unpredictable because of the way Python handles these objects internally. How is with this issue in Python 3.0? Is it fixed? Does Python handle this things properly now? -

Re: Some comparison operators gone in Python 3.0?

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 06:34:03 -0300, <[EMAIL PROTECTED]> escribió: Is that true that this comparison operators are gone in Python 3.0: <(is less than) (is greater than) <= (is less than or equals) = (is greater than or equals) Is it true? May I ask *where* did you read that crazy i

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread Marco Mariani
[EMAIL PROTECTED] wrote: We have to avoid the use of the 'is' identity operator with basic, immutable values such as numbers and strings. I'm glad for you. Did you really write checks like "if foo is 27" ? The point is, you have to learn technologies to use them. It's not like technologies l

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 5:28 am, [EMAIL PROTECTED] wrote: > Hi - I have a list returned from popen/readlines, and am wondering how > to go about iterating over each item which was returned (rather than > currently having the whole lot returned). > > so far: > > >>> f=os.open("./get_hostnames").readlines > > ret

Re: Best way to delimit a list?

2008-05-13 Thread dannywebster
On May 13, 11:28 am, [EMAIL PROTECTED] wrote: > Hi - I have a list returned from popen/readlines, and am wondering how > to go about iterating over each item which was returned (rather than > currently having the whole lot returned). > > so far: > > >>> f=os.open("./get_hostnames").readlines > > re

Re: where to get McMillan Installer?

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 07:06:09 -0300, gsal <[EMAIL PROTECTED]> escribió: There does not seem to be a valid url for the Installer, anywhere. Could anyone provide me with a copy of it? I think py2exe is its successor: http://www.py2exe.org/ -- Gabriel Genellina -- http://mail.python.org/mailman/

Best way to delimit a list?

2008-05-13 Thread dannywebster
Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned). so far: >>> f=os.open("./get_hostnames").readlines returns ['host1 host2 host3 ... hostN\n]' i'd like to be in a

Re: Backslash frowned upon?

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 07:25:06 -0300, <[EMAIL PROTECTED]> escribió: Why is the \ backslash character frowned upon? Can I still use it in Python 3.0 to achieve the same thing it was designed to do? Uh... where do you get your (mis)information about 3.0? See http://docs.python.org/dev/3.0/whatsn

Backslash frowned upon?

2008-05-13 Thread wxPythoner
Why is the \ backslash character frowned upon? Can I still use it in Python 3.0 to achieve the same thing it was designed to do? -- http://mail.python.org/mailman/listinfo/python-list

Re: anonymous assignment

2008-05-13 Thread Mark Wooding
Ben Finney <[EMAIL PROTECTED]> wrote: > Paul Rubin writes: >> You can just use a variable name than you ignore. It's traditional >> to use _ but it's not a special keyword, it's just a another >> variable name: >> >>y, _, d, _, _, _, _, _, _ = time.localtime() > > It

Re: threads problem in python

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 06:42:13 -0300, Astan Chee <[EMAIL PROTECTED]> escribió: I have 2 classes in python, the first one runs first and and then the first one calls the second class. I want it to run the second class as a separate thread but I want the first one to wait until the second class

feedparser

2008-05-13 Thread Mike
Hello, I'm trying to use the feedparser module (http://www.feedparser.org/). Is it possible to use this without running the setup program? I don't see why not, seems like I'm missing something obvious. My directory structure is: myprogram.py /feedparser /feedparser.py I know I can

Re: Is there no single/uniform RDBMS access API module for Python ?

2008-05-13 Thread M.-A. Lemburg
On 2008-05-12 07:43, Banibrata Dutta wrote: Hi, Again a noob question. Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is it correct to conclude that there is no RDBMS agnostic, single/uniform DB access API for Python ? Something in the lines of JDBC for Java, DBD for Perl et

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread Christian Heimes
[EMAIL PROTECTED] schrieb: > We have to avoid the use of the 'is' identity operator with basic, > immutable values such as numbers and strings. The result is > unpredictable because of the way Python handles these objects > internally. You are confusing immutable objects with singletons. Never use

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread castironpi
On May 13, 5:10 am, [EMAIL PROTECTED] wrote: > We have to avoid the use of the 'is' identity operator with basic, > immutable values such as numbers and strings. The result is > unpredictable because of the way Python handles these objects > internally. > > How is with this issue in Python 3.0? Is

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 4:52 am, [EMAIL PROTECTED] wrote: > On May 13, 4:18 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > > > > Dave Parker wrote: > > > On May 12, 7:20 pm, [EMAIL PROTECTED] wrote: > > >>Yes, I am trying to visualize something. > > > > If it is related to making furniture comfortabl

Re: Best way to delimit a list?

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 07:28:03 -0300, <[EMAIL PROTECTED]> escribió: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned). so far: f=os.open("./get_hostnames").readline

Re: Some comparison operators gone in Python 3.0?

2008-05-13 Thread George Sakkis
On May 13, 6:18 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 06:34:03 -0300, <[EMAIL PROTECTED]> escribió: > > > Is that true that this comparison operators are gone in Python 3.0: > > > <    (is less than) > >>    (is greater than) > > <= (is less than or equals) > >> =

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 5:46 am, [EMAIL PROTECTED] wrote: > On May 13, 11:28 am, [EMAIL PROTECTED] wrote: > > > > > > > Hi - I have a list returned from popen/readlines, and am wondering how > > to go about iterating over each item which was returned (rather than > > currently having the whole lot returned). >

Re: The 'is' identity operator checking immutable values caution

2008-05-13 Thread castironpi
On May 13, 5:37 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > We have to avoid the use of the 'is' identity operator with basic, > > immutable values such as numbers and strings. The result is > > unpredictable because of the way Python handles these objects > >

Re: feedparser

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 07:30:44 -0300, Mike <[EMAIL PROTECTED]> escribió: I'm trying to use the feedparser module (http://www.feedparser.org/). Is it possible to use this without running the setup program? I don't see why not, seems like I'm missing something obvious. My directory structure is:

Re: Some comparison operators gone in Python 3.0?

2008-05-13 Thread alex23
On May 13, 8:18 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > May I ask *where* did you read that crazy idea? Grant Edwards outlines his past behaviour here: http://groups.google.com/group/comp.lang.python/msg/27553bd56827dc0f Given that all nine of his postings have inflammatory topics, h

Re: Best way to delimit a list?

2008-05-13 Thread dannywebster
On May 13, 11:51 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > You meant readlines(), I presume. A file acts as its own iterator: > > f=os.open("./get_hostnames") > try: >for line in f: > # do something with line > finally: >f.close() > > -- > Gabriel Genellina Hi - thank you

Re: Backslash frowned upon?

2008-05-13 Thread Paul Melis
[EMAIL PROTECTED] wrote: Why is the \ backslash character frowned upon? Can I still use it in Python 3.0 to achieve the same thing it was designed to do? Yes, it's still valid to use in a script. See http://docs.python.org/dev/3.0/whatsnew/3.0.html for the big changes coming with 3.0 Paul

Re: feedparser

2008-05-13 Thread castironpi
On May 13, 6:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 07:30:44 -0300, Mike <[EMAIL PROTECTED]> escribió: > > > > > > > I'm trying to use the feedparser module (http://www.feedparser.org/). > > > Is it possible to use this without running the setup program? > > > I

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 6:18 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 07:46:45 -0300, <[EMAIL PROTECTED]> escribió: > > > On May 13, 11:28 am, [EMAIL PROTECTED] wrote: > >> Hi - I have a list returned from popen/readlines, and am wondering how > >> to go about iterating over each

Re: Best way to delimit a list?

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 07:46:45 -0300, <[EMAIL PROTECTED]> escribió: On May 13, 11:28 am, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned).

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 6:18 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 07:46:45 -0300, <[EMAIL PROTECTED]> escribió: > > > On May 13, 11:28 am, [EMAIL PROTECTED] wrote: > >> Hi - I have a list returned from popen/readlines, and am wondering how > >> to go about iterating over each

Re: Some comparison operators gone in Python 3.0?

2008-05-13 Thread Gabriel Genellina
En Tue, 13 May 2008 08:13:01 -0300, alex23 <[EMAIL PROTECTED]> escribió: On May 13, 8:18 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: May I ask *where* did you read that crazy idea? Grant Edwards outlines his past behaviour here: http://groups.google.com/group/comp.lang.python/msg/2755

Re: using PIL for good screenshots

2008-05-13 Thread Tim Arnold
On May 12, 8:11 pm, [EMAIL PROTECTED] wrote: > Tim, > > Sounds like an interesting project. > > Have you considered using SnagIt to produce your > screenshots?www.TechSmith.com/SnagIt > > Malcolm Thanks for the interest on this, but I don't control what the writers use to get the screenshot. They

Re: Backslash frowned upon?

2008-05-13 Thread castironpi
On May 13, 5:54 am, Paul Melis <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Why is the  \  backslash character frowned upon? Can I still use it in > > Python 3.0 to achieve the same thing it was designed to do? > > Yes, it's still valid to use in a script. > > Seehttp://docs.python.org

Re: where to get McMillan Installer?

2008-05-13 Thread castironpi
On May 13, 5:47 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 07:06:09 -0300, gsal <[EMAIL PROTECTED]> escribió: > > > There does not seem to be a valid url for the Installer, anywhere. > > Could anyone provide me with a copy of it? > > I think py2exe is its successor:htt

Re: Backslash frowned upon?

2008-05-13 Thread Marc 'BlackJack' Rintsch
On Tue, 13 May 2008 03:25:06 -0700, wxPythoner wrote: > Why is the \ backslash character frowned upon? Is it frowned upon? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to delimit a list?

2008-05-13 Thread Wolfgang Grafen
[EMAIL PROTECTED] schrieb: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned). so far: f=os.open("./get_hostnames").readlines returns ['host1 host2 host3 ... host

asynchat sends data on async_chat.push and .push_with_producer

2008-05-13 Thread [EMAIL PROTECTED]
Hello, My question concerns asynchat in particular. With the following half- pseudo code in mind: class Example(asynchat.async_chat): def readable(self): if foo: self.push_with_producer(ProducerA()) return asynchat.async_chat.readable(self) Now

Re: Backslash frowned upon?

2008-05-13 Thread J. Clifford Dyer
On Tue, 2008-05-13 at 03:25 -0700, [EMAIL PROTECTED] wrote: > Why is the \ backslash character frowned upon? Can I still use it in > Python 3.0 to achieve the same thing it was designed to do? > -- > http://mail.python.org/mailman/listinfo/python-list > Many people think it looks ugly, but it s

Re: Some comparison operators gone in Python 3.0?

2008-05-13 Thread Marco Mariani
alex23 wrote: Given that all nine of his postings have inflammatory topics, he's beginning to sound like a troll. Thank you, I couldn't decide if he was silly or nasty. Now I know he's both. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to delimit a list?

2008-05-13 Thread J. Clifford Dyer
On Tue, 2008-05-13 at 03:28 -0700, [EMAIL PROTECTED] wrote: > Hi - I have a list returned from popen/readlines, and am wondering how > to go about iterating over each item which was returned (rather than > currently having the whole lot returned). > > so far: > > >>> f=os.open("./get_hostnames").

Re: Need to install Python in windows 32 bit processor

2008-05-13 Thread Aspersieman
[EMAIL PROTECTED] wrote: Hi people,  I am working with windows32 bit processor machine.   I want to install Python in my machine. I am not able to get the preferable installer  for installing python. Can you tell, Which windows installer is preferable for windows32 bit proc

Re: downloading a link with javascript in it..

2008-05-13 Thread Larry Bates
Jetus wrote: I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the "view" link. I don't know how to automate this next part of my script. It seems like it uses Javascript. The line in the page source says hr

Need to install Python in windows 32 bit processor

2008-05-13 Thread VarunKumar.Rajendran
Hi people, I am working with windows32 bit processor machine. I want to install Python in my machine. I am not able to get the preferable installer for installing python. Can you tell, Which windows installer is preferable for windows32 bit processor? ? Thanks and Regards, VarunKumar R

wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Iain King
Hi. I have a modal dialog whcih has a "Browse..." button which pops up a file selector. This all works fine, but the first thing the user has to do when they open the dialog is select a file, so I would like the dialog to automatically call the onBrowse function as soon as the dialog opens. Howe

I'm stuck in Python!

2008-05-13 Thread castironpi
Hi all. I am trying to write to the Python newsgroup. I doubt (aha, but doubt) that I have come to the right place. (Incoming "this"!) Is this the Python newsgroup? I heard it was called comp.lang.python. Now to repeat the subject line. I'm stuck in Python. Now that was fun. I will also try

Re: Is using range() in for loops really Pythonic?

2008-05-13 Thread Dave Parker
> REXX's loop construct subsumes all the common uses... And worse, it > appears that a repetition and a condition can be part of the single > statement. Thank you for pointing out the REXX examples. I am a Kedit user, but had forgotten about the REXX do-loops. I'll keep them in mind when

Re: Best way to delimit a list?

2008-05-13 Thread Giuseppe Ottaviano
On May 13, 2008, at 12:28 PM, [EMAIL PROTECTED] wrote: Hi - I have a list returned from popen/readlines, and am wondering how to go about iterating over each item which was returned (rather than currently having the whole lot returned). so far: f=os.open("./get_hostnames").readlines return

Re: wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Larry Bates
Iain King wrote: Hi. I have a modal dialog whcih has a "Browse..." button which pops up a file selector. This all works fine, but the first thing the user has to do when they open the dialog is select a file, so I would like the dialog to automatically call the onBrowse function as soon as the

Re: where to get McMillan Installer?

2008-05-13 Thread gsal
hhhmmm...py2exe...I tried it earlier and it couldn't handle some of the packages I was using because they were in the "egg" form. I was hoping Installer could...then again, I don't know how long ago Installer was written and whether eggs came along after that... Regarding the word 'copy'...will

Re: Running compiled windows service python script

2008-05-13 Thread Mike Driscoll
On May 13, 5:15 am, Aspersieman <[EMAIL PROTECTED]> wrote: > Hi All > > I have a windows service (attached file). I basically just calls another > script every 60 seconds. I can install, start and stop this service as > expected with: >     ParseMailboxService.py install | start | stop > > The prob

Re: Python and Flaming Thunder

2008-05-13 Thread Dave Parker
On May 12, 11:52 pm, [EMAIL PROTECTED] wrote: > I do hold an argument that one can make too much money for one's own > good quality of life. As do I; I think there is an optimal amount. Too little, and you waste time gathering food. Too much, and you waste time gathering money. > Am I trying to

Re: threads problem in python

2008-05-13 Thread castironpi
On May 13, 5:38 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 13 May 2008 06:42:13 -0300, Astan Chee <[EMAIL PROTECTED]> escribió: > > > I have 2 classes in python, the first one runs first and and then the   > > first one calls the second class. I want it to run the second class as

Re: Python and Flaming Thunder

2008-05-13 Thread Dave Parker
> Don't let yourself be irritated by castironpi I'm not the sort to get irritated by anyone. There is value in all interaction. Flaming Thunder is itself the averaging of interactions with many computer languages and conversations with many people, so as to create a language that allows people t

Re: Best way to delimit a list?

2008-05-13 Thread Peter Otten
Giuseppe Ottaviano wrote: > def ichain(seq): > for s in seq: > for x in s: yield x > > (which is often useful and I don't think it has been included in   > itertools) you can iterate lazily on the file: Python 2.6 includes itertools.chain.from_iterable() with that functio

Re: module global variables

2008-05-13 Thread pistacchio
On 12 Mag, 11:11, pistacchio <[EMAIL PROTECTED]> wrote: > On 12 Mag, 10:47, Marco Mariani <[EMAIL PROTECTED]> wrote: > > >pistacchiowrote: > > > On 12 Mag, 10:01, alex23 <[EMAIL PROTECTED]> wrote: > > >> On May 12, 5:17 pm,pistacchio<[EMAIL PROTECTED]> wrote: > > > >>> hi to all! > > >>> can i load

Re: wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Iain King
On May 13, 2:20 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > Iain King wrote: > > Hi. I have a modal dialog whcih has a "Browse..." button which pops > > up a file selector. This all works fine, but the first thing the user > > has to do when they open the dialog is select a file, so I would like

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 8:32 am, Dave Parker <[EMAIL PROTECTED]> wrote: > > Don't let yourself be irritated by castironpi > > I'm not the sort to get irritated by anyone.  There is value in all > interaction.  Flaming Thunder is itself the averaging of interactions > with many computer languages and conversatio

Re: I'm stuck in Python!

2008-05-13 Thread Sanoski
Any programming that helps you solve a problem is fun and recreational. At least, that's how I look at it. I suppose it really depends on why you're doing it, what your objective is, etc. But I'd say, why not? Tron! That's one I haven't seen in awhile. I'll have to take a mental note to rent the m

Re: Is using range() in for loops really Pythonic?

2008-05-13 Thread Larry Bates
John Salerno wrote: I know it's popular and very handy, but I'm curious if there are purists out there who think that using something like: for x in range(10): #do something 10 times is unPythonic. The reason I ask is because the structure of the for loop seems to be for iterating through a

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 8:17 am, Giuseppe Ottaviano <[EMAIL PROTECTED]> wrote: > On May 13, 2008, at 12:28 PM, [EMAIL PROTECTED] wrote: > > > > > > > Hi - I have a list returned from popen/readlines, and am wondering how > > to go about iterating over each item which was returned (rather than > > currently havi

Re: Python and Flaming Thunder

2008-05-13 Thread Paul McGuire
On May 13, 8:32 am, Dave Parker <[EMAIL PROTECTED]> wrote: > > Don't let yourself be irritated by castironpi > > I'm not the sort to get irritated by anyone.  There is value in all > interaction. Not this interaction, I'm afraid. What irritates *me* about castironpi is that he uses a chatterbot t

Re: I'm stuck in Python!

2008-05-13 Thread castironpi
On May 13, 8:46 am, Sanoski <[EMAIL PROTECTED]> wrote: > Any programming that helps you solve a problem is fun and > recreational. At least, that's how I look at it. I suppose it really > depends on why you're doing it, what your objective is, etc. But I'd > say, why not? > > Tron! That's one I hav

Re: Python and Flaming Thunder

2008-05-13 Thread Dave Parker
On May 13, 7:44 am, [EMAIL PROTECTED] wrote: > I am not convinced that the colorspace occupies three dimensions necessarily. Apparently there are some people -- called tetrachromats -- who can see color in four dimensions. They have extra sets of cones in their retinas containing a different phot

Re: wxpython dialog - do something after ShowModal()?

2008-05-13 Thread Iain King
On May 13, 2:43 pm, Iain King <[EMAIL PROTECTED]> wrote: > On May 13, 2:20 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > > > > Iain King wrote: > > > Hi. I have a modal dialog whcih has a "Browse..." button which pops > > > up a file selector. This all works fine, but the first thing the user >

Re: Best way to delimit a list?

2008-05-13 Thread castironpi
On May 13, 8:32 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Giuseppe Ottaviano wrote: > > def ichain(seq): > > for s in seq: > > for x in s: yield x > > > (which is often useful and I don't think it has been included in   > > itertools) you can iterate lazily on the file: >

Threader Earrings -- A Fashion Jewelry Success Story

2008-05-13 Thread aztnat
New jewelry fashions need several factors going for them if they are to succeed. These include aesthetics, price, timing, and maybe even just sheer, plain luck. Threader earrings seem to have all these qualities in abundance. Also known as earthreads or ear strings, threader earrings have a very la

Re: do you fail at FizzBuzz? simple prog test

2008-05-13 Thread Bruno Desthuilliers
Kam-Hung Soh a écrit : On Tue, 13 May 2008 03:42:30 +1000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I just can't believe someone applying for a programmer position cannot provide a sensible anwser in 5 or less minutes. You should join the recruitment and interview panel in your organizat

Re: Python and Flaming Thunder

2008-05-13 Thread castironpi
On May 13, 9:05 am, Dave Parker <[EMAIL PROTECTED]> wrote: > On May 13, 7:44 am, [EMAIL PROTECTED] wrote: > > > I am not convinced that the colorspace occupies three dimensions > > necessarily. > > Apparently there are some people -- called tetrachromats -- who can > see color in four dimensions.

Re: Is using range() in for loops really Pythonic?

2008-05-13 Thread Lie
On May 13, 11:01 am, John Salerno <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > I think that the idiom > > >     for unused in xrange(10): > >         # do stuff with no reference to 'unused' > > > is quite common. Is that what you're asking about? > > Yes. I was more or less asking about the

Re: where to get McMillan Installer?

2008-05-13 Thread castironpi
On May 13, 8:23 am, gsal <[EMAIL PROTECTED]> wrote: > hhhmmm...py2exe...I tried it earlier and it couldn't handle some of > the packages I was using because they were in the "egg" form.  I was > hoping Installer could...then again, I don't know how long ago > Installer was written and whether eggs

  1   2   3   >