Re: Lists in classes

2007-07-15 Thread Alex Popescu
On Jul 13, 6:02 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Alex Popescu a écrit : > (snip) > > > > > You are defining the list in the class context and so it becomes a > > class field/member. > > 'attribute' is the pythonic term. Thanks! I'm just a couple of weeks Python old, so I am st

Re: Can a low-level programmer learn OOP?

2007-07-15 Thread bonnie
On Jul 13, 3:20 pm, Wayne Brehaut <[EMAIL PROTECTED]> wrote: > On Sat, 14 Jul 2007 06:01:56 +0200, Bruno Desthuilliers > > <[EMAIL PROTECTED]> wrote: > >Chris Carlen a écrit : > >> Hi: > > >> From what I've read of OOP, I don't get it. I have also found some > >> articles profoundly critical of O

Re: Trying to choose between python and java

2007-07-15 Thread Alex Popescu
I read in this thread lots of different (hopefully personal) opinions on the question of Java vs Python, so I thought I will post mines too (with the amendment that I am a Java guy, spending there more than 10 years). I don't think you can do a performance comparison upfront (without having it com

Re: Re-raising exceptions with modified message

2007-07-15 Thread Christoph Zwerschke
samwyse wrote: > NewStyle.__name__ = old.__class__.__name__ Simple, but that does the trick! > new.__dict__ = old.__dict__.copy() Unfortunately, that does not work, since the attributes are not writeable and thus do not appear in __dict__. But my __getattr__ solution does not work either, si

Re: Re-raising exceptions with modified message

2007-07-15 Thread Christoph Zwerschke
Christoph Zwerschke wrote: > But my __getattr__ solution does not work either, since the attributes > are set to None when initialized, so __getattr__ is never called. Here is a simple solution, but it depends on the existence of the args attribute that "will eventually be deprecated" according

standalone module

2007-07-15 Thread Navid Parvini
Dear All, I want to create a standalone program ( an exe file ) from my python files which works on Windows and Linux. Could you please tell me how to do that? Thank you in advance, Navid - Got a little couch potato? Check out fun summer activities for

Re: Re-raising exceptions with modified message

2007-07-15 Thread Christoph Zwerschke
Christoph Zwerschke wrote: > Here is a simple solution, but it depends on the existence of the args > attribute that "will eventually be deprecated" according to the docs: Ok, here is another solution that does not depend on args: def PoliteException(e): E = e.__class__ class PoliteExc

Re: standalone module

2007-07-15 Thread Daniel Nogradi
> I want to create a standalone program ( an exe file ) from my python files > which works on Windows and Linux. > > Could you please tell me how to do that? The same executable should work on both linux and windows? Not possible. But see: http://mail.python.org/pipermail/python-list/2007-July/4

Re: Re-raising exceptions with modified message

2007-07-15 Thread Christoph Zwerschke
Christoph Zwerschke wrote: > Here is a simple solution, but it depends on the existence of the args > attribute that "will eventually be deprecated" according to the docs: Just found another amazingly simple solution that does neither use teh .args (docs: "will eventually be deprecated") attribu

Font used in Logo

2007-07-15 Thread ddwagnz
Hi, I'm just wondering why Python did not choose a free font that they can redistribute with the logo instead of a commercial font which puts limitations on distrubiting the font to the public im not exactly sure where to put this, i was told to send a thing to the list so excuse me if ive got the

Re: Circular import problem

2007-07-15 Thread Alex Popescu
On Jul 14, 6:27 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 13 Jul 2007 13:24:57 -0300, bvdp <[EMAIL PROTECTED]> escribió: > > > > > > >> Seehttp://effbot.org/zone/import-confusion.htm > >> Try to move the circular references later in the code (maybe inside a > >> function, when it

Re: Getting values out of a CSV

2007-07-15 Thread Steve Holden
Alex Popescu wrote: > On Jul 14, 5:55 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> So, as always, one should measure in each specific case if optimization is >> worth the pain [...]. >> > > I hope I am somehow misreading the above sentence :-). IMO synonim > language contructs > shoul

