Re: escaping/encoding/formatting in python

2012-05-21 Thread rusi
On Apr 6, 10:13 am, Steve Howell wrote: > On Apr 5, 9:59 pm,rusi wrote: > > > On Apr 6, 6:56 am,SteveHowell wrote: > > > > One of the biggest nuisances for programmers, just beneath date/time > > > APIs in the pantheon of annoyances, is that we are constantly dealing > > > with escaping/encoding/f

Re: 2.x,3.x iOS static build: Fatal Python error: exceptions bootstrapping error.

2012-05-21 Thread angeljanai
well, I dont tested all, but at least error above was fixed by using build script from https://github.com/cobbal/python-for-iphone and patch from http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI toolkits and dynamic table browser widget

2012-05-21 Thread Simon Cropper
On 22/05/12 05:35, Sibylle Koczian wrote: So I suppose you're using Python 2 or that's acceptable for you at least. In this case I'd take a long look at Dabo: http://www.dabodev.com/ That's based on wxPython but easier to use and explicitly made for database applications. Developers and mailing l

Re: bash/shell to python

2012-05-21 Thread Dan Stromberg
FWIW, I do manual argument parsing, because pylint understands how to detect typos with manual argument parsing, but not the highly dynamic modules that parse arguments. On Wed, May 16, 2012 at 7:16 PM, Rita wrote: > Hello, > > I currently build a lot of interfaces/wrappers to other applications

Re: How to hide console with Popen on Windows?

2012-05-21 Thread alex23
On May 22, 3:00 am, xliiv wrote: > Now I know that my 'solution' is not a solution and problem still bugs me. > Any ideas how to deal with it? I haven't tried it but this thread talks about being able to use a standard install of Python with OpenOffice: http://user.services.openoffice.org/en/for

DIR reports file timestamp and size, but os.path.getctime(), os.path.getsize() raise WindowsError [Error 5] Access is denied

2012-05-21 Thread python
Wondering if any of you have stumbled across the following behavior: I'm doing a recursive directory listing of my Windows folder and I can access the timestamps and file sizes of all files except the following 6 files: In the \windows\microsoft.net\framework\v2.0.50727\config folder: enterprise

Re: GUI toolkits and dynamic table browser widget

2012-05-21 Thread Sibylle Koczian
Am 19.05.2012 04:05, schrieb Simon Cropper: Googling gridtable allowed me to find my way to the wxGrid Manual which seems to be what I was asking for... http://wiki.wxpython.org/wxGrid%20Manual wxPyGridTableBase, a particular class associated with wxGrid appears to be what I need. The blurb sta

Re: How to hide console with Popen on Windows?

2012-05-21 Thread xliiv
On Monday, May 21, 2012 6:38:34 AM UTC+2, alex23 wrote: > On May 18, 6:22 pm, xliiv wrote: > > Like the topic, more details in followed links.. > > http://stackoverflow.com/questions/10637450/how-to-hide-console-with-... > > Try replacing all of your code with something simple, a 'pass' op will >

Re: Good data structure for finding date intervals including a given date

2012-05-21 Thread Daniel Stutzbach
On Wed, May 16, 2012 at 5:38 AM, Jean-Daniel wrote: > On Sun, May 13, 2012 at 2:29 PM, Alec Taylor > wrote: > > There is an ordered dict type since Python 3.1[1] and Python 2.7.3[2]. > > Ordered dict are useful, but they only remember the ordered in which > they were added, you can not order them

Re: PyCarolinas 2012 Call For Proposals

2012-05-21 Thread Calvin Spealman
CORRECTION The proposal deadline is July 20, 2012 Not 2011, obviously. On Mon, May 21, 2012 at 10:51 AM, Calvin Spealman wrote: > PyCarolinas 2012 Call For Proposals > > PyCarolinas 2012, the first Python conference held in the carolinas, > is now accepting proposals! We’re looking for proposal

PyCarolinas 2012 Call For Proposals

2012-05-21 Thread Calvin Spealman
PyCarolinas 2012 Call For Proposals PyCarolinas 2012, the first Python conference held in the carolinas, is now accepting proposals! We’re looking for proposals for talks you can present to this great and growing Python community. PyCarolinas will be held in October in Chapel Hill, NC. The exact

Re: Unexpected exception thrown in __del__

2012-05-21 Thread Charles Hixson
On 05/21/2012 08:29 AM, Charles Hixson wrote: message excerpt: flush: sql = insert or replace into persists (id, name, data, rdCnt, rdTim, wrCnt, wrTim, deprecation) values (?, ?, ?, ?, ?, ?, ?, ?) Exception TypeError: "'NoneType' object is not callable" in method Shelve2.__del__ of <__main__.S

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread Roy Smith
On Monday, May 21, 2012 9:39:59 AM UTC-4, Jon Clements wrote: > > def experience_text(self): > > return dict(CHOICES).get("self.level", "???") > Haven't used django in a while, but doesn't the model provide a > get_experience_display() method which you could use... Duh, I totally mi

Unexpected exception thrown in __del__

2012-05-21 Thread Charles Hixson
message excerpt: flush: sql = insert or replace into persists (id, name, data, rdCnt, rdTim, wrCnt, wrTim, deprecation) values (?, ?, ?, ?, ?, ?, ?, ?) Exception TypeError: "'NoneType' object is not callable" in method Shelve2.__del__ of <__main__.Shelve2 object at 0x7ff4c0513f90>> ignored fl

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread Jon Clements
On Monday, 21 May 2012 13:37:29 UTC+1, Roy Smith wrote: > I've got this code in a django app: > > CHOICES = [ > ('NONE', 'No experience required'), > ('SAIL', 'Sailing experience, new to racing'), > ('RACE', 'General racing experience'), > ('GOOD', 'Experienced

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread Tim Chase
On 05/21/12 08:10, Steven D'Aprano wrote: > On Mon, 21 May 2012 08:37:29 -0400, Roy Smith wrote: > > [...] >> The above code works, but it occurs to me that I could use the much >> shorter: >> >> def experience_text(self): >> return dict(CHOICES).get("self.level", "???") >> >> So, the

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread David Lambert
One suggestion is to construct the dictionary first: CHOICES = dict( NONE = 'No experience required', SAIL = 'Sailing experience, new to racing', RACE = 'General racing experience', GOOD = 'Experienced racer', ROCK = 'Rock star' ) def experience_text(self): try:

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread Steven D'Aprano
On Mon, 21 May 2012 08:37:29 -0400, Roy Smith wrote: [...] > The above code works, but it occurs to me that I could use the much > shorter: > > def experience_text(self): > return dict(CHOICES).get("self.level", "???") > > So, the question is, purely as a matter of readability, which

Re: A question of style (finding item in list of tuples)

2012-05-21 Thread Chris Angelico
On Mon, May 21, 2012 at 10:37 PM, Roy Smith wrote: > The above code works, but it occurs to me that I could use the much > shorter: > >    def experience_text(self): >        return dict(CHOICES).get("self.level", "???") > > So, the question is, purely as a matter of readability, which would you >

A question of style (finding item in list of tuples)

2012-05-21 Thread Roy Smith
I've got this code in a django app: CHOICES = [ ('NONE', 'No experience required'), ('SAIL', 'Sailing experience, new to racing'), ('RACE', 'General racing experience'), ('GOOD', 'Experienced racer'), ('ROCK', 'Rock star'), ] def experience_

Re: Looking for video/slides from PyCon 2011...

2012-05-21 Thread Michiel Overtoom
On May 16, 2012, at 08:24, Monte Milanuk wrote: >>> >>> http://us.pycon.org/2011/schedule/presentations/207/ > > Unless its buried in one of the lightning talk vids, I'm not seein' it. Me neither. But that page show that it was a workshop, not necessarily videotaped. That's a pity, it seems i