Re: using super

2007-12-31 Thread iu2
On Dec 31 2007, 6:03 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > As to the original idea, better to give it up. > Typically code for a "chained" method "foo" that > returns a result will want to (in some way) use > the result from that call in forming its result. > Python's super allows yo

Re: pdf library.

2007-12-31 Thread Shriphani
On Dec 30 2007, 5:08 am, Waldemar Osuch <[EMAIL PROTECTED]> wrote: > On Dec 29, 11:54 am,Shriphani<[EMAIL PROTECTED]> wrote: > > > Hi, > > I am looking for a pdf library that will give me a list of pages where > > new chapters start. Can someone point me to such a module ? > > Regards, > >Shriphani

Re: usage of file separator

2007-12-31 Thread [EMAIL PROTECTED]
> > from os.path import join > #.. >     imgfile=join(folder, x) > > -- > Thomas Wittek > thanx! dn -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre behavior with mutable default arguments

2007-12-31 Thread NickC
On Jan 1, 3:22 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > > > I'm surprised noone has said anything about the why of default > > mutables. I think it is becasue it isn't easy to do it an other way. > > [...] > > There is an easy enou

Re: using super

2007-12-31 Thread Scott David Daniels
Steven D'Aprano wrote: > On Mon, 31 Dec 2007 16:19:11 -0800, Scott David Daniels wrote: > >> Steven D'Aprano wrote: >>> On Mon, 31 Dec 2007 08:03:22 -0800, Scott David Daniels wrote: Steven D'Aprano wrote: ... > def chain(meth): # A decorator for calling super. > def f(self, *arg

Re: getting n items at a time from a generator

2007-12-31 Thread NickC
On Dec 27 2007, 11:31 pm, Kugutsumen <[EMAIL PROTECTED]> wrote: > On Dec 27, 7:24 pm, Terry Jones <[EMAIL PROTECTED]> wrote: > > > > > > "Kugutsumen" == Kugutsumen <[EMAIL PROTECTED]> writes: > > > Kugutsumen> On Dec 27, 7:07 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > >> On Dec 27, 11:34

Re: dont loose packages

2007-12-31 Thread Bjoern Schliessmann
Oguz Yarimtepe wrote: > I am trying to write a program that will work on a machine which > is between a client and a server. What i want is to simulate the > bridging process. So the program should take the packages and able > to send them to the other interface. I dont want to loose package > and

Re: ElementTree should parse string and file in the same way

2007-12-31 Thread Steven D'Aprano
On Tue, 01 Jan 2008 01:53:47 +, Peter Pei wrote: > You are talking shit. It is never about whether it is hard to write a > wrapper. It is about bad design. I should be able to parse a string and > a file in exactly same way, and that should be provided as part of the > package. Oh my, somebod

Re: pexpect ssh login and ls | grep

2007-12-31 Thread crybaby
1) what are these characters: \x1b]0; ~\x07\x1b[?1034h in line '\x1b]0;[EMAIL PROTECTED]:[EMAIL PROTECTED] ~]'? 2) Also, how come I don't get 0 or 2(excuting ls command exit code) from result.split('\r\n')[0] or result.split('\r\n')[1] ? This is what I get: >>> import pexpect >>> child=pexpect.s

Re: using super

2007-12-31 Thread Steven D'Aprano
On Mon, 31 Dec 2007 16:19:11 -0800, Scott David Daniels wrote: > Steven D'Aprano wrote: >> On Mon, 31 Dec 2007 08:03:22 -0800, Scott David Daniels wrote: >>> Steven D'Aprano wrote: ... def chain(meth): # A decorator for calling super. def f(self, *args, **kwargs): resul

Re: ElementTree should parse string and file in the same way

2007-12-31 Thread Peter Pei
To be preise, XPath is not fully supported. Don't be a smart asshole. = "Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Peter Pei wrote: >> One bad design about elementtree is that it has different wa

Re: ElementTree should parse string and file in the same way

2007-12-31 Thread Peter Pei
You are talking shit. It is never about whether it is hard to write a wrapper. It is about bad design. I should be able to parse a string and a file in exactly same way, and that should be provided as part of the package. Looks like you are just a code monkey not a designer, so I forgive you. Y

Re: [OT] minimalist web server

2007-12-31 Thread Daniel Fetchinson
> Using DSL (Damn Small Linux) try apache! Or you can try litehttpd > > > > Hi list, > > > > This is way off topic but maybe somebody knowledgeable can help. > > > > I'm looking for the most minimalist web server ever that does nothing > > else than return a fixed static page for every request.

Re: using super

2007-12-31 Thread Scott David Daniels
Steven D'Aprano wrote: > On Mon, 31 Dec 2007 08:03:22 -0800, Scott David Daniels wrote: >> Steven D'Aprano wrote: ... >>> def chain(meth): # A decorator for calling super. >>> def f(self, *args, **kwargs): >>> result = meth(self, *args, **kwargs) >>> S = super(self.__class__, s

Re: argv[0] and __file__ inconsistency

2007-12-31 Thread Benjamin M. A'Lee
On Mon, Dec 31, 2007 at 02:31:39PM -0800, Hai Vu wrote: > I currently use ActivePython 2.5.1. Consider the following code which > I saved as cmdline.py: > import sys > print sys.argv[0] > If I invoke this code as 'python cmdline.py', then the output is: > cmdline.py > If I invoke it as

Re: using super

2007-12-31 Thread Steven D'Aprano
On Mon, 31 Dec 2007 08:03:22 -0800, Scott David Daniels wrote: > Steven D'Aprano wrote: >> ... >> I'm not sure if this is your only problem or not, but super() only >> works with new-style classes, not with classic classes. You must >> inherit from object, or it cannot possibly work. >> >> Change

Re: argv[0] and __file__ inconsistency

2007-12-31 Thread Hai Vu
> use os.path.abspath Bingo! This is just what the doctor ordered. Thank you. Hai -- http://mail.python.org/mailman/listinfo/python-list

Re: pexpect ssh login and ls | grep

2007-12-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, crybaby <[EMAIL PROTECTED]> wrote: >I need to ssh into a remote machine and check if mytest.log file is >there. I have setup ssh keys to handle login authentications. > >How do I determine if mytest.log is there by using Pexpect. What I >have done so far is spawned

Re: argv[0] and __file__ inconsistency

2007-12-31 Thread John Machin
On Jan 1, 9:31 am, Hai Vu <[EMAIL PROTECTED]> wrote: > I currently use ActivePython 2.5.1. Consider the following code which > I saved as cmdline.py: > import sys > print sys.argv[0] > If I invoke this code as 'python cmdline.py', then the output is: > cmdline.py > If I invoke it as 'cm

Re: What's the limit of variables size in pyhton?

2007-12-31 Thread Gabriel Genellina
En Mon, 31 Dec 2007 20:05:41 -0200, هنداوى <[EMAIL PROTECTED]> escribi�: > On Dec 31, 11:26 am, "James Matthews" <[EMAIL PROTECTED]> wrote: >> However some Debuggers will not show you variable's that are too big! >> >> On Dec 31, 2007 7:38 PM, Gabriel Genellina <[EMAIL PROTECTED]> >> wrote: >> >>

argv[0] and __file__ inconsistency

2007-12-31 Thread Hai Vu
I currently use ActivePython 2.5.1. Consider the following code which I saved as cmdline.py: import sys print sys.argv[0] If I invoke this code as 'python cmdline.py', then the output is: cmdline.py If I invoke it as 'cmdline.py', then the output is: C:\Users\hai\src\python\cmdline.

Re: What's the limit of variables size in pyhton?

2007-12-31 Thread [EMAIL PROTECTED]
On Dec 31, 4:05 pm, "هنداوى" <[EMAIL PROTECTED]> wrote: > On Dec 31, 11:26 am, "James Matthews" <[EMAIL PROTECTED]> wrote: > > > However some Debuggers will not show you variable's that are too big! > > > On Dec 31, 2007 7:38 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > > > En Mon, 31 Dec 2

Re: Choosing a new language

2007-12-31 Thread Achim Schneider
Tim Roberts <[EMAIL PROTECTED]> wrote: > Xah Lee <[EMAIL PROTECTED]> wrote: > > > >Let me tell you, since you know PHP, that PHP and Perl are > >practically identical in their high-levelness or expressiveness or > >field of application (and syntax), and, Perl and Python are pretty > >much the same

Re: What's the limit of variables size in pyhton?

2007-12-31 Thread هنداوى
On Dec 31, 11:26 am, "James Matthews" <[EMAIL PROTECTED]> wrote: > However some Debuggers will not show you variable's that are too big! > > On Dec 31, 2007 7:38 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > > En Mon, 31 Dec 2007 15:40:31 -0200, هنداوى <[EMAIL PROTECTED]> > > escribi�: > > >

Re: Choosing a new language

2007-12-31 Thread Tim Roberts
Xah Lee <[EMAIL PROTECTED]> wrote: > >Let me tell you, since you know PHP, that PHP and Perl are practically >identical in their high-levelness or expressiveness or field of >application (and syntax), and, Perl and Python are pretty much the >same except their syntax. I agree with the fundamental

Re: Bizarre behavior with mutable default arguments

2007-12-31 Thread Chris Mellon
On Dec 31, 2007 2:08 PM, Odalrick <[EMAIL PROTECTED]> wrote: > On 31 Dec, 18:22, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > > > > > On 30 Dec, 17:26, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > > On Dec 29, 9:14 pm, bukzor <[EMA

Re: OOP: How to implement listing al 'Employees'.

2007-12-31 Thread Mike Orr
On Dec 29, 1:53 am, Petar <[EMAIL PROTECTED]> wrote: > Let me explain how I got to this question. I had written een Article > class which handled the articles that I had. On a certain page I > wanted to show all the articles. That got me wondering about what to > do. Should I make a method in my A

Re: Python Trajectory Module?

2007-12-31 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Greetings, > > I was wondering if there was a python Module/Library out there that > handles some trajectory/physics stuff like moving an object along a > straight path in an X,Y 2D (or 3D) plane or calculating parabolic > arcs. I'd really settle for just the moving of a

Re: Bizarre behavior with mutable default arguments

2007-12-31 Thread Odalrick
On 31 Dec, 18:22, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > > > On 30 Dec, 17:26, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > On Dec 29, 9:14 pm, bukzor <[EMAIL PROTECTED]> wrote: > > > > > Here's the answer to the > > > > questio

pexpect ssh login and ls | grep

2007-12-31 Thread crybaby
I need to ssh into a remote machine and check if mytest.log file is there. I have setup ssh keys to handle login authentications. How do I determine if mytest.log is there by using Pexpect. What I have done so far is spawned a child for ssh. 1) Now what do I do to execute shell_cmd(ls and grep),

Re: ElementTree should parse string and file in teh same way

2007-12-31 Thread James Matthews
When dealing with files you pass it an object! So make your string an object and then it should work! On Dec 31, 2007 8:17 AM, Paddy <[EMAIL PROTECTED]> wrote: > On Dec 31, 3:42 am, "Peter Pei" <[EMAIL PROTECTED]> wrote: > > One bad design about elementtree is that it has different ways parsing a

Re: Python for web...

2007-12-31 Thread James Matthews
The issue is finding a host with mod_python installed for cheap! On Dec 31, 2007 7:57 AM, David Van Mosselbeen < [EMAIL PROTECTED]> wrote: > on Tue, 25 Dec 2007 20:42:03 -0800 (PST), [EMAIL PROTECTED] < > [EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > > I have to develop a web based enterpr

Re: What's the limit of variables size in pyhton?

2007-12-31 Thread James Matthews
However some Debuggers will not show you variable's that are too big! On Dec 31, 2007 7:38 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Mon, 31 Dec 2007 15:40:31 -0200, هنداوى <[EMAIL PROTECTED]> > escribi�: > > > Python allow you to only take care about variable name and ignore it's > >

Re: Newbie: Why doesn't this work

2007-12-31 Thread Gabriel Genellina
En Mon, 31 Dec 2007 16:01:38 -0200, <[EMAIL PROTECTED]> escribi�: > Thanks you Gabriel and Timm for your thoughtful responses. I am very > appreciative. > > I had heard about the properties function, but wanted to understand > the old syntax first before I tried that. Thanks to your responses, I

if you want do business on the internet .pls go, if you want buy much popular and inexpensive price pls go

2007-12-31 Thread yhnetstore1
if you want do business on the internet .pls go,if you want buy much popular and inexpensive price pls go In order to greet the new year the arrival, company in new year grand preferential policy: 1. The shopping full 500USD customer, may enjoy the company to provide 90% discount the preferentia

Re: What's the limit of variables size in pyhton?

2007-12-31 Thread Gabriel Genellina
En Mon, 31 Dec 2007 15:40:31 -0200, هنداوى <[EMAIL PROTECTED]> escribi�: > Python allow you to only take care about variable name and ignore it's > size because pyhton dynamicly allocate it > so what's the limit in the allocated size in the memory As big as would fit on available memory. -- Gab

Re: Unexpected __metaclass__ method behavior

2007-12-31 Thread Arnaud Delobelle
On Dec 31, 12:06 pm, [EMAIL PROTECTED] wrote: > Well, you see, I have some database functions that deal with "things" > which are either classes or instances thereof. I though polymorphism > would be a nice way to handle them identically, like: > > def do(thing): thing.Foo() > do(t) > do(Test) > >

Re: os.fork leaving processes behind

2007-12-31 Thread Falcolas
On Dec 28, 12:11 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > I'd try to use any of the existing server implementations in > SocketServer.py, but if you insist on using your own, look at the > ForkingMixin class as an example of using waitpid() to avoid having zombie > processes. > > -- > G

Re: at what complexity, a comparison fails ?

2007-12-31 Thread Robert Kern
Stef Mientki wrote: > hello, > > I had a program that worked perfectly well. > In this program modules were dynamically added, > just by putting the file in a predefined directory. > > Now one of the interface mechanisms was to see if some parameter was > changed in a an instance, > by comparing

Re: evolution-python

2007-12-31 Thread eloi-ribeiro.blogspot.com
Thanks a lot Egon it really helped me, I have used evolution-addressbook-export --format=vcard -- output=file_name.txt by, Eloi On Dec 31, 10:47 am, Egon Frerich <[EMAIL PROTECTED]> wrote: > eloi-ribeiro.blogspot.com schrieb: > > > Hi everyone, > > > I would like to use a python script to expor

Re: Newbie: Why doesn't this work

2007-12-31 Thread Jeff McNeil
I didn't actually answer your question, my apologies! The reason you're failing is due to your use of the __setattr__ call. Remember, when you override __setattr__, you need to handle *all* of the logic behind setting object attributes. You're only attempting to do so when handling the 'name' pro

Re: Newbie: Why doesn't this work

2007-12-31 Thread ct60
Thanks you Gabriel and Timm for your thoughtful responses. I am very appreciative. I had heard about the properties function, but wanted to understand the old syntax first before I tried that. Thanks to your responses, I was able to see what the problem was. Here is a solution I came up with:

What's the limit of variables size in pyhton?

2007-12-31 Thread هنداوى
Python allow you to only take care about variable name and ignore it's size because pyhton dynamicly allocate it so what's the limit in the allocated size in the memory -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: Why doesn't this work

2007-12-31 Thread Tim Chase
A couple items of note: > class Person: This should be "class Person(object)" to take advantage of some of the features that new-style classes offer...particularly in this case. > def __init__(self, fName="", lName=""): > self.__fName = fName > self.__lName = lName > > d

Re: Newbie: Why doesn't this work

2007-12-31 Thread Gabriel Genellina
En Mon, 31 Dec 2007 14:56:02 -0200, <[EMAIL PROTECTED]> escribi�: > Hi Python Community: > > Despite my new-ness to Python I have alreadhy been able to do some (I > think) amazing things. It is a truly elegant and smart language. > > Yet, I can not seem to get a handle on something simple. > > I

Re: Newbie: Why doesn't this work

2007-12-31 Thread Jeff McNeil
Perhaps you'd be better off using a standard property? Within your Person class, you can define a property 'name' to handle what you're trying to do: Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "copyright", "credits" or "license()" for

Re: Bizarre behavior with mutable default arguments

2007-12-31 Thread Arnaud Delobelle
On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > On 30 Dec, 17:26, George Sakkis <[EMAIL PROTECTED]> wrote: > > > On Dec 29, 9:14 pm, bukzor <[EMAIL PROTECTED]> wrote: > > > > Here's the answer to the > > > question:http://www.python.org/doc/faq/general/#why-are-default-values-shared-...

Re: Python Trajectory Module?

2007-12-31 Thread Paul McGuire
On Dec 31, 9:40 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Greetings, > > I was wondering if there was a python Module/Library out there that > handles some trajectory/physics stuff like moving an object along a > straight path in an X,Y 2D (or 3D) plane or calculating parabolic > arcs. I

Re: Python Trajectory Module?

2007-12-31 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Greetings, > > I was wondering if there was a python Module/Library out there that > handles some trajectory/physics stuff like moving an object along a > straight path in an X,Y 2D (or 3D) plane or calculating parabolic > arcs. I'd really settle for just the moving of

Re: at what complexity, a comparison fails ?

2007-12-31 Thread Hans Nowak
Stef Mientki wrote: > hello, > > I had a program that worked perfectly well. > In this program modules were dynamically added, > just by putting the file in a predefined directory. > > Now one of the interface mechanisms was to see if some parameter was > changed in a an instance, > by comparing

Re: at what complexity, a comparison fails ?

2007-12-31 Thread Zentrader
On Dec 31, 2:45 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > So what I need was something like: > if A != A_prev : > ... do something > A_prev = A If A_prev is not declared prior to the if statement, you will get an error when you try to compare the non-existing variable to A.

Python-URL! - weekly Python news and links (Dec 31)

2007-12-31 Thread Gabriel Genellina
QOTW: "I find the best approach is to use multiple languages." - Roger Binns "All generators can be re-written with classes using the iterator protocol." - Jean-Paul Calderone Mutable default arguments revisited: http://groups.google.com/group/comp.lang.python/browse_thread/t

dont loose packages

2007-12-31 Thread Oguz Yarimtepe
Hi, I am trying to write a program that will work on a machine which is between a client and a server. What i want is to simulate the bridging process. So the program should take the packages and able to send them to the other interface. I dont want to loose package and i want efficiency. I t

Re: usage of file separator

2007-12-31 Thread Thomas Wittek
[EMAIL PROTECTED]: > for x in imagefilenames: > imgfile=folder+"/"+x > newimgfilenamelist.append(imgfile) > > [..] how do i make it work on other os? from os.path import join #.. imgfile=join(folder, x) -- Thomas Wittek Web: http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED]

Re: help building python installer

2007-12-31 Thread Martin v. Löwis
> Now i want to build an msi installer out of this. What's procedure > that I should follow for this ?? See Tools/msi. Notice that this (*) isn't supported, so you are on your own; you probably need to change msi.py Regards, Martin (*) Packaging a Python installer that was built with MSVC 8. --

Re: Sub-classing unicode: getting the unicode value

2007-12-31 Thread Martin v. Löwis
>>> How does my object get its own value? >> def __unicode__(self): >> return unicode(self) > > I get an endless recursion with this. I see. That worked fine in Python 2.4, but give a stack overflow in Python 2.5. Depending on your exact class definition, something like return supe

Newbie: Why doesn't this work

2007-12-31 Thread ct60
Hi Python Community: Despite my new-ness to Python I have alreadhy been able to do some (I think) amazing things. It is a truly elegant and smart language. Yet, I can not seem to get a handle on something simple. I would like to make a class which has private varaiables fName and lName. It sh

PyPy-Sprint 12th-19th January Leysin, Switzerland

2007-12-31 Thread Carl Friedrich Bolz
= PyPy Leysin Winter Sprint (12-19th January 2008) = .. image:: http://www.ermina.ch/002.JPG The next PyPy sprint will be in

Re: using super

2007-12-31 Thread Gabriel Genellina
En Mon, 31 Dec 2007 12:08:43 -0200, Steven D'Aprano <[EMAIL PROTECTED]> escribi�: > On Mon, 31 Dec 2007 05:47:31 -0800, iu2 wrote: > >> I'm trying to make a method call automatically to its super using this >> syntax: > > > def chain(meth): # A decorator for calling super. > def f(self, *ar

Re: using super

2007-12-31 Thread Scott David Daniels
Steven D'Aprano wrote: > ... > I'm not sure if this is your only problem or not, but super() only works > with new-style classes, not with classic classes. You must inherit from > object, or it cannot possibly work. > > Change "class A" to "class A(object)". Absolutely correct. However, the sug

usage of file separator

2007-12-31 Thread [EMAIL PROTECTED]
in my code i am iterating thru a list of filenames (like 'image1.jpg' etc) and appending them to fully qualified directory names for x in imagefilenames: imgfile=folder+"/"+x newimgfilenamelist.append(imgfile) sothat finally i can get items like c:/mycode/image1.jpg etc from the newi

Re: TK 8.5

2007-12-31 Thread Kevin Walzer
Christian Heimes wrote: > Leon wrote: > >> 2) Is it a way to use Tk 8.5 with the present version of Python (2.5) ? > > No, not yet. It may be possible to back port Tcl Tk 8.5 support from 2.6 > to 2.5 once we have finished the migration to 8.5. Actually, you can. I'm using a custom-built Python

Python Trajectory Module?

2007-12-31 Thread [EMAIL PROTECTED]
Greetings, I was wondering if there was a python Module/Library out there that handles some trajectory/physics stuff like moving an object along a straight path in an X,Y 2D (or 3D) plane or calculating parabolic arcs. I'd really settle for just the moving of an object along a straight line. I kn

Re: using super

2007-12-31 Thread Steven D'Aprano
On Mon, 31 Dec 2007 05:47:31 -0800, iu2 wrote: > Hi > > I'm trying to make a method call automatically to its super using this > syntax: [snip code] I'm not sure if this is your only problem or not, but super() only works with new-style classes, not with classic classes. You must inherit from

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Torsten Bronger
Hallöchen! Paul McGuire writes: > On Dec 31, 2:54 am, abhishek <[EMAIL PROTECTED]> wrote: >> >> Use this function -- >> >> def omitNonAscii(nstr): >>     sstr='' >>     for r in nstr: >>         if ord(r)<127: >>             sstr+=r >>     return sstr > > > Learn the ways of the generator expres

if you want do business on the internet .pls go, if you want buy much popular and inexpensive price pls go

2007-12-31 Thread yhnetstore6
if you want do business on the internet .pls go,if you want buy much popular and inexpensive price pls go 2008 new year, 2008 Good news www.yhnetstore.com In order to greet the new year the arrival, company in new year grand preferential policy: 1. The shopping full 500USD customer, may enjoy th

