Re: pythonOCC examples doesn't work?

2012-09-16 Thread Dwight Hutto
>> Alan Gauld quotes, "Putting on my moderator's hat", sometimes. >> >>> is as you describe, a monarchy whose head but seldom exercises power; >> >> >> I think it's Rossenbom(or whoever the creator of the interpreter >> written in C is), "who says benevolent dictator for life" >> > [snip] > You don

Re: Comparing strings from the back?

2012-09-16 Thread alex23
On Sep 17, 2:05 pm, Chris Angelico wrote: > I would hate to see people leaned > hard on to make their speech entirely politically correct. Use common > sense, on both sides. Don't be offensive, and don't be offended. While I would like to agree, this would require there to be no power disparities

Re: utcnow

2012-09-16 Thread Ben Finney
Nick the Gr33k writes: > Hello is there a better way of writing this: > > date = ( datetime.datetime.utcnow() + datetime.timedelta(hours=3) > ).strftime( '%y-%m-%d %H:%M:%S') > > something like: > > date = datetime.datetime.utcnow(hours=3).strftime( '%y-%m-%d %H:%M:%S') > > i prefer it if it coul

Re: utcnow

2012-09-16 Thread Joost Molenaar
Time zones! So much fun. Looks like you're dealing with UTC offsets yourself, which gets messy as soon as you start thinking about DST. The good news is that there's a timezone database on most systems, which you should almost definitely use. Take a look at python-dateutil (pip install python-date

Re: Python garbage collector/memory manager behaving strangely

2012-09-16 Thread 88888 Dihedral
alex23於 2012年9月17日星期一UTC+8上午11時25分06秒寫道: > On Sep 17, 12:32 pm, "Jadhav, Alok" > > wrote: > > > - As you have seen, the line separator is not '\n' but its '|\n'. > > > Sometimes the data itself has '\n' characters in the middle of the line > > > and only way to find true end of the line is tha

utcnow

2012-09-16 Thread Nick the Gr33k
Hello is there a better way of writing this: date = ( datetime.datetime.utcnow() + datetime.timedelta(hours=3) ).strftime( '%y-%m-%d %H:%M:%S') something like: date = datetime.datetime.utcnow(hours=3).strftime( '%y-%m-%d %H:%M:%S') i prefer it if it could be written as this. Also what about

Re: Comparing strings from the back?

2012-09-16 Thread Chris Angelico
On Mon, Sep 17, 2012 at 11:11 AM, alex23 wrote: > On Sep 15, 1:10 pm, Dwight Hutto wrote: >> On Fri, Sep 14, 2012 at 6:43 PM, Prasad, Ramit >> > Since I was unsure myself if you were trying to be offensive or racist, >> > I would disagree with "everyone can know it wasn't meant as racist". >> >>

Re: Python garbage collector/memory manager behaving strangely

2012-09-16 Thread alex23
On Sep 17, 12:32 pm, "Jadhav, Alok" wrote: > - As you have seen, the line separator is not '\n' but its '|\n'. > Sometimes the data itself has '\n' characters in the middle of the line > and only way to find true end of the line is that previous character > should be a bar '|'. I was not able spec

RE: Python garbage collector/memory manager behaving strangely

2012-09-16 Thread Jadhav, Alok
I am thinking of calling a new subprocess which will do the memory hungry job and then release the memory as specified in the link below http://stackoverflow.com/questions/1316767/how-can-i-explicitly-free-mem ory-in-python/1316799#1316799 Regards, Alok -Original Message- From: Dave An

RE: Python garbage collector/memory manager behaving strangely

2012-09-16 Thread Jadhav, Alok
Thanks Dave for clean explanation. I clearly understand what is going on now. I still need some suggestions from you on this. There are 2 reasons why I was using self.rawfile.read().split('|\n') instead of self.rawfile.readlines() - As you have seen, the line separator is not '\n' but its '|\n'

Re: Python garbage collector/memory manager behaving strangely

2012-09-16 Thread Dave Angel
On 09/16/2012 09:07 PM, Jadhav, Alok wrote: > Hi Everyone, > > > > I have a simple program which reads a large file containing few million > rows, parses each row (`numpy array`) and converts into an array of > doubles (`python array`) and later writes into an `hdf5 file`. I repeat > this loop fo

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread alex23
On Sep 17, 10:55 am, Roy Smith wrote: > They didn't buy the service.  They bought the data.  Well, they really > bought both, but the data is all they wanted. I thought they'd taken most of the historical data offline now too? Either way, it was the sort of purchase-and-whither approach you usua

Re: Comparing strings from the back?

2012-09-16 Thread alex23
On Sep 15, 1:10 pm, Dwight Hutto wrote: > On Fri, Sep 14, 2012 at 6:43 PM, Prasad, Ramit > > Since I was unsure myself if you were trying to be offensive or racist, > > I would disagree with "everyone can know it wasn't meant as racist". > > If you're unsure if it was racist, you should err on the

Python garbage collector/memory manager behaving strangely

2012-09-16 Thread Jadhav, Alok
Hi Everyone, I have a simple program which reads a large file containing few million rows, parses each row (`numpy array`) and converts into an array of doubles (`python array`) and later writes into an `hdf5 file`. I repeat this loop for multiple days. After reading each file, i delete all the

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Roy Smith
In article <6c732de0-b10f-4d40-853c-f62682970...@rg9g2000pbc.googlegroups.com>, alex23 wrote: > On Sep 16, 11:18 pm, Ben Finney wrote: > > Using Google Groups for posting to Usenet has been a bad idea for a long > > time, but now it just seems to be a sure recipe for annoying the rest of > > u

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread alex23
On Sep 16, 11:18 pm, Ben Finney wrote: > Using Google Groups for posting to Usenet has been a bad idea for a long > time, but now it just seems to be a sure recipe for annoying the rest of > us. Again, not something you have much control over, except to stop > using Google Groups. Agreed. While i

Re: Decorators not worth the effort

2012-09-16 Thread alex23
On Sep 15, 6:30 am, Terry Reedy wrote: > > On 13Sep2012 18:58, alex23 wrote: > > | On Sep 14, 3:54 am, Jean-Michel Pichavant > > | wrote: > > | > I don't like decorators, I think they're not worth the mental effort. > > | > > | Because passing a function to a function is a huge cognitive burden?

Re: unit test strategy

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 11:38:15 -0700, Aaron Brady wrote: > Here is an example of some repetitive code. > > for view_meth in [ dict.items, dict.keys, dict.values ]: > dict0= dict( ( k, None ) for k in range( 10 ) ) > iter0= iter( view_meth( dict0 ) ) > dict.__setitem__( dict0, 0,

Re: Obnoxious postings from Google Groups

2012-09-16 Thread Mayuresh Kathe
On Sunday 16 September 2012 09:11 PM, pandora.ko...@gmail.com wrote: Τη Κυριακή, 16 Σεπτεμβρίου 2012 4:18:50 μ.μ. UTC+3, ο χρήστης Ben Finney έγραψε: Νικόλαος Κούρας writes: Iam sorry i didnt do that on purpose and i dont know how this is done. Iam positng via google groups using chr

Re: datetime issue

2012-09-16 Thread Dave Angel
On 09/16/2012 07:56 AM, Νικόλαος Κούρας wrote: > Τη Κυριακή, 16 Σεπτεμβρίου 2012 2:34:34 μ.μ. UTC+3, ο χρήστης Steven D'Aprano > έγραψε: >> >> >> No. That's not how mailing lists work. Every email gets posted to all >> members, unless they go onto "No Mail", in which case they get no emails >>

Re: Obnoxious postings from Google Groups

2012-09-16 Thread Mark Lawrence
On 16/09/2012 17:06, pandora.ko...@gmail.com wrote: http://mail.python.org/mailman/listinfo/python-list email client to python-list@python.org wait a minute! i must use my ISP's news server and then post o comp.lang.python no? What is python-list@python.org how can i post there? I

Re: datetime issue

2012-09-16 Thread Mark Lawrence
On 16/09/2012 16:54, Chris Angelico wrote: On Mon, Sep 17, 2012 at 1:40 AM, wrote: Cant it be written more easily as: date = (datetime.datetime.utcnow(+2) i know this is not thhe correct syntax but it just needs a way to add GMT+2 hours since utc=gmt I've dithered about whether to open t

Re: unit test strategy

2012-09-16 Thread Aaron Brady
On Sunday, September 16, 2012 2:42:09 AM UTC-5, Steven D'Aprano wrote: > On Fri, 14 Sep 2012 19:59:29 -0700, Aaron Brady wrote: > > > > > Hello, > > > > > > I've developing a test script. There's a lot of repetition. I want to > > > introduce a strategy for approaching it, but I don't want

RE: Moving folders with content

2012-09-16 Thread jyoung79
Hi "Nobody" and Hans, I really appreciate you all sharing this insight with me. > You might think that os.path.expanduser > would never expand '~' to something containing a double quote, > but you'd be wrong: > >>> import os > >>> os.environ['HOME'] = 'gotcha!"; rm -rf ' > >>> print(os.path.expa

Re: Python presentations

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 18:13:36 +0200, Alexander Blinne wrote: > I did some timing with the following versions of the function: > > def powerlist1(x, n): > result=[1] > for i in xrange(n-1): > result.append(result[-1]*x) > return result > > def powerlist2(x,n): > if n==1: >

Using Py_AddPendingCall

2012-09-16 Thread css322
I have an embedded Python program which runs in a thread in C. When the Python interpreter switches thread context (yielding control to another thread), I'd like to be notified so I can perform certain necessary operations. It seems that Py_AddPendingCall is exactly what I'm looking for. Howeve

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 08:41:44 -0700, pandora.koura wrote: > If i ditch google groups what application can i use in Windows 8 to post > to this newsgroup and what newsserver too? Google is your friend. Do try to find the answer to your questions before asking here. Search for "usenet news reader

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 09:06:30 -0700, pandora.koura wrote: >> > http://mail.python.org/mailman/listinfo/python-list > What is python-list@python.org how can i post there? It's the same thing it was when I posted the above URL a few hours ago. Didn't you follow the link before? It has instructio

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Gene Heskett
On Sunday 16 September 2012 12:08:47 pandora.ko...@gmail.com did opine: > Whaen i tried to post just now by hitting sumbit, google groups told me > that the following addresssed has benn found in this thread! i guess is > used them all to notify everything! > > cdf072b2-7359-4417-b1e4-d984e4317..

Re: Obnoxious postings from Google Groups

2012-09-16 Thread Terry Reedy
On 9/16/2012 11:41 AM, pandora.ko...@gmail.com wrote: If i ditch google groups PLEASE DO > what application can i use in Windows 8 to post to this newsgroup > and what newsserver too? news.gmane.org is a free newsserver that mirrors 1000s of technical email lists. python-list is gmane.comp.

testing....

2012-09-16 Thread Nick the Gr33k
Test to see if it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Joel Goldstick
On Sun, Sep 16, 2012 at 12:06 PM, wrote: > >> >> > http://mail.python.org/mailman/listinfo/python-list >> >> >> >> email client to python-list@python.org >> > > wait a minute! i must use my ISP's news server and then post o > comp.lang.python no? > > What is python-list@python.org how can i post

Re: Python presentations

2012-09-16 Thread Chris Angelico
On Mon, Sep 17, 2012 at 2:13 AM, Alexander Blinne wrote: > def powerlist3(x,n): > return [x**i for i in xrange(n)] > > for really big n powerlist3 always takes very much time :) I would reiterate that a really big n is a really unusual use case for a function like this, except that... I frankly

Re: Python presentations

2012-09-16 Thread Alexander Blinne
On 14.09.2012 14:19, Chris Angelico wrote: > Err, yes, I did mean ** there. The extra multiplications may be > slower, but which is worse? Lots of list additions, or lots of integer > powers? In the absence of clear and compelling evidence, I'd be > inclined to go with the list comp - and what's mo

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread pandora . koura
> > Ah. Did you then send to all three? Just a wild guess, but I'm > > thinking that might be the cause of post duplication... > > > > ChrisA I had no choise, it doesnt let me pick one, it just notifies me that it will posted to these 3. -- http://mail.python.org/mailman/listinfo/python-li

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Joel Goldstick
On Sun, Sep 16, 2012 at 11:41 AM, wrote: > Τη Κυριακή, 16 Σεπτεμβρίου 2012 4:18:50 μ.μ. UTC+3, ο χρήστης Ben Finney > έγραψε: >> Νικόλαος Κούρας writes: >> >> >> >> > Iam sorry i didnt do that on purpose and i dont know how this is done. >> >> > >> >> > Iam positng via google groups using chrom

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread pandora . koura
> > > http://mail.python.org/mailman/listinfo/python-list > > > > email client to python-list@python.org > wait a minute! i must use my ISP's news server and then post o comp.lang.python no? What is python-list@python.org how can i post there? -- http://mail.python.org/mailman/listinfo/py

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Chris Angelico
On Mon, Sep 17, 2012 at 1:44 AM, wrote: > Whaen i tried to post just now by hitting sumbit, google groups told me that > the following addresssed has benn found in this thread! i guess is used them > all to notify everything! > > cdf072b2-7359-4417-b1e4-d984e4317...@googlegroups.com > mailman.7

Re: datetime issue

2012-09-16 Thread Chris Angelico
On Mon, Sep 17, 2012 at 1:40 AM, wrote: > Cant it be written more easily as: > date = (datetime.datetime.utcnow(+2) > > i know this is not thhe correct syntax but it just needs a way to add GMT+2 > hours since utc=gmt I've dithered about whether to open this can of worms or let sleeping dogs l

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread pandora . koura
Whaen i tried to post just now by hitting sumbit, google groups told me that the following addresssed has benn found in this thread! i guess is used them all to notify everything! cdf072b2-7359-4417-b1e4-d984e4317...@googlegroups.com mailman.774.1347735926.27098.python-l...@python.org nikos.gr..

Re: Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread pandora . koura
Τη Κυριακή, 16 Σεπτεμβρίου 2012 4:18:50 μ.μ. UTC+3, ο χρήστης Ben Finney έγραψε: > Νικόλαος Κούρας writes: > > > > > Iam sorry i didnt do that on purpose and i dont know how this is done. > > > > > > Iam positng via google groups using chrome, thats all i know. > > > > It is becoming qui

Re: datetime issue

2012-09-16 Thread pandora . koura
Τη Κυριακή, 16 Σεπτεμβρίου 2012 4:23:02 μ.μ. UTC+3, ο χρήστης Günther Dietrich έγραψε: > In article , > > Νικόλαος Κούρας wrote: > > > > [...] > > > > >also it would be nice if datetime.datetime.now(GMT+2) can be used. > > > > In

Re: newbie question About O'Reilly "Python for Unix and Linux System Administration" ftp Mirror question

2012-09-16 Thread Chris Angelico
On Mon, Sep 17, 2012 at 1:09 AM, moonhkt wrote: > Hi All > > O'Reilly Book ISBN 978-986-6840-36-4. > > python --version > Python 2.6.2 on AIX 5.3 Hi! Thanks for this, good information to open with. > Using this python to get files in ftp server. > > I got below error. What is the error meaning a

Re: datetime issue

2012-09-16 Thread pandora . koura
Τη Κυριακή, 16 Σεπτεμβρίου 2012 6:30:15 μ.μ. UTC+3, ο χρήστης MRAB έγραψε: > On 2012-09-16 09:25, Νικόλαος Κούρας wrote: > > [snip] > > > > > > date = ( datetime.datetime.now() + datetime.timedelta(hours=8) ).strftime( > > '%y-%m-%d %H:%M:%S') > > > > > > but iam giving +8 hours which is the

Re: newbie question About O'Reilly "Python for Unix and Linux System Administration" ftp Mirror question

2012-09-16 Thread Joel Goldstick
On Sun, Sep 16, 2012 at 11:09 AM, moonhkt wrote: > Hi All > > > O'Reilly Book ISBN 978-986-6840-36-4. > > python --version > Python 2.6.2 on AIX 5.3 > > Using this python to get files in ftp server. > > I got below error. What is the error meaning and how to fix ? > > ftp_mirror.py > Traceback (mo

Re: datetime issue

2012-09-16 Thread MRAB
On 2012-09-16 09:25, Νικόλαος Κούρας wrote: [snip] date = ( datetime.datetime.now() + datetime.timedelta(hours=8) ).strftime( '%y-%m-%d %H:%M:%S') but iam giving +8 hours which is the time difference between texas, us where the server sits and Greece's time. cant we somehow tell it to use GM

newbie question About O'Reilly "Python for Unix and Linux System Administration" ftp Mirror question

2012-09-16 Thread moonhkt
Hi All O'Reilly Book ISBN 978-986-6840-36-4. python --version Python 2.6.2 on AIX 5.3 Using this python to get files in ftp server. I got below error. What is the error meaning and how to fix ? ftp_mirror.py Traceback (most recent call last): File "/xx../shell/ftpmirror.py", line 80, in

Re: Moving folders with content

2012-09-16 Thread Nobody
On Sun, 16 Sep 2012 12:40:18 +0200, Hans Mulder wrote: > But you should get into the habit of using shell=False whenever > possible, because it is much easier to get it right. More accurately, you should get into the habit of passing a list as the first argument, rather than a string. On Unix-li

Re: newbie question : gedit as an ide

2012-09-16 Thread Devin Jeanpierre
On Sun, Sep 16, 2012 at 7:52 AM, Mayuresh Kathe wrote: > new to the group, a quick hello to all. :-) > does anyone use gedit as an 'ide' for python development? > if yes, may i know the caveats against using 'idle', 'bpython', etc? bpython isn't an IDE, it's a good interactive interpreter. As f

Re: newbie question : gedit as an ide

2012-09-16 Thread Chris Angelico
On Sun, Sep 16, 2012 at 9:52 PM, Mayuresh Kathe wrote: > new to the group, a quick hello to all. :-) > does anyone use gedit as an 'ide' for python development? > if yes, may i know the caveats against using 'idle', 'bpython', etc? > > thank you. I never really liked gedit; when I first switched

Re: datetime issue

2012-09-16 Thread Chris Angelico
On Mon, Sep 17, 2012 at 12:06 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> > Is it September already? >> >> Yes, it is; what does that mean in response to this question? Is there >> something about September that causes the question, or is it a once >> per month[1] question?

Re: datetime issue

2012-09-16 Thread Chris Angelico
On Sun, Sep 16, 2012 at 11:22 PM, Roy Smith wrote: > In article <4f9d9a0b-539a-4b6a-af3e-b02d1f400...@googlegroups.com>, > Νικόλαος Κούρας wrote: >> Iam sorry i didnt do that on purpose and i dont know how this is done. >> >> Iam positng via google groups using chrome, thats all i know. >> >> Wh

Re: datetime issue

2012-09-16 Thread Günther Dietrich
In article , Νικόλαος Κούρας wrote: [...] >also it would be nice if datetime.datetime.now(GMT+2) can be used. In , one of the first answers to your question you were pointed to pytz. This module does exactly what you ask for: >>> imp

Re: datetime issue

2012-09-16 Thread Roy Smith
In article <4f9d9a0b-539a-4b6a-af3e-b02d1f400...@googlegroups.com>, Íéêüëáïò Êïýñáò wrote: > Iam sorry i didnt do that on purpose and i dont know how this is done. > > Iam positng via google groups using chrome, thats all i know. > > Whats a mailing list? Is it September already? -- http://

Obnoxious postings from Google Groups (was: datetime issue)

2012-09-16 Thread Ben Finney
Νικόλαος Κούρας writes: > Iam sorry i didnt do that on purpose and i dont know how this is done. > > Iam positng via google groups using chrome, thats all i know. It is becoming quite clear that some change has happened recently to Google Groups that makes posts coming from there rather more obn

Re: unit test strategy

2012-09-16 Thread Mark Lawrence
On 15/09/2012 03:59, Aaron Brady wrote: Hello, I've developing a test script. There's a lot of repetition. I want to introduce a strategy for approaching it, but I don't want the program to be discredited because of the test script. Therefore, I'd like to know what people's reactions to an

Re: datetime issue

2012-09-16 Thread Νικόλαος Κούρας
Τη Κυριακή, 16 Σεπτεμβρίου 2012 2:34:34 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > On Sun, 16 Sep 2012 03:54:45 -0700, Νικόλαος Κούρας wrote: > > > > > Τη Κυριακή, 16 Σεπτεμβρίου 2012 1:49:38 μ.μ. UTC+3, ο χρήστης Steven > > > D'Aprano έγραψε: > > >> On Sun, 16 Sep 2012 03:15:11 -0700, Ν

newbie question : gedit as an ide

2012-09-16 Thread Mayuresh Kathe
new to the group, a quick hello to all. :-) does anyone use gedit as an 'ide' for python development? if yes, may i know the caveats against using 'idle', 'bpython', etc? thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: datetime issue

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 03:54:45 -0700, Νικόλαος Κούρας wrote: > Τη Κυριακή, 16 Σεπτεμβρίου 2012 1:49:38 μ.μ. UTC+3, ο χρήστης Steven > D'Aprano έγραψε: >> On Sun, 16 Sep 2012 03:15:11 -0700, Νικόλαος Κούρας wrote: >> >> >> >> > Whats a mailing list? >> >> > Can i get responses to my mail instead

