[ANN] ChiPy November Meeting Thursday the 13th at DePaul

2008-11-08 Thread Brian Ray
Chicago Python User Group = Sick of faceless social networking? Come meet some of the most highly regarded Python programmers face-2-face. This will be our best meeting yet to date! You are invited. Everyone currently involved or just curious in Python, welcome.

Re: Very simple - please help

2008-11-08 Thread pineapple
On Nov 8, 12:24 pm, Chris Rebert [EMAIL PROTECTED] wrote: The code you gave works perfectly: Weird! Doesn't work at all on my system (WinXP, Python 2.5). Please post some of the actual code so that we can determine the problem. Taking a guess, I'd suspect Blah and commands are in different

Re: Very simple - please help

2008-11-08 Thread pineapple
On Nov 8, 1:02 pm, Mark Tolonen [EMAIL PROTECTED] wrote: Also, you don't need a lambda for this example: Interestingly, this works - thanks. I'd still like to know why the other doesn't work, but I suppose at this juncture it isn't worth the time and energy trying to figure it out --

Re: Very simple - please help

2008-11-08 Thread John Machin
On Nov 8, 7:21 pm, pineapple [EMAIL PROTECTED] wrote: On Nov 8, 12:24 pm, Chris Rebert [EMAIL PROTECTED] wrote: The code you gave works perfectly: Weird! Doesn't work at all on my system (WinXP, Python 2.5). Please post some of the actual code so that we can determine the problem.

Re: best way to accelerate xmlrpc?

2008-11-08 Thread Martin v. Löwis
I've got some python xmlrpc servers and clients. What's the best way to accelerate them? You mean, fastest? xmlrpclib.py attempts to import these modules: import _xmlrpclib import sgmlop from xml.parsers import expat and falls back to defining the SlowParser class. Why

Re: using datetime containers

2008-11-08 Thread John Machin
On Nov 8, 6:06 pm, indika [EMAIL PROTECTED] wrote: Hi, I'm a newbie to python but have some experience in programming. So work through the Python tutorial, to find out how it all hangs together ... this will be much better than trying to translate snippets of language X into Python. I came

U JUST CLICK U GET SOME DOLLARS

2008-11-08 Thread Goldbell
www.goodplaces4.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-11-08 Thread Arnaud Delobelle
On Nov 8, 6:21 am, greg [EMAIL PROTECTED] wrote: Arnaud Delobelle wrote: 'Pass by value' is not relevant to Python as variables do not contain anything. Where abouts in the phrase pass by value does the word contain appear? You don't quote enough context for it to appear. You don't need

Re: adodbapi and output parameters in stored procedures

2008-11-08 Thread M.-A. Lemburg
On 2008-11-07 17:32, [EMAIL PROTECTED] wrote: Thanks for that excellent pointer! I was able to do just what you said with But if my procedure has an insert statement in its midst, it doesn't work. The cursor.fetchall() gets an exception. Any ideas? Try this (I haven't checked that it

Why is indexing into an numpy array that slow?

2008-11-08 Thread R�diger Werner
Hello! Out of curiosity and to learn a little bit about the numpy package i've tryed to implement a vectorised version of the 'Sieve of Zakiya'. While the code itself works fine it is astounding for me that the numpy Version is almost 7 times slower than the pure python version. I tryed to

Re: Installation of Py3.0rc1 fails on Mac OS X with bad locale

2008-11-08 Thread Martin v. Löwis
Not sure if this would qualify as a patch, but a workaround that seems to be working for me is to change the bash environment's default locale setting -- to a value acceptable to py3. I did this by adding the following line to /etc/profile: export LC_ALL=en_US.UTF-8 It's not a patch - as

Re: Finding the instance reference of an object [long and probably boring]

2008-11-08 Thread Joe Strout
On Nov 7, 2008, at 6:21 PM, Aaron Brady wrote: Therefore objects don't need names to exist. Having a name is sufficient but not necessary to exist. Being in a container is neither necessary -nor- sufficient. What do you mean? Being in a container isn't necessary, but it certainly is