◙►Instantly Turn your Computer into a Super TV ◄◙

2007-07-15 Thread jeniffer
Instantly Turn your Computer into a Super TV • Watch all your favorite shows on your Computer & TV! • Channels you can’t get any other place in the U.S.A! • Watch from anywhere in the world! • Save 1000's of $$$ over many years on cable and satellite bills • INSTANT DOWNLOAD • And much, much more!

Re: CSV without first line?

2007-07-15 Thread Steve Holden
Sebastian Bassi wrote: > Hi, > > In my CSV file, the first line has the name of the variables. So the > data I want to parse resides from line 2 up to the end. Here is what I > do: > > import csv > lines=csv.reader(open("MYFILE")) > lines.next() #this is just to avoid the first line > for line in

Re: zipfile 2GB problems?

2007-07-15 Thread Jim
On Jul 14, 10:35 pm, xamdam <[EMAIL PROTECTED]> wrote: > Hi fellas, > I am experiencing problems reading a 2GB zipfile consisting of > multiple zipped files. I found a > threadhttp://mail.python.org/pipermail/python-dev/2005-April/053027.html > that mentions a problem on the writing side, does suc

building directpython application with py2exe

2007-07-15 Thread ...:::JA:::...
Hello, I have problem with building directpython ( .exe ) application , actually when I finish building application and when I run it, in log file I get an error: Traceback (most recent call last): File "sampleMeshAnim.py", line 16, in ? ImportError: No module named d3d I was copy d3d.py an

Re: CSV without first line?

2007-07-15 Thread Sebastian Bassi
On 7/15/07, John Machin <[EMAIL PROTECTED]> wrote: > So you imagine that there is an undocumented feature? No, I just think that is documented but I am not able to understand it. Reading the list I've learned several things that are not directly inferred from documentation (that is not the same as

Dict Help

2007-07-15 Thread Robert Rawlins
Hello Guys, I'm looking for some help expanding on a dictionary I've got and storing multiple values per key and the best way to do it. I'm guessing that I need to store a list inside the value of the dictionary, but I'm not quite sure how that can be achieved, and also how to check for values

Python and Tkinter Primer/Tutorial?

2007-07-15 Thread W. Watson
Is there a primer out there on these two items? I have the Python tutorial, but would like either a Tkinter tutorial/primer to supplement it, or a primer/tutorial that addresses both. Maybe there's even an O'Reilly book on both? -- Wayne Watson (Nevada City, CA)

Re: Python and Tkinter Primer/Tutorial?

2007-07-15 Thread Kevin Walzer
W. Watson wrote: > Is there a primer out there on these two items? I have the Python > tutorial, but would like either a Tkinter tutorial/primer to supplement > it, or a primer/tutorial that addresses both. Maybe there's even an > O'Reilly book on both? These are good resources: http://www.pyt

in a bit of a quandary about an SMTP receiver

2007-07-15 Thread Eric S. Johansson
I have wasted way too much time on this problem already and I'm hoping it's just that I'm missing some bit of information somewhere. I need an SMTP receiver so I can handle filter requests from a postfix mail server. the asyncore version works fine for one request at a time. This is great ex

Re: zipfile 2GB problems?

2007-07-15 Thread Steve Holden
Jim wrote: > On Jul 14, 10:35 pm, xamdam <[EMAIL PROTECTED]> wrote: >> Hi fellas, >> I am experiencing problems reading a 2GB zipfile consisting of >> multiple zipped files. I found a >> threadhttp://mail.python.org/pipermail/python-dev/2005-April/053027.html >> that mentions a problem on the writ

Re: Getting values out of a CSV

2007-07-15 Thread Alex Popescu
On Jul 15, 3:00 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Alex Popescu wrote: > > On Jul 14, 5:55 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> So, as always, one should measure in each specific case if optimization is > >> > >> worth the pain [...]. > > > I hope I am somehow m

www.eBankGame.com Buy WoW gold RS gold WG k gold Lotro gold