Re: datetime issue

2012-09-16 Thread Νικόλαος Κούρας
Τη Κυριακή, 16 Σεπτεμβρίου 2012 1:49:38 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > On Sun, 16 Sep 2012 03:15:11 -0700, Νικόλαος Κούρας wrote: > > > > > Whats a mailing list? > > > Can i get responses to my mail instead of constantly check the google > > > groups site? > > > > http://m

Re: datetime issue

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 03:15:11 -0700, Νικόλαος Κούρας wrote: > Whats a mailing list? > Can i get responses to my mail instead of constantly check the google > groups site? http://mail.python.org/mailman/listinfo/python-list -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Moving folders with content

2012-09-16 Thread Hans Mulder
On 16/09/12 10:02:09, jyoun...@kc.rr.com wrote: > Thank you "Nobody" and Hans! You're welcome! >> You may want to use the subprocess module to run 'ditto'. If >> the destination folder does not exist, then ditto will copy MacOS >> specific aspects such as resource forks, ACLs and HFS meta-data.

Re: datetime issue

2012-09-16 Thread Νικόλαος Κούρας
Τη Κυριακή, 16 Σεπτεμβρίου 2012 12:53:42 μ.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: > On Sun, 16 Sep 2012 01:25:30 -0700, Νικόλαος Κούρας wrote: > > [...] > > > > You seem to be emailing python-list AND posting to comp.lang.python (or > > the gmane mirror). Please pick one, or the other,

Re: datetime issue

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 01:25:30 -0700, Νικόλαος Κούρας wrote: [...] You seem to be emailing python-list AND posting to comp.lang.python (or the gmane mirror). Please pick one, or the other, and not both, because the mailing list and the newsgroup are mirrors of each other. Anything you send to the

Re: datetime issue

2012-09-16 Thread Νικόλαος Κούρας
Τη Κυριακή, 16 Σεπτεμβρίου 2012 8:53:57 π.μ. UTC+3, ο χρήστης Dennis Lee Bieber έγραψε: > On Sat, 15 Sep 2012 22:15:38 -0700 (PDT), Íéêüëáïò Êïýñáò > > declaimed the following in > > gmane.comp.python.general: > > > > > > > > > > If i wanted to alter the following line, how would i write

Re: datetime issue

2012-09-16 Thread Νικόλαος Κούρας
Τη Κυριακή, 16 Σεπτεμβρίου 2012 10:51:18 π.μ. UTC+3, ο χρήστης Νικόλαος Κούρας έγραψε: > dn = datetime.datetime.now() > > dd = datetime.timedelta(hours=2) > > date = dn + dd > > date = date.strftime( '%y-%m-%d %H:%M:%S' ) > > > > still giving me texas,us time for some reason which is same a

Re: Python Logging: Specifying converter attribute of a log formatter in config file

2012-09-16 Thread Vinay Sajip
On Thursday, August 30, 2012 11:38:27 AM UTC+1, Radha Krishna Srimanthula wrote: > > Now, how do I specify the converter attribute (time.gmtime) in the above > section? Sadly, there is no way of doing this using the configuration file, other than having e.g. a class UTCFormatter(logging.Format

RE: Moving folders with content

2012-09-16 Thread jyoung79
Thank you "Nobody" and Hans! > You may want to use the subprocess module to run 'ditto'. If > the destination folder does not exist, then ditto will copy MacOS > specific aspects such as resource forks, ACLs and HFS meta-data. This looks like a good direction to go. Maybe something like: >>>

Re: datetime issue

2012-09-16 Thread Νικόλαος Κούρας
dn = datetime.datetime.now() dd = datetime.timedelta(hours=2) date = dn + dd date = date.strftime( '%y-%m-%d %H:%M:%S' ) still giving me texas,us time for some reason -- http://mail.python.org/mailman/listinfo/python-list

Re: unit test strategy

2012-09-16 Thread Steven D'Aprano
On Fri, 14 Sep 2012 19:59:29 -0700, Aaron Brady wrote: > Hello, > > I've developing a test script. There's a lot of repetition. I want to > introduce a strategy for approaching it, but I don't want the program to > be discredited because of the test script. Test scripts should be simple enough

Re: want to show list of available options and arguments in my command line utility

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 12:20:08 +0530, Santosh Kumar wrote: > I have a script that takes an which basically takes a command line > argument and prints after processing. If I don't give the argument to > the script, it gives me a ValueError: > > ValueError: need more than 1 value to unpack > > I was

Re: want to show list of available options and arguments in my command line utility

2012-09-16 Thread Steven D'Aprano
On Sun, 16 Sep 2012 12:20:08 +0530, Santosh Kumar wrote: > I have a script that takes an which basically takes a command line > argument and prints after processing. If I don't give the argument to > the script, it gives me a ValueError: > > ValueError: need more than 1 value to unpack > > I was

Re: want to show list of available options and arguments in my command line utility

2012-09-16 Thread Peter Otten
Santosh Kumar wrote: > I have a script that takes an which basically takes a command line > argument and prints after processing. If I don't give the argument to > the script, it gives me a ValueError: > > ValueError: need more than 1 value to unpack > > I was trying to utilizing this space, if