Re: [ANN] vim patch to support python3 interface

2009-05-25 Thread Roland Puntaier
vim_...@googlegroups.com schrieb am 21.05.2009 14:27:13: > > On 12/05/09 18:35, Roland Puntaier wrote: > > Hello, > > > > I have ported vim's python interface (if_python.c) to the python3 C-API. > > > > The changed files are: > > - Makef

strange list comprehension on generator

2007-08-29 Thread Roland Puntaier
def changeOne(aa,idx): aa[idx]=not aa[idx] yield aa for i in range(idx): for x in changeOne(aa,i): yield x def changeOneOrder(aa): yield aa for i in range(len(aa)): for x in changeOne(aa,i): yield x a=[False]*3 og=changeOneOrder(a) #this does not return the way I wo

Re: Python IDE

2007-06-20 Thread Roland Puntaier
Hi, With a python-enabled VIM it's possible to execute and thus test the python code. I have the following lines in my vimrc. F2 prints the result of a line evaluation on the bottom or in a window named pyout if there. I open pyout with ":vert rightb new pyout" mapped to F1. F4 does the same on

RE: c[:]()

2007-06-04 Thread Roland Puntaier
Hi, I have started to look into the last postings. It is funny and sad how people talking the same language cannot understand each other. I have become curious on what exactly you mean. Warren, can you please restate your point. When doing so, please define every identifier or non-plain english

Antwort: How to calculate definite integral with python

2007-05-15 Thread Roland Puntaier
Searching the web I have found: from numpy import * def simple_integral(func,a,b,dx = 0.001): return sum(map(lambda x:dx*x, func(arange(a,b,dx simple_integral(sin,0,2*pi) Or in http://pylab.sourceforge.net/ quadrature.py Cheers. [EMAIL PROTECTED] schrieb am 15.05.2007 04:23:00:

Re: how to mimik a main() function to start a program with entry point?

2007-01-19 Thread Roland Puntaier
Hi, >From a python module you could use subprocess and start the exe. Normally one must leave it to the OS to load a binary module, because there are certain things done during loading. Nevertheless the location of the entry point is coded in the binary file format (e.g. PE for windows or ELF

Antwort: Re: SubProcess _make_inheritable

2007-01-11 Thread Roland Puntaier
Thanks for pointing me to the tracker. I've seen there is already an entry for this: [ 1603907 ] subprocess: error redirecting i/o from non-console process Roland Gabriel Genellina <[EMAIL PROTECTED]> schrieb am 11.01.2007 05:24:03: > At Wednesday 10/1/2007 13:10, Roland

SubProcess _make_inheritable

2007-01-10 Thread Roland Puntaier
SubProcess.py needs to be patched - at least in 2.4 - to work from windows GUIs: def _make_inheritable(self, handle): """Return a duplicate of handle, which is inheritable""" if handle==None: handle=-1 return DuplicateHandle(GetCurrentProcess(), handle

call graph using python and cscope

2007-01-10 Thread Roland Puntaier
""" Sometimes it is nice to have the data used by cscope accessible in a programatic way. The following python script extract the "functions called" information from cscope (function: callGraph) and produced an html file from them. from csCallGraph import * acg=callGraph(entryFun,workingDir

Re: array, a better shell

2006-12-20 Thread Roland Puntaier
>I have also used the shell of Mathematica. It's quite powerful and it >can show graphics too inlined, but globally I don't like it fully >because it makes editing small programs a pain (for me)... I use Vim to edit python code and can execute any selection (F3) or single lines (F2) whenever I w