2007-07-15 Thread www.ebankgame.com
www.eBankGame.com Buy WoW gold RS gold WG k gold Lotro gold http://www.eBankGame.com (w w w .e BankGame . c o m ) As you might or might not known that Taiwan earthquake has caused most of supplier are experiencing the serve problem to process the gold. However, eBankGame is always stay line with a

Re: Python Subprocess module

2007-07-15 Thread Noah
On Jul 13, 2:15 pm, Dave Sampson <[EMAIL PROTECTED]> wrote: > hey folks, > > A simple question hopefully. despite all my searching I have not found a > satisfactory response. > > The goal. Interact with a command line program. Simple enough, but the > key is INTERACT. You need Pexpect. > So then

Re: Python and Tkinter Primer/Tutorial?

2007-07-15 Thread BartlebyScrivener
On Jul 15, 9:46 am, "W. Watson" <[EMAIL PROTECTED]> wrote: > Is there a primer out there on these two items? I have the Python tutorial, > but would like either a Tkinter tutorial/primer to supplement it, or a > primer/tutorial that addresses both. http://www.freenetpages.co.uk/hp/alan.gauld/tutgu

Re: Can a low-level programmer learn OOP?

2007-07-15 Thread Wayne Brehaut
On Sun, 15 Jul 2007 07:47:20 -, [EMAIL PROTECTED] wrote: >On Jul 13, 3:20 pm, Wayne Brehaut <[EMAIL PROTECTED]> wrote: >> On Sat, 14 Jul 2007 06:01:56 +0200, Bruno Desthuilliers >> >> <[EMAIL PROTECTED]> wrote: >> >Chris Carlen a écrit : >> >> Hi: >> >> >> From what I've read of OOP, I don't

Re: zipfile 2GB problems?

2007-07-15 Thread xamdam
On Jul 15, 12:35 am, xamdam <[EMAIL PROTECTED]> wrote: > Hi fellas, > I am experiencing problems reading a 2GB zipfile consisting of > multiple zipped files. I found a thread > http://mail.python.org/pipermail/python-dev/2005-April/053027.html > that mentions a problem on the writing side, does su

Re: Dict Help

2007-07-15 Thread Gabriel Genellina
En Sun, 15 Jul 2007 11:39:24 -0300, Robert Rawlins <[EMAIL PROTECTED]> escribió: > I'm looking for some help expanding on a dictionary I've got and storing > multiple values per key and the best way to do it. I'm guessing that I > need to store a list inside the value of the dictionary, but

RE: Dict Help

2007-07-15 Thread Robert Rawlins - Think Blue
Thanks Gabriel, That all works a charm, Iteration on this isn’t important for me so the SET will work much better I think, I had read about them before but have never used them, I'm glad to see it works so simply. Thanks, Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

Re: zipfile 2GB problems?

2007-07-15 Thread xamdam
> Hi, > I use PKZIP V9.00 and maintain a 2.5GB zipfile that consists of over > 6,600 zipped files. > There is no problem with reading or writing. > Thanks, > Jim Which version of Python? What platform? thanks, max -- http://mail.python.org/mailman/listinfo/python-list

Re: zipfile 2GB problems?

2007-07-15 Thread Steve Holden
xamdam wrote: > On Jul 15, 12:35 am, xamdam <[EMAIL PROTECTED]> wrote: >> Hi fellas, >> I am experiencing problems reading a 2GB zipfile consisting of >> multiple zipped files. I found a thread >> http://mail.python.org/pipermail/python-dev/2005-April/053027.html >> that mentions a problem on the

Re: Can a low-level programmer learn OOP?

2007-07-15 Thread Paddy
On Jul 13, 5:06 pm, Chris Carlen <[EMAIL PROTECTED]> wrote: > Hi: > Christopher > > Problem: > > 1. How to most easily learn to write simple PC GUI programs that will > send data to remote embedded devices via serial comms, and perhaps > incorporate some basic (x,y) type graphics display and mani

Re: zipfile 2GB problems?

