Re: Another MySQL Problem

2010-06-24 Thread John Nagle
On 6/23/2010 10:59 PM, Dennis Lee Bieber wrote: On Wed, 23 Jun 2010 11:58:24 -0430, Victor Subervi victorsube...@gmail.com declaimed the following in gmane.comp.python.general: When I have this code: And yes -- it IS an error... You are AGAIN trying to use parameters for

Re: Types missing from typesmodule

2010-06-24 Thread John Nagle
On 6/23/2010 10:08 PM, Stephen Hansen wrote: On Jun 23, 2010, at 9:24 PM, John Naglena...@animats.com wrote: Here's dir(types), in Python 2.6.5: ['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType', 'CodeType', 'ComplexType', 'DictProxyType', 'DictType',

Re: Types missing from typesmodule

2010-06-24 Thread Ian Kelly
On Thu, Jun 24, 2010 at 12:29 AM, John Nagle na...@animats.com wrote:   Does the types module go away in 3.x, then? Not entirely, but it is greatly reduced. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic Idiom For Searching An Include Path

2010-06-24 Thread Nobody
On Wed, 23 Jun 2010 17:27:16 -0500, Tim Daneliuk wrote: Given a program 'foo' that takes a command line argument '-I includefile', I want to be able to look for 'includefile' in a path specified in an environment variable, 'FOOPATH'. I'd like a semantic that says: If 'includefile'

Re: Should I Learn Python or Ruby next?

2010-06-24 Thread Gregory Ewing
Jean-Michel Pichavant wrote: (that makes me think that Perl should be renamed as it outrageously share the same 1st character with Python). +1. I suggest CalcifiedMolluscSecretion. The very awkwardness of that name will doom the language to the obscurity that it deserves relative to the One

Re: Pythonic Idiom For Searching An Include Path

2010-06-24 Thread Gregory Ewing
Tim Daneliuk wrote: If 'includefile' contains one or more path separator characters, ignore 'FOOPATH'. Are you sure that's exactly what you want? Usually with such things the distinction is absolute vs. relative, not whether there is more than one pathname component. E.g. in a C file,

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Bruno Desthuilliers
Vlastimil Brom a écrit : Hi all, I'd like to ask about the most reasonable/recommended/... way to modify the functionality of the standard library module (if it is recommended at all). (snip) However, I'd like to ask, how to best maintain this modified functionality in the sourcecode. I tried

Re: the bugerrd code

2010-06-24 Thread Bruno Desthuilliers
Victoria Hernandez a écrit : The new mision I herits the buggered code (i do not the bugger). How do debugger him? Tahnk you very much. Vikhy :) http://docs.python.org/library/pdb.html#module-pdb http://docs.python.org/library/unittest.html#module-unittest --

Re: example of multi threads

2010-06-24 Thread Sandy
On Jun 23, 11:58 am, Stefan Behnel stefan...@behnel.de wrote: Mag Gam, 23.06.2010 12:24: I am looking for a simple multi threaded  example. Lets say I have to ssh to 20 servers and I would like to that in parallel. Can someone please provide a an example for that? Sounds like you want

Re: ttk Scale: missing attributes

2010-06-24 Thread eb303
On Jun 23, 7:26 pm, Alan G Isaac alan.is...@gmail.com wrote: Tkinter's Scale widget had a `label` and a `resolution` attribute. These appear to be missing from the Ttk Scale widget. Is there a reason?  These were important attributes. Thanks, Alan Isaac As you might know, the new ttk

Re: Simple list problem that's defeating me!

2010-06-24 Thread Neil Webster
Thanks for the help so far. The background to the problem is that the lists come from reading a dbf file. The code that I am trying to write is to merge lines of the dbf based on the first column. So in my example there would be three lines: a 2 3 4 b 10 11 12 a 2 3 4 The expected output from

Re: Simple list problem that's defeating me!

