Re: The del statement

2006-12-06 Thread Marco Aschwanden
Thanks for the answers. I see that the del statement does remove an object from the namespace. And yes, it makes perfect sense to handle it from "outside" with the del command. I am not convinced though that del should also remove elements from a container/sequence. Thanks for the enlight

Re: The del statement

2006-12-05 Thread Marco Aschwanden
> do you find the x[i] syntax for calling the getitem/setitem methods a > bit awkward too? what about HTTP's use of "GET" and "POST" for most > about everything ? ;-) No. I like the x[i] syntax. I use it in every second row of my code and getting an item like: x.getitem(i) would be a viable (

Re: The del statement

2006-12-05 Thread Marco Aschwanden
> so what about > > del x Ups. I never used it for an object. So far I only used it for deletion of elements of a container. In that case del has two purposes: 1. Deletes an item from a container (and of course destructs it) --> list.remove(elem) 2. Calls the destructor of an object -->

The del statement

2006-12-05 Thread Marco Aschwanden
Hi I was wondering whether the del statment was going to stay in Python3000? It is a bit awkward to use the del statement where a method call would do the same without the need for a new keyword. del list[elem] del map[elem] Where list.del(elem) map.del(elem) would achieve the same result (

Re: Looking for an intellisense with good help IDE for Python

2006-08-09 Thread Marco Aschwanden
The best code completion you can get for Python is delivered by WingIDE: http://wingware.com/ I have seen, PyDev, Kommodo, Spe and when it comes to code completion for Python than nothing beats WingIDE. Maybe anyone can proof the contrary. WingIDE is not for free though (Personal: 35 USD upto

pyExcelerator - Can I read and modify an existing Excel-WorkBook?

2006-07-11 Thread Marco Aschwanden
Hi I would like to 1. import an existing Excel-sheet (a template) 2. and add some data to it 3. and save it under a different name afterwards. To me it seems, that pyExcelerator does not support the reading for modification of an Excel-sheet. It allows only the "parse_xls" but I would

Re: XML-RPC server-client communication

2006-07-06 Thread Marco Aschwanden
> server = SimpleXMLRPCServer.SimpleXMLRPCServer(("xxx.xxx.xxx.xxx", > 22999)) Could it be that xxx.xxx.xxx.xxx stands for '127.0.0.1'? If so... rename it to 'localhost'. If you bind a port to 127.0.0.1 it will be found only on the same machine. Greetings, Marco -- http://mail.python.org/mai

Re: Using "external" vars on module load time

2006-06-14 Thread Marco Aschwanden
Marvelous that was the solution I was looking for. > I think you should consider a class instead of a module, though. What I don't get: Why should I consider using a class? Greetings from sunny Switzerland, Marco -- http://mail.python.org/mailman/listinfo/python-list

Using "external" vars on module load time

2006-06-14 Thread Marco Aschwanden
Hi I have a script that looks for modules and tries to load them. After loading I attach the "server"-API function to it. module = __import__(module_name, globals(), locals(), []) module.server = server.server_api Now, some modules need the "server" functionality on load/init. I tried to mo

Re: From Python to c++

2006-03-22 Thread Marco Aschwanden
Heck! I received 1 useless answer in comp.lang.c++ and here I get useful links/hints and even a code-pattern! Great. Thank you all. Sorry for posting a c++-problem here, but it was derived from my thinking the Python way... Cheers, Marco -- http://mail.python.org/mailman/listinfo/python-li

Re: From Python to c++

2006-03-22 Thread Marco Aschwanden
On Wed, 22 Mar 2006 08:11:24 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > This is so scary, I probably shouldn't post this. It sounds from your > description, you really want RTTI. I haven't done this in a long > while, so I'm not sure there is an easier way. But the program below >

From Python to c++

2006-03-21 Thread Marco Aschwanden
This is actually a c++ problem. Got no satisfying answer on comp.lang.c++. Maybe you can help better because I know, there are many c++-converts ;). Suppose you've got the following list (first line has field names, second line has types and any row after is data): csv = "name,age,place\nstri

Re: PyHtmlGUI Project is looking for developers

2005-12-27 Thread Marco Aschwanden
A good idea... but I would prefer it being abstracted from Zope... -- http://mail.python.org/mailman/listinfo/python-list

Embedding Python in Borland Builder C++ (6.0)

2005-12-01 Thread Marco Aschwanden
Hi There almost no pages on how to embed Python in Borland Builder C++ (6.0). Any hints in this matter are very welcome... Thanks, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: PyExcelerator - mishandling of formulas?

