Re: any issues with long running python apps?

2010-07-09 Thread William Heymann
On Friday 09 July 2010, Les Schaffer wrote: > but none of this has anything to do with Python itself. i am sure python > servers have been running reliably for long periods of time, but i've > never had to deal with a two-month guarantee before. is there something > else i am missing here that i s

Re: Get objects from ZODB into MySQL

2009-04-27 Thread William Heymann
On Monday 27 April 2009, TheIvIaxx wrote: > Hello, I have searched for some solution to getting the object data > from a ZODB Data.fs file into something i can work with for MySQL. So > far, no such luck. I can open the DB and poke around, but im not sure > where or what to even poke :) > Normal

Re: Ternary operator alternative in Ptyhon

2008-06-17 Thread William Heymann
On Wednesday 18 June 2008, kretik wrote: > if params.has_key("mykey"): > self.SomeField = params["mykey"] > else: > self.SomeField = None > self.SomeField = parms.get('mykey', None) This looks like what you want and it is also simpler because you don't deal with che

Re: Getting current screen resolution

2008-06-09 Thread William Heymann
On Monday 09 June 2008, Thomas Morton wrote: > This is a "thing" that has been annoying me all morning: and I can't > work out how to do it. > > I need a way to get the DPI or screen resolution of the monitor that a > script is currently runnign on. > > I have a way in Windows but it doesnt port to

Re: Zope/DTML Infuriating...

2008-04-29 Thread William Heymann
On Tuesday 29 April 2008, Jens wrote: > Hello Everyone. > > > > > > > > > I think you are going to really regret doing things this way, it is only going to make your life much harder regardless of if you are using zpt or dtml by doing stuff like this inside the template. The most corr

decode Numeric Character References to unicode

2008-02-18 Thread William Heymann
How do I decode a string back to useful unicode that has xml numeric character references in it? Things like 占 -- http://mail.python.org/mailman/listinfo/python-list

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-29 Thread William Heymann
On Friday 29 June 2007, Martin v. Löwis wrote: > > There was no need for me to use 64 so I have switched back to 32 and > > works fine. > > > > Python is not ready for the 64 world yet ;) > > It's a matter of standpoint. 64 bit is not ready for the world, yet. > > Regards, > Martin I think you mea

Re: Perl and Python, a practical side-by-side example.

2007-03-03 Thread William Heymann
On Saturday 03 March 2007, Ben Finney wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > > if not recs.has_key(piid): # [1] > Why not if piid not in recs: That is shorter, simpler, easier to read and very slightly faster. Plus you can change the data structure of recs later with

Re: asyncore DoS vulnerability

2007-02-02 Thread William Heymann
On Thursday 01 February 2007, billie wrote: > Here's the traceback: > > Traceback (most recent call last): > File "C:\Documents and Settings\root\Desktop\test.py", line 31, in ? > asyncore.loop(timeout=1) > File "C:\Python24\lib\asyncore.py", line 192, in loop > poll_fun(timeout, map)

Re: maximum number of threads

2007-01-11 Thread William Heymann
On Wednesday 10 January 2007 7:11 am, Felipe Almeida Lessa wrote: > --- > $ python test.py > 50 > 100 > 150 > 200 > 250 > 300 > 350 > Exception raised: can't start new thread > > Biggest number of threads: 382 > --- > > The test.py script is attached. So you know I tried this on ubuntu edgy 64bit

Re: Python memory usage

2006-11-07 Thread William Heymann
On Tuesday 07 November 2006 22:42, placid wrote: > Hi All, > > Just wondering when i run the following code; > > for i in range(100): > print i > > the memory usage of Python spikes and when the range(..) block finishes > execution the memory usage does not drop down. Is there a way of > f

Re: Best IDE?

2006-10-13 Thread William Heymann
On Friday 13 October 2006 08:29, Ahmer wrote: > What do you guys use? Kdevelop 3 > Why? It has good project management, good highlighting and since it is a kde app it supports ioslaves (means I can work with a resource from any location trasnparently like opening up files via sftp) > What do you

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-09-29 Thread William Heymann
On Friday 29 September 2006 08:34, Larry Hastings wrote: > It would still blow up if you ran > s = "" > for i in range(1000): > s = "a" + s This is a pretty small change but I would suggest xrange instead of range. That way you don't allocate that large list just to throw all the ite

Re: Zope, Python 2.4 pythonScripts import problem

2005-08-17 Thread William Heymann
On Tuesday 16 August 2005 07:09 am, [EMAIL PROTECTED] wrote: > I see that Python 2.4.x does not work with Zope-2-7-6 properly. When I > start zope I get warning that I should recompile my pythonScripts by > executing manage_addProduct/PythonScripts/recompile. I do it and get > list of scripts whoos

Re: Favorite non-python language trick?

2005-06-25 Thread William Heymann
On Friday 24 June 2005 02:53 pm, D H wrote: > Again, you are splitting hairs. His point still stands that it is not > possible to do method overloading in python (unless you use decorator > hacks). It may be possible to add this feature when type declarations > and type checking are added to a f

Re: moving from c++ to python

2005-05-21 Thread William Heymann
On Saturday 21 May 2005 03:19 am, Michael wrote: Yeah this tutorial is aimed at people that already know how to program. http://www.diveintopython.org/ It would still be a good idea though to go through the basic python tutorial at http://docs.python.org/tut/tut.html For someone already exp