2010-06-24 Thread Sion Arrowsmith
Mark Lawrence breamore...@yahoo.co.uk wrote: On 22/06/2010 15:06, Neil Webster wrote: I have a list of lists such as [[a,2,3,4],[b,10,11,12], [a,2,3,4]]. I need to combine the two lists that have the same first character in this example 'a'. In reality there are 656 lists within the list. [

Re: How to send a non-standard IMAP command?

2010-06-24 Thread Xianwen Chen
On 6/24/10, Tim Chase python.l...@tim.thechases.com wrote: On 06/23/2010 05:22 PM, Xianwen Chen wrote: I need to send one line of commands to an IMAP server. The commands are not standard IMAP protocols, hence it's not specified in http://docs.python.org/library/imaplib.html. Sounds like you

Re: Simple list problem that's defeating me!

2010-06-24 Thread Bruno Desthuilliers
Neil Webster a écrit : Thanks for the help so far. The background to the problem is that the lists come from reading a dbf file. The code that I am trying to write is to merge lines of the dbf based on the first column. So in my example there would be three lines: a 2 3 4 b 10 11 12 a 2 3 4

Re: Another MySQL Problem

2010-06-24 Thread Victor Subervi
On Thu, Jun 24, 2010 at 1:56 AM, John Nagle na...@animats.com wrote: On 6/23/2010 10:59 PM, Dennis Lee Bieber wrote: On Wed, 23 Jun 2010 11:58:24 -0430, Victor Subervi victorsube...@gmail.com declaimed the following in gmane.comp.python.general: When I have this code:

Using Classes

2010-06-24 Thread Mag Gam
I have been using python for about 1 year now and I really like the language. Obviously there was a learning curve but I have a programing background which made it an easy transition. I picked up some good habits such as automatic code indenting :-), and making my programs more modular by having

dbus and properties multivalue

2010-06-24 Thread ste
hello, i want to build a simple script to resize a window of konqueror using the dbus protocol. Normally use the python interface, but the problem is most general because this operation it is impossible for me also if use qdbusviewer and is to complex for me if use dbus-send. If i use the python

Re: Using Classes

2010-06-24 Thread Bruno Desthuilliers
Mag Gam a écrit : I have been using python for about 1 year now and I really like the language. Obviously there was a learning curve but I have a programing background which made it an easy transition. I picked up some good habits such as automatic code indenting :-), and making my programs more

Re: best way to increment an IntVar?

2010-06-24 Thread Bruno Desthuilliers
Dennis Lee Bieber a écrit : (snip - about Tkinter IntVar type) It is NOT a numeric variable in Python realms. So var+=increment can't be used because Python would rebind the name var to a new object -- but Tkinter would still be hooked to the original object and never see the

Re: Using Classes

2010-06-24 Thread Neil Cerutti
On 2010-06-24, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Not going into OO when you don't need it IS actually the Python way !-) My most satisfying classes are the ones that gradually coalesce from a functional program. They take actual shape during refactoring. I

Problem PIL-1.1.7 _imagingft

2010-06-24 Thread Michel Claveau - MVP
Hi! With PIL-1.1.7.win32-py2.6 and Windows 7, I have this traceback: raise ImportError(The _imagingft C module is not installed) ImportError: The _imagingft C module is not installed I tested import _imaging and several other things, without success. If I re-install PIL-1.1.6 all run OK. I

Re: Pythonic Idiom For Searching An Include Path

2010-06-24 Thread Tim Daneliuk
On 6/24/2010 2:57 AM, Gregory Ewing wrote: Tim Daneliuk wrote: If 'includefile' contains one or more path separator characters, ignore 'FOOPATH'. Are you sure that's exactly what you want? Usually with such things the distinction is absolute vs. relative, not whether there is more

Emacs Form Feed (^L) Display Suggestion and Tips

2010-06-24 Thread Xah Lee
• Emacs Form Feed (^L) Display Suggestion and Tips http://xahlee.org/emacs/modernization_formfeed.html plain text version follows -- Emacs Form Feed (^L) Display Suggestion and Tips Xah Lee, 2010-06-24 This page discusses some problems involving the Form feed

Re: Using Classes

2010-06-24 Thread Alf P. Steinbach /Usenet
* Mag Gam, on 24.06.2010 13:58: I have been using python for about 1 year now and I really like the language. Obviously there was a learning curve but I have a programing background which made it an easy transition. I picked up some good habits such as automatic code indenting :-), and making my