2005-11-17 Thread Marco Aschwanden
On Thu, 17 Nov 2005 09:27:26 +0100, Serge Orlov <[EMAIL PROTECTED]> wrote: >> ws_summary.write(0,0, pyExcelerator.Formula('Data:A1')) >> ws_data.write(0, 0, '4000') > I think you're doing it wrong. ":" character means range, to refer to a > sheet use "!" charater: Data!A1 > Right you are. It

PyExcelerator - mishandling of formulas?

2005-11-15 Thread Marco Aschwanden
Hi, Yesterday I placed a bug report on PyExcelerators-Sourceforge-page... but I am not so sure anymore, whether this is really a bug - I could imagine that I missed something, but I don't see what. Please confirm that my bug is due to mishandling and I will gladly retreat my bug report. In

Re: Pywin32: How to import data into Excel?

2005-11-08 Thread Marco Aschwanden
PyXLWriter might be at your service: http://pyxlwriter.sourceforge.net/ Have a nice day, Marco -- http://mail.python.org/mailman/listinfo/python-list

Notes 6.X not accessible with Python?

2005-11-07 Thread Marco Aschwanden
Hi Since my upgrade from Notes 5.X to Notes 6.X I can't access Notes anymore. The third line of the following code is already a show stopper in my case: from win32com.client import Dispatch session = Dispatch('Lotus.NotesSession') session.Initialize('my_secret_passwort') When started, ends: F

Re: Python and Lotus Notes

2005-11-04 Thread Marco Aschwanden
The second line of your code is already a show stopper in my case: from win32com.client import Dispatch session = Dispatch('Lotus.NotesSession') session.Initialize('my_secret_passwort') When started, ends: File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line

Re: Batteries Included?

2005-10-11 Thread Marco Aschwanden
> I might be wrong expecting that a language whose > moto is "Batteries Included" would be able to produce exe files. Are > there plans to do this in the future version of Python? Yes, you are wrong expecting that. Creating an exe-cutable is windows specific and python _tries_ to be platform neu

Re: python script under windows

2005-09-12 Thread Marco Aschwanden
> Can you help me ? Or better is there some info for unix person how > to survive with python on windows ;-) Use py2exe to transform your app into a service... -- http://mail.python.org/mailman/listinfo/python-list

Re: List of string

2005-08-18 Thread Marco Aschwanden
> Thanks , but , this work for an ordered substrings , just like what we > had ['0132442\n', '13\n', '24\n'] , I would like to remove all > substrings from the list , example > > ['0134314244133', '132443', '234'] > > > 2nd and 3rd strings are also substrings from the 1st one , so it should > be

A sad story about a real "Python"

2005-07-21 Thread Marco Aschwanden
http://www.snopes.com/photos/animals/fencesnake.asp Cheers, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Marco Aschwanden
On Tue, 10 May 2005 00:49:40 -0300, André Roberge <[EMAIL PROTECTED]> wrote: > Learning to program computer should be fun, for adults and children > alike. RUR-PLE is an environment designed to help you learn computer > programming using the language Python. To use RUR-PLE, you need > wxPython.

COM on a network drive can't find pywintypes23.dll

2005-01-31 Thread Marco Aschwanden
Hi I have installed Python (2.3.4) on a shared network drive. I use it to run a bunch of application on the workstations (Win2K). Now I am running into the first problem ever. I try to use COM to generate a word-file. It runs fine on my machine (Python installed locally). When I deploy it an

Re: fast list lookup

2005-01-26 Thread Marco Aschwanden
what is the fastest way to determine whether list l (with len(l)>3) contains a certain element? Either a sorted list (in conjunction with the bisect-module) or a dictionary is your friend... Regards, Marco -- http://mail.python.org/mailman/listinfo/python-list

Apple creator on Python

2005-01-07 Thread Marco Aschwanden
One of the "creators" of Apple has written a book and mentions Python in the interview: http://www.macdevcenter.com/pub/a/mac/2005/01/04/hertzfeld.html After writing around 20 stories, I shifted gears and worked on the web software to publish them, writing a simple authoring system in Python,

Re: Winge IDE Issue - an suggestions?

2004-12-16 Thread Marco Aschwanden
Without further checking I would propose you let WingIDE ignore this exception - most probably WingIDE is choking on a exception that was thrown intentionally by the module writer. I hope you know how to let WingIDE ignore exceptions? (In the upper part of the Exceptions-tool click on 'Ignor

Re: Protecting Python source

2004-11-30 Thread Marco Aschwanden
+1 QOTW -- http://mail.python.org/mailman/listinfo/python-list