Re: XML-schema 'best practice' question

2008-09-20 Thread Frank Millman
On Sep 18, 8:28 am, Frank Millman [EMAIL PROTECTED] wrote: Hi all This is not strictly a Python question, but as I am writing in Python, and as I know there are some XML gurus on this list, I hope it is appropriate here. XML-schemas are used to define the structure of an xml document, and

Re: report a BUG of package setuptools-0.6c8.

2008-09-20 Thread Fredrik Lundh
为爱而生 wrote: File /usr/lib/python2.5/site-packages/setuptools/command/sdist.py, line 98, in entries_finder log.warn(unrecognized .svn/entries format in %s, dirname) NameError: global name 'log' is not defined global name 'log' is not defined to the line 98!!! please report bugs here:

The Python computer language

2008-09-20 Thread ROSEEE
http://pthoncomputerlanguage.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python computer language

2008-09-20 Thread Fredrik Lundh
ROSEEE wrote: http://pthoncomputerlanguage.blogspot.com report here: http://tinyurl.com/blogspot-spam /F -- http://mail.python.org/mailman/listinfo/python-list

Ascii Menu I/O redirection

2008-09-20 Thread Hendrik van Rooyen
I am writing a small application with a simple ascii based menu. The menu is used to test individual functions, and to change some timings. Otherwise the application just runs automatically, depending on command line options. I want to be able to redirect the menu. The console, a serial port,

Not fully OO ?

2008-09-20 Thread candide
Excerpt quoted from http://www.astro.ufl.edu/~warner/prog/python.html : About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP language. Thanks for any comment. --

Re: Not fully OO ?

2008-09-20 Thread James Mills
This is wrong. Python _is_ a full OOP language. Everything form modules, functions to basic data types are an object. --JamesMills On Sat, Sep 20, 2008 at 7:23 PM, candide [EMAIL PROTECTED] wrote: Excerpt quoted from http://www.astro.ufl.edu/~warner/prog/python.html : About Python: Python is

how can i check whether a variable is iterable in my code?

2008-09-20 Thread satoru
hi, all i want to check if a variable is iterable like a list, how can i implement this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-20 Thread Kay Schluehr
On 20 Sep., 11:23, candide [EMAIL PROTECTED] wrote: Excerpt quoted fromhttp://www.astro.ufl.edu/~warner/prog/python.html: About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP

Re: Not fully OO ?

2008-09-20 Thread Fredrik Lundh
Kay Schluehr wrote: Answer: if you want to define an entity it has to be defined inside a class. If you want to access an entity you have to use the dot operator. Therefore Java is OO but Python is not. you're satirising the quoted author's cargo-cultish view of object orientation, right?

Re: report a BUG of package setuptools-0.6c8.

2008-09-20 Thread Carl Banks
On Sep 20, 1:11 am, Fredrik Lundh [EMAIL PROTECTED] wrote: 为爱而生 wrote: File /usr/lib/python2.5/site-packages/setuptools/command/sdist.py, line 98, in entries_finder log.warn(unrecognized .svn/entries format in %s, dirname) NameError: global name 'log' is not defined global name

Re: how can i check whether a variable is iterable in my code?

2008-09-20 Thread Aidan
satoru wrote: hi, all i want to check if a variable is iterable like a list, how can i implement this? this would be one way, though I'm sure others exist: if hasattr(yourVar, '__iter__'): # do stuff -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-20 Thread Carl Banks
On Sep 20, 2:23 am, candide [EMAIL PROTECTED] wrote: Excerpt quoted fromhttp://www.astro.ufl.edu/~warner/prog/python.html: About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP

Re: how can i check whether a variable is iterable in my code?

2008-09-20 Thread satoru
On Sep 20, 6:35 pm, Aidan [EMAIL PROTECTED] wrote: satoru wrote: hi, all i want to check if a variable is iterable like a list, how can i implement this? this would be one way, though I'm sure others exist: if hasattr(yourVar, '__iter__'):         # do stuff thank you,but this will

Re: how can i check whether a variable is iterable in my code?

2008-09-20 Thread Vito De Tullio
satoru wrote: hi, all i want to check if a variable is iterable like a list, how can i implement this? untested def is_iterable(param): try: iter(param) except TypeError: return False else: return True -- By ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-20 Thread Colin J. Williams
candide wrote: Excerpt quoted from http://www.astro.ufl.edu/~warner/prog/python.html : About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP language. Thanks for any comment.

Re: how can i check whether a variable is iterable in my code?

2008-09-20 Thread John Machin
On Sep 20, 8:54 pm, satoru [EMAIL PROTECTED] wrote: On Sep 20, 6:35 pm, Aidan [EMAIL PROTECTED] wrote: satoru wrote: hi, all i want to check if a variable is iterable like a list, how can i implement this? this would be one way, though I'm sure others exist: if hasattr(yourVar,

Re: Not fully OO ?

2008-09-20 Thread Fredrik Lundh
Colin J. Williams wrote: foreach: for x in array: statements Loops over the array given by array. On each iteration, the value of the current element is assigned to x and the internal array pointer is advanced by one. This could be a useful addition to Python. for-in could be a useful

Re: Not fully OO ?

2008-09-20 Thread Martin v. Löwis
for-in could be a useful addition to Python? looks like Guido's used his time machine again, then, since it's been around since the pre-1.0 days: http://www.python.org/doc/ref/for.html He somehow must have misinterpreted http://www.astro.ufl.edu/~warner/prog/python.html which has the

Re: Not fully OO ?

2008-09-20 Thread Duncan Booth
candide [EMAIL PROTECTED] wrote: Excerpt quoted from http://www.astro.ufl.edu/~warner/prog/python.html : About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP language. Thanks

jips works with in online

2008-09-20 Thread killyou
http://candapud.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-20 Thread Steven D'Aprano
On Sat, 20 Sep 2008 13:13:08 +, Duncan Booth wrote: This is a good indication that the author doesn't know much about OOP. I think you can drop the last two words :) Actually that's unfair -- it looks like he knows quite a bit about the metallicity of quasers, but he's just parroting a

Re: how can i check whether a variable is iterable in my code?

2008-09-20 Thread satoru
thanks very much! -- http://mail.python.org/mailman/listinfo/python-list

Re: Ascii Menu I/O redirection

2008-09-20 Thread Steven D'Aprano
On Sat, 20 Sep 2008 23:14:26 +0200, Hendrik van Rooyen wrote: class console(object): This spoofs a single file like object, using stdout - in (Minimalistic proof of concept implementation) def __init__(self): self.read = sys.stdin.read self.readline =

Re: Not fully OO ?

2008-09-20 Thread Kay Schluehr
On 20 Sep., 12:14, Fredrik Lundh [EMAIL PROTECTED] wrote: Kay Schluehr wrote: Answer: if you want to define an entity it has to be defined inside a class. If you want to access an entity you have to use the dot operator. Therefore Java is OO but Python is not. you're satirising the quoted

Re: Not fully OO ?

2008-09-20 Thread Eduardo O. Padoan
On Sat, Sep 20, 2008 at 11:26 AM, Kay Schluehr [EMAIL PROTECTED] wrote: On 20 Sep., 12:14, Fredrik Lundh [EMAIL PROTECTED] wrote: Kay Schluehr wrote: Answer: if you want to define an entity it has to be defined inside a class. If you want to access an entity you have to use the dot

Re: Not fully OO ?

2008-09-20 Thread Thomas G. Willis
On Sep 20, 5:23 am, candide [EMAIL PROTECTED] wrote: Excerpt quoted fromhttp://www.astro.ufl.edu/~warner/prog/python.html: About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP

Re: Not fully OO ?

2008-09-20 Thread Colin J. Williams
Fredrik Lundh wrote: Colin J. Williams wrote: foreach: for x in array: statements Loops over the array given by array. On each iteration, the value of the current element is assigned to x and the internal array pointer is advanced by one. This could be a useful addition to Python.

Re: XML-schema 'best practice' question

2008-09-20 Thread Lorenzo Gatti
On 20 Set, 07:59, Frank Millman [EMAIL PROTECTED] wrote: I want to introduce an element of workflow management (aka Business Process Management) into the business/accounting system I am developing. I used google to try to find out what the current state of the art is. After several months of

Re: XML-schema 'best practice' question

2008-09-20 Thread Lorenzo Gatti
Sorry for pressing the send button too fast. On 20 Set, 07:59, Frank Millman [EMAIL PROTECTED] wrote: I want to introduce an element of workflow management (aka Business Process Management) into the business/accounting system I am developing. I used google to try to find out what the current

How to make a reverse for loop in python?

2008-09-20 Thread Alex Snast
Hello I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) -- http://mail.python.org/mailman/listinfo/python-list

Here's something interesting: sympy crashes in Python 2.6 (Windows)

2008-09-20 Thread Mensanator
Beacuse in 2.6, Python apparently has fixed a discrepency that existed in previous versions. In the IDLE that comes with 2.5, typing as, to wit import random as ran, the words import and as highlight in red, so you can't use them as variable names or you'll get a syntax error. Ah, but you CAN

Re: How to make a reverse for loop in python?

2008-09-20 Thread Thoma
Alex Snast a écrit : Hello I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) for (i = 0; i 10; i--) - for i in range(10): for (i = 10; i = 0; --i) - for i in range(10,-1,-1): Thoma --

Re: How to make a reverse for loop in python?

2008-09-20 Thread Mensanator
On Sep 20, 11:16�am, Alex Snast [EMAIL PROTECTED] wrote: Hello I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) for i in xrange(10,-1,-1): print i, 10 9 8 7 6 5 4 3 2 1 0 Note the

Re: How to make a reverse for loop in python?

2008-09-20 Thread Duncan Booth
Alex Snast [EMAIL PROTECTED] wrote: Hello I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) The exact equivalent would be: for i in range(10, -1, -1): print i except you

Re: How to make a reverse for loop in python?

2008-09-20 Thread Simon Brunning
2008/9/20 Alex Snast [EMAIL PROTECTED]: I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) for i in range(10, 0, -1): print i -- Cheers, Simon B. --

Re: How to make a reverse for loop in python?

2008-09-20 Thread Fredrik Lundh
Alex Snast wrote: I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) use range with a negative step: for i in range(10-1, -1, -1): ... or just reverse the range: for i in

Re: How to make a reverse for loop in python?

2008-09-20 Thread Gary Herron
Alex Snast wrote: Hello I'm new to python and i can't figure out how to write a reverse for loop in python e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) -- http://mail.python.org/mailman/listinfo/python-list What are you trying to loop through? If it's the contents

Re: How to make a reverse for loop in python?

2008-09-20 Thread Fredrik Lundh
Fredrik Lundh wrote: e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) use range with a negative step: for i in range(10-1, -1, -1): ... or just reverse the range: for i in reversed(range(10)): ... (and to include the 10 in the range, add one to

Re: How to make a reverse for loop in python?

2008-09-20 Thread Peter Otten
Gary Herron wrote: Or you can create a new reversed (copy of the original) list and iterate through it for item in reversed(L):   print item It's not a copy, it's a view: items = [1,2,3] r = reversed(items) items[:] = abc for item in r: print item ... c b a Peter --

Re: how can i check whether a variable is iterable in my code?

2008-09-20 Thread Terry Reedy
satoru wrote: On Sep 20, 6:35 pm, Aidan [EMAIL PROTECTED] wrote: satoru wrote: hi, all i want to check if a variable is iterable like a list, how can i implement this? this would be one way, though I'm sure others exist: if hasattr(yourVar, '__iter__'): # do stuff thank you,but

NEW GENERATED DLL ERROR FOUND WITHIN f2PY.py

2008-09-20 Thread Blubaugh, David A.
To All, I have now been able to generate a .pyd file from a FORTRAN file that I am trying to interface with python. I was able to execute this with an additional insight into how f2py operates. It seems as though the documentation requires an upgrade, since there appears to be missing

Re: How to make a reverse for loop in python?

2008-09-20 Thread bearophileHUGS
Duncan Booth: e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) The exact equivalent would be: for i in range(10, -1, -1): print i I'd use xrange there. Anyway, I have always felt that Python syntax not easy to understand at first sight, expecially when you try to

