Re: ? 'in' operator and fallback to __getitem__

2009-05-18 Thread Tim Hoffman
Hi Marco Thats definately what I think is happening. I tried the following >>> class yy(object): ... def __getitem__(self,name): ... raise KeyError(name) ... def __contains__(self,name): ... raise KeyError(name) ... >>> aa = yy() >>> 'll' in aa Traceback (most recent call last): Fi

Re: Web based application development using python

2009-04-28 Thread Tim Hoffman
On Apr 28, 7:50 pm, Rahul wrote: > On Apr 28, 1:02 pm, Marco Mariani wrote: > > > > > Rahul wrote: > > > 1) Do you have any idea about web based support (like mod_python) > > > provided by python.org (official web site) > > > > Details: - As we know mod_python is used for embeding python code int

Re: Web based application development using python

2009-04-28 Thread Tim Hoffman
Calling mod_python a web framework is a bit of a stretch. if you want to work at that level though mod_wsgi is worth a look, on top of that you can put a range of frameworks such as repose, django, turbo gears etc.. T On Apr 28, 12:55 pm, Rahul wrote: > > > 2) I have my web based applicat

Re: Is there a programming language that is combination of Python and Basic?

2009-04-19 Thread Tim Hoffman
I started my commercial programming in Business Basic, (actually MAI Basic 4, and it's equivalent on primos (can't think of it's name at the moment) then later BBX (Basis) We ran the same code (all development on MAI, and then translated the few differences programatically between MAI and Prime) a

Re: Using Python after a few years of Ruby

2009-04-15 Thread Tim Hoffman
Hi For a rake alternative have a look at aap http://www.a-a-p.org/ It won't be a drop in replacement but, does provide similiar functionality ( i have used to drive delphi, visualstudio, borland c and bunch of other stuff build scripts to make a complete windows desktop app) and automagically bui

Re: weird try/finally behaviour

2009-04-10 Thread Tim Hoffman
Hi Sylvain You should have a read of the python docs, specifically on try: finally: excerpt from docs. -- When a return, break or continue statement is executed in the try suite of a try...finally statement, the finally clause is also executed `on the way out.' A continue statement is illegal in

Re: dict view to list

2009-03-30 Thread Tim Hoffman
Hi Larry I actually feel this is a bad idea, (that is making list() a method of all iterators) because quite often iterators are created that don't end. What happens then, is you have a method that will intentionally cause you to run out of memory or you exclude it from such iterators (creating i

Re: dict view to list

2009-03-30 Thread Tim Hoffman
more typing ;-) How do you see the to_list() to be better or contributing the the user experience ? Rgds Tim Hoffman On Mar 27, 1:44 pm, Aaron Brady wrote: > Hi. > > Is there a possibility of the dict_values, dict_items, and dict_keys > objects growing a 'tolist' method

Re: python equivalent of java technologies

2009-03-19 Thread Tim Hoffman
Oops , for RIA there is always pyjamas (gwt for python ;-) T On Mar 19, 7:52 pm, Tim Hoffman wrote: > Hi > > Well zope has quite a few of these out of the box and have been around > for a bit longer than some of the java options. > > Specifically persistence (ZODB persistence

Re: python equivalent of java technologies

2009-03-19 Thread Tim Hoffman
Hi Well zope has quite a few of these out of the box and have been around for a bit longer than some of the java options. Specifically persistence (ZODB persistence in zope is pretty much completely autmomatic) you can inplement web services with it (xmlrpc out of the box, though I assume you me

Re: Python Light Revisted?

2005-08-22 Thread Tim Hoffman
Ramza Brown wrote: > Steve M wrote: > >> > Also, py2exe will work '100%' without a host python install. I have > never used it. I have my doubts though? > Yes it sure does. I have distributed at least 3 different standalone python programs using py2exe and I can absolutely garuntee that the

Re: Using print with format to stdout generates unwanted space

2005-06-20 Thread Tim Hoffman
Hi Paul Based on your description of what you want to do, print is probably not the correct method of controlling output format. You should use write() method of the file handle to get unadulterated output. print is working as documented . From the Python 2.3 documentation, Section 6.6 The P

How to use axdebug

2005-06-10 Thread Tim Hoffman
Hi I am trying to work how how to use axdebug, and for the life of me can't work it out. I have tried google ;-) and looked for docs, and now am working through the code. I have a Delphi/C++ app that has a Delphi Scripting component that uses windows underlying Scripting Host, and am successful

Re: Memory Allocation?

2005-02-07 Thread Tim Hoffman
Hi Chris Have a look at http://www.python.org/doc/2.3.4/whatsnew/section-pymalloc.html for a description of what is going on. Basically malloc is used to grab a big chunk of memory, then python objects use bits of it. Rgds Tim Chris S. wrote: Donn Cave wrote: In article <[EMAIL PROTECTED]>, "Chr

Re: WYSIWYG wxPython "IDE"....?

2005-02-06 Thread Tim Hoffman
Have you tried Boa Constructor ? http://boa-constructor.sourceforge.net/ Simon John wrote: I'm writing my 2nd large wxPython program, and after the problems I found doing the first's layout in code, I'd like to look at using a 'WYSIWYG' IDE, like VisualStudio does for MFC. I've tried a few that I f

Re: FW: executing VBScript from Python and vice versa

2005-02-05 Thread Tim Hoffman
PythonWin 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information. >>> from win32com.client import Dispatch >>> x = Dispatch("MSScriptControl.ScriptControl

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-05 Thread Tim Hoffman
Have a gander at Boa Constructor. YOu can certainly go to a shell when debugging. (ie set breakpoint) then the shell is attached to that context. T Ashot wrote: This is sort of both Python and Vim related (which is why I've posted to both newsgroups). Python related: -- I hav

Re: Python for Series 60 update

2004-12-23 Thread Tim Hoffman
HI Jukka Laurila wrote: On Thu, 23 Dec 2004 06:52:28 +0800, Tim Hoffman <[EMAIL PROTECTED]> wrote: I did find a problem with it on my 7610. It works, but I had to hard code my bluetooth mac address (I assume thats what it is called in bluetooth). The bt_discover() call didn't seem

Re: Python for Series 60 update

2004-12-22 Thread Tim Hoffman
Whoo hoo. Just got it. I did find a problem with it on my 7610. It has a python program called bt_console.py which allows you to start a ptyhon shell, but its I/O is redirected over Bluetooth to a terminal on a PC (ie Hyper Term) It goves you have access to the Python shell with a decent keyboard a