Re: at what complexity, a comparison fails ?

2007-12-31 Thread Steven D'Aprano
On Mon, 31 Dec 2007 11:45:55 +0100, Stef Mientki wrote: > hello, > > I had a program that worked perfectly well. In this program modules were > dynamically added, just by putting the file in a predefined directory. > > Now one of the interface mechanisms was to see if some parameter was > change

using super

2007-12-31 Thread iu2
Hi I'm trying to make a method call automatically to its super using this syntax: class A: chained = ['pr'] def pr(self): print 'Hello from A' class B(A): def pr(self): print 'Hello from B' chain(B, A) b = B() b.pr() b.pr() will print Hello from B Hello from A I'm

Re: TK 8.5

2007-12-31 Thread Christian Heimes
Leon wrote: > 1) Did you know if a future version of Python/Tkinter will use Tk 8.5 ? > And when ? We are planing to use Tcl/Tk 8.5 for Python 2.6 and 3.0. The topic is currently being discussed but nothing has been decided yet. > 2) Is it a way to use Tk 8.5 with the present version of Python (

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Michael Ströder
[EMAIL PROTECTED] wrote: > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed of > only ascii characters? I'd recommend to re

M.I 5-Perse cution ` 22,5 44 + 837 = 23 ,381

2007-12-31 Thread fivfm
MI5. Persecution Update: Friday 7 April, 2000 22,544 +. 837 = 23,381 Last weekend I delivered another 837 faxes to politicians and the. media on the subject. of the security service conspiracy which has destroyed my life.. This brings the total in the last three years to at least 23,381. These t

Re: Unexpected __metaclass__ method behavior

2007-12-31 Thread anne . nospam01
Well, you see, I have some database functions that deal with "things" which are either classes or instances thereof. I though polymorphism would be a nice way to handle them identically, like: def do(thing): thing.Foo() do(t) do(Test) But never mind, I now understand that Test.__dict__ can contai

M, I.5'Persec ution MI5 In sist tha t the se F axes mu st Con tinue

2007-12-31 Thread vfmivmiv
MI5 Persecution. Update: Friday 31 March, 2000 22,544 Faxes Delivered in Three Years, and Still No. Breakthrough In the last three. years I have sent at least 22,544 faxes to recipients in the UK, of. which at least 13,974 have gone to Westminster. Last weekend alone I sent 832 completed faxes t

Re: TK 8.5

2007-12-31 Thread marcpenninga
On 31 dec, 09:41, Leon <[EMAIL PROTECTED]> wrote: > 2) Is it a way to use Tk 8.5 with the present version of Python (2.5) ? > > Can you give me informations (or links, etc...) about this three > questions ? These links might help: http://tkinter.unpythonic.net/wiki/TileWrapper http://tkinter.unpy

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread John Machin
On Dec 31, 7:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed o

Re: at what complexity, a comparison fails ?

2007-12-31 Thread Marc 'BlackJack' Rintsch
On Mon, 31 Dec 2007 11:45:55 +0100, Stef Mientki wrote: > Now one of the interface mechanisms was to see if some parameter was > changed in a an instance, > by comparing the value from the instance with its previous value > > This went all well, untill I added a too complex variable, > then the

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Steven D'Aprano
On Mon, 31 Dec 2007 01:09:09 -0800, John Machin wrote: > On Dec 31, 7:20 pm, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Is there a string function to trim all non-ascii characters out of a >> string? >> Let say I have a string in python (which is utf8 encoded), is there a >> pyt

M`I,5.Persec ution ` MI 5 W ant Me to Se nd Y ou t hese Faxes

2007-12-31 Thread mevfv
MI5 Want Me to Send You these. Faxes MI5. seem to Want to Spin this Business out for as Long as Possible The MI5 persecution has. now been going on, starting from June 1990, for well over nine years. If I. knew how to put an end to it then I would do so. Of course MI5 have indicated how they wi

Re: Bizarre behavior with mutable default arguments

2007-12-31 Thread Odalrick
On 30 Dec, 17:26, George Sakkis <[EMAIL PROTECTED]> wrote: > On Dec 29, 9:14 pm, bukzor <[EMAIL PROTECTED]> wrote: > > > Here's the answer to the > > question:http://www.python.org/doc/faq/general/#why-are-default-values-shared-... > > > It looks like Guido disagrees with me, so the discussion is

at what complexity, a comparison fails ?

2007-12-31 Thread Stef Mientki
hello, I had a program that worked perfectly well. In this program modules were dynamically added, just by putting the file in a predefined directory. Now one of the interface mechanisms was to see if some parameter was changed in a an instance, by comparing the value from the instance with its

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Duncan Booth
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed of > only ascii cha

M'I`5 Pers ecution Thr ee Year s of MI5 Persecution Fa xes

2007-12-31 Thread fefvmimvm
Three Years of. "MI5 Persecution" Faxes Ten Thousand Faxes,. and Still No Breakthrough In the last three years I have sent. at least 5,301 faxes directly from my computer, and 4,478 faxes through Demons extremely. useful TPC.INT service, to politicians and the media, in. the subject of the "MI5

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Paul McGuire
On Dec 31, 2:54 am, abhishek <[EMAIL PROTECTED]> wrote: > > Use this function -- > > def omitNonAscii(nstr): >     sstr='' >     for r in nstr: >         if ord(r)<127: >             sstr+=r >     return sstr Learn the ways of the generator expression you must. See Dan Bishop's post. -- Paul --

M-I 5.Pe rsecution . Ha rassment throu gh the Ra dio

2007-12-31 Thread fvfmfi
MI5 Persecution. Update: Friday 9 July, 1999 Harassment in Poland,. July 1999 And still it continues in my last fax I said. that provided MI5 made no attempts at. harassment during my two-week holiday this summer, or after I returned to England, then. I would discontinue these faxes. Unfortu

Re: evolution-python

2007-12-31 Thread Egon Frerich
eloi-ribeiro.blogspot.com schrieb: > Hi everyone, > > I would like to use a python script to export (save as...) all my > contacts in Evolution to VCard format (.vcf). I am a beginner so I > don't knock how to use evolution-python module. The second part of the > script would be to make inserts to

M`I'5.Persecu tion - M I5 Hav e System atically Dest royed My Li fe

2007-12-31 Thread ivime
MI5. Have Systematically Destroyed My Life This is getting depressing. From the feedback Ive received, the. recipients of these faxes are tired of hearing my complaints,. and in truth I am tired of sending them.. The reason I havent yet ceased sending faxes is because I cannot think of any other

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread John Machin
On Dec 31, 7:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed o

M'I.5,Persecution No Justi ce fo r the Vi ctims of MI5

2007-12-31 Thread mivefifim
MI5 Persecution. Update: Friday 11 June, 1999 Harassment. in a pub in Clapham, Tuesday lunchtime Once a month, or once every other month, I meet a Polish friends of. mine who lives in Clapham North, and sometimes we go to. a particular pub near where he lives. The last time. was some two months

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread John Machin
On Dec 31, 7:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed o

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread abhishek
On Dec 31, 1:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed o

Re: Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread Dan Bishop
On Dec 31, 2:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a string function to trim all non-ascii characters out of a > string? > Let say I have a string in python (which is utf8 encoded), is there a > python function which I can convert that to a string which composed o

Re: Tab indentions on different platforms?

2007-12-31 Thread Thorsten Kampe
* Steven D'Aprano (Mon, 31 Dec 2007 00:05:15 -) > On Sun, 30 Dec 2007 20:41:09 +, Thorsten Kampe wrote: > > Anyway: the consequence of your well done argumentation is that > > someone editing Python code has to use a specialised editor to prevent > > screwing up tab indented code - and that

M-I, 5`Pers ecution - MI5 are Afra id to Ad mit Theyre B ehind the Persecut ion

2007-12-31 Thread fievmfvf
MI5 are Afraid to Admit They're Behind the. Persecution MI5 have issued a formal denial of any involvement in my life to. the Security Service. Tribunal, as you might expect them to; but, more importantly, the persecutors have never denied that theyre. from the Security Service, despite several y

Re: Help please with code to find and move files.

2007-12-31 Thread Gabriel Genellina
En Mon, 31 Dec 2007 05:09:37 -0200, <[EMAIL PROTECTED]> escribió: > I am sorry if I was not clear in what I was trying to achieve. All I > wanted was simple way to achieve what windows does when you use search > for Files or Folders, and all the files that mach two words like foo > and bar in the

Re: Tab indentions on different platforms?

2007-12-31 Thread Thorsten Kampe
* Steven D'Aprano (Sun, 30 Dec 2007 23:28:50 -) > On Sun, 30 Dec 2007 20:33:19 +, Thorsten Kampe wrote: > > * Steven D'Aprano (Sun, 30 Dec 2007 00:37:32 -) > >> On Sat, 29 Dec 2007 15:29:25 +, Thorsten Kampe wrote: > >> > I'd personally go for spaces because: > >> > > >> > 1. I don

TK 8.5

2007-12-31 Thread Leon
Hello, First of all, I beg you pardon for my poor english... You probably know it, but a new version of Tcl/TK has arrived : http://groups.google.fr/group/comp.lang.tcl/browse_frm/thread/747fcc9df3274310/ With TK8.5, I found the look and feel better that in the past : http://wiki.tcl.tk/13636

M'I.5'P ersecution Moles tation du ring Trave l

2007-12-31 Thread efvemimiv
MI5 Persecution:. Molestation during Travel MI5s persecution of me varies in intensity. Since 1990 it has. been steady for perhaps 80% of the time; there was. a notable quiet period in 1993, and another quiet period in Jan-Feb 1995, as. well as a hiatus in the first two months of 1999. It puzzles

Is there a string function to trim all non-ascii characters out of a string

2007-12-31 Thread [EMAIL PROTECTED]
Hi, Is there a string function to trim all non-ascii characters out of a string? Let say I have a string in python (which is utf8 encoded), is there a python function which I can convert that to a string which composed of only ascii characters? Thank you. -- http://mail.python.org/mailman/listin

Re: Cheat sheet

2007-12-31 Thread Gabriel Genellina
En Sat, 29 Dec 2007 06:58:27 -0200, ZeD <[EMAIL PROTECTED]> escribi�: > Michele Simionato wrote: > >> Nowadays file is no more an alias for open. > > curious... maybe it's me, but I can't find a "What's New in Python" where > this is said... See Misc/NEWS: - Patch #1479181: split open() and file(

Re: ElementTree should parse string and file in the same way

2007-12-31 Thread Stefan Behnel
Peter Pei wrote: > One bad design about elementtree is that it has different ways parsing a > string and a file, even worse they return different objects: > 1) When you parse a file, you can simply call parse, which returns a > elementtree, on which you can then apply xpath; ElementTree doesn't su

  1   2   >