Sunbeam India UPS Point- unfair Trade Practices in Computer Business

2008-09-20 Thread ronald
Sunbeam India UPS Point- unfiar Trade Practices in Computer Business Save Money, Tension, and Time. Avoid Nehru Place market to buy Computer Goods Hello All, This is to inform you all the sellers at the Nehru Place are not selling good products. Especially the shop- Nishchal Joshi, Sunbeam

Re: NEW GENERATED DLL ERROR FOUND WITHIN f2PY.py

2008-09-20 Thread Fredrik Lundh
Blubaugh, David A. wrote: (no need to shout when filling in the subject line, thanks) I have now been able to generate a .pyd file from a FORTRAN file that I am trying to interface with python. I was able to execute this with an additional insight into how f2py operates. ImportError:

Re: Not fully OO ?

2008-09-20 Thread Aaron Castironpi Brady
On Sep 20, 5:14 am, Fredrik Lundh [EMAIL PROTECTED] wrote: Kay Schluehr wrote: Answer: if you want to define an entity it has to be defined inside a class. If you want to access an entity you have to use the dot operator. Therefore Java is OO but Python is not. you're satirising the

Re: Not fully OO ?

2008-09-20 Thread Paul Boddie
On 20 Sep, 19:42, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: Wikipedia puts it decently: mainly for OO programming, but with some procedural elements. ducks When it comes to Python and object-oriented programming, you can't leave out the ducks. ;-) Paul --

Re: Ascii Menu I/O redirection

2008-09-20 Thread Hendrik van Rooyen
Steven D'Aprano [EMAIL PROTECTED] wrote: I'm not sure that closing stdin and stout are a good idea. This could have side-effects for other parts of your program, and will almost certainly end badly if you're running in the interactive interpreter. Its a very simple thingy - there will only

Re: Not fully OO ?

2008-09-20 Thread Bruno Desthuilliers
candide a écrit : Excerpt quoted from http://www.astro.ufl.edu/~warner/prog/python.html : About Python: Python is a high level scripting language with object oriented features. (...) Python supports OOP and classes to an extent, but is not a full OOP language. Thanks for any comment.

Re: Here's something interesting: sympy crashes in Python 2.6 (Windows)

2008-09-20 Thread Guilherme Polo
On Sat, Sep 20, 2008 at 1:27 PM, Mensanator [EMAIL PROTECTED] wrote: Beacuse in 2.6, Python apparently has fixed a discrepency that existed in previous versions. In the IDLE that comes with 2.5, typing as, to wit import random as ran, the words import and as highlight in red, so you can't

writeable buffer and struct.pack_into and struct.unpck_from

2008-09-20 Thread Tzury Bar Yochay
Hi, I can't find in the documentation the way to use these two functions. can someone share a simple code that utilize these two functions? -- http://mail.python.org/mailman/listinfo/python-list

ANN: Python FTP Server library (pyftpdlib) 0.5.0 released

2008-09-20 Thread Giampaolo Rodola'
Hi, I'm pleased to announce release 0.5.0 of Python FTP Server library (pyftpdlib). http://code.google.com/p/pyftpdlib/ === About === Python FTP server library provides an high-level portable interface to easily write asynchronous FTP servers with Python. Based on asyncore framework pyftpdlib

Re: Here's something interesting: sympy crashes in Python 2.6 (Windows)

2008-09-20 Thread Mensanator
On Sep 20, 1:34�pm, Guilherme Polo [EMAIL PROTECTED] wrote: On Sat, Sep 20, 2008 at 1:27 PM, Mensanator [EMAIL PROTECTED] wrote: Beacuse in 2.6, Python apparently has fixed a discrepency that existed in previous versions. In the IDLE that comes with 2.5, typing as, to wit import random as