2007-07-15 Thread xamdam
> > > Additional info: my file is from a data provider, do not know what > > they used to compress it. Previous files worked ok, this one is the > > 1st over 2GB. Winzip has no problem with it. > > It could be you are using a Python with an in-built limit of 2GB on file > size. What happens if you

Re: Circular import problem

2007-07-15 Thread Gabriel Genellina
En Sun, 15 Jul 2007 08:49:54 -0300, Alex Popescu <[EMAIL PROTECTED]> escribió: >> > But, I still don't understand how python can access a function in a >> > file I have NOT included. In this case, to get things to work, I DO >> > NOT "import MMA.grooves" but later in the module I access a functi

Access Object From 2 Applications or Fix Scheduler

2007-07-15 Thread Robert Rawlins - Think Blue
Hello Guys, I have two applications which I need to get talking and sharing an object, what's the best way to do this? Basically my first application parses an XML document into a bunch of lists and tuples etc, and I need to access the data in these lists and tuples from my second application.

Re: 2**2**2**2**2 wrong? Bug?

2007-07-15 Thread Wayne Brehaut
On Fri, 13 Jul 2007 14:27:13 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >On Jul 13, 1:20 pm, Wayne Brehaut <[EMAIL PROTECTED]> wrote: >> On Mon, 09 Jul 2007 23:51:25 -0700, "[EMAIL PROTECTED]" >> >> >> >> >> >> <[EMAIL PROTECTED]> wrote: >> >On Jul 9, 11:42?pm, Paul McGuire <[EMAIL PROT

Re: 2**2**2**2**2 wrong? Bug?

2007-07-15 Thread Wayne Brehaut
On Fri, 13 Jul 2007 14:32:03 -0700, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >On Jul 13, 2:52 pm, Wayne Brehaut <[EMAIL PROTECTED]> wrote: >> On Fri, 13 Jul 2007 11:30:16 -0700, Paul McGuire <[EMAIL PROTECTED]> >> wrote: >> >> >> >> >> >> >On Jul 13, 1:20 pm, Wayne Brehaut <[EMAIL PROTECTED]

Re: 2**2**2**2**2 wrong? Bug?

2007-07-15 Thread Steve Holden
Wayne Brehaut wrote: > On Fri, 13 Jul 2007 14:32:03 -0700, "[EMAIL PROTECTED]" [...] > But I digress (but only because provoked!)... > >>> [for purposes of this argument, at least] > > This statement is the informal equivalent to saying "Define a base-1 > number system as...", as I noted above.

Re: zipfile 2GB problems?

2007-07-15 Thread Steve Holden
xamdam wrote: >>> Additional info: my file is from a data provider, do not know what >>> they used to compress it. Previous files worked ok, this one is the >>> 1st over 2GB. Winzip has no problem with it. >> It could be you are using a Python with an in-built limit of 2GB on file >> size. What hap

Re: 2**2**2**2**2 wrong? Bug?

2007-07-15 Thread Wayne Brehaut
On Sun, 15 Jul 2007 17:37:13 -0400, Steve Holden <[EMAIL PROTECTED]> wrote: >Wayne Brehaut wrote: >> On Fri, 13 Jul 2007 14:32:03 -0700, "[EMAIL PROTECTED]" >[...] >> But I digress (but only because provoked!)... >> [for purposes of this argument, at least] >> >> This statement is the infor

get a free 150$ sign up bonus without deposit!!! tinyurl.com/ysmfw8

2007-07-15 Thread playrambo.blogspot.com
(and also free licenses of pokertracker and pokeracehud after 500partypoints) tinyurl.com/ysmfw8 free 150$ NO deposit!!! (\__/) (='.'=) (")_(") -- http://mail.python.org/mailman/listinfo/python-list

Re: Circular import problem

2007-07-15 Thread Alex Popescu
On Jul 15, 10:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 15 Jul 2007 08:49:54 -0300, Alex Popescu > <[EMAIL PROTECTED]> escribió: > > > > >> > But, I still don't understand how python can access a function in a > >> > file I have NOT included. In this case, to get things to w

Re: Can a low-level programmer learn OOP?

2007-07-15 Thread Aahz
In article <[EMAIL PROTECTED]>, James Stroud <[EMAIL PROTECTED]> wrote: > >If you just want to enter some values and set some flags and then hit >"go", you could always program the GUI in HTML and have a cgi script >process the result. This has a lot of benefits that are frequently >overlooked

Re: Pass by reference or by value?

2007-07-15 Thread Aahz
[posted and e-mailed] [top-posting because I want to make only a one-line response] Please stick this on a web-page somewhere -- it makes an excellent counterpoint to http://starship.python.net/crew/mwh/hacks/objectthink.html http://effbot.org/zone/python-objects.htm In article <[EMAIL PROTECTE

Re: 2**2**2**2**2 wrong? Bug?

2007-07-15 Thread Ben Finney
Wayne Brehaut <[EMAIL PROTECTED]> writes: > On Fri, 13 Jul 2007 14:32:03 -0700, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > >You can call Roman Numerals a Tally System of Radix 1. > > I can call it what I want--within reason--so long as those I'm mainly > addressing understand what I mean a

Re: Python Subprocess module

2007-07-15 Thread Josiah Carlson
Dave Sampson wrote: > I am supposed to be able to entre 'y' and return for the program to > continue if I agree with what I see in the stdout. > > A problem exists though that I have tried > 'y' > 'y\n' > 'y\r' Depending on the platform, you may need to send '\r\n'. > ASPN Python cookbok provi

Re: pattern match !

2007-07-15 Thread Asun Friere
On Jul 11, 9:29 pm, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > import re > P=re.compile(r'(\w+(?:[-.]\d+)+)-RHEL3-Linux\.RPM') > S="hpsmh-1.1.1.2-0-RHEL3-Linux.RPM" > PO= P.match(S) > if PO : >print PO.group(1) Isn't a regexp overkill here when this will do: head = filename[:filename.index

Re: Marshalling big objects

2007-07-15 Thread Josiah Carlson
Gabriel Genellina wrote: > En Sat, 14 Jul 2007 20:04:21 -0300, Orlando Döhring <[EMAIL PROTECTED]> > escribió: > >> I want to marshal objects: >> >> - http://docs.python.org/lib/module-marshal.html >> where I have problems with a bigger objects, e.g. > > Any specific reason you use this module?

Accessing Python variables in an extension module

2007-07-15 Thread MD
Hi, I would like to access "variables" defined in my Python program in a C module extension for Python. Is this possible? I looked at the Python C API reference but didn't find anything there that could help me. Thanks in advance for any help/tips. Regards, -MD -- http://mail.python.org/ma

Re: Accessing Python variables in an extension module

2007-07-15 Thread Alex Martelli
MD <[EMAIL PROTECTED]> wrote: > Hi, > >I would like to access "variables" defined in my Python program in > a C module extension for Python. Is this possible? I looked at the > Python C API reference but didn't find anything there that could help > me. If they're global variables of a certai

How to determine which method was used in an inheritance heirarchy?

2007-07-15 Thread Erik Jones
Say you're given a call event frame for a method call. How can you tell if the code being executed came from a super class of the object or class the method was called on? Erik Jones Software Developer | Emma® [EMAIL PROTECTED] 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps orga

Re: Right tool and method to strip off html files (python, sed, awk?)

2007-07-15 Thread sebzzz
Thank you guys for all the good advice. All be working on defining a clearer problem (I think this advice is good for all areas of life). I appreciate the help, the python community looks really open to learners and beginners, hope to be helping people myself in not too long from now (well, reaso

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-15 Thread Michele Simionato
On Jul 16, 5:51 am, Erik Jones <[EMAIL PROTECTED]> wrote: > Say you're given a call event frame for a method call. How can you > tell if the code being executed came from a super class of the object > or class the method was called on? > > Erik Jones You look if the method was defined in self.__c

determining the source code and module based on the class

2007-07-15 Thread alf
Hi, Let's say I have a class defined somewhere: class A: pass now I import (indirectly) a module defining that class (and in fact thousands of others defined in hundreds of modules) where all I have is a list of them provided: l=[A,B,C] now I need a piece of code which based on the cl

Fetching a clean copy of a changing web page

2007-07-15 Thread John Nagle
I'm reading the PhishTank XML file of active phishing sites, at "http://data.phishtank.com/data/online-valid/"; This changes frequently, and it's big (about 10MB right now) and on a busy server. So once in a while I get a bogus copy of the file because the file was rewritten while being sent b

Re: Trying to choose between python and java

2007-07-15 Thread Alex Martelli
James T. Dennis <[EMAIL PROTECTED]> wrote: ... > You can start writing all your code now as: print() --- calling > the statement as if it were a function. Then you're future Python ...except that your output format will thereby become disgusting...: >>> name = 'Alex' >>> print 'Hello', name

Re: how to implementation latent semantic indexing in python..

2007-07-15 Thread Alex Martelli
78ncp <[EMAIL PROTECTED]> wrote: > hi... > how to implementation algorithm latent semantic indexing in python > programming...?? You may get more responses (as in, >0!-) if you give some URL about what this algorithm is supposed to do. Alex -- http://mail.python.org/mailman/listinfo/python-lis

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-15 Thread Erik Jones
On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote: > On Jul 16, 5:51 am, Erik Jones <[EMAIL PROTECTED]> wrote: >> Say you're given a call event frame for a method call. How can you >> tell if the code being executed came from a super class of the object >> or class the method was called on?

Re: Fetching a clean copy of a changing web page

2007-07-15 Thread Diez B. Roggisch
John Nagle schrieb: >I'm reading the PhishTank XML file of active phishing sites, > at "http://data.phishtank.com/data/online-valid/"; This changes > frequently, and it's big (about 10MB right now) and on a busy server. > So once in a while I get a bogus copy of the file because the file > was

Re: Fetching a clean copy of a changing web page

2007-07-15 Thread Miles
On Jul 16, 1:00 am, John Nagle <[EMAIL PROTECTED]> wrote: > I'm reading the PhishTank XML file of active phishing sites, > at "http://data.phishtank.com/data/online-valid/"; This changes > frequently, and it's big (about 10MB right now) and on a busy server. > So once in a while I get a bogus

Re: how to implementation latent semantic indexing in python..

2007-07-15 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > You may get more responses (as in, >0!-) if you give some URL about what > this algorithm is supposed to do. http://en.wikipedia.org/wiki/Latent_semantic_analysis Very cool stuff. -- http://mail.python.org/mailman/listinfo/python-list

embedded python in dll with C

2007-07-15 Thread Mick Duprez
Hi All, I can't quite get my head around embedding Python in a C app and I have a few questions if I may, here is the background. I want to create a dll plugin that has the Python interpreter embedded in it for use in scripting an established application. So far I have created the interface dll and

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-15 Thread Michele Simionato
On Jul 16, 7:18 am, Erik Jones <[EMAIL PROTECTED]> wrote: > On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote: > > > On Jul 16, 5:51 am, Erik Jones <[EMAIL PROTECTED]> wrote: > >> Say you're given a call event frame for a method call. How can you > >> tell if the code being executed came from

Re: determining the source code and module based on the class

2007-07-15 Thread thebjorn
On Jul 16, 6:55 am, alf <[EMAIL PROTECTED]> wrote: ... > now I need a piece of code which based on the class name can point to > the module as well as the line number where the given class is defined. > > Is it doable in Python? look in the inspect module. -- bjorn -- http://mail.python.org/mai

Re: How to determine which method was used in an inheritance heirarchy?

2007-07-15 Thread Erik Jones
On Jul 16, 2007, at 1:31 AM, Erik Jones wrote: > On Jul 16, 2007, at 12:53 AM, Michele Simionato wrote: > >> On Jul 16, 7:18 am, Erik Jones <[EMAIL PROTECTED]> wrote: >>> On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote: >>> On Jul 16, 5:51 am, Erik Jones <[EMAIL PROTECTED]> wrote: