Re: Need a strange sort method...

2006-10-16 Thread Simon Brunning
On 10/16/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > >>> a = [1,2,3,4,5,6,7,8,9,10] > >>> a.sort(key=lambda item: (((item-1) %3), item)) > >>> a > [1, 4, 7, 10, 2, 5, 8, 3, 6, 9] Re-reading the OP's post, perhaps sorting isn't what's required: >>> a[::3] + a[1::3] + a[2::3] [1, 4, 7, 10, 2, 5

Re: Need a strange sort method...

2006-10-16 Thread Gerard Flanagan
SpreadTooThin wrote: > I have a list and I need to do a custom sort on it... > > for example: > a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order > > def cmp(i,j): #to be defined in this thread. > > a.sort(cmp) > > print a > [1,4,7,10, 2,5,8, 3,6,9] > > So withouth making this into a

Re: Ok. This IS homework ...

2006-10-16 Thread Frederic Rentsch
Nick Craig-Wood wrote: > Frederic Rentsch <[EMAIL PROTECTED]> wrote: > >> It was called a flow chart. Flow charts could be translated directly >> into machine code written in assembly languages which had labels, tests >> and jumps as the only flow-control constructs. When structured >> pr

Re: How to send E-mail without an external SMTP server ?

2006-10-16 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > Yes, I want to find a way to send email without an external smtp server. You can't. Use a DNS server to find the MX record of the destination domain, connect to that SMTP server, then deliver the mail. Sybren -- Sybren Stüvel Stüvel IT - http://www.stuv

Re: Alphabetical sorts

2006-10-16 Thread Neil Cerutti
On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote: > > I have several applications where I want to sort lists in > alphabetical order. Most examples of sorting usually sort on > the ord() order of the character set as an approximation. But > that is not always what you want. Check out strxfrm in

Re: Need a strange sort method...

2006-10-16 Thread Tim Chase
> for example: > a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order > > def cmp(i,j): #to be defined in this thread. Well, if you're willing to give up doing it in a cmp() method, you can do it as such: >>> a.sort() >>> chunk_size = 3 >>> [a[i::chunk_size] for i in range(chunk_si

Re: Need a strange sort method...

2006-10-16 Thread Saizan
SpreadTooThin wrote: > I have a list and I need to do a custom sort on it... > > for example: > a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order > > def cmp(i,j): #to be defined in this thread. > > a.sort(cmp) > > print a > [1,4,7,10, 2,5,8, 3,6,9] > > So withouth making this into a

Re: OT: What's up with the starship?

2006-10-16 Thread rurpy
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > Then perhaps you or he could explain it to us less intelligent > > people in very simple terms? > > the security advisory explains that the cause of the problem is a bug > in the source code used to implement repr() for 32-bit Unicode strings,

Re: OT: What's up with the starship?

2006-10-16 Thread Shane Hathaway
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > >> Then perhaps you or he could explain it to us less intelligent >> people in very simple terms? > > the security advisory explains that the cause of the problem is a bug > in the source code used to implement repr() for 32-bit Unicode strings,

string splitting

2006-10-16 Thread rdharles
Hello, I have thousands of files that look something like this: wisconsin_state.txt french_guiana_district.txt central_african_republic_province.txt I need to extract the string between the *last* underscore and the extention. So based on the files above, I want returned: state district province

Re: Need a strange sort method...

2006-10-16 Thread SpreadTooThin
Fredrik Lundh wrote: > SpreadTooThin wrote: > > > I have a list and I need to do a custom sort on it... > > > Its more like > > 1 4 7 10 > > 2 5 8 > > 3 6 9 > > that's trivial to do with slicing, of course. what makes you think you > need to do this by calling the "sort" method ? > > You are of

Re: urllib.urlopen: Errno socket error

2006-10-16 Thread kgrafals
Hi Salvatore, Even if I catch the exceptions in a loop it goes on forever. - ken -- http://mail.python.org/mailman/listinfo/python-list

RE: jython and toString

2006-10-16 Thread Walter S. Leipold
toString() isn't supposed to be a static method. When you call x.toString(), you're accessing x's non-static version of toString(), which is inherited from Object. -- Walt ivansh ([EMAIL PROTECTED]) wrote: > For one java class (Hello) i use another (HelloPrinter) to build the > string represen

Re: string splitting

2006-10-16 Thread Simon Brunning
On 16 Oct 2006 12:12:38 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > I have thousands of files that look something like this: > > wisconsin_state.txt > french_guiana_district.txt > central_african_republic_province.txt > > I need to extract the string between the *last* underscore

Re: Need a strange sort method...

2006-10-16 Thread Neil Cerutti
On 2006-10-16, Tim Chase <[EMAIL PROTECTED]> wrote: > If you need it in a flat list, rather than as a list of > chunk_size lists (which are handy for iterating over in many > cases), there are ways of obtaining it, such as the hackish > > >>> sum([a[i::chunk_size] for i in range(chunk_size)], []) >

Re: string splitting

2006-10-16 Thread hiaips
[EMAIL PROTECTED] wrote: > Hello, > I have thousands of files that look something like this: > > wisconsin_state.txt > french_guiana_district.txt > central_african_republic_province.txt > > I need to extract the string between the *last* underscore and the > extention. > So based on the files abov

Re: Need a strange sort method...

2006-10-16 Thread Saizan
SpreadTooThin wrote: > > that's trivial to do with slicing, of course. what makes you think you > > need to do this by calling the "sort" method ? > > > > > > You are of course correct.. There might be a way to do this with > slicing > and i % 3 Slicing will work only with a sorted list. --

Re: How to send E-mail without an external SMTP server ?

2006-10-16 Thread Grant Edwards
On 2006-10-16, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 16 Oct 2006 17:04:19 +0800, "[EMAIL PROTECTED]" ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> >> Yes, I want to find a way to send email without an external smtp server. >> > You're going to have t

Re: How to send E-mail without an external SMTP server ?

2006-10-16 Thread Grant Edwards
On 2006-10-16, Sybren Stuvel <[EMAIL PROTECTED]> wrote: >> Yes, I want to find a way to send email without an external >> smtp server. > > You can't. Use a DNS server to find the MX record of the > destination domain, connect to that SMTP server, then deliver > the mail. Or, just send it to a rel

Re: string splitting

2006-10-16 Thread rdharles
Much thanks for your replies hiaips & Simon! R.D. -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: What's up with the starship?

2006-10-16 Thread skip
rurpy> It seems to have been disscussed publically starting around Oct 6 rurpy> or 7 (I didn't do a though search so this may be wrong.) It was rurpy> fixed in Python 2.5 so either it was treated as a ordinary bug rurpy> with unrecognised security implications, or the developers w

Re: Need a strange sort method...

2006-10-16 Thread Tim Chase
>>> that's trivial to do with slicing, of course. what makes you think you >>> need to do this by calling the "sort" method ? >>> >>> >> You are of course correct.. There might be a way to do this with >> slicing >> and i % 3 > > Slicing will work only with a sorted list. But modulus arithmeti

Re: Need a strange sort method...

2006-10-16 Thread SpreadTooThin
Simon Brunning wrote: > On 10/16/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > > >>> a = [1,2,3,4,5,6,7,8,9,10] > > >>> a.sort(key=lambda item: (((item-1) %3), item)) > > >>> a > > [1, 4, 7, 10, 2, 5, 8, 3, 6, 9] > > Re-reading the OP's post, perhaps sorting isn't what's required: > > >>> a[::3]

Re: Book about database application development?

2006-10-16 Thread Wolfgang Keller
> Developping quality SQLDBMS-based applications requires more than "a > bit" of SQL knowledge. No doubt. :-) But my "bit" is enough to get me going and to know where to look for further information if I hit a wall. Especially the people on the Postgres mailinglists (as well as the excellent doc

Re: Need a strange sort method...

2006-10-16 Thread Gerard Flanagan
Gerard Flanagan wrote: > SpreadTooThin wrote: > > I have a list and I need to do a custom sort on it... > > > > for example: > > a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order > > > 1 4 7 10 > > 2 5 8 > > 3 6 9 > > > > from math import sqrt > > for i in range(2,12): > seq = rang

Re: Need a strange sort method...

2006-10-16 Thread SpreadTooThin
SpreadTooThin wrote: > Simon Brunning wrote: > > On 10/16/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > > > >>> a = [1,2,3,4,5,6,7,8,9,10] > > > >>> a.sort(key=lambda item: (((item-1) %3), item)) > > > >>> a > > > [1, 4, 7, 10, 2, 5, 8, 3, 6, 9] > > > > Re-reading the OP's post, perhaps sorting

Re: OT: What's up with the starship?

2006-10-16 Thread Fredrik Lundh
Shane Hathaway wrote: > I don't know if this concern applies to Starship specifically, but it > seems to apply to thousands of web sites running Python CGIs and > Python web servers. so are we seeing thousands of web sites running Python CGIs and web servers being attacked right now? -- h

Re: string splitting

2006-10-16 Thread bearophileHUGS
A pair of solutions: >>> s = "central_african_republic_province.txt" >>> s.rsplit("_", 1)[-1].split(".")[0] 'province' >>> import re >>> p = re.compile(r"_ ([^_]+) \.", re.VERBOSE) >>> s = """\ ... wisconsin_state.txt ... french_guiana_district.txt ... central_african_republic_province.txt""" >>>

Re: run subprocess in separate window

2006-10-16 Thread Radek
Hello, as you can see, I tried subprocess methods. But could not find the right call. Radek [EMAIL PROTECTED] wrote: > Radek a écrit : > > > Hi, > > > > I am trying to create GUI launcher of several applications using Python > > and Tkinter. > > > > Currently when using subprocess.Popen("mycomm

Re: Need a strange sort method...

2006-10-16 Thread Paul Rubin
"SpreadTooThin" <[EMAIL PROTECTED]> writes: > > I have one extra 10 that I shouldn't... > > I think my loop termination is incorrect... It looks wrong to me; try your loop on range(20) and see what happens. > maybe I should just stop when my new series size is the same size as > the original? Y

Re: Need a strange sort method...

2006-10-16 Thread Gerard Flanagan
Gerard Flanagan wrote: > Gerard Flanagan wrote: > > SpreadTooThin wrote: > > > I have a list and I need to do a custom sort on it... > > > > > > for example: > > > a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order > > > > > 1 4 7 10 > > > 2 5 8 > > > 3 6 9 > > > > > > > from math impor

Re: OT: What's up with the starship?

2006-10-16 Thread Shane Hathaway
Fredrik Lundh wrote: > Shane Hathaway wrote: > > > I don't know if this concern applies to Starship specifically, but it > > seems to apply to thousands of web sites running Python CGIs and > > Python web servers. > > so are we seeing thousands of web sites running Python CGIs and web > serve

ADO with Python

2006-10-16 Thread Ralf
Is their anybody with xperience in using the both and can provide me with some xamples. Thx a lot Ralf -- http://mail.python.org/mailman/listinfo/python-list

Re:RELEASED Python 2.4.4, release candidate 1

2006-10-16 Thread Jonathan Smith
Anthony Baxter wrote: > On behalf of the Python development team and the Python community, > I'm happy to announce the release of Python 2.4.4 (release candidate 1). When trying to build 2.4.4c1 with cross-compiling, I get the following error. checking for /dev/ptmx... configure: error: cannot

Re: Need a strange sort method...

2006-10-16 Thread [EMAIL PROTECTED]
SpreadTooThin wrote: > SpreadTooThin wrote: > > Simon Brunning wrote: > > > On 10/16/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > > > > >>> a = [1,2,3,4,5,6,7,8,9,10] > > > > >>> a.sort(key=lambda item: (((item-1) %3), item)) > > > > >>> a > > > > [1, 4, 7, 10, 2, 5, 8, 3, 6, 9] > > > > > > Re-

Re: ADO with Python

2006-10-16 Thread hg
Ralf wrote: > Is their anybody with xperience in using the both and can provide me with > some xamples. > > Thx a lot > Ralf > > I suggest you buy the book from Mark Hammond hg ex (major cut and paste): # def Get_U

Re: OT: What's up with the starship?

2006-10-16 Thread skip
Shane> I'm trying to understand: Shane> a) how urgent and/or exploitable this is, Perhaps not very. As I indicated in an earlier post, the exploit has been available since 2001, so it is probably fairly hard to exploit. Shane> b) how I can check whether a given Python installation

Re: Standard Forth versus Python: a case study

2006-10-16 Thread Elizabeth D Rather
[EMAIL PROTECTED] wrote: > John you nailed it. I was a big forth fan in the mid-80s but it was > very clear that you either had to spend a lot of money on proprietary > systems or do it ALL yourself. Not having any money I was pleased to be > able to do it all but today, in the age of instant commu

Re: Re:RELEASED Python 2.4.4, release candidate 1

2006-10-16 Thread skip
Jonathan> When trying to build 2.4.4c1 with cross-compiling, I get the Jonathan> following error. Can you file a bug report on SourceForge please? Thx, Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Output from subprocess.Popen()

2006-10-16 Thread [EMAIL PROTECTED]
Clodoaldo Pinto Neto wrote: > Output from the shell: > > [EMAIL PROTECTED] teste]$ set | grep IFS > IFS=$' \t\n' > > Output from subprocess.Popen(): > > >>> import subprocess as sub > >>> p = sub.Popen('set | grep IFS', shell=True, stdout=sub.PIPE) > >>> p.stdout.readlines()[1] > "IFS=' \t\n" > > B

Re: Need a strange sort method...

2006-10-16 Thread SpreadTooThin
Tim Chase wrote: > > for example: > > a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order > > > > def cmp(i,j): #to be defined in this thread. > > Well, if you're willing to give up doing it in a cmp() method, > you can do it as such: > > >>> a.sort() > >>> chunk_size = 3 > >>> [a[i:

Re: Output from subprocess.Popen()

2006-10-16 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I can't see any obvious way to ask subprocess to use a shell other than > the default. -c ? >>> f = Popen(["/bin/bash", "-c", "set|grep IFS"], stdout=PIPE) >>> f.stdout.read() "IFS=$' \\t\\n'\n" >>> f = Popen(["/bin/sh", "-c", "set|grep IFS"], stdout=PIPE) >>> f.st

Re: Alphabetical sorts

2006-10-16 Thread Tuomas
My application needs to handle different language sorts. Do you know a way to apply strxfrm dynamically i.e. without setting the locale? Tuomas Neil Cerutti wrote: > On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote: > >>I have several applications where I want to sort lists in >>alphabetical

Re: ADO with Python

2006-10-16 Thread Ravi Teja
Ralf wrote: > Is their anybody with xperience in using the both and can provide me with > some xamples. Googling for python ado returns this simple tutorial http://www.markcarter.me.uk/computing/python/ado.html COM access in Python is straight forward with win32all. -- http://mail.python.org/ma

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocks in python

2006-10-16 Thread jmdeschamps
Bruno Desthuilliers wrote: > Kay Schluehr wrote: > > Bruno Desthuilliers wrote: > > > >> Just for the record : Ruby's code-blocks (closures, really) come from > >> Smalltalk, which is still the OneTrueObjectLanguage(tm). > > > > IsTheOneTrueObjectLanguage(tm)ReallyCamelCased? > > > ThatsAGoodQuest

Re: Mail Delivery (failure [EMAIL PROTECTED])

2006-10-16 Thread support
Thank you for your email. This is an automatic acknowledgement, and we will process your email in one business day. To shorten your waiting period until your email is answered manually, you have the possibility to find a solution on our webpage i.e. 1.) I am unable to register my program I purc

Max-plus library

2006-10-16 Thread Martin Manns
Hello, Is there any library that allows employing max-plus dioids in python (e.g. based on numpy/scipy)? The only libraries that I found so far are for Matlab / Octave, Scilab and Maple: http://ifatwww.et.uni-magdeburg.de/~stanczyk/mpa/index.php http://www-rocq.inria.fr/MaxplusOrg/soft.html Than

Re: Max-plus library

2006-10-16 Thread Robert Kern
Martin Manns wrote: > Hello, > > Is there any library that allows employing max-plus dioids in > python (e.g. based on numpy/scipy)? Google says "no" and I haven't heard of any, so I imagine that there aren't. There might be something buried in some of the control theory packages, but as I nei

Re: always raise syntax error!

2006-10-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Larry Bates <[EMAIL PROTECTED]> wrote: >daniel wrote: . . . >> well, I would say, the reason why I could not position the error code >> may partly due to the ambiguous message that python provid

Re: Alphabetical sorts

2006-10-16 Thread Leo Kislov
On Oct 16, 2:39 pm, Tuomas <[EMAIL PROTECTED]> wrote: > My application needs to handle different language sorts. Do you know a > way to apply strxfrm dynamically i.e. without setting the locale? Collation is almost always locale dependant. So you have to set locale. One day I needed collation th

XLRDError: Can't find workbook in OLE2 compound document

2006-10-16 Thread kath
Hi XLRDError: Can't find workbook in OLE2 compound document What does this error means? When I try to open some excel files using XLRD, I encounter this error. Not with every excel, but with some file. Can anybody help me know, what is this error trying say and what I should do to avoid this

Dr. Dobb's Python-URL! - weekly Python news and links (Oct 16)

2006-10-16 Thread Cameron Laird
QOTW: "Well, I haven't yet seen a definition of 'Integrated Development Environment' which would exclude Emacs..." - Slawomir Nowaczyk "Let me tell you: There are times when I'm really glad that as a German, I'm not supposed to possess any sense of humour at all." - Georg Brandl Pythoneers

doctest quiet again before exit how

2006-10-16 Thread p . lavarre
Looks like every run of doctest after the first is verbose: $ python2.5 quiet-once.py (0, 0) *** DocTestRunner.merge: '__main__' in both testers; summing outcomes. (0, 0) *** DocTestRunner.merge: '__main__' in both testers; summing outcomes. (0, 0) $ $ cat quiet-once.py import doctest print doctes

Re: Output from subprocess.Popen()

2006-10-16 Thread Clodoaldo Pinto Neto
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > I can't see any obvious way to ask subprocess to use a shell other than > > the default. > > -c ? > > >>> f = Popen(["/bin/bash", "-c", "set|grep IFS"], stdout=PIPE) > >>> f.stdout.read() > "IFS=$' \\t\\n'\n" > >>> f = Popen(["/bin/sh", "-c",

PyGegl

2006-10-16 Thread bearophileHUGS
It looks interesting, PyGegl is a python binding for gegl: http://ervilha.org/pygegl/ Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: command text parsing and hints displaying on user input.

2006-10-16 Thread Andy
Anybody have an idea on this?? Does Natural Language Processing help in this case? -- http://mail.python.org/mailman/listinfo/python-list

httplib and HTTPS Connections

2006-10-16 Thread runningwild
Helo, This is the first time I have cared about httplib's HTTPSConnection. In the docs I read "Note: HTTPS support is only available if the socket module was compiled with SSL support." Although my small test script "seems" to work when connecting to a webserver via HTTPS I am really not sure.

Re: httplib and HTTPS Connections

2006-10-16 Thread runningwild
runningwild wrote: > Helo, > > This is the first time I have cared about httplib's HTTPSConnection. > > In the docs I read "Note: HTTPS support is only available if the socket > module was compiled with SSL support." > > Although my small test script "seems" to work when connecting to a > webserve

Re: python's OOP question

2006-10-16 Thread neoedmund
On Oct 16, 9:01 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > neoedmund wrote: > > Bruno Desthuilliers wrote: > >> neoedmund wrote: > >> (*PLEASE* stop top-posting - corrected) > >>> Ben Finney wrote: > [Please don't top-post above the text to which you're replying.] > > "neoedmu

Re: Alphabetical sorts

2006-10-16 Thread Ron Adam
Neil Cerutti wrote: > On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote: >> I have several applications where I want to sort lists in >> alphabetical order. Most examples of sorting usually sort on >> the ord() order of the character set as an approximation. But >> that is not always what you want

Plotting histograms

2006-10-16 Thread [EMAIL PROTECTED]
hi, I have some values(say from -a to a) stored in a vector and I want to plot a histogram for those values. How can I get it done in python. I have installed and imported the Matplotlib package but on executing the code [N,x]=hist(eig, 10) # make a histogram I am getting an error saying "NameEr

Re: wing ide vs. komodo?

