Print a text at a specific location on the page

2013-12-04 Thread loic . espern
Hi all This is my first post on this list :-) I have a web-application (developped using a python framework). In this web-app, I would like to print certificates for some courses. The principle : The course teacher has a "default" certificates, with placeholders for the name, and the certifica

Re: Convert some Python code to C++

2007-11-14 Thread Loic Mahe
[EMAIL PROTECTED] a écrit : > For those that understand algorithms and can talk Python, I want to > convert the Python code in the section "Reading out all LCSs" into C++ > code but I don't understand some of the syntax. Can anyone give me a > hand? > > def backTrackAll(C, X, Y, i, j): > if i

Re: Equivalent of TCL's "subst" ?

2007-11-14 Thread Loic Mahe
;> foobar = "HI!" >>> x = 'foo' >>> y = 'bar' >>> print eval(x+y) HI! Loic -- http://mail.python.org/mailman/listinfo/python-list

Re: Some "pythonic" suggestions for Python

2007-11-12 Thread Loic Mahe
Chris M write : > Multi-return value lambda? Just so you know, there is no concept of > returning more than one value from a function. I wrote: > * multi return value lambda I meant: multiple return statement, not return multiple values pseudo code here: lambda x: if A return B, if C return D,

Re: Some "pythonic" suggestions for Python

2007-11-09 Thread Loic Mahe
like this: foo = lambda x,y: x+y*2 bar = foo bar(3,4) you would only need to extend existing lambda: * support all python keywords/expressions in lambda * multiline lambda * multi return value lambda * and possibility to map 'function' name to be equivalent to 'lambda' Loic

Re: How to implement function like this?

2007-10-23 Thread Loic Mahe
Marc 'BlackJack' Rintsch a écrit : > On Tue, 23 Oct 2007 11:48:08 +0200, Loic Mahe wrote: > >> even shorter: >> >> def funcA(tarray): >> s = min(len(tarray), 3) >> return [2, 3, 4][0:s] + [e for e in funcB(3-s)[0:3-s]] > > Why the lis

Re: How to implement function like this?

2007-10-23 Thread Loic Mahe
even shorter: def funcA(tarray): s = min(len(tarray), 3) return [2, 3, 4][0:s] + [e for e in funcB(3-s)[0:3-s]] -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling python2.5 on IBM AIX

2007-07-17 Thread bravo . loic
> I haven't compiled it myself, but I'm told that the installation I > work with was compiled with: > > export PATH=$PATH:/usr/vacpp/bin:/usr/vacpp/lib > ./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" --disable- > ipv6 AR="ar -X64" > make > make install I've tried with the followong c

Bug with make altinstall ?

2007-07-16 Thread bravo . loic
I've made a local installation of Python2.5 with the following instruction : export BASE=/usr/local/python251 cd Python.2.5.1 ./configure --prefix=${BASE}/\ LDFLAGS="-L\${BASE}/lib/"\ PPFLAGS="-I\${BASE}/include/"\ make make test make altinstall It works fine on Linux except this little

Compiling python2.5 on IBM AIX

2007-07-16 Thread bravo . loic
hi, I'm trying to make a local install of python 2.5 on AIX and I'm getting some trouble with _curses. Here is how I tried to compile it : export BASE=/usr/local/python251 cd Python.2.5.1 ./configure --prefix=${BASE}/\ LDFLAGS="-L\${BASE}/lib/"\ PPFLAGS="-I\${BASE}/include/"\ make

Comparing lists ...

2007-02-13 Thread Loic
I would like to know if it is possible, and how to do this with Python: I want to design a function to compare lists and return True only if both lists are equal considering memory location of the list. I suppose it would be the equivalent of comparing 2 pointers in c++ lets call this function c