Re: locale.format without trailing zeros

2011-08-22 Thread przemolicc
On Mon, Aug 22, 2011 at 11:48:46AM +0200, Peter Otten wrote: > przemol...@poczta.fm wrote: > > import locale > locale.setlocale(locale.LC_ALL, "pl_PL") > > 'pl_PL' > i=0.20 > j=0.25 > locale.format('%f', i) > > '0,20' > locale.format('%f', j) > > '0,25' > > >

Re: locale.format without trailing zeros

2011-08-22 Thread przemolicc
On Mon, Aug 22, 2011 at 11:48:46AM +0200, Peter Otten wrote: > przemol...@poczta.fm wrote: > > import locale > locale.setlocale(locale.LC_ALL, "pl_PL") > > 'pl_PL' > i=0.20 > j=0.25 > locale.format('%f', i) > > '0,20' > locale.format('%f', j) > > '0,25' > > >

locale.format without trailing zeros

2011-08-22 Thread przemolicc
Hello, >>> import locale >>> locale.setlocale(locale.LC_ALL, "pl_PL") 'pl_PL' >>> i=0.20 >>> j=0.25 >>> locale.format('%f', i) '0,20' >>> locale.format('%f', j) '0,25' I need to print the numbers in the following format: '0,2' (i) '0,25' (j) So the last trailing zeros are not printed.

Re: String concatenation - which is the fastest way ?

2011-08-16 Thread przemolicc
On Fri, Aug 12, 2011 at 11:25:06AM +0200, Stefan Behnel wrote: > przemol...@poczta.fm, 11.08.2011 16:39: >> On Thu, Aug 11, 2011 at 02:48:43PM +0100, Chris Angelico wrote: >>> On Thu, Aug 11, 2011 at 2:46 PM, wrote: This is the way I am going to use. But what is the best data type to hol

Re: String concatenation - which is the fastest way ?

2011-08-12 Thread przemolicc
On Thu, Aug 11, 2011 at 02:48:43PM +0100, Chris Angelico wrote: > On Thu, Aug 11, 2011 at 2:46 PM, wrote: > > This is the way I am going to use. > > But what is the best data type to hold so many rows and then operate on > > them ? > > > > List of strings. [...] Let's assume I have the whole l

Re: String concatenation - which is the fastest way ?

2011-08-12 Thread przemolicc
On Thu, Aug 11, 2011 at 02:48:43PM +0100, Chris Angelico wrote: > On Thu, Aug 11, 2011 at 2:46 PM, wrote: > > This is the way I am going to use. > > But what is the best data type to hold so many rows and then operate on > > them ? > > > > List of strings. Take it straight from your Oracle inte

Re: String concatenation - which is the fastest way ?

2011-08-12 Thread przemolicc
On Thu, Aug 11, 2011 at 02:38:32PM -0700, SigmundV wrote: > When I saw the headline I thought "oh no, not string concatenation > again... we have had scores of these thread before...", but this is a > rather interesting problem. The OP says he's not a database > developer, but why is he then fiddl

Re: String concatenation - which is the fastest way ?

2011-08-11 Thread przemolicc
On Thu, Aug 11, 2011 at 11:59:31AM +0100, Chris Angelico wrote: > > What may be the easiest way is to do the select in a single process, > then partition it and use the Python multiprocessing module to split > the job into several parts. Then you need only concatenate the handful > of strings. Th

Re: String concatenation - which is the fastest way ?

2011-08-11 Thread przemolicc
On Thu, Aug 11, 2011 at 11:59:31AM +0100, Chris Angelico wrote: > On Thu, Aug 11, 2011 at 7:40 AM, wrote: > > I am not a database developer so I don't want to change the whole process > > of data flow between applications in my company. Another process is > > reading this XML from particular Orac

Re: String concatenation - which is the fastest way ?

2011-08-11 Thread przemolicc
On Wed, Aug 10, 2011 at 03:38:42PM +0100, Chris Angelico wrote: > On Wed, Aug 10, 2011 at 3:38 PM, Chris Angelico wrote: > > Which SQL library are you suing? > > And this is why I should proof-read BEFORE, not AFTER, sending. > > Which SQL library are you *using*? cx_oracle Regards Przemyslaw

Re: String concatenation - which is the fastest way ?

2011-08-10 Thread przemolicc
On Wed, Aug 10, 2011 at 06:20:10PM +0200, Stefan Behnel wrote: > przemol...@poczta.fm, 10.08.2011 15:31: >> On Wed, Aug 10, 2011 at 01:32:06PM +0100, Chris Angelico wrote: >>> On Wed, Aug 10, 2011 at 12:17 PM, wrote: I'd like to write a python (2.6/2.7) script which connects to database, >>>

Re: String concatenation - which is the fastest way ?

2011-08-10 Thread przemolicc
On Wed, Aug 10, 2011 at 01:32:06PM +0100, Chris Angelico wrote: > On Wed, Aug 10, 2011 at 12:17 PM, wrote: > > Hello, > > > > I'd like to write a python (2.6/2.7) script which connects to database, > > fetches > > hundreds of thousands of rows, concat them (basically: create XML) > > and then pu

String concatenation - which is the fastest way ?

2011-08-10 Thread przemolicc
Hello, I'd like to write a python (2.6/2.7) script which connects to database, fetches hundreds of thousands of rows, concat them (basically: create XML) and then put the result into another table. Do I have any choice regarding string concatenation in Python from the performance point of view ? S

Re: - what do you think ?

2011-02-09 Thread przemolicc
On Tue, Feb 08, 2011 at 01:20:48PM -0500, Terry Reedy wrote: > On 2/8/2011 7:18 AM, przemol...@poczta.fm wrote: >> On Tue, Feb 08, 2011 at 10:16:42PM +1100, Ben Finney wrote: > >>> Either way, please don't ask for the subject lines to be munged. >> >> Any technical reason why not ? > > For one reas

Re: [python-list] - what do you think ?

2011-02-08 Thread przemolicc
On Tue, Feb 08, 2011 at 10:16:42PM +1100, Ben Finney wrote: > przemol...@poczta.fm writes: > > > I have just subscribed to this python-list@ and this is my N list. > > Usually many mailing lists use square brackets to identify its name > > when you have e-mails from different forums. > > Would you

[python-list] - what do you think ?

2011-02-08 Thread przemolicc
Hello, I have just subscribed to this python-list@ and this is my N list. Usually many mailing lists use square brackets to identify its name when you have e-mails from different forums. Would you consider adding [] to this list also ? Please compare both version below: 5350 Feb 07 Richard Ho

Re: Graphical library - charts

2009-06-22 Thread przemolicc
BJörn Lindqvist wrote: > 2009/6/22 : >> Hello, >> >> I have thousends of files with logs from monitoring system. Each file >> has some important data (numbers). I'd like to create charts using those >> numbers. Could you please suggest library which will allow creating >> such charts ? The prefer

Re: Graphical library - charts

2009-06-22 Thread przemolicc
BJörn Lindqvist wrote: > 2009/6/22 : >> Hello, >> >> I have thousends of files with logs from monitoring system. Each file >> has some important data (numbers). I'd like to create charts using those >> numbers. Could you please suggest library which will allow creating >> such charts ? The prefer

Graphical library - charts

2009-06-22 Thread przemolicc
Hello, I have thousends of files with logs from monitoring system. Each file has some important data (numbers). I'd like to create charts using those numbers. Could you please suggest library which will allow creating such charts ? The preferred chart is line chart. Besides is there any library w