Re: Emacs Form Feed (^L) Display Suggestion and Tips

2010-06-24 Thread Xah Lee
On Jun 24, 5:41 am, Xah Lee xah...@gmail.com wrote: • Emacs Form Feed (^L) Display Suggestion and Tips http://xahlee.org/emacs/modernization_formfeed.html a follow up question. when i was learning python in ~2005, i remember seeing it in python code, but i haven't done much python since. Does

Re: Problem PIL-1.1.7 _imagingft

2010-06-24 Thread Christian Heimes
Am 24.06.2010 14:39, schrieb Michel Claveau - MVP: Hi! With PIL-1.1.7.win32-py2.6 and Windows 7, I have this traceback: raise ImportError(The _imagingft C module is not installed) ImportError: The _imagingft C module is not installed I tested import _imaging and several other things,

Re: question about multiprocessing

2010-06-24 Thread hywhy
thanks,friend! I wanna use Queue to share objects,but on windows, the multiprocessing module can‘t do this。 Is there any way to solve this problem! thanks -- View this message in context: http://old.nabble.com/question-about-multiprocessing-tp28940614p28982744.html Sent from the Python -

Re: Another MySQL Problem

2010-06-24 Thread Stephen Hansen
On Thu, Jun 24, 2010 at 4:47 AM, Victor Subervi victorsube...@gmail.comwrote: On Thu, Jun 24, 2010 at 1:56 AM, John Nagle na...@animats.com wrote: Yes. Please post your CREATE statements, so we can see your database schema. If you really have one table per client, you're doing it wrong.

Re: How to send a non-standard IMAP command?

2010-06-24 Thread Michael Torrie
On 06/24/2010 03:47 AM, Xianwen Chen wrote: . This is what I'm now working for. I tried: IMAP4.xatom('','ID (GUID 1)','',) and dest_srv.xatom('ID (GUID 1)') , but I got error messages. Any hint please? What error messages? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to send a non-standard IMAP command?

2010-06-24 Thread Michael Torrie
On 06/24/2010 03:47 AM, Xianwen Chen wrote: , but I got error messages. Any hint please? Why not just use a proxy server: http://sourceforge.net/projects/imapidproxy/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to send a non-standard IMAP command?

2010-06-24 Thread Tim Chase
On 06/24/2010 04:47 AM, Xianwen Chen wrote: Thanks a lot for your reply! I thought it would be simpler if the problem was presented in a brief way. Unfortunately, not for this case. Here is the detail. Free Yahoo! mail accounts can be accsessed via IMAP protocal, however, a non-standard shake

Re: Using Classes

2010-06-24 Thread Nathan Rice
As others have mentioned when you would like to encapsulate data and functions together, they're useful. Also, if you find yourself passing lists/tuples/dictionaries around frequently, you might benefit from converting them into classes. This tends to make the code clearer and more readable, you

Re: Another MySQL Problem

2010-06-24 Thread Victor Subervi
On Thu, Jun 24, 2010 at 9:34 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote: On Thu, Jun 24, 2010 at 4:47 AM, Victor Subervi victorsube...@gmail.comwrote: On Thu, Jun 24, 2010 at 1:56 AM, John Nagle na...@animats.com wrote: Yes. Please post your CREATE statements, so we can see your

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Vlastimil Brom
2010/6/24 Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid: Vlastimil Brom a écrit : Hi all, I'd like to ask about the most reasonable/recommended/... way to modify the functionality of the standard library module (if it is recommended at all). ... - I guess, it wouldn't be

Re: Types missing from typesmodule

2010-06-24 Thread Thomas Jollans
On 06/24/2010 08:29 AM, John Nagle wrote: On 6/23/2010 10:08 PM, Stephen Hansen wrote: On Jun 23, 2010, at 9:24 PM, John Naglena...@animats.com wrote: Here's dir(types), in Python 2.6.5: ['BooleanType', 'BufferType', 'BuiltinFunctionType', 'BuiltinMethodType', 'ClassType', 'CodeType',

Re: print line number and source filename

