Re: extract PDF pages

2005-10-13 Thread Andreas Lobinger
Aloha, David Isaac wrote: > I am looking for a Python solution. > Just for PDF page extraction. > Any hope? With python, there's always hope. http://sourceforge.net/projects/pdfplayground In the CVS (sorry no distribution at the time) you'll find an example page-extract. http://cvs.sourceforge.n

Re: Addressing the last element of a list

2005-11-08 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: > Isn't there an easier way than > lst[len(lst) - 1] = ... lst[-1] = ... Wishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining glyph width in Python

2005-07-04 Thread Andreas Lobinger
Aloha, Charlie wrote: > Hi, I'm looking for a way to obtain the width of a string, either in actual > inches/centimeters, or pixels will also work. Unfortunately this seems > difficult as I'd like to keep things as close to the stock Python install as > possible, and I'm not working with Graphics

Re: Frankenstring

2005-07-13 Thread Andreas Lobinger
Aloha, Thomas Lotze wrote: > I think I need an iterator over a string of characters pulling them out > one by one, like a usual iterator over a str does. At the same time the > thing should allow seeking and telling like a file-like object: f = frankenstring("0123456789") for c in f: > ...

Re: Frankenstring

2005-07-14 Thread Andreas Lobinger
Aloha, Thomas Lotze wrote: >>A string, and a pointer on that string. If you give up the boundary >>condition to tell backwards, you can start to eat up the string via f = >>f[p:]. There was a performance difference with that, in fact it was faster >>~4% on a python2.2. > When I tried it just now,

using hotshot for timing and coverage analysis

2005-07-15 Thread Andreas Lobinger
Aloha, hotshot.Profile has flags for recording timing per line and line events. Even if i had both set to 1 i still get only the standard data (time per call). Is there any document available that has examples how to use the hotshot for converage analysis and to display timing per line? Hoping f

Re: encryption with python

2005-09-07 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: > I was wondering if someone can recommend a good encryption algorithm > written in python. > It would be great if there exists a library already written to do this, > and if there is, can somebody please point me to it?? M2Crypto, interface to OpenSSL http://sand

zlib written in python

2005-09-20 Thread Andreas Lobinger
Aloha, is a pure _python_ implementation of the zlib available? I have broken zlib streams and need to patch the deocder to get them back. Wishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. First of all, http://groups.google.de/groups?selm=400CF2E3.29506EAE%40net

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Thanks guys... what if I convert it to PS via printing it to a file or something? Would that make it easier to work with? Not really... The classical PS Drivers (f.e. Acroread4-Unix print-> ps) simply define the pdf graphics and text operators as PS commands and copy the pdf cont

Re: PDF count pages

2004-12-06 Thread Andreas Lobinger
Aloha, Jose Benito Gonzalez Lopez wrote: Does anyone know how I could do in order to get/count the number of pages of a PDF file? Like this ? Python 2.2.2 (#3, Apr 10 2003, 17:06:52) [GCC 2.95.2 19991024 (release)] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>

OT: Re: PDF count pages

2004-12-09 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: Andreas Lobinger wrote: >>> import pdffile I browsed the code in CVS and it looks like a pretty comprehensive implementation. Maybe we should join forces. I have problems contacting you via the given e-mail adress. Wishing a happy day LOB

Re: SVG rendering with Python

2005-12-15 Thread Andreas Lobinger
Aloha, richard wrote: > Dennis Benzinger wrote: >>Does anybody know of a SVG rendering library for Python? > Google "python svg" ... to find what? Whishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a bytecode interpreter (for TeX dvi files)

2005-05-27 Thread Andreas Lobinger
Aloha, Jonathan Fine wrote: > I'm writing some routines for handling dvi files. > In case you didn't know, these are TeX's typeset output. > These are binary files containing opcodes. > I wish to write one or more dvi opcode interpreters. > Are there any tools or good examples to follow for > writ

expat error, help to debug?

2007-08-23 Thread Andreas Lobinger
Aloha, i'm trying to write an xml filter, that extracts some info about an .xml document (with external entities), esp. start elements and external entities. The document is a DOCBOOK xml and afacs well formed and passes our docbook toolchain (dblatex etc.). My parser is (very simple): [115] scyl

Re: expat error, help to debug?

2007-08-27 Thread Andreas Lobinger
Aloha, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote: >>Anyone any idea where the error is produced? > Do you want to try adding an EndElementHandler as well, just to get more > information on where the error might be happ

Re: expat error, help to debug?

2007-08-28 Thread Andreas Lobinger
Aloha, Andreas Lobinger wrote: > Lawrence D'Oliveiro wrote: >> In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote: >>> Anyone any idea where the error is produced? ... to share my findings with you: def ex(self,context,baseid,n1,n2): print "

Re: expat error, help to debug?

2007-08-28 Thread Andreas Lobinger
Aloha, Andreas Lobinger wrote: > Andreas Lobinger wrote: >> Lawrence D'Oliveiro wrote: >>> In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote: >>>> Anyone any idea where the error is produced? > The registered Handler has to return a (integer) va

Re: count pages in a pdf

2007-11-27 Thread Andreas Lobinger
Tim Golden wrote: > [EMAIL PROTECTED] wrote: > >> is it possible to parse a pdf file in python? for starters, i would >> like to count the number of pages in a pdf file. i see there is a >> project called ReportLab, but it seems to be a pdf generator... i >> can't tell if i would be able to pars