Re: Python newbie question re Strings and integers

2008-09-20 Thread Bruno Desthuilliers
rmac a écrit : the following code attempts to extract a symbol name from a string: extensionStart = int(filename.rfind('.')) rfind returns an int, so passing it to the int type constructor is useless. filenameStart = int(filename.rfind('/')) idem #print 'Extension Start - '

Re: improving a huge double-for cycle

2008-09-20 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Thu, 18 Sep 2008 20:43:00 +0200, Bruno Desthuilliers wrote: Now the obvious winner is pruebono - even unoptimized, using sets seems to be *way* faster than even the most optimized corrected version of your algorithm. I'm not being snarky about losing priority

RE: NEW GENERATED DLL ERROR FOUND WITHIN f2PY.py

2008-09-20 Thread Blubaugh, David A.
Sir, Let me state that do have extensive experience with developing binary files. Please note that I have followed all of the instructions to the letter as far as developing a DLL to be imported. However, it is not working correctly. I believe it might be my system environment variables??

Re: improving a huge double-for cycle

2008-09-20 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : Alexzive a écrit : Hello there :) , (snip) Now the obvious winner is pruebono Correction (my bad) : Steven D'Aprano submitted the set-based solution first. So the winners are Steven and pruebono. -- http://mail.python.org/mailman/listinfo/python-list

Re: improving a huge double-for cycle

2008-09-20 Thread Bruno Desthuilliers
Harald Luessen a écrit : On Thu, 18 Sep 2008 Bruno Desthuilliers wrote: # Harald : uncomment this and run test_results. As far as I can tell, it # doesn't yields the expected results ## IN7 = IN[:] ## def sortk7(n): ## return n.coordinates[0] ## def doubles7(): ## is ordering better

Re: matplotlib in interactive mode locks when run from subprocess

2008-09-20 Thread Almar Klein
I think my question was not very clear. I narrowed the problem down to a reconstructable small example, consisting of a python script (a very simple interpreter) and three lines to execute in it: == start simple interpreter file == import os import sys import time def run():

Re: Not fully OO ?

2008-09-20 Thread Kay Schluehr
On 20 Sep., 18:33, Bruno Desthuilliers [EMAIL PROTECTED] wrote: The following definitions are AFAIK the only commonly accepted definitions about OO: 1/ an object is defined by identity, state and behaviour 2/ objects interacts by sending messages each other 3/ an OO program is made of

Re: [Tkinter-discuss] (newbie) can't invoke button for twice

2008-09-20 Thread Guilherme Polo
On Sat, Sep 20, 2008 at 4:10 PM, dmitrey [EMAIL PROTECTED] wrote: hi all, I have the problem: a func has been binded to a Button: RunPause = Button(root, textvariable = t, command = lambda: invokeRunPause(p)) def invokeRunPause(p): if p.state == 'init': p.state = 'running'

Re: Not fully OO ?

2008-09-20 Thread Aaron Castironpi Brady
On Sep 20, 3:22 pm, Kay Schluehr [EMAIL PROTECTED] wrote: On 20 Sep., 18:33, Bruno Desthuilliers [EMAIL PROTECTED] wrote: The following definitions are AFAIK the only commonly accepted definitions about OO: 1/ an object is defined by identity, state and behaviour 2/ objects interacts

explain slice assignment to newb

2008-09-20 Thread Andrew
please explain this behavior to a newb: a = [1,2,3,4] b = [a,b,c,d] a [1, 2, 3, 4] b ['a', 'b', 'c', 'd'] a[0:2] [1, 2] a [1, 2, 3, 4] b[2:4] ['c', 'd'] a[0:2] = b[0:2] b[2:4] = a[2:4] a ['a', 'b', 3, 4] b ['a', 'b', 3, 4] -- http://mail.python.org/mailman/listinfo/python-list

Re: explain slice assignment to newb