2010-06-24 Thread Stephen Hansen
On Wed, Jun 23, 2010 at 8:07 PM, Peng Yu pengyu...@gmail.com wrote: I tried to put the above code in a module. Say in a.b.__init__.py %(module)s only print to __init__. However, I need the fullname a.b.__init__. I looked at the manual, but I don't see what format string I should supply.

Re: Book review / advise

2010-06-24 Thread Stephen Hansen
On Wed, Jun 23, 2010 at 10:22 AM, John Bokma j...@castleamber.com wrote: Stephen Hansen me+list/pyt...@ixokai.io writes: On 6/22/10 9:48 PM, John Bokma wrote: Its when you package it up in such a way that the buyer doesn't realize what they're buying, that's where the problem comes-- and

use python as a calculator

2010-06-24 Thread ilovesss2004
If I run 1.0/10**10 python will return 0 How can I make python return 1e-10? -- http://mail.python.org/mailman/listinfo/python-list

Re: use python as a calculator

2010-06-24 Thread David Houston
I believe this is fixed in python3 On Thu, Jun 24, 2010 at 4:42 PM, ilovesss2004 yyiillu...@gmail.com wrote: If I run 1.0/10**10 python will return 0 How can I make python return 1e-10? -- http://mail.python.org/mailman/listinfo/python-list -- Dave - Email:

Re: use python as a calculator

2010-06-24 Thread Thomas Jollans
On 06/24/2010 05:42 PM, ilovesss2004 wrote: If I run 1.0/10**10 python will return 0 How can I make python return 1e-10? It returns 1e-10. -- http://mail.python.org/mailman/listinfo/python-list

Re: use python as a calculator

2010-06-24 Thread Tim Harig
On 2010-06-24, ilovesss2004 yyiillu...@gmail.com wrote: If I run 1.0/10**10 python will return 0 Python 2.6.4 (r264:75706, Dec 11 2009, 23:02:59) [GCC 3.4.6] on linux2 Type help, copyright, credits or license for more information. 1.0/10**10 1e-10 What version are you using? How can I

Re: use python as a calculator

2010-06-24 Thread D'Arcy J.M. Cain
On Thu, 24 Jun 2010 08:42:32 -0700 (PDT) ilovesss2004 yyiillu...@gmail.com wrote: If I run 1.0/10**10 python will return 0 How can I make python return 1e-10? What version of Python are you using? Python 2.6.4 (r264:75706, Jan 28 2010, 11:26:00) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Bruno Desthuilliers
Vlastimil Brom a écrit : Many thanks for your insights! Just now, I am the almost the only user of this script, hence the consequences of version mismatches etc. shouldn't (directly) affect anyone else, fortunately. So far so good. However, I'd like to ask for some clarification about

Re: Should I Learn Python or Ruby next?

2010-06-24 Thread Default User
On Thu, Jun 24, 2010 at 02:53, Gregory Ewing greg.ew...@canterbury.ac.nzwrote: Jean-Michel Pichavant wrote: (that makes me think that Perl should be renamed as it outrageously share the same 1st character with Python). +1. I suggest CalcifiedMolluscSecretion. The very awkwardness of that

Re: use python as a calculator

2010-06-24 Thread ilovesss2004
On Jun 24, 5:50 pm, Tim Harig user...@ilthio.net wrote: On 2010-06-24, ilovesss2004 yyiillu...@gmail.com wrote: If I run 1.0/10**10 python will return 0 Python 2.6.4 (r264:75706, Dec 11 2009, 23:02:59) [GCC 3.4.6] on linux2 Type help, copyright, credits or license for more information.

Re: use python as a calculator

2010-06-24 Thread Tim Wintle
On Thu, 2010-06-24 at 09:33 -0700, ilovesss2004 wrote: On Jun 24, 5:50 pm, Tim Harig user...@ilthio.net wrote: On 2010-06-24, ilovesss2004 yyiillu...@gmail.com wrote: If I run 1.0/10**10 python will return 0 Python 2.6.4 (r264:75706, Dec 11 2009, 23:02:59) [GCC 3.4.6] on linux2

Re: use python as a calculator

2010-06-24 Thread Etienne Rousee
Le 24/06/2010 18:33, ilovesss2004 a écrit : I use python 2.5 Must change version? Is there any other solution? With python 2.6.5, I obtain 1e-10. -- Etienne -- http://mail.python.org/mailman/listinfo/python-list

Re: use python as a calculator

2010-06-24 Thread Peter Otten
ilovesss2004 wrote: If I run 1.0/10**10 python will return 0 How can I make python return 1e-10? If you meant 1/10**10, by default this returns an integer in Python 2.x. With from __future__ import division you can opt for the division of integers to return a float: 1/10**10 0 from

deprecated string module issue

2010-06-24 Thread GrayShark
In my code I have: from string import lower, upper When I use pylint on the program I get just one warning: Uses of a deprecated module 'string'. Iv'e noted that many if not all string functions are now in _builtin_. Where are the constants? Thanks Steven --

Re: use python as a calculator

2010-06-24 Thread Ian Kelly
On Thu, Jun 24, 2010 at 10:33 AM, ilovesss2004 yyiillu...@gmail.com wrote: I use python 2.5 Must change version? Is there any other solution? It works for me: Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more

Re: deprecated string module issue

2010-06-24 Thread Stephen Hansen
On Thu, Jun 24, 2010 at 10:06 AM, GrayShark howe.ste...@gmail.com wrote: In my code I have: from string import lower, upper When I use pylint on the program I get just one warning: Uses of a deprecated module 'string'. Iv'e noted that many if not all string functions are now in _builtin_.

Re: deprecated string module issue

2010-06-24 Thread GrayShark
On Jun 24, 10:06 am, GrayShark howe.ste...@gmail.com wrote: In my code I have: from string import lower, upper When I use pylint on the program I get just one warning: Uses of a deprecated module 'string'. Iv'e noted that many if not all string functions are now in _builtin_. Where are

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Vlastimil Brom
2010/6/24 Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid: Vlastimil Brom a écrit : patching source code canonically means physically modifying the original source file. Monkeypatching - which can only be done in some dynamic languages - is what you're doing above, ie

Re: deprecated string module issue

2010-06-24 Thread Ixokai
On Thu, Jun 24, 2010 at 10:39 AM, GrayShark howe.ste...@gmail.com wrote: Sorry, I meant from string import lowercase, uppercase As I was joining these two, I just changed the import to 'letters' So if the constants are not deprecated, why is the module? Is some other state then deprecated

Re: deprecated string module issue

2010-06-24 Thread Thomas Jollans
On 06/24/2010 07:39 PM, GrayShark wrote: On Jun 24, 10:06 am, GrayShark howe.ste...@gmail.com wrote: In my code I have: from string import lower, upper When I use pylint on the program I get just one warning: Uses of a deprecated module 'string'. Iv'e noted that many if not all string

Re: modifying standard library functionality (difflib)

2010-06-24 Thread Paul Rubin
Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid writes: patching source code canonically means physically modifying the original source file. Monkeypatching - which can only be done in some dynamic languages - is what you're doing above, ie dynamically replacing a given feature

Re: print line number and source filename

2010-06-24 Thread Vinay Sajip
On Jun 24, 4:07 am, Peng Yu pengyu...@gmail.com wrote: %(module)s only print to __init__. However, I need the fullname a.b.__init__. I looked at the manual, but I don't see what format string I should supply. Would you please let me know? Did you look at this part of the documentation?

Re: Emacs Form Feed (^L) Display Suggestion and Tips

2010-06-24 Thread Tassilo Horn
Xah Lee xah...@gmail.com writes: Hi Xah, also, besides emacs elisp, does anyone see the form feed char in other lang source code? It's quite often used in messages in newsgroups and mailing lists. The Gnus news- and mailreader creates nice Next/Previous page buttons from them and hides the

Re: Emacs Form Feed (^L) Display Suggestion and Tips

2010-06-24 Thread Thomas Jollans
On 06/24/2010 03:14 PM, Xah Lee wrote: On Jun 24, 5:41 am, Xah Lee xah...@gmail.com wrote: • Emacs Form Feed (^L) Display Suggestion and Tips http://xahlee.org/emacs/modernization_formfeed.html a follow up question. when i was learning python in ~2005, i remember seeing it in python

Re: Second attempt WAS: From Dict to Classes yes or no and how

2010-06-24 Thread Colin J. Williams
On 22-Jun-10 08:03 AM, Jerry Rocteur wrote: On Tue, Jun 22, 2010 at 9:32 PM, Jerry Rocteurmac...@rocteur.cc wrote: If you were able to ask us perhaps a more specific question and describe your problem a little more concisely perhaps I (and we) might have a bit more to offer you. I have a

mod_python and css

2010-06-24 Thread Bradley Hintze
Hi all, the mod_python mailing list is pretty dead so I thought I'd try asking my question here. I am using mod_python and am having trouble with my .py scripts that output HTML. the HTML comes out alright but my style sheets are not being rendered. I am sure that this has to do withe a mod

Re: mod_python and css

2010-06-24 Thread Thomas Jollans
On 06/24/2010 09:10 PM, Bradley Hintze wrote: Hi all, about your question, no idea. the mod_python mailing list is pretty dead so I thought I'd try asking my question here. It comes as no surprise to me that the mod_python mailing list is dead: nobody uses mod_python anymore. For all I

Please book now for EuroPython 2010: 17th to 24th July in Birmingham, UK

2010-06-24 Thread Zeth
EuroPython 2010 --- EuroPython is a conference for the Python programming language community, including software written in Python such as Django, Zope and so on. It is aimed at everyone from beginners through to core developers. This year EuroPython will be held from the 17th to 24th

Re: deprecated string module issue

2010-06-24 Thread Terry Reedy
On 6/24/2010 1:50 PM, Ixokai wrote: On Thu, Jun 24, 2010 at 10:39 AM, GrayShark howe.ste...@gmail.com So if the constants are not deprecated, why is the module? Is some Again: the string module is not deprecated. It simply is not. GrayShark, pylint has a bug. Tell the author that its

Re: mod_python and css

2010-06-24 Thread Bradley Hintze
I had some issues with WSGI install. It was duious at best as it failed and seemed very unstable. Is this a trusted application? On Thu, Jun 24, 2010 at 3:19 PM, Thomas Jollans tho...@jollans.com wrote: On 06/24/2010 09:10 PM, Bradley Hintze wrote: Hi all, about your question, no idea. the

GDAL-1.7.1 : vcvarsall.bat missing

2010-06-24 Thread kBob
I am attempting to install the GDAL bindings (GDAL-1.7.1) on a Windows XP Desktop with Python 2.6 and GDAL. During install, the script finishes with error: Unable to find vcvarsall.bat. What dependencies am I missing? C:\PyPI\GDAL-1.7.1c:\python26\python setup.py install running install

Re: GDAL-1.7.1 : vcvarsall.bat missing

2010-06-24 Thread Christian Heimes
I am attempting to install the GDAL bindings (GDAL-1.7.1) on a Windows XP Desktop with Python 2.6 and GDAL. During install, the script finishes with error: Unable to find vcvarsall.bat. What dependencies am I missing? Visual Studio 2008 Christian --

Re: question about multiprocessing

2010-06-24 Thread News123
hywhy wrote: thanks,friend! I wanna use Queue to share objects,but on windows, the multiprocessing module can‘t do this。 Is there any way to solve this problem! thanks With multiprocessing.SyncManager you should be able to exchange Queues between different processes. --

Re: Should I Learn Python or Ruby next?

2010-06-24 Thread Rhodri James
On Wed, 23 Jun 2010 23:47:55 +0100, rantingrick rantingr...@gmail.com wrote: On Jun 23, 4:43 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: And how exactly does your example express itself in a more syntactically-correct linear-flow than the two code snippets i provided earlier,

Re: mod_python and css

2010-06-24 Thread John Nagle
If you send back a content type of text/plain, your output will not be rendered as HTML by a browser; it will just be displayed as plain text. Try text/html. John Nagle On 6/24/2010 12:19 PM, Thomas Jollans wrote: On 06/24/2010 09:10 PM, Bradley Hintze

Re: How to send a non-standard IMAP command?

