Re: how do i merge two sequence

2012-04-19 Thread Hegedüs Ervin
Hello, On Thu, Apr 19, 2012 at 08:54:28AM +0200, Peter Otten wrote: > Have a second look at the desired output. Your suggestion doesn't produce > that. oh', I'm really sorry, I was distracted... thanks: a. -- I � UTF-8 -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert trusted timestamp to PDF

2011-12-08 Thread Hegedüs , Ervin
hello, On Wed, Dec 07, 2011 at 11:39:20PM -0800, marco.ru...@gmail.com wrote: > Hi, take a look at this online tool: http://easytimestamping.com I need to create the PDF on my server - it could be any online service, but it must to have any kind of API. > It is able to apply RFC3161 compliant t

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Hegedüs , Ervin
Hello, On Thu, Dec 08, 2011 at 04:28:01PM +1100, Alec Taylor wrote: > Just digitally sign the document using python-gnupg > > /problem-solved! using gnupg to sign a document != add a timestamp to a pdf. May be this doc helps to clear what's the different, and what I want: http://learn.adobe.co

Re: Insert trusted timestamp to PDF

2011-12-07 Thread Hegedüs , Ervin
Hello Irmen, On Wed, Dec 07, 2011 at 08:59:11PM +0100, Irmen de Jong wrote: > On 07-12-11 20:41, Hegedüs, Ervin wrote: > >Hello Everyone, > > > >I'm looking for a tool, which can add a trusted timestamp to an > >existing PDF file (and can sign - but currently on

Insert trusted timestamp to PDF

2011-12-07 Thread Hegedüs , Ervin
Hello Everyone, I'm looking for a tool, which can add a trusted timestamp to an existing PDF file (and can sign - but currently only have to add TS). Could anybody help? Thanks: a. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python without a tty

2011-10-03 Thread Hegedüs , Ervin
hello, On Mon, Oct 03, 2011 at 09:28:27AM +0200, Hans Mulder wrote: > On 3/10/11 08:10:57, Hegedüs, Ervin wrote: > > > >If you fork() your process, then it will also loose the tty... > > Errhm, I suggest you check again. This cannot be true. > > >os.setsid() >

Re: Python without a tty

2011-10-02 Thread Hegedüs , Ervin
hello, On Mon, Oct 03, 2011 at 04:37:43AM +, Steven D'Aprano wrote: > > I wanted to ensure that it would do the right thing when run without a tty, > such as from a cron job. If you fork() your process, then it will also loose the tty... import os import sys try: pid = os.fork()

Re: Environment variables not visible from Python