2008-09-20 Thread Sean DiZazzo
On Sep 20, 2:20 pm, Andrew [EMAIL PROTECTED] wrote: please explain this behavior to a newb: a = [1,2,3,4] b = [a,b,c,d] a [1, 2, 3, 4] b ['a', 'b', 'c', 'd'] a[0:2] [1, 2] a [1, 2, 3, 4] b[2:4] ['c', 'd'] a[0:2] = b[0:2] b[2:4] = a[2:4] a ['a', 'b', 3, 4] b ['a',

Re: How to make a reverse for loop in python?

2008-09-20 Thread Alex Snast
On Sep 20, 8:13 pm, [EMAIL PROTECTED] wrote: Duncan Booth: e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) The exact equivalent would be:         for i in range(10, -1, -1): print i I'd use xrange there. Anyway, I have always felt that Python syntax not easy to

Re: How to make a reverse for loop in python?

2008-09-20 Thread Alex Snast
On Sep 20, 8:13 pm, [EMAIL PROTECTED] wrote: Duncan Booth: e.g. the python equivalent to the c++ loop for (i = 10; i = 0; --i) The exact equivalent would be:         for i in range(10, -1, -1): print i I'd use xrange there. Anyway, I have always felt that Python syntax not easy to

Re: writeable buffer and struct.pack_into and struct.unpck_from

2008-09-20 Thread Gabriel Genellina
En Sat, 20 Sep 2008 15:45:48 -0300, Tzury Bar Yochay [EMAIL PROTECTED] escribió: I can't find in the documentation the way to use these two functions. can someone share a simple code that utilize these two functions? struct.pack_into is intended to fill a buffer you got from somewhere,

Re: How to make a reverse for loop in python?

2008-09-20 Thread Christian Heimes
Alex Snast wrote: Another quick question please, is the List data structure just a dynamic array? If so how can you use static size array, linked list, AVL trees etcetera. You should treat Python lists as an opaque item. You shouldn't concern yourself with the implementation details. Python

Re: How to make a reverse for loop in python?