2010-06-24 Thread Xianwen Chen
On Thu, Jun 24, 2010 at 2:25 PM, Tim Chase python.l...@tim.thechases.comwrote: On 06/24/2010 04:47 AM, Xianwen Chen wrote: Thanks a lot for your reply! I thought it would be simpler if the problem was presented in a brief way. Unfortunately, not for this case. Here is the detail. Free

Re: Types missing from typesmodule

2010-06-24 Thread Terry Reedy
On 6/24/2010 2:29 AM, John Nagle wrote: Does the types module go away in 3.x, then? No, but all the duplication (IntType is int, etc) is removed. dir(types) ['BuiltinFunctionType', 'BuiltinMethodType', 'CodeType', 'FrameType', 'FunctionType', 'GeneratorType', 'GetSetDescriptorType',

Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Lawrence D'Oliveiro
Just been reading this article http://www.theregister.co.uk/2010/06/23/xxs_sql_injection_attacks_testing_remedy/ which says that a lot of security holes are arising these days because everybody is concentrating on unit testing of their own particular components, with less attention being devoted

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Roy Smith
In article i00t2k$l0...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: I construct ad-hoc queries all the time. It really isn’t that hard to do safely. All you have to do is read the documentation I get worried when people talk about how easy it is to do

Heuristic

2010-06-24 Thread Marcos
I have a store, so I want to maximize the profit. I have all the suppliers with diferent prices, some providers can send products to a client an others not, this has a plus price. Some providers has a discount over the tansport if a quantity is reached. Sometimes its better to me receive the

Re: Heuristic

2010-06-24 Thread Terry Reedy
On 6/24/2010 9:13 PM, Marcos wrote: I have a store, so I want to maximize the profit. I have all the suppliers with diferent prices, some providers can send products to a client an others not, this has a plus price. Some providers has a discount over the tansport if a quantity is reached.

Re: deprecated string module issue

2010-06-24 Thread Benjamin Peterson
GrayShark howe.steven at gmail.com writes: Sorry, I meant from string import lowercase, uppercase Technically, you should use ascii_lowercase and ascii_uppercase, though I don't know if that's the cause of pylint's complaints. -- http://mail.python.org/mailman/listinfo/python-list

Re: Heuristic

2010-06-24 Thread geremy condra
On Thu, Jun 24, 2010 at 9:13 PM, Marcos marcosruap...@gmail.com wrote: I have a store, so I want to maximize the profit. I have all the suppliers with diferent prices, some providers can send products to a client an others not, this has a plus price. Some providers has a discount over the

Re: Heuristic

2010-06-24 Thread Marcos
On 25 jun, 03:28, Terry Reedy tjre...@udel.edu wrote: On 6/24/2010 9:13 PM, Marcos wrote: I have a store, so I want to maximize the profit. I have all the suppliers with diferent prices, some providers can send products to a client an others not, this has a plus price. Some providers has a

Re: Heuristic

2010-06-24 Thread Marcos
On 25 jun, 03:36, geremy condra debat...@gmail.com wrote: On Thu, Jun 24, 2010 at 9:13 PM, Marcos marcosruap...@gmail.com wrote: I have a store, so I want to maximize the profit. I have all the suppliers with diferent prices, some providers can send products to a client an others not, this

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Owen Jacobson
On 2010-06-24 21:02:48 -0400, Roy Smith said: In article i00t2k$l0...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: I construct ad-hoc queries all the time. It really isn’t that hard to do safely. All you have to do is read the documentation I get worried

improving python performance by extension module (64bit)

2010-06-24 Thread Peng Yu
http://psyco.sourceforge.net/ The above package can improve python program on 32 bit library. But I need to run on 64 bit library. Is there any other module that can help improving the performance of python on 64 bit? -- Regards, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Lawrence D'Oliveiro
In message roy-30b881.21024824062...@news.panix.com, Roy Smith wrote: 1) Somebody is running your application (or the database server) with the locale set to something unexpected. Locales are under program control, so that won’t happen. This is why I use UTF-8 encoding for everything. --

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Lawrence D'Oliveiro
In message 2010062422432660794-angrybald...@gmailcom, Owen Jacobson wrote: Why would I write this when SQLAlchemy, even without using its ORM features, can do it for me? SQLAlchemy doesn’t seem very flexible. Looking at the code examples http://www.sqlalchemy.org/docs/examples.html, they’re

[ANN] pyparsing 1.5.3 released

2010-06-24 Thread Paul McGuire
I'm happy to announce that a new release of pyparsing is now available, version 1.5.3. It has been almost a year and a half since 1.5.2 was released, but pyparsing has remained pretty stable. I believe I have cleaned up the botch-job I made in version 1.5.2 of trying to support both Python 2.x

Re: Why Is Escaping Data Considered So Magical?

2010-06-24 Thread Cameron Simpson
On 25Jun2010 15:38, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: | In message 2010062422432660794-angrybald...@gmailcom, Owen Jacobson wrote: | Why would I write this when SQLAlchemy, even without using its ORM | features, can do it for me? | | SQLAlchemy doesn’t seem very

[issue9065] tarfile: default root:root ownership is incorrect.

2010-06-24 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9065 ___

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Distribution with my algorithm: ... from collections import Counter print Counter(_randint(6755399441055744) % 3 for _ in xrange(1)) = Counter({0L: 33342985, 2L: 5781, 1L: 33321234}) Distribution: {0:

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: A couple of points: (1) In addition to documenting the extent of the repeatability, it would be good to have tests to prevent changes that inadvertently change the sequence of randrange values. (2) For large arguments, cross-platform

[issue1685453] email package should work better with unicode

2010-06-24 Thread Shashwat Anand
Changes by Shashwat Anand anand.shash...@gmail.com: -- nosy: +l0nwlf ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1685453 ___ ___

[issue9067] Use macros from pyctype.h

2010-06-24 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: While investigating issue 9020, I noticed that there are several places where the pyctype.h macros could/should be used. -- messages: 108505 nosy: eric.smith, skrah priority: normal severity: normal status: open title: Use

[issue9020] 2.7: eval hangs on AIX

2010-06-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Committed fix in r82191. Thanks Sridhar for tracking this down. New issues emerging from this one: 1) Simplify Py_CHARMASK: issue 9036 2) Use macros from pyctype.h: issue 9067 Additionally, I noticed that the macros

[issue9068] from . import *

2010-06-24 Thread Haoyu Bai
New submission from Haoyu Bai divine...@gmail.com: from . import * is valid syntax in CPython (both 2.6 and py3k) but in the language reference it is not allowed: http://docs.python.org/dev/py3k/reference/simple_stmts.html#the-import-statement -- components: Interpreter Core messages:

[issue1172711] long long support for array module

2010-06-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Seems like a reasonable addition to me. Anyone feel like refreshing the patch so that it applies to py3k? -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org

[issue1172711] long long support for array module

2010-06-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: BTW, the PyLong_AsUnsignedLongLong BadInternalCall has long since disappeared. I agree with Armin Rigo that the conversion functions in longobject.c are a mess, though (and also that cleanup is difficult). --

[issue1172711] long long support for array module

2010-06-24 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1172711 ___ ___

[issue9066] Standard type codes for array.array, same as struct

2010-06-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I agree that it might be useful to have some way of specifying fixed-width integers. It's not clear to me that importing specifier prefixes from the struct module is the best way to go about this, though. -- nosy: +mark.dickinson

[issue9064] pdb enhancement up/down traversals

2010-06-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is a good idea, but tab characters are disallowed in core python code; please replace them with spaces. Then, please provide an unified diff patch (with diff -u), and name it with the .patch extension, this will make it easier to

[issue9064] pdb enhancement up/down traversals

2010-06-24 Thread Andrew Valencia
Andrew Valencia ajv-611-065-2...@vsta.org added the comment: Here's the patch, hopefully updated as requested. Thanks! -- keywords: +patch Added file: http://bugs.python.org/file17758/pdb_up.patch ___ Python tracker rep...@bugs.python.org

[issue9036] Simplify Py_CHARMASK

2010-06-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Antoine Pitrou rep...@bugs.python.org wrote: Thus, ((unsigned char)((c) 0xff)) and ((unsigned char)(c)) should produce the same results. If it's the case, it's probably optimized away by the compiler anyway. Yes, the asm output

  1   2   >