CPython / Decimal and bit length of value.

2021-09-04 Thread Nacnud Nac via Python-list
Hi, Is there a quick way to get the number of bits required to store the value in a Decimal class?  What obvious thing am I missing? I'm working with really large integers, say, in the order of 5_000_000 of ASCII base 10 digits.  It seems the function mpd_sizeinbase would be a nice thing to be ab

Python solve problem with string operation

2014-01-16 Thread Nac Temha
Hi everyone, I want to do operation with chars in the given string. Actually I want to grouping the same chars. For example; input : "3443331123377" operation-> (3)(44)()(333)(11)(2)(33)(77) output: "34131237" How can I do without list, regular expression. just using string op

Re: Python log parser

2013-04-05 Thread Nac Temha
On Fri, Apr 5, 2013 at 4:31 PM, Grant Edwards wrote: > On 2013-04-05, rh wrote: > > On Fri, 5 Apr 2013 02:17:55 +0300 Nac Temha > wrote: > > > >> Hi, I'm working to parse log files. But I need to help this matter. I > >> want to parse syslog(wihch p

Re: Python log parser

2013-04-05 Thread Nac Temha
I could not do using syslog module. On Fri, Apr 5, 2013 at 4:00 AM, rh wrote: > pydoc syslog > > That intenough? > > On Fri, 5 Apr 2013 02:17:55 +0300 > Nac Temha wrote: > > > Hi, I'm working to parse log files. But I need to help this matter. I > >

Python log parser

2013-04-04 Thread Nac Temha
Hi, I'm working to parse log files. But I need to help this matter. I want to parse syslog(wihch program is running, timestamp,host,etc) of system I could not find any module of python for this. Or do you have suggestion? Best regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to set or get enviroment variable

2013-03-30 Thread Nac Temha
Just wondering. most ideal approach is use os module, is true? On Sat, Mar 30, 2013 at 10:45 PM, Chris Angelico wrote: > On Sun, Mar 31, 2013 at 7:39 AM, Nac Temha wrote: > > Hi, I want to get and set enviroment variable of linux system. Actually I > > can do this issue usin

How to set or get enviroment variable

2013-03-30 Thread Nac Temha
Hi, I want to get and set enviroment variable of linux system. Actually I can do this issue using os module but How can I do without using os module? Is there another way? Regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: Calculate Big Number

2013-01-07 Thread Nac Temha
Thanks for reply. I wonder how quickly calculate big numbers. Can you explain me as theoretical? Because this numbers overflow size of integer and double. On Tue, Jan 8, 2013 at 3:08 AM, Tim Chase wrote: > On 01/07/13 18:44, Nac Temha wrote: > >> How to *quickly* calculate large

Calculate Big Number

2013-01-07 Thread Nac Temha
Hello, How to *quickly* calculate large numbers. For example >>> (10**25) * (2**50) 11258999068426240L Regards. -- http://mail.python.org/mailman/listinfo/python-list

Python programming philosophy

2013-01-05 Thread Nac Temha
Hello, I want to learn working principle of python as broadly. How to interpret the python? For example, what is pyc files and when does it occur? Can you explain them? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler Fails

2012-03-05 Thread nac
On Mar 5, 4:27 am, Jean-Michel Pichavant wrote: > nac wrote: > > The RotatingFileHandler running on win 7 64-bit; py 2.7 is failing > > when the script launches a process using subprocess.Popen. Works fine > > if the subprocess is not launched > > > The exception thr

RotatingFileHandler Fails

2012-03-03 Thread nac
The RotatingFileHandler running on win 7 64-bit; py 2.7 is failing when the script launches a process using subprocess.Popen. Works fine if the subprocess is not launched The exception thrown Traceback (most recent call last): File "C:\Python27\lib\logging\handlers.py", line 78, in emit self