2008-09-20 Thread Gabriel Genellina
En Sat, 20 Sep 2008 20:27:41 -0300, Alex Snast [EMAIL PROTECTED] escribió: Another quick question please, is the List data structure just a dynamic array? If so how can you use static size array, linked list, AVL trees etcetera. Yes, lists are implemented as dynamic arrays (but you shouldn't

Re: How to make a reverse for loop in python?

2008-09-20 Thread Steven D'Aprano
On Sat, 20 Sep 2008 16:22:31 -0700, Alex Snast wrote: That's a lot of responses guys. Thanks a lot i think i got it. Another question, are there any pointers in python (or iterators) for when i use a data structure that doesn't support random access? That surely depends on the data

Re: Installing pySerial

2008-09-20 Thread Gabriel Genellina
En Sat, 20 Sep 2008 02:01:14 -0300, eliben [EMAIL PROTECTED] escribió: Why are people preferring the python.org package over ActiveState's, which seems to be more complete and includes more modules (like pywin32) ? They do a hard work collecting, compiling and packaging the Python

Hi guys!

2008-09-20 Thread Rajko Mackic Cvrcko
Hello, this is Rajko Mackic from town Banjaluka, Bosnia and Herzegovina, also known as Cvrcko Does anyone know of any bars in town where I can swallow a bucket of cum? It can be either dog, horse or human cum. Also, does anyone know of any sex bars where people will shit in your mouth? I also like

Re: explain slice assignment to newb

2008-09-20 Thread Terry Reedy
Andrew wrote: please explain this behavior to a newb: Read the section on sequence slicing in the Library Reference. Use the interactive interpreter or IDLE to perform experiments, like you did, until you understand to your satisfaction. --

Re: How to make a reverse for loop in python?

2008-09-20 Thread bearophileHUGS
Christian Heimes: Unless you have specific needs for highly specialized data types, use lists. There's also the collections.deque for other related purposes. (I suggest people willing to look at some nice C code to read the sources of deque, Hettinger has created some refined code, very

Re: How to make a reverse for loop in python?

2008-09-20 Thread Steven D'Aprano
On Sat, 20 Sep 2008 16:27:41 -0700, Alex Snast wrote: Another quick question please, is the List data structure just a dynamic array? If so how can you use static size array, linked list, AVL trees etcetera. Before I answer your question, I should say that you can go a LONG way with just the

Re: Not fully OO ?

2008-09-20 Thread Christian Heimes
Kay Schluehr wrote: Actually it is simply wrong in the mentioned case and here is the proof: def foo(): return 2+2 import dis dis.dis(foo) 2 0 LOAD_CONST 2 (4) 3 RETURN_VALUE OO is a heuristic method used to understand the semantics of a

Re: How to make a reverse for loop in python?

2008-09-20 Thread Steven D'Aprano
On Sun, 21 Sep 2008 01:56:59 +0200, Christian Heimes wrote: Just *don't* try to abuse lists by creating fancy stuff e.g. linked lists. The memory overhead is going to kill your app. I agree with your advice not to abuse lists, but not for the reason you give. The memory overhead of a linked

Re: Not fully OO ?

2008-09-20 Thread Aaron Castironpi Brady
On Sep 20, 8:06 pm, Christian Heimes [EMAIL PROTECTED] wrote: Kay Schluehr wrote: Actually it is simply wrong in the mentioned case and here is the proof: def foo():     return 2+2 import dis dis.dis(foo)   2           0 LOAD_CONST               2 (4)               3

Re: explain slice assignment to newb

2008-09-20 Thread Stephen Horne
On Sat, 20 Sep 2008 14:20:20 -0700 (PDT), Andrew [EMAIL PROTECTED] wrote: please explain this behavior to a newb: a = [1,2,3,4] b = [a,b,c,d] a[0:2] = b[0:2] The slice [0:2] represent positions 0 = x 2 Replaces the [1, 2] from [1, 2, 3, 4] with ['a', 'b'] Result: a = ['a', 'b', 3, 4]

Re: improving a huge double-for cycle

2008-09-20 Thread Steven D'Aprano
On Sat, 20 Sep 2008 19:01:42 +0200, Bruno Desthuilliers wrote: Once again, sorry if me missing your correct answer drives you paranoid :-) What do you mean by that? How many other people have been talking about me? *wink* -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: writeable buffer and struct.pack_into and struct.unpck_from

2008-09-20 Thread Aaron Castironpi Brady
On Sep 20, 6:42 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 20 Sep 2008 15:45:48 -0300, Tzury Bar Yochay   [EMAIL PROTECTED] escribió: I can't find in the documentation the way to use these two functions. can someone share a simple code that utilize these two functions?

Re: improving a huge double-for cycle

2008-09-20 Thread Aaron Castironpi Brady
On Sep 20, 9:20 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sat, 20 Sep 2008 19:01:42 +0200, Bruno Desthuilliers wrote: Once again, sorry if me missing your correct answer drives you paranoid :-) What do you mean by that? How many other people have been talking about

BeautifulSoup and Problem Tables

2008-09-20 Thread academicedgar
Hi I would appreciate some help. I am trying to learn Python and want to use BeautifulSoup to pull some data from tables. I was really psyched earlier tonight when I discovered that I could do this from BeautifulSoup import BeautifulSoup bst=file(rc:\bstest.htm).read() soup=BeautifulSoup(bst)

Quick Secured Pharmacy Online. bhsrf

2008-09-20 Thread [EMAIL PROTECTED]
Start saving, best online pharmacy here http://gjlabeh.cuchezfarg.com/?cdfikmabehxwvrsygzchcmjl -- http://mail.python.org/mailman/listinfo/python-list

Quick Secured Pharmacy Online. hr3tn

2008-09-20 Thread [EMAIL PROTECTED]
Start saving, best online pharmacy here http://gjlabeh.cuchezfarg.com/?cdfikmabehxwvrsygzchcmjl -- http://mail.python.org/mailman/listinfo/python-list

Re: Not fully OO ?