Workflow engine?

2008-11-08 Thread Grzegorz Staniak
Hi, In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project on? Google returns hist for GoFlow (Django only, from what I can tell),

Dispatch('Excel.Application') on Vista from Task Scheduler

2008-11-08 Thread Cupric
I have a python script that runs fine from the command line or from within IDLE, but doesn't work through the Vista Task Scheduler. The script downloads some csv files and then uses pywin32 to combine the csv files into a single document. When I run it through the task scheduler, it downloads the

Re: using datetime containers

2008-11-08 Thread indika
John Machin wrote: On Nov 8, 6:06�pm, indika [EMAIL PROTECTED] wrote: Hi, I'm a newbie to python but have some experience in programming. So work through the Python tutorial, to find out how it all hangs together ... this will be much better than trying to translate snippets of language

Re: Installation of Py3.0rc1 fails on Mac OS X with bad locale

2008-11-08 Thread mr
On Nov 1, 4:40 pm, Martin v. Löwis [EMAIL PROTECTED] wrote: It would be best if a Mac user could propose a patch for that problem before the release of Python 3.0. Not sure if this would qualify as a patch, but a workaround that seems to be working for me is to change the bash environment's

Re: Workflow engine?

2008-11-08 Thread Tino Wildenhain
Grzegorz Staniak wrote: Hi, In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project on? Google returns hist for GoFlow (Django only, from

Insert data into MySQL from HTML Form using .psp script

2008-11-08 Thread brianrpsgt1
I am attempting to insert data from a HTML form using a .psp script. I can not find how to link the data that is inserted into the form to the variables in the .psp script to then insert into the MySQL Insert statement. I am familiar with PHP, where you would write $_POST(['field']), however I

Re: Insert data into MySQL from HTML Form using .psp script

2008-11-08 Thread Tino Wildenhain
brianrpsgt1 wrote: I am attempting to insert data from a HTML form using a .psp script. I can not find how to link the data that is inserted into the form to the variables in the .psp script to then insert into the MySQL Insert statement. I am familiar with PHP, where you would write

Re: Are .pyc files portable?

2008-11-08 Thread Wubbulous
Yes, apologies, I overlooked that detail. If using a different version of the binary, (i.e. 3.0 vs 2.6) you will have to re-compile the source code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Are .pyc files portable?

2008-11-08 Thread John Machin
On Nov 8, 1:36 pm, Roy Smith [EMAIL PROTECTED] wrote: I'm using Python as part of a test fixture for a large (mostly C++) software project.  We build on a lot of different platforms, but Solaris is a special case -- we build on Solaris 8, and then run our test suite on Solaris 8, 9, and 10.  

Re: using datetime containers

2008-11-08 Thread Peter Otten
indika wrote: Hi, I'm a newbie to python but have some experience in programming. I came across this requirement of using datetime.date objects associated with some another object. eg. a dictionary containing datetime.date = string { datetime.date(2001, 12, 3): 'c', datetime.date(2001,

Re: Rewriting a bash script in python

2008-11-08 Thread Chris Jones
On Wed, Nov 05, 2008 at 09:23:02PM EST, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Chris Jones wrote: But then I started thinking .. what if for instance I had to scale my effort from my single system to a large data center with hundred of hosts .. with different backup

Python 3.0 - is this true?

2008-11-08 Thread walterbyrd
I have read that in Python 3.0, the following will raise an exception: [2, 1, 'A'].sort() Will that raise an exception? And, if so, why are they doing this? How is this helpful? Is this new enhancement Pythonic? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 - is this true?

2008-11-08 Thread Peter Otten
walterbyrd wrote: I have read that in Python 3.0, the following will raise an exception: [2, 1, 'A'].sort() Will that raise an exception? Yes. [2, 1, a].sort() Traceback (most recent call last): File stdin, line 1, in module TypeError: unorderable types: str() int() And, if so,

Re: Python 3.0 - is this true?

2008-11-08 Thread Arnaud Delobelle
walterbyrd [EMAIL PROTECTED] writes: I have read that in Python 3.0, the following will raise an exception: [2, 1, 'A'].sort() Will that raise an exception? Yes. In fact, plenty of objects of different types aren't comparable anymore. And, if so, why are they doing this? How is it

Re: using datetime containers

2008-11-08 Thread Marc 'BlackJack' Rintsch
On Sat, 08 Nov 2008 08:07:15 -0800, indika wrote: John Machin wrote: On Nov 8, 6:06�pm, indika [EMAIL PROTECTED] wrote: Or else, I would have expected the datatime.date object has a writeable data member, so that iterating a calender with itermonthdates would allow me to access that data

is there really no good gui builder

2008-11-08 Thread azrael
whoever I ask, everyone tells me when it come to python and GUI-s and that there is the best way to use WX. I am browsing for the 10th time during the last year and I can still not bealive that there is not one project to make gui-building easy as maybe in VB for python. Each I tried was a pain in

Re: Workflow engine?

2008-11-08 Thread Grzegorz Staniak
On 08.11.2008, Tino Wildenhain [EMAIL PROTECTED] wroted: In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project on? Google returns hist

Re: SendKeys-0.3.win32-py2.1.exe

2008-11-08 Thread scripteaze
On Oct 26, 9:01 am, Thorsten Kampe [EMAIL PROTECTED] wrote: * Jesse (Sat, 25 Oct 2008 14:33:52 -0700 (PDT)) cant seem to install this, using python 2.6, any known errors that wont let me select the python installation to use, just opens a blank dialog and wont let me continue..do i need to

Re: Finding the instance reference of an object [long and probably boring]

2008-11-08 Thread Aaron Brady
On Nov 8, 8:42 am, Joe Strout [EMAIL PROTECTED] wrote: On Nov 7, 2008, at 6:21 PM, Aaron Brady wrote: Therefore objects don't need names to exist.  Having a name is sufficient but not necessary to exist.  Being in a container is neither necessary -nor- sufficient. What do you mean?  

Re: Finding the instance reference of an object

2008-11-08 Thread Aaron Brady
On Nov 8, 1:08 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sat, 08 Nov 2008 18:31:47 +1300, greg wrote: Quote in favor of Steven snip Example in favor of Steven snip There's no obviously about it. To anyone who has learned that call-by- value means that a copy is made,

My first Python program -- a lexer

2008-11-08 Thread Thomas Mlynarczyk
Hello, I started to write a lexer in Python -- my first attempt to do something useful with Python (rather than trying out snippets from tutorials). It is not complete yet, but I would like some feedback -- I'm a Python newbie and it seems that, with Python, there is always a simpler and

Re: Finding the instance reference of an object

2008-11-08 Thread Terry Reedy
greg wrote: Joe Strout wrote: Something has just occurred to me. If you take the view that the value of an expression is an object, then the terms value and object are synonymous. Nope. The result of an expression is an object with an id, class, and 'value', where 'value' can include

Re: Workflow engine?

2008-11-08 Thread Stefan Behnel
Grzegorz Staniak schrieb: On 08.11.2008, Tino Wildenhain [EMAIL PROTECTED] wroted: In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project

Re: Finding the instance reference of an object [long and probably boring]

2008-11-08 Thread Terry Reedy
Steven D'Aprano wrote: In an attempt to keep this post from hitting the ridiculous length of one (Aside: I've learned one thing in this discussion. Despite the number of sources I've read that claim that if you pass an array to a C function the entire array will be copied, this does not

Re: Finding the instance reference of an object

2008-11-08 Thread Aaron Brady
On Nov 8, 3:38 pm, Terry Reedy [EMAIL PROTECTED] wrote: In order for code A to call code B, some information must be communicated from A to B.  Something we all know ... That information is a value of some sort. True... Therefore all calling is calling by value. Well, yes, if you insist.  

Re: Workflow engine?

2008-11-08 Thread Grzegorz Staniak
On 08.11.2008, Stefan Behnel [EMAIL PROTECTED] wroted: In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project on? Google returns hist for

Re: Workflow engine?

2008-11-08 Thread Eric Wertman
To be exact, I used the words engine/library, not a whole framework. Thanks for the link, I've googled for articles and recipes myself and as I said, I more or less know what to do - I just thought it might be a good idea to ask whether perhaps the wheel has already been invented. Apparently

Re: Workflow engine?

2008-11-08 Thread Grzegorz Staniak
On 08.11.2008, Eric Wertman [EMAIL PROTECTED] wroted: To be exact, I used the words engine/library, not a whole framework. Thanks for the link, I've googled for articles and recipes myself and as I said, I more or less know what to do - I just thought it might be a good idea to ask whether

multiple threads with Logging: ValueError: I/O operation on closed file

2008-11-08 Thread scriptlearner
OS: Solaris 9 Python Version: 2.4.4 I need to log certain data in a worker thread; however, I am getting an error now when I use two worker threads. I think the problem comes from the line logging.info('Thread Object (%d):(%d), Time:%s in seconds %d'%

Re: My first Python program -- a lexer

2008-11-08 Thread John Machin
On Nov 9, 7:55 am, Thomas Mlynarczyk [EMAIL PROTECTED] wrote: Hello, I started to write a lexer in Python -- my first attempt to do something useful with Python (rather than trying out snippets from tutorials). It is not complete yet, but I would like some feedback -- I'm a Python newbie and

Re: is there really no good gui builder

2008-11-08 Thread Zac256
I'ma huge fan of qt and pyqt. http://trolltech.com/products -Zac On Nov 8, 2008 11:35am, azrael [EMAIL PROTECTED] wrote: whoever I ask, everyone tells me when it come to python and GUI-s and that there is the best way to use WX. I am browsing for the 10th time during the last year and I can

Re: is there really no good gui builder

2008-11-08 Thread Stef Mientki
azrael wrote: whoever I ask, everyone tells me when it come to python and GUI-s and that there is the best way to use WX. I am browsing for the 10th time during the last year and I can still not bealive that there is not one project to make gui-building easy as maybe in VB for python. Each I

Re: Finding the instance reference of an object [long and probably boring]

2008-11-08 Thread Grant Edwards
On 2008-11-08, Terry Reedy [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: In an attempt to keep this post from hitting the ridiculous length of one (Aside: I've learned one thing in this discussion. Despite the number of sources I've read that claim that if you pass an array to a C

ctypes shared object FILE*

2008-11-08 Thread Dog Walker
I need to call a function in a shared object with this signature: init_dialog(FILE *input, FILE *output) The FILE*'s are to stdin and stdout. The call from python is libdialog.init_dialog( x, y) I need to define x and y so that they will have the structure of sys.stdin and sys.stdout; the called

Re: File names are changed into capital letter in Python CE and WM5

2008-11-08 Thread Tim Roberts
[EMAIL PROTECTED] wrote: Yesterday, I installed PythonCE on my cellphone whose OS is Windows Mobile 5.I wanted to use numpy as calculation tool.But after I copy numpy module in my desktop computer into my phone,I find many file names in directory \numpy were changed into capital letters.For

Re: Calling Python from Python and .pyc problem

2008-11-08 Thread Tim Roberts
David Shi [EMAIL PROTECTED] wrote: Hello, there.I am using Python 2.5. I used py_compile and made a .pyc file. Just in case the advice from Terry was too subtle, I'd like to spell it out. Python scripts do not need to be compiled. The interpreter runs the .py file directly. However, it runs

Re: Workflow engine?

2008-11-08 Thread Tim Chase
After all its just maintaining a state and rules for possible transitions. I've implemented my own web framework (just like every other Python developer ;-) and I've done my own finite-state-machines for workflows. Web Frameworks are large, error-prone and have a lot of nuanced details.

Re: is there really no good gui builder

2008-11-08 Thread Alex_Gaynor
On Nov 8, 6:29 pm, Stef Mientki [EMAIL PROTECTED] wrote: azrael wrote: whoever I ask, everyone tells me when it come to python and GUI-s and that there is the best way to use WX. I am browsing for the 10th time during the last year and I can still not bealive that there is not one project

Re: Workflow engine?

2008-11-08 Thread Piotr Chamera
Grzegorz Staniak pisze: Hi, In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project on? Google returns hist for GoFlow (Django only, from

Re: Python 3.0 - is this true?

2008-11-08 Thread Cameron Simpson
On 08Nov2008 19:17, walterbyrd [EMAIL PROTECTED] wrote: | On Nov 8, 12:02 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: | It goes well with duck typing.  It lets you know when you things happen | that you don't mean to happen. | | But doesn't that also make the language less flexible? No. All

Re: using datetime containers

2008-11-08 Thread indika
Marc 'BlackJack' Rintsch wrote: On Sat, 08 Nov 2008 08:07:15 -0800, indika wrote: John Machin wrote: On Nov 8, 6:06�pm, indika [EMAIL PROTECTED] wrote: Or else, I would have expected the datatime.date object has a writeable data member, so that iterating a calender with

Re: is there really no good gui builder

2008-11-08 Thread sturlamolden
On 8 Nov, 20:35, azrael [EMAIL PROTECTED] wrote: I am freaking out that I need 5 times more time to make a GUI in python than in VB. I find wxFormBuilder nice to work with. wxPython can use XRC-files from wxFormBuilder. Note that wx uses sizers (layout managers). While it makes GUIs a bit

Re: Cisco's $100,000 Developer Contest

2008-11-08 Thread sockem
basically it is on the ISRs with the AXP module. chk out website at www.cisco.com/go/thinkinside. blog questions at blogs.cisco.com/go/innovation James Mills wrote: On Fri, Nov 7, 2008 at 7:15 AM, Guido van Rossum [EMAIL PROTECTED] wrote: This seems of interest to Python developers all over

Spawning a new UI process

2008-11-08 Thread Ed Leafe
I'm working on a wxPython app (well, a Dabo app, but it's basically the same thing) that presents the user with a selection of several wxPython apps that exist on their system. They choose one, and I want to then launch that app, as if they had typed python myapp.py from a terminal

Re: Python 3.0 - is this true?

2008-11-08 Thread Terry Reedy
Steven D'Aprano wrote: On Sat, 08 Nov 2008 19:02:28 +, Arnaud Delobelle wrote: And, if so, why are they doing this? How is it helpful to be able to sort things which have no natural order? Assuming you need to sort arbitrary types, then you have to choose an order, even if it is

Re: Python 3.0 - is this true?

2008-11-08 Thread walterbyrd
On Nov 8, 12:02 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: It goes well with duck typing.  It lets you know when you things happen that you don't mean to happen. But doesn't that also make the language less flexible? For example, if I used C, I would never have to worry about assigning a

Re: is there really no good gui builder

2008-11-08 Thread Peter Decker
On Sat, Nov 8, 2008 at 1:35 PM, azrael [EMAIL PROTECTED] wrote: whoever I ask, everyone tells me when it come to python and GUI-s and that there is the best way to use WX. I am browsing for the 10th time during the last year and I can still not bealive that there is not one project to make

Re: Python 3.0 - is this true?

2008-11-08 Thread walterbyrd
On Nov 8, 7:44 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: Define your own ordering if you need to sort incomparable types. If you starting new, I suppose you can always work around this new enhancement. But, couldn't this cause a lot of backward compatibility issues?

Re: Python 3.0 - is this true?

2008-11-08 Thread Kay Schluehr
On 9 Nov., 05:04, Terry Reedy [EMAIL PROTECTED] wrote: Have you written any Python code where you really wanted the old, unpredictable behavior? Sure: if len(L1) == len(L2): return sorted(L1) == sorted(L2) # check whether two lists contain the same elements else: return False It

Re: Python 3.0 - is this true?

2008-11-08 Thread Terry Reedy
walterbyrd wrote: Guido and the developers changed the behavior of order comparisons, and hence of sorts, because they agreed, on the basis of person-decades of experience, with no dissent that I know of, that the new behavior would be better. Have you written any Python code where you

Re: Python 3.0 - is this true?

2008-11-08 Thread Steven D'Aprano
On Sat, 08 Nov 2008 19:02:28 +, Arnaud Delobelle wrote: And, if so, why are they doing this? How is it helpful to be able to sort things which have no natural order? Assuming you need to sort arbitrary types, then you have to choose an order, even if it is arbitrary, so long as it's

Re: Python 3.0 - is this true?

2008-11-08 Thread Alex_Gaynor
On Nov 8, 11:36 pm, Kay Schluehr [EMAIL PROTECTED] wrote: On 9 Nov., 05:04, Terry Reedy [EMAIL PROTECTED] wrote: Have you written any Python code where you really wanted the old, unpredictable behavior? Sure: if len(L1) == len(L2):     return sorted(L1) == sorted(L2)  # check whether

Re: Finding the instance reference of an object

2008-11-08 Thread Joe Strout
On Nov 8, 2008, at 2:38 PM, Terry Reedy wrote: So if you then insist that Python uses call by object, you're actually saying it uses call by value! Both Joe and you seem to be engaging in the following bit of sophistry: In order for code A to call code B, some information must be

Re: ctypes shared object FILE*

2008-11-08 Thread Aaron Brady
On Nov 8, 6:34 pm, Dog Walker [EMAIL PROTECTED] wrote: I need to call a function in a shared object with this signature: init_dialog(FILE *input, FILE *output) The FILE*'s are to stdin and stdout. The call from python is libdialog.init_dialog( x, y) I need to define x and y so that they will

Re: Python 3.0 - is this true?

2008-11-08 Thread Steven D'Aprano
On Sat, 08 Nov 2008 19:06:14 -0800, walterbyrd wrote: On Nov 8, 7:44 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: Define your own ordering if you need to sort incomparable types. If you starting new, I suppose you can always work around this new enhancement. But,

Re: Python 3.0 - is this true?

2008-11-08 Thread Kay Schluehr
On 9 Nov., 05:49, Alex_Gaynor [EMAIL PROTECTED] wrote: On Nov 8, 11:36 pm, Kay Schluehr [EMAIL PROTECTED] wrote: On 9 Nov., 05:04, Terry Reedy [EMAIL PROTECTED] wrote: Have you written any Python code where you really wanted the old, unpredictable behavior? Sure: if len(L1) ==

replacing characters within a string

2008-11-08 Thread John Smith
Hi, I coded a python script that lets me parse a csv file into html code with a certain format, but I would like to replace every and character that appears within each column entry of the csv file (they are parsed as strings) with the html equivalents of lt; and gt;. example csv file

Re: Finding the instance reference of an object

2008-11-08 Thread Aaron Brady
On Nov 8, 10:59 pm, Joe Strout [EMAIL PROTECTED] wrote: Of course, I've softened my position somewhat, since being shown that   call by sharing is simply a term for call-by-value in the case where   the values are object references.  That clearly does apply to Python   (as well as other OOP

Re: replacing characters within a string

2008-11-08 Thread Chris Rebert
On Sat, Nov 8, 2008 at 9:16 PM, John Smith [EMAIL PROTECTED] wrote: Hi, I coded a python script that lets me parse a csv file into html code with a certain format, but I would like to replace every and character that appears within each column entry of the csv file (they are parsed as

Re: using datetime containers

2008-11-08 Thread indika
indika wrote: Marc 'BlackJack' Rintsch wrote: On Sat, 08 Nov 2008 08:07:15 -0800, indika wrote: John Machin wrote: On Nov 8, 6:06�pm, indika [EMAIL PROTECTED] wrote: Or else, I would have expected the datatime.date object has a writeable data member, so that iterating a

Re: Python 3.0 - is this true?

2008-11-08 Thread Steven D'Aprano
On Sat, 08 Nov 2008 20:36:59 -0800, Kay Schluehr wrote: On 9 Nov., 05:04, Terry Reedy [EMAIL PROTECTED] wrote: Have you written any Python code where you really wanted the old, unpredictable behavior? Sure: if len(L1) == len(L2): return sorted(L1) == sorted(L2) # check whether

Re: using datetime containers

2008-11-08 Thread Arnaud Delobelle
indika [EMAIL PROTECTED] writes: while trying out the sorting method i realized that u can *never* insert the sorted data to dict !!! m1 {datetime.date(2008, 1, 1): 'b', datetime.date(2008, 1, 3): 'c', datetime.date(2008, 1, 2): 'a'} l = sorted(m1.items(), cmp=cmpr) // cmpr is date comp

Re: Python 3.0 - is this true?

2008-11-08 Thread Kay Schluehr
On 9 Nov., 07:06, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sat, 08 Nov 2008 20:36:59 -0800, Kay Schluehr wrote: On 9 Nov., 05:04, Terry Reedy [EMAIL PROTECTED] wrote: Have you written any Python code where you really wanted the old, unpredictable behavior? Sure:

Re: Python 3.0 - is this true?

2008-11-08 Thread Steven D'Aprano
On Sat, 08 Nov 2008 22:53:14 -0800, Kay Schluehr wrote: How often do you care about equality ignoring order for lists containing arbitrary, heterogeneous types? A few times. Why do you care, Steven? I'm a very caring kind of guy. In any case, the above doesn't work now, since either L1

Re: My first Python program -- a lexer

2008-11-08 Thread Arnaud Delobelle
Thomas Mlynarczyk [EMAIL PROTECTED] writes: Hello, I started to write a lexer in Python -- my first attempt to do something useful with Python (rather than trying out snippets from tutorials). It is not complete yet, but I would like some feedback -- I'm a Python newbie and it seems that,

[issue4275] socketserver example code not correctly ported to py3k

2008-11-08 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Why not using bytes() instead of bytearray()? Eg. replace s.send('Hello, world') by s.send(b'Hello, world'). -- nosy: +haypo ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4275

[issue4281] Idle - incorrectly displaying a character (Latin capital letter sharp s)

2008-11-08 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: On my system, a square box is drawn indeed. First, I would like to confirm that this is not a bug in Python. Can you please install Tcl 8.5 separately, run wish, and execute label .l -text \u1e9e pack .l IIUC, Tk will try to find a

[issue4251] library.pdf documentation: See also: Module xxx does not link to xxx inside the PDF File

2008-11-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Should be fixed in Sphinx rev 735:a4019921bdf4. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4251

[issue4283] python3.0 setup.py install --user raises AttributeError

2008-11-08 Thread Hagen Fürstenau
New submission from Hagen Fürstenau [EMAIL PROTECTED]: A simple left-over dict.iteritems. Patch is attached. -- components: Distutils files: distutils.patch keywords: patch messages: 75634 nosy: hagen severity: normal status: open title: python3.0 setup.py install --user raises

[issue2433] Merge audio modules

2008-11-08 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Which modules? And where is the patch? :-) -- nosy: +haypo stage: - needs patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2433 ___

[issue4275] socketserver example code not correctly ported to py3k

2008-11-08 Thread Brad Miller
Brad Miller [EMAIL PROTECTED] added the comment: For the example in unixclient.py using b'Hello World' works fine. But for the example in the socketserver documentation the strings to convert come from argv[1:] On Sat, Nov 8, 2008 at 5:48 AM, STINNER Victor [EMAIL PROTECTED]wrote: STINNER

[issue4283] python3.0 setup.py install --user raises AttributeError

2008-11-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, fixed in r67160. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4283 ___

[issue4246] execution model - clear and complete example in documentation

2008-11-08 Thread robwolfe
robwolfe [EMAIL PROTECTED] added the comment: People seem to understand that they can not use variable before definition. But this dramatically change when they come across nested functions. They don't understand when variable can be resolved from outer scope and when can not, e.g: def outer():

[issue4275] socketserver example code not correctly ported to py3k

2008-11-08 Thread Brad Miller
Brad Miller [EMAIL PROTECTED] added the comment: Here's a combined patch that fixes: Doc/library/socketserver.rst examples tested and working Demo/sockets/udpecho.py Demo/sockets/unixclient.py Added file: http://bugs.python.org/file11967/socketpatches.patch

[issue4275] socketserver example code not correctly ported to py3k

2008-11-08 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Thanks! Fixed in r67168. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4275

[issue4250] urllib2.py: HTTPResponse instance has no attribute 'code'

2008-11-08 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- status: pending - open ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4250 ___ ___ Python-bugs-list

[issue4250] urllib2.py: HTTPResponse instance has no attribute 'code'

2008-11-08 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4250 ___ ___ Python-bugs-list

[issue4118] Built-in compile() and ast module doc issues

2008-11-08 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Thanks for the suggestions! Changed in r67162. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4118

[issue4281] Idle - incorrectly displaying a character (Latin capital letter sharp s)

2008-11-08 Thread Vlastimil Brom
Vlastimil Brom [EMAIL PROTECTED] added the comment: I can confirm, that TCL displays the same character as Idle, hence it itsn't a bug in Python (cf. the screenshot). Unfortunately, I couldn't identify the font used here; I'm not able to modify and recompile Tk, as suggested, but I tried to

[issue4271] conversion tool does not fix from Tkinter import N,E

2008-11-08 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: The other problem is fixed in r67170. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4271 ___

[issue4281] Idle - incorrectly displaying a character (Latin capital letter sharp s)

2008-11-08 Thread Martin v. Löwis
Changes by Martin v. Löwis [EMAIL PROTECTED]: -- resolution: - works for me status: open - closed versions: +3rd party -Python 2.6, Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4281

[issue4284] Python 2.6 64-bit + Vista 64 = Bad MSVCRT

2008-11-08 Thread Anthony Awtrey
New submission from Anthony Awtrey [EMAIL PROTECTED]: Here is the reproduction process. Get Windows box running Vista 64-bit. Download the Python 2.6 64-bit version. Write a script that imports escape from saxutils. See this: C:\Python26python.exe example_xml_script.py out.xml Traceback (most

[issue4251] library.pdf documentation: See also: Module xxx does not link to xxx inside the PDF File

2008-11-08 Thread Winfried Plappert
Winfried Plappert [EMAIL PROTECTED] added the comment: Hi, I just checked out sphinx version 67171. It still seems not to procduce a link to the module. How does Sphinx rev 735:a4019921bdf4 translate into a Python revision? This is what I did: $ make update svn update tools/sphinx At revision

[issue4251] library.pdf documentation: See also: Module xxx does not link to xxx inside the PDF File

2008-11-08 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: It doesn't directly translate. I'm going to switch the Python docs' build setup to checkout from Hg soon. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4251

[issue4284] Python 2.6 64-bit + Vista 64 = Bad MSVCRT

2008-11-08 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: This is a duplicate of Issue4018. You need to install Python for all users; just for me installation is not supported. -- nosy: +loewis resolution: - duplicate superseder: - for me installer problem on x64 Vista

[issue4284] Python 2.6 64-bit + Vista 64 = Bad MSVCRT

2008-11-08 Thread Martin v. Löwis
Changes by Martin v. Löwis [EMAIL PROTECTED]: -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4284 ___ ___ Python-bugs-list

[issue4286] Discrepancy in format string documentation

2008-11-08 Thread dlfjessup
New submission from dlfjessup [EMAIL PROTECTED]: In the documentation for Format Strings (http://docs.python.org/dev/3.0/library/string.html#formatstrings), the grammar has the following rule: conversion::= r | s However, the documentation later reads: Three conversion flags are

[issue4287] Broken URL in documentation style guide

2008-11-08 Thread Fernando Correia
New submission from Fernando Correia [EMAIL PROTECTED]: The documentation Style Guide [http://docs.python.org/dev/documenting/style.html] has a broken link to http://developer.apple.com/documentation/UserExperience/Conceptual/APStyleGuide/AppleStyleGuide2006.pdf. This link should be updated to:

  1   2   >