2011-09-21 Thread Hegedüs , Ervin
hello, On Thu, Sep 22, 2011 at 06:12:01AM +, Steven D'Aprano wrote: > I don't understand why some environment variables are not visible from > Python. > > [steve@wow-wow ~]$ echo $LINES $COLUMNS $TERM > 30 140 xterm > [steve@wow-wow ~]$ python2.6 > Python 2.6.6 (r266:84292, Dec 21 2010, 18:1

Re: Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Hegedüs Ervin
hello, On Thu, Sep 01, 2011 at 10:00:27AM +0200, Michiel Overtoom wrote: > On Sep 1, 2011, at 09:48, Amogh M S wrote: [...] > > class S: > >def _init_(self, name=None): > >self.name = name > > s = S("MyName") > > Two things: Derive your class from object, why's that better than just

Re: smtp

2011-08-08 Thread Hegedüs , Ervin
hello, > > import smtplib > def prompt(prompt): > return raw_input(prompt).strip() > fromaddr = prompt("From: ")toaddrs = prompt("To: ").split()print > "Enter message, end with ^D (Unix) or ^Z (Windows):" > # Add the From: and To: headers at the start!msg = ("From: %s\r\nTo: > %s\r\n\r\n" >

Re: Looking PDF module

2011-06-24 Thread Hegedüs Ervin
hello, On Fri, Jun 24, 2011 at 12:37:40AM -0700, mando wrote: > Take a look to reportlab: > > http://www.reportlab.com/software/opensource/ thanks, I'll check it out, a. -- http://mail.python.org/mailman/listinfo/python-list

Looking PDF module

2011-06-24 Thread Hegedüs Ervin
Hello Everyone, I'm looking a good PDF module for Python 2.x - I've never used any PDF in Python, I don't know, what would be a good choice. There are several PDF tool for Python - this is my problem :) What I need: - utf8 support - create header and footer - (in headers there are small images)

Re: Compile 32bit C-lib on 64 bit

2011-05-01 Thread Hegedüs , Ervin
Hello, thanks for all reply, On Mon, May 02, 2011 at 03:20:40AM +0100, Nobody wrote: > You need to build your module for a 32-bit version of Python. ok, I believed it, I was hoping there is another solution, > On a 64-bit system, each process is either 32-bit or 64-bit process. You > can't mix

Re: Py_INCREF() incomprehension

2011-05-01 Thread Hegedüs , Ervin
hello, Thomas, Gregory, thank you for your ansrwers, > I guess this is the point where yo should start printf programing. oh', already done :) > * What happens during module initialization? successfully initialized, > * What happens n the functions? > * Where does the stuff fail? > * What a

Compile 32bit C-lib on 64 bit

2011-05-01 Thread Hegedüs Ervin
Hello, this is not a "clear" Python question - I've wrote a module in C, which uses a 3rd-party lib - it's a closed source, I just get the .so, .a and a header file. Looks like it works on 32bit (on my desktop), but it must be run on 64bit servers. When I'm compiling it on 64bit, gcc says: /us

Re: Py_INCREF() incomprehension

2011-05-01 Thread Hegedüs Ervin
hello, On Wed, Apr 27, 2011 at 11:58:18AM +0200, Thomas Rachel wrote: > Am 26.04.2011 20:44, schrieb Hegedüs Ervin: > > >and (maybe) final question: :) > > > >I defined many exceptions: > > > >static PyObject *cibcrypt_error_nokey; > >static PyObject

Re: ElementTree XML parsing problem

2011-04-27 Thread Hegedüs Ervin
hello, > I'm using ElementTree to parse an XML file, but it stops at the > second record (id = 002), which contains a non-standard ascii > character, ä. Here's the XML: > > > > > > > > > > > The complaint offered up by the parser is I've checked this xml with your script, I think your l

Re: Py_INCREF() incomprehension

2011-04-26 Thread Hegedüs Ervin
Hello, > >But, when I don't read input arguments (there isn't > >PyArg_ParseTuple), there isn't exception. > > > >How Python handle the number of arguments? > > From what you tell it: with PyArg_ParseTuple(). (see > http://docs.python.org/c-api/arg.html for this). > > You give a format string (i

Re: Py_INCREF() incomprehension

2011-04-26 Thread Hegedüs Ervin
Dear Thomas, thank you again, > The ownership rules say that the input parameter belongs to the > caller who holds it at least until we return. (We just "borrow" it.) > So no action needed. ok, its' clear, I understand, > >>* Py_BuildValue() > > This function "transfers ownership", as it is n

Re: Py_INCREF() incomprehension

2011-04-26 Thread Hegedüs Ervin
Hello, thanks for the answer, > >Everything works fine, but sorry for the recurrent question: where > >should I use the Py_INCREF()/Py_DECREF() in code above? > > That depends on the functions which are called. It should be given > in the API description. The same counts for the incoming paramet

Re: Py_INCREF() incomprehension

2011-04-26 Thread Hegedüs Ervin
hello, sorry for the typo, these are many "cibcrypt" reference, this is the real name of my module - I just replaced it somewhere to "mycrypt" - and somewhere I forgot... :( > ... > static PyObject *cibcrypt_error_badparm; > ... > > void handle_err(int errcode) { > switch(errcode) { > ...

Re: Py_INCREF() incomprehension

2011-04-26 Thread Hegedüs Ervin
Hello, thanks for the reply, > >static PyObject* > >mycrypt_encrypt(PyObject *self, PyObject *args) > >{ > > int cRes = 0; > > int OutLen = 0; > > > > char * url; > > char * path; > > > > if (!PyArg_ParseTuple(args, "ss",&url,&path)) { > > Use the "s#" format instead to get