2008-09-20 Thread Aahz
In article [EMAIL PROTECTED], Thomas G. Willis [EMAIL PROTECTED] wrote: On Sep 20, 5:23=A0am, candide [EMAIL PROTECTED] wrote: Excerpt quoted fromhttp://www.astro.ufl.edu/~warner/prog/python.html: About Python: Python is a high level scripting language with object oriented features. (...)

Re: Not fully OO ?

2008-09-20 Thread Kay Schluehr
On 20 Sep., 23:07, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: On Sep 20, 3:22 pm, Kay Schluehr [EMAIL PROTECTED] wrote: On 20 Sep., 18:33, Bruno Desthuilliers [EMAIL PROTECTED] wrote: The following definitions are AFAIK the only commonly accepted definitions about OO: 1/

Re: writeable buffer and struct.pack_into and struct.unpck_from

2008-09-20 Thread Tzury Bar Yochay
Thanks Gabriel, I was missing the information how to create a writable buffer. -- http://mail.python.org/mailman/listinfo/python-list

[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Vlastimil Brom
Vlastimil Brom [EMAIL PROTECTED] added the comment: While I am not sure about the status of this somewhat older issue, I just wanted to mention, that the behaviour remains the same in Python 3.0rc1 (XPh SP3, Czech) Python 3.0rc1 (r30rc1:66507, Sep 18 2008, 14:47:08) [MSC v.1500 32 bit

[issue3891] collections.deque should have empty() method

2008-09-20 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Sorry Roy, I think you're way off base on this one. There are standard ways to test for an empty container if c: or if len(c) or if len(c) 0. This is Python 101. Closing this one as it has nothing to do specifically with

[issue3905] subprocess failing in GUI applications on Windows

2008-09-20 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: There are also instances of set_daemon left in socketserver and multiprocessing/dummy. How is that possible? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3905

[issue3905] subprocess failing in GUI applications on Windows

2008-09-20 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Benjamin, I think you're responsible. -- assignee: - benjamin.peterson nosy: +benjamin.peterson, georg.brandl ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3905

[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Amaury, what further review of the patch do you desire? I had already commented that I consider the patch correct, except that it might use stdout_encoding instead. Also, I wouldn't consider this a release blocker. It is somewhat annoying

[issue3905] subprocess failing in GUI applications on Windows

2008-09-20 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: The idle problem has already been fixed, and I got the socket server one in r66520. -- assignee: benjamin.peterson - ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3905

[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: Given MvL's review, assuming it fixes the Czech problem, I'm all for applying it. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1688 ___

[issue3905] subprocess failing in GUI applications on Windows

2008-09-20 Thread Jean-Michel Fauth
Jean-Michel Fauth [EMAIL PROTECTED] added the comment: Just for information and from an end user perspective. I have tried to replace the socketserver.py from the original 3.0rc1 distribution by the socketserver.py as proposed by Benjamin Peterson (r66520). Script difference (line 568):

[issue3915] Broken link in 14.7 curses, Python Library Reference

2008-09-20 Thread Jason Etheridge
New submission from Jason Etheridge [EMAIL PROTECTED]: In http://docs.python.org/lib/module-curses.html, the link Curses Programming with Python is broken. It links to http://www.python.org/doc/howto/curses/curses.html, which no longer exists. I found the page externally at

[issue3911] ftplib.FTP.makeport() bug

2008-09-20 Thread Giampaolo Rodola'
Giampaolo Rodola' [EMAIL PROTECTED] added the comment: Would you like to contribute a patch? Ok. I started working on a patch which implements a dummy asyncore-based FTP server including tests for all basic FTP() class methods. I'll contribute a patch as soon as I'll wrote IPv6 tests.

[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2008-09-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Here is a new version of the patch: the PyString* functions were renamed to PyBytes*, and it now uses stdout_encoding. About the release blocker status: I agree it is not so important, I just wanted to express my it's been here for long,

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-20 Thread Matthew Barnett
Changes by Matthew Barnett [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11530/regex_2.6rc2.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3825 ___

  1   2   >