2006-10-16 Thread Theerasak Photha
On 13 Oct 2006 17:07:56 -0700, Sandra-24 <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > > Just curious what users of the two big commercial IDEs think of them > > compared to one another (if you've used both). > > > > Wing IDE looks a lot nicer and fuller featured in the screenshots, but a > >

Re: Plotting histograms

2006-10-16 Thread Robert Kern
[EMAIL PROTECTED] wrote: > hi, I have some values(say from -a to a) stored in a vector and I want > to plot a histogram for those values. How can I get it done in python. > I have installed and imported the Matplotlib package but on executing > the code > [N,x]=hist(eig, 10) # make a histogram > I

Re: Plotting histograms

2006-10-16 Thread Theerasak Photha
On 16 Oct 2006 20:49:10 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi, I have some values(say from -a to a) stored in a vector and I want > to plot a histogram for those values. How can I get it done in python. > I have installed and imported the Matplotlib package but on executing > the

[no subject]

2006-10-16 Thread zhaoren liu
-- http://mail.python.org/mailman/listinfo/python-list

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-16 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > > Hendrik> is there not something based on signals? - I seem to recall > Hendrik> some such thing here in another thread.. ( I am running Linux) > > Have you tried: > > import signal > help(signal) > > at the interpreter prompt? > > Skip *blush*

COM Error -- Urgent help

2006-10-16 Thread Teja
HI all, I have a problem in accesing COM objects in threads. To be precise, lets assume that I have a class GenericFunctions which is defined as follows: import win32com.client, pythoncom, thread ie=win32com.client.Dispatch('internetexplorer.application') ie.Visible=1 class GenericFunctions:

Re: OT: What's up with the starship?

2006-10-16 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I admit I am totally flmmexed by your answer. > What does when the bug was introduced have to do with > anything? oh, I thought your main concern was whether the packages available had been compromised, and that you asked if that was the reason an advisory was released

Re: Output from subprocess.Popen()

2006-10-16 Thread Fredrik Lundh
Clodoaldo Pinto Neto wrote: > But I still don't understand what is happening. The manual says that > when shell=True the executable argument specifies which shell to use: no, it says that when shell=True, it runs the command "through" the default shell. that is, it hands it over to the shell fo

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocksin python

2006-10-16 Thread Hendrik van Rooyen
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote: > Kay Schluehr wrote: > > Bruno Desthuilliers wrote: > > > >> Just for the record : Ruby's code-blocks (closures, really) come from > >> Smalltalk, which is still the OneTrueObjectLanguage(tm). > > > > IsTheOneTrueObjectLanguage(tm)ReallyCamelCased?

Re: COM Error -- Urgent help

2006-10-16 Thread M�ta-MCI
Hi! .func( is not defined... @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

a question about s[i:j] when i is negative

2006-10-16 Thread dracula571
s[i:j] slice of s from i to j (3), (4) (3) If i or j is negative, the index is relative to the end of the string: len(s) + i or len(s) + j is substituted. But note that -0 is still 0. (4) The slice of s from i to j is defined as the sequence of items with index k such that i <= k < j. If

Re: a question about s[i:j] when i is negative

2006-10-16 Thread Fredrik Lundh
dracula571 wrote: > but k[-6:2] = [1,2] > why k[-6:2] is [1,2]not [].i do follow (3),to make i positive by > plusing len(k) twice. twice? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python component model

2006-10-16 Thread Ilias Lazaridis
Terry Reedy wrote: > "Ilias Lazaridis" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > I share the infrastructure which I use: > > > > http://dev.lazaridis.com/base > > But not quite yet, it appears. "A public release is planned shortly" Thank you for you comment. You are right.

Scope of decorator argument

2006-10-16 Thread Gregor Horvath
Hi, this: class base(object): @adecorator(xy) def edit(self): print "edit" class child(base): xy = 3 obviously fails because "xy" is not bound at class creation time of the base object. One solution could be delegation: class base(object): @classmethod def edit(se

Re: Python component model

2006-10-16 Thread Ilias Lazaridis
Peter Wang wrote: > Ilias Lazaridis wrote: > > looks interesting. > > Thanks! > > > what about persistency? > > Um... what about it? " As far as I can see, there's no persistency binding available. Is one planned? " http://groups.google.com/group/comp.lang.python/msg/dbdaedc68eee653a . -- htt

Re: a question about s[i:j] when i is negative

2006-10-16 Thread [EMAIL PROTECTED]
dracula571 wrote: > s[i:j] slice of s from i to j (3), (4) > > (3) > If i or j is negative, the index is relative to the end of the string: > len(s) + i or len(s) + j is substituted. But note that -0 is still 0. > > > (4) > The slice of s from i to j is defined as the sequence of items wit

Re: Best IDE?

2006-10-16 Thread limodou
On 10/14/06, Fulvio <[EMAIL PROTECTED]> wrote: > *** > Your mail has been scanned by InterScan MSS. > *** > > > On Friday 13 October 2006 23:17, limodou wrote: > > hope you try it. > > If you'll manage for macro recording, playing back and from file then I'll

<    1   2