cheap, shoes,sneaker,sneakers ( paypal accept ) ( www.top-saler .com )

2008-03-25 Thread kuaile9834
cheap, shoes,sneaker,sneakers ( paypal accept )( www.top-saler .com ) cheap, shoes,sneaker,sneakers ( paypal accept ) (www.top-saler .com ) cheap, shoes,sneaker,sneakers (paypal accept ) ( www.top-saler .com ) cheap, shoes,sneaker,sneakers ( paypal accept )

cheap, shoes,sneaker,sneakers ( paypal accept ) ( www.top-saler .com )

2008-03-25 Thread kuaile9834
cheap, shoes,sneaker,sneakers ( paypal accept )( www.top-saler .com ) cheap, shoes,sneaker,sneakers ( paypal accept ) (www.top-saler .com ) cheap, shoes,sneaker,sneakers (paypal accept ) ( www.top-saler .com ) cheap, shoes,sneaker,sneakers ( paypal accept )

Re: Shortcutting the function call stack

2008-03-25 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 15:05:38 -0700, Julien ha scritto: ... > > I'll try to explain a bit more what I'm after, and hopefully that will > be clearer. In fact, what I'm trying to do is to "hijack" (I'm making up > the term) a function: > > def hijacker(arg): > if I_feel_its_necessary: >

Re: eval and unicode

2008-03-25 Thread Laszlo Nagy
> I think your confusion comes from the use of the interactive mode. > It is not. The example provided in the original post will also work when you put then into a python source file. > PEP 263 doesn't really apply to the interactive mode, hence the > behavior in interactive mode is undefined,

StringIO + unicode

2008-03-25 Thread Laszlo Nagy
Is there a standard "in-memory file" interface for reading/writting unicode stings? Something like StringIO. E.g. this would be possible: - create UnicodeStringIO - write unicode strings into it - wite data (binary) string of UnicodeStringIO into a file ('wb' mode) and then later: - read the s

Re: eval and unicode

2008-03-25 Thread Laszlo Nagy
Martin v. Löwis wrote: >> eval() somehow decoded the passed expression. No question. It did not >> use 'ascii', nor 'latin2' but something else. Why is that? Why there >> is a particular encoding hard coded into eval? Which is that >> encoding? (I could not decide which one, since '\xdb' will be

importing a csv file as a Numeric array

2008-03-25 Thread Rahul
What's a good way of importing a csv text file of floats into a Numeric array? I tried the csv module and it seems to work well so long as I've ints. Does anyone have any suggestions / snippets that work to import a csv file of floats into a Numeric array? -Rahul -- http://mail.python.org/mailma

Re: Python 2.2.1 and select()

2008-03-25 Thread Francesco Bochicchio
Il Mon, 24 Mar 2008 17:58:42 -0400, Derek Martin ha scritto: > Hi kids! > > I've got some code that uses select.select() to capture all the output > of a subprocess (both stdout and stderr, see below). This code works as > expected on a variety of Fedora systems running Python > 2.4.0, but on a

Re: StringIO + unicode

2008-03-25 Thread Diez B. Roggisch
Laszlo Nagy wrote: > Is there a standard "in-memory file" interface for reading/writting > unicode stings? Something like StringIO. > > E.g. this would be possible: > > - create UnicodeStringIO > - write unicode strings into it > - wite data (binary) string of UnicodeStringIO into a file ('wb' m

Re: Code folder with Emacs

2008-03-25 Thread Martin Sand Christensen
> "Grant" == Grant Edwards <[EMAIL PROTECTED]> writes: Grant> Has anybody figured out how to do code folding of Python source Grant> files in emacs? I use outline-minor-mode with the following home baked configuration: ;; Python stuff for outline mode. (defvar py-outline-regexp "^\\([ \t]*\\

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread john s.
On Mar 24, 9:39 pm, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: > > On Behalf Of john s. > > import os, sys, string, copy, getopt, linecache > > from traceback import format_exception > > > #The file we read in... > > fileHandle = "/etc/passwd" > > srcFile = open(fileHandle,'r') > > srcList = srcFil

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Bryan Olson
john s. wrote: > #/usr/bin/enviro python > > #Purpose - a dropped in useracct/pass file is on a new server to build > a cluster... Alas there are no home #directories.. Let me rip through > the passfile, grab the correct field (or build it) and use it to make > the directory! > > import os, sys

Re: How to send a var to stdin of an external software

2008-03-25 Thread Benjamin Watine
Bryan Olson a écrit : > Benjamin Watine wrote: >> [EMAIL PROTECTED] a écrit : >>> I wrote: And here's a thread example, based on Benjamin's code: >>> [...] >>> >>> Doh! Race condition. Make that: >>> >>> import subprocess >>> import thread >>> import Queue >>> >>> def readtoq(p

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread john s.
On Mar 25, 6:34 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > john s. wrote: > > #/usr/bin/enviro python > > > #Purpose - a dropped in useracct/pass file is on a new server to build > > #a cluster... Alas there are no home directories.. Let me rip through > > #the passfile, grab the correct field (

My python interpreter became mad !

2008-03-25 Thread Benjamin Watine
Yes, my python interpreter seems to became mad ; or may be it's me ! :) I'm trying to use re module to match text with regular expression. In a first time, all works right. But since yesterday, I have a very strange behaviour : $ python2.4 Python 2.4.4 (#2, Apr 5 2007, 20:11:18) [GCC 4.1.2 200

Re: My python interpreter became mad !

2008-03-25 Thread Tim Golden
Benjamin Watine wrote: > Yes, my python interpreter seems to became mad ; or may be it's me ! :) > > I'm trying to use re module to match text with regular expression. In a > first time, all works right. But since yesterday, I have a very strange > behaviour : > > $ python2.4 > Python 2.4.4 (#2

Re: My python interpreter became mad !

2008-03-25 Thread alex23
On Mar 25, 9:05 pm, Benjamin Watine <[EMAIL PROTECTED]> wrote: > I'm trying to use re module to match text with regular expression. In a > first time, all works right. But since yesterday, I have a very strange > behaviour : The following line in the traceback shows you're not using the default py

Re: My python interpreter became mad !

2008-03-25 Thread John Machin
On Mar 25, 10:05 pm, Benjamin Watine <[EMAIL PROTECTED]> wrote: > Yes, my python interpreter seems to became mad ; or may be it's me ! :) > > I'm trying to use re module to match text with regular expression. In a > first time, all works right. But since yesterday, I have a very strange > behaviour

Inheritance question

2008-03-25 Thread Tzury Bar Yochay
given two classes: class Foo(object): def __init__(self): self.id = 1 def getid(self): return self.id class FooSon(Foo): def __init__(self): Foo.__init__(self) self.id = 2 def getid(self): a = Foo.getid() b = self.id return

Outlook 2003 and Python

2008-03-25 Thread cuordileone
Good Day. I woul like to ask you if it is possible to make a program in python that move the email messages that I had received in outlook 2003, to a specific folder, accoding to the sender's name: Es: [EMAIL PROTECTED] -->> folder Martin. Thanks. Riccardo. -- http://mail.python.org/mailman/li

Issues with Python + Batch File

2008-03-25 Thread tarun
Hi All, I've a batch file which invoks a python file. The python code in the file brings up a GUI. The GUI is of a test tool which can execute scripts. I tried using the following 2 sample of code for my batch file: * (1) (2)* D:\opengui.py D:\opengui.py got

Re: Inheritance question

2008-03-25 Thread Jeff
Rather than use Foo.bar(), use this syntax to call methods of the super class: super(ParentClass, self).method() -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance question

2008-03-25 Thread John Machin
On Mar 25, 10:44 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > given two classes: > > class Foo(object): > def __init__(self): > self.id = 1 > > def getid(self): > return self.id > > class FooSon(Foo): > def __init__(self): > Foo.__init__(self) > self

Time module is not behaving.

2008-03-25 Thread jjlofaro
Hi I'm just getting myself going again on Python and would appreciate any help. My install of Python seems to have some difficulty loading and using the time module in a script. Strange thing is that if I start another instance of Python I can type in my program manually/interactively and it wor

Re: Inheritance question

2008-03-25 Thread Tzury Bar Yochay
On Mar 25, 2:00 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 25, 10:44 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > > > > > given two classes: > > > class Foo(object): > >     def __init__(self): > >         self.id = 1 > > >     def getid(self): > >         return self.id > > > class F

Re: Inheritance question

2008-03-25 Thread Tzury Bar Yochay
> Rather than use Foo.bar(), use this syntax to call methods of the > super class: > > super(ParentClass, self).method() Hi Jeff, here is the nw version which cause an error class Foo(object): def __init__(self): self.id = 1 def getid(self): return self.id class FooSon(F

Re: embedded python in c++ packaging

2008-03-25 Thread Furkan Kuru
Sorry for long delay, I've tried below code (Setting pythonpath environment variable) and then initialize python interpreter but the embedded python interpreter did not get the newly assigned PYTHONPATH. I ve looked at the sys.path in python code (that is run by the embedded interpreter) and it be

Need help with OptionParser

2008-03-25 Thread hellt
today i've decided to use optionparser instead of GetOpt and unfortunately i've got an error which i cant handle my pice of code: from optparse import OptionParser def main(): usage = "usage: %prog [options]" parser = OptionParser(usage) parser.add_option("-f", "--file", dest="filen

Re: Inheritance question

2008-03-25 Thread Furkan Kuru
a = super(Foo, self).getid() should be a = super(FooSon, self).getid() On Tue, Mar 25, 2008 at 2:34 PM, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > > Rather than use Foo.bar(), use this syntax to call methods of the > > super class: > > > > super(ParentClass, self).method() > > Hi Jeff, > here

Re: Inheritance question

2008-03-25 Thread Furkan Kuru
In the derived class init you set self.id to 2 so when you call getid method it just returns self.id which is now 2. you can use another variable name. On Tue, Mar 25, 2008 at 1:44 PM, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > given two classes: > > class Foo(object): >def __init__(self):

Re: Need help with OptionParser

2008-03-25 Thread hellt
On 25 мар, 15:42, hellt <[EMAIL PROTECTED]> wrote: > today i've decided to use optionparser instead of GetOpt > > and unfortunately i've got an error which i cant handle > > my pice of code: > > from optparse import OptionParser > > def main(): > usage = "usage: %prog [options]" > parser =

Re: My python interpreter became mad !

2008-03-25 Thread Furkan Kuru
Most probably X-Spam added itself to your path. you should look at your PATH and PYTHONPATH environment variables. On Tue, Mar 25, 2008 at 1:40 PM, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 25, 10:05 pm, Benjamin Watine <[EMAIL PROTECTED]> wrote: > > Yes, my python interpreter seems to beca

Re: Need help with OptionParser

2008-03-25 Thread Stargaming
On Tue, 25 Mar 2008 05:42:03 -0700, hellt wrote: [snip] > usage = "usage: %prog [options]" > parser = OptionParser(usage) > parser.add_option("-f", "--file", dest="filename", > help="executable filename", > metavar="FILE") > parser.add_option("-b"

sendmail should throw an exception but does not

2008-03-25 Thread Clodoaldo
I need to know if an email was refused for whatever reason, it makes no difference. The email is sent to an email address that does not exist in a foreign domain. I can see in the postfix log that the email was sent and bounced with the error code 550. The problem is that sendmail should throw an

Re: Reading new mail from outlook

2008-03-25 Thread Tim Golden
SPJ wrote: > I am trying to create new tickets in the ticketing system using python. When > I > receive new email from a particular address, I have to trigger the python > script > and parse the mail in required format. > > The main hurdle here is, how to invoke the script on arrival of new

Re: My python interpreter became mad !

2008-03-25 Thread Benjamin Watine
John Machin a écrit : > On Mar 25, 10:05 pm, Benjamin Watine <[EMAIL PROTECTED]> wrote: >> Yes, my python interpreter seems to became mad ; or may be it's me ! :) >> >> I'm trying to use re module to match text with regular expression. In a >> first time, all works right. But since yesterday, I hav

Re: sendmail should throw an exception but does not

2008-03-25 Thread Jarek Zgoda
Clodoaldo napisał(a): > I need to know if an email was refused for whatever reason, it makes > no difference. > > The email is sent to an email address that does not exist in a foreign > domain. I can see in the postfix log that the email was sent and > bounced with the error code 550. > > The p

Re: Inheritance question

2008-03-25 Thread Anthony
On Mar 25, 11:44 am, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > While my intention is to get 1.2 I get 2.2 > I would like to know what would be the right way to yield the expected > results Is this what you want? class Foo(object): def __init__(self): self.id = 1 def getid(sel

Re: sendmail should throw an exception but does not

2008-03-25 Thread D'Arcy J.M. Cain
On Tue, 25 Mar 2008 06:39:57 -0700 (PDT) Clodoaldo <[EMAIL PROTECTED]> wrote: > I need to know if an email was refused for whatever reason, it makes > no difference. > > The email is sent to an email address that does not exist in a foreign > domain. I can see in the postfix log that the email was

Re: About reading Python code

2008-03-25 Thread Phil
On 2008-03-18, sturlamolden <[EMAIL PROTECTED]> wrote: > First, I recommend that you write readable code! Don't use Python as > if you're entering the obfuscated C contest. > > Two particularly important points: > > * Comments are always helpful to the reader. It would be nice if this was the case

Re: Inheritance question

2008-03-25 Thread Tzury Bar Yochay
On Mar 25, 4:03 pm, Anthony <[EMAIL PROTECTED]> wrote: > On Mar 25, 11:44 am, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > > > While my intention is to get 1.2 I get 2.2 > > I would like to know what would be the right way to yield the expected > > results > > Is this what you want? > > class Foo(

any good g.a.'s?

2008-03-25 Thread castironpi
Any good genetic algorithms involving you-split, i-pick? "genetic algorithms involving you-split, i-pick" returned 6 results. So, people: -- http://mail.python.org/mailman/listinfo/python-list

Re: Outlook 2003 and Python

2008-03-25 Thread Larry Bates
cuordileone wrote: > Good Day. > > I woul like to ask you if it is possible to make a program in python > that move the email messages that I had received in outlook 2003, to a > specific folder, accoding to the sender's name: > > Es: [EMAIL PROTECTED] -->> folder Martin. > > Thanks. > > Riccar

Re: sendmail should throw an exception but does not

2008-03-25 Thread Clodoaldo
2008/3/25, D'Arcy J.M. Cain <[EMAIL PROTECTED]>: > On Tue, 25 Mar 2008 06:39:57 -0700 (PDT) > Clodoaldo <[EMAIL PROTECTED]> wrote: > > I need to know if an email was refused for whatever reason, it makes > > no difference. > > > > The email is sent to an email address that does not exist in a

Re: Reading new mail from outlook

2008-03-25 Thread Larry Bates
Tim Golden wrote: > SPJ wrote: >> I am trying to create new tickets in the ticketing system using >> python. When I receive new email from a particular address, I have to >> trigger the python script and parse the mail in required format. >> >> The main hurdle here is, how to invoke the script

Re: Does python hate cathy?

2008-03-25 Thread Edward A. Falk
In article <[EMAIL PROTECTED]>, Patrick Mullen <[EMAIL PROTECTED]> wrote: >Then again, I can count the number of times I have ever needed __del__ >with no fingers (never used it!). Still, quite interesting to >explore. I used it once, for an object that had a doubly-linked list. The __del__() me

dynamically created names / simple problem

2008-03-25 Thread Jules Stevenson
Hello all, I'm fairly green to python and programming, so please go gently. The following code for display in secondary: self.("so_active_"+display) = wx.CheckBox(self.so_panel, -1, "checkbox_2") Errors, because of the apparent nastyness at the beginning. What I'm trying to do is

Re: sendmail should throw an exception but does not

2008-03-25 Thread Jarek Zgoda
Clodoaldo napisał(a): > That email address is used to register in a site. I'm already doing > the confirmation email path. The confirmation email prevents someone > to register with a forged email but also prevents those who simple > don't know exactly what their email is. Yes the email must be ty

Re: dynamically created names / simple problem

2008-03-25 Thread Robert Bossy
Jules Stevenson wrote: > > Hello all, > > I'm fairly green to python and programming, so please go gently. The > following code > > for display in secondary: > > self.("so_active_"+display) = wx.CheckBox(self.so_panel, -1, "checkbox_2") > > Errors, because of the apparent nastyness at the beginnin

Re: dynamically created names / simple problem

2008-03-25 Thread Robert Bossy
Robert Bossy wrote: > Jules Stevenson wrote: > >> Hello all, >> >> I'm fairly green to python and programming, so please go gently. The >> following code >> >> for display in secondary: >> >> self.("so_active_"+display) = wx.CheckBox(self.so_panel, -1, "checkbox_2") >> >> Errors, because of the

Re: Need help calling a proprietary C DLL from Python

2008-03-25 Thread Craig
On Mar 25, 2:02 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 24 Mar 2008 15:21:11 -0700 (PDT), Craig <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > And this is what I got: > > VmxGet test - looking for valid record... > > Before -PriKey = 0x0044F56C,S

Re: Inheritance question

2008-03-25 Thread Gerard Flanagan
On Mar 25, 1:34 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > > Rather than use Foo.bar(), use this syntax to call methods of the > > super class: > > > super(ParentClass, self).method() > > Hi Jeff, > here is the nw version which cause an error > > class Foo(object): > def __init__(self):

Re: Reading new mail from outlook using Python

2008-03-25 Thread SPJ
Thanks... I could access the folders in outlook express using the COM interface. Now I am stuck with how to read to a file only new mails. Anyone knows how to achieve this? Thanks SPJ --- On Tue, 3/25/08, Pete Stapley <[EMAIL PROTECTED]> wrote: > From: Pete Stapley <[EMAIL PROTECTED]> > Sub

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Paul McGuire
This code is SO *CUTE*! I wish there was a font with little hearts to dot the 'i's with, then it would be PERFECT! -- http://mail.python.org/mailman/listinfo/python-list

RE: dynamically created names / simple problem

2008-03-25 Thread Jules Stevenson
Brilliant. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance question

2008-03-25 Thread Anthony
On Mar 25, 2:31 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > I wish it was that simple but 'a = Foo().getid()' is actually creating > a new instance of Foo whereas I want the data of the Foo instanced by > __init__ of FooSon(). I don't think Foo.__init__(self) creates an instance of the Foo c

Re: Inheritance question

2008-03-25 Thread Brian Lane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gerard Flanagan wrote: > Use the child class when calling super: > > -- > class Foo(object): > def __init__(self): > self.id = 1 > > def getid(self): > return self.id > > class FooSon(Foo)

Creating dynamic objects with dynamic constructor args

2008-03-25 Thread Greg
I'd like to create objects on the fly from a pointer to the class using: instance = klass() But I need to be able to pass in variables to the __init__ method. I can recover the arguments using the inspect.argspec, but how do I call __init__ with a list of arguments and have them unpacked to

Re: Time module is not behaving.

2008-03-25 Thread Gary Herron
jjlofaro wrote: > Hi > > I'm just getting myself going again on Python and would appreciate any > help. > > My install of Python seems to have some difficulty loading and using > the time module in a script. Strange thing is that if I start another > instance of Python I can type in my program

Re: any good g.a.'s?

2008-03-25 Thread Tim Chase
> Any good genetic algorithms involving you-split, i-pick? I've always heard it as "you divide, I decide"... That said, I'm not sure how that applies in a GA world. It's been a while since I've done any coding with GAs, but I don't recall any facets related to the You Divide, I Decide problem.

Re: StringIO + unicode

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 06:26:04 -0300, Laszlo Nagy <[EMAIL PROTECTED]> escribió: > Is there a standard "in-memory file" interface for reading/writting > unicode stings? Something like StringIO. > > E.g. this would be possible: > > - create UnicodeStringIO > - write unicode strings into it > - wite

Re: Reading new mail from outlook using Python

2008-03-25 Thread Tim Golden
SPJ wrote: > Thanks... > > I could access the folders in outlook express using the COM interface. > Now I am stuck with how to read to a file only new mails. Well, this Google query: http://www.google.co.uk/search?hl=en&q=OUTLOOK.application+unread+messages seems to indicate some useful hits.

Re: Creating dynamic objects with dynamic constructor args

2008-03-25 Thread Furkan Kuru
you can call a function with arglist like this: def dummy(a, b, c): print a + b, c args = [1, 2, "hello"] dummy(*args) On Tue, Mar 25, 2008 at 5:38 PM, <[EMAIL PROTECTED]> wrote: > I'd like to create objects on the fly from a pointer to the class > using: instance = klass() But I need to

Re: Inheritance question

2008-03-25 Thread Hrvoje Niksic
Tzury Bar Yochay <[EMAIL PROTECTED]> writes: > given two classes: > > class Foo(object): > def __init__(self): > self.id = 1 > > def getid(self): > return self.id > > class FooSon(Foo): > def __init__(self): > Foo.__init__(self) > self.id = 2 > > def

Re: Inheritance question

2008-03-25 Thread Hrvoje Niksic
Brian Lane <[EMAIL PROTECTED]> writes: > Basically, you can't do what you are trying to do without using a > different variable, ...or abusing the __foo private identifier trick. -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance question

2008-03-25 Thread Diez B. Roggisch
Anthony wrote: > On Mar 25, 2:31 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: >> I wish it was that simple but 'a = Foo().getid()' is actually creating >> a new instance of Foo whereas I want the data of the Foo instanced by >> __init__ of FooSon(). > > I don't think Foo.__init__(self) creates

Finding Will Ware

2008-03-25 Thread Bill Horst
I am looking for Will Ware, but his website (willware.net) is not responding, so I'm guessing at a email addresses for him. Please let me know where he can be reached. (Will, this is regarding Sue Bauter, who was a close friend of mine at ISU in '72. Please reply so I can correspond with you abo

Re: Creating dynamic objects with dynamic constructor args

2008-03-25 Thread Robert Bossy
[EMAIL PROTECTED] wrote: > I'd like to create objects on the fly from a pointer to the class > using: instance = klass() But I need to be able to pass in variables > to the __init__ method. I can recover the arguments using the > inspect.argspec, but how do I call __init__ with a list of argu

Re: Outlook 2003 and Python

2008-03-25 Thread cuordileone
On Mar 25, 3:52 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > cuordileone wrote: > > Good Day. > > > I woul like to ask you if it is possible to make a program in python > > that move the email messages that I had received in outlook 2003, to a > > specific folder, accoding to the sender's name: > >

Re: importing a csv file as a Numeric array

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 06:46:57 -0300, Rahul <[EMAIL PROTECTED]> escribió: > What's a good way of importing a csv text file of floats into a > Numeric array? I tried the csv module and it seems to work well so > long as I've ints. Does anyone have any suggestions / snippets that > work to import a c

Re: Inheritance question

2008-03-25 Thread Eric Brunel
On Tue, 25 Mar 2008 16:37:00 +0100, Brian Lane <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Gerard Flanagan wrote: > >> Use the child class when calling super: >> >> -- >> class Foo(object): >> def __init__(self): >>

Files, directories and imports - relative to the current directory only

2008-03-25 Thread ptn
Hello, group. I can only read files and import modules that are in the same directory as the one my script is. Here is a test script (path.py): import os import uno # some module I wrote print list(os.walk('~/hacking/python')) f = open('~/read/foo.txt')

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 07:44:59 -0300, john s. <[EMAIL PROTECTED]> escribió: >> for line in open("/etc/passwd"): >> user, _pwd = line.split(":") >^- Ok this one here we are taking a string spliting it > into to variables... >user gets one (the first) and _pwd gets to

Re: A "roadmap" for ctypes wrapping?

2008-03-25 Thread Alaric Haag
In article <[EMAIL PROTECTED]>, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Alaric Haag schrieb: > > Hi all, > > > > stuff deleted > > > > == > > Can anyone with some "wrapping" experience add/modify/enhance the above? > > Use gccxml to gather the typedefs. And look at Gary Bis

Re: Inheritance question

2008-03-25 Thread Gerard Flanagan
On Mar 25, 4:37 pm, Brian Lane <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Gerard Flanagan wrote: > > Use the child class when calling super: > > > -- > > class Foo(object): > > def __init__(self): > > self.id

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Bruno Desthuilliers
john s. a écrit : > On Mar 24, 9:39 pm, "Ryan Ginstrom" <[EMAIL PROTECTED]> wrote: >>> On Behalf Of john s. >>> import os, sys, string, copy, getopt, linecache >>> from traceback import format_exception >>> #The file we read in... >>> fileHandle = "/etc/passwd" >>> srcFile = open(fileHandle,'r') >>

Re: Issues with Python + Batch File

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 08:55:12 -0300, tarun <[EMAIL PROTECTED]> escribió: > I've a batch file which invoks a python file. The python code in the file > brings up a GUI. The GUI is of a test tool which can execute scripts. > > I tried using the following 2 sample of code for my batch file: > > *

Re: Inheritance question

2008-03-25 Thread Robert Bossy
Hi, I'm not sure what you're trying to actually achieve, but it seems that you want an identificator for classes, not for instances. In this case, setting the id should be kept out of __init__ since it is an instance initializer: make id static and thus getid() a classmethod. Furthermore, if yo

Re: Beautiful Soup Looping Extraction Question

2008-03-25 Thread Tess
Paul - you are very right. I am back to the drawing board. Tess -- http://mail.python.org/mailman/listinfo/python-list

Re: Does python hate cathy?

2008-03-25 Thread Marc 'BlackJack' Rintsch
On Tue, 25 Mar 2008 14:58:51 +, Edward A. Falk wrote: > In article <[EMAIL PROTECTED]>, > Patrick Mullen <[EMAIL PROTECTED]> wrote: > >>Then again, I can count the number of times I have ever needed __del__ >>with no fingers (never used it!). Still, quite interesting to >>explore. > > I use

how to dynamically create class methods ?

2008-03-25 Thread j vickroy
Hello, Here is some pseudo-code that hopefully illustrates what I want to do: records = list(...) for record in records: new_fcn = define_a function_for(record) instance = my_new_class_instance() setattr(instance, 'myfcn', new_fcn) instance.execute() # instance.execute() calls ins

Re: Does python hate cathy?

2008-03-25 Thread Hrvoje Niksic
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes: > On Tue, 25 Mar 2008 14:58:51 +, Edward A. Falk wrote: > >> In article <[EMAIL PROTECTED]>, >> Patrick Mullen <[EMAIL PROTECTED]> wrote: >> >>>Then again, I can count the number of times I have ever needed __del__ >>>with no fingers (never

Re: Files, directories and imports - relative to the current directory only

2008-03-25 Thread Bjoern Schliessmann
ptn wrote: > Traceback (most recent call last): > File "path.py", line 4, in > f = open('~/read/foo.txt') > IOError: [Errno 2] No such file or > directory: '~/read/foo.txt' > [...] > So, what's wrong here? Maybe there's something I haven't set up

Re: Inheritance question

2008-03-25 Thread castironpi
On Mar 25, 12:01 pm, Robert Bossy <[EMAIL PROTECTED]> wrote: > Hi, > > I'm not sure what you're trying to actually achieve, but it seems that > you want an identificator for classes, not for instances. In this case, > setting the id should be kept out of __init__ since it is an instance > initializ

setattr what is the parent object?

2008-03-25 Thread Jules Stevenson
I'm trying to use setattr to dynamically name and layout gui wx widgets, this is all fine and dandy until I've run up against something where I simply don't know what the object is, please see the amended **don't know** in the following code. class MyFrame2(wx.Frame): def __init__(self, *a

Re: Inheritance question

2008-03-25 Thread Tzury Bar Yochay
Hi all, I would like to thank you all for all the suggestions. what I did was simply extending the super class data with data from its child using the id example, Foo.id = 1 is now = [1] and the FooSon does self.id.append(2) the system designer wanted inheritance+java and I wanted Python +Functi

Re: Beautiful Soup Looping Extraction Question

2008-03-25 Thread Stefan Behnel
Hi, again, not BS related, but still a solution. Tess wrote: > Let's say I have a file that looks at file.html pasted below. > > My goal is to extract all elements where the following is true: align="left"> and . Using lxml: from lxml import html tree = html.parse("file.html") for el in

Re: Disable resize button

2008-03-25 Thread myonov
On Mar 24, 5:45 pm, Francesco Bochicchio <[EMAIL PROTECTED]> wrote: > Il Mon, 24 Mar 2008 04:38:50 -0700, myonov ha scritto: > > > > > Hi! > > > I need to disable resize button in Tkinter. I inherit the Frame class. > > Then in the constructor i make my buttons, labels, etc. Then I pack them > > an

Re: any good g.a.'s?

2008-03-25 Thread castironpi
On Mar 25, 11:03 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > Any good genetic algorithms involving you-split, i-pick? > > I've always heard it as "you divide, I decide"... > > That said, I'm not sure how that applies in a GA world.  It's > been a while since I've done any coding with GAs, but I do

Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread blackpawn
I've been trying to get garbage collection of circular references to work properly with no success then I noticed the documentation stating that it just doesn't: >From documentation on Py_Finalize() -> "Memory tied up in circular references between objects is not freed. " I copy pasted the Noddy

Re: how to dynamically create class methods ?

2008-03-25 Thread Arnaud Delobelle
On Mar 25, 6:13 pm, j vickroy <[EMAIL PROTECTED]> wrote: > Hello, > > Here is some pseudo-code that hopefully illustrates what I want to do: > > records = list(...) > for record in records: >     new_fcn = define_a function_for(record) >     instance = my_new_class_instance() >     setattr(instance

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Marc 'BlackJack' Rintsch
On Tue, 25 Mar 2008 12:32:17 -0700, blackpawn wrote: > So what's the deal here? :) I want all objects to be freed when I > shut down and their destruction functions to be properly called. Then you want something that's not guaranteed by the language. Ciao, Marc 'BlackJack' Rintsch --

Re: Files, directories and imports - relative to the current directory only

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 15:35:34 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: > ptn wrote: >> Traceback (most recent call last): >> File "path.py", line 4, in >> f = open('~/read/foo.txt') >> IOError: [Errno 2] No such file or >> directo

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Christian Heimes
blackpawn schrieb: > So what's the deal here? :) I want all objects to be freed when I > shut down and their destruction functions to be properly called. Is > there really no way to make this happen? Does the Noddy example use GC (Py_TPFLAGS_HAVE_GC)? Container objects must use the cycle GC or

Re: setattr what is the parent object?

2008-03-25 Thread Gabriel Genellina
En Tue, 25 Mar 2008 15:46:57 -0300, Jules Stevenson <[EMAIL PROTECTED]> escribió: > I'm trying to use setattr to dynamically name and layout gui wx widgets, > this is all fine and dandy until I've run up against something where I > simply don't know what the object is, please see the amended **d

Re: PyGTK localisation on Win32

2008-03-25 Thread Jarek Zgoda
jwesonga pisze: > I've built an app on linux which we have managed to localise into at > least three languages, the app runs well using this command LANG=fr_FR > python app.py which would translate the app into french. We've tried > the replicate the same principle on windows but so far nothing wor

Re: "Soup Strainer" for ElementSoup?

2008-03-25 Thread erikcw
On Mar 25, 12:17 am, John Nagle <[EMAIL PROTECTED]> wrote: > erikcwwrote: > > Hi all, > > > I was reading in the Beautiful Soup documentation that you should use > > a "Soup Strainer" object to keep memory usage down. > > > Since I'm already using Element Tree elsewhere in the project, I > > figure

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Paul McGuire
On Mar 25, 2:32 pm, blackpawn <[EMAIL PROTECTED]> wrote: > I've been trying to get garbage collection of circular references to > work properly with no success then I noticed the documentation stating > that it just doesn't: > > From documentation on Py_Finalize() -> "Memory tied up in circular > r

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread blackpawn
> Does the Noddy example use GC (Py_TPFLAGS_HAVE_GC)? Container objects > must use the cycle GC or circular referneces aren't broken. Have you > tried calling PyGC_Collect() multiple times? Yeah the Noddy example is from "2.1.3 Supporting cyclic garbage collection" part of the Python docs. They l

Re: how to dynamically create class methods ?

2008-03-25 Thread j vickroy
Arnaud Delobelle wrote: > On Mar 25, 6:13 pm, j vickroy <[EMAIL PROTECTED]> wrote: >> Hello, >> >> Here is some pseudo-code that hopefully illustrates what I want to do: >> >> records = list(...) >> for record in records: >> new_fcn = define_a function_for(record) >> instance = my_new_class

  1   2   >