Re: How to figure out if the platform is 32bit or 64bit?

2008-07-27 Thread Manuel Vazquez Acosta
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Just test for maxint value: from sys import maxint if maxint >> 33: print "more than 32 bits" # probably 64 else: print "32 bits" Best regards, Manuel. Trent Mick wrote: > norseman wrote: >> >> > > I need to know if I'm running on

Re: Python Written in C?

2008-07-20 Thread Manuel Vazquez Acosta
I think your mixing things up. Even modern C compiler are mostly written in some other high level language. See GCC, for instance: it's mostly written in C. Many languages are made for build other major systems: * C was made in order to ease the build of Unix * Ada was made in order to ease the bu

Re: Python and decimal character entities over 128.

2008-07-10 Thread Manuel Vazquez Acosta
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > Some web feeds use decimal character entities that seem to confuse > Python (or me). For example, the string "doesn't" may be coded as > "doesn’t" which should produce a right leaning apostrophe. > Python hates decimal entiti

Re: Determining when a file has finished copying

2008-07-10 Thread Manuel Vazquez Acosta
Cameron Simpson wrote: > On 09Jul2008 15:54, Ethan Furman <[EMAIL PROTECTED]> wrote: >> The solution my team has used is to monitor the file size. If the file >> has stopped growing for x amount of time (we use 45 seconds) the file is >> done copying. Not elegant, but it works. > > If you kn

Re: Determining when a file has finished copying

2008-07-09 Thread Manuel Vazquez Acosta
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This seems a synchronization problem. A scenario description could clear things up so we can help: Program W (The workflow) copies file F to directory B Program D (the dog) polls directory B to find is there's any new file F In this scenario, program

Re: A fix for OverflowError in 64bits platforms

2008-07-04 Thread Manuel Vazquez Acosta
Terry Reedy wrote: > Manuel Vazquez Acosta wrote: >> Hi all, >> >> I'm debugging a Plone site in an AMD64 laptop. When I first tried to run >> Zope, I got this exception: > > In general, versions numbers for both Python and the app are helpful. > P

A fix for OverflowError in 64bits platforms

2008-07-03 Thread Manuel Vazquez Acosta
Hi all, I'm debugging a Plone site in an AMD64 laptop. When I first tried to run Zope, I got this exception: OverflowError: signed integer is greater than maximum In the archives I encounter no solutions. This is what I could find, so I share with you all: It seems that on 64bit platforms, sys.