communicate with external process via pty

2012-10-09 Thread Tim Arnold
I have an external process, 'tralics' that emits mathml when you feed it latex equations. I want to get that mathml into a string. The problem for me is that tralics wants to talk to a tty and I've never done that before; it basically starts its own subshell. I have the following code which w

fabric problem with ssh

2012-08-24 Thread Tim Arnold
.7.3 (default, Aug 22 2012, 13:09:20) [GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2 thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: XSLT to Python script conversion?

2012-02-15 Thread Tim Arnold
On 2/13/2012 6:20 AM, Matej Cepl wrote: Hi, I am getting more and more discouraged from using XSLT for a transformation from one XML scheme to another one. Does anybody could share any experience with porting moderately complicated XSLT stylesheet (https://gitorious.org/sword/czekms-csp_bible/bl

Re: xhtml encoding question

2012-02-01 Thread Tim Arnold
On 2/1/2012 3:26 AM, Stefan Behnel wrote: Tim Arnold, 31.01.2012 19:09: I have to follow a specification for producing xhtml files. The original files are in cp1252 encoding and I must reencode them to utf-8. Also, I have to replace certain characters with html entities

xhtml encoding question

2012-01-31 Thread Tim Arnold
I have to follow a specification for producing xhtml files. The original files are in cp1252 encoding and I must reencode them to utf-8. Also, I have to replace certain characters with html entities. I think I've got this right, but I'd like to hear if there's something I'm doing that is dangero

Re: sqlite3 with context manager

2011-09-06 Thread Tim Arnold
On 9/3/2011 3:03 AM, Carl Banks wrote: On Friday, September 2, 2011 11:43:53 AM UTC-7, Tim Arnold wrote: Hi, I'm using the 'with' context manager for a sqlite3 connection: with sqlite3.connect(my.database,timeout=10) as conn: conn.execute('update confi

sqlite3 with context manager

2011-09-02 Thread Tim Arnold
Hi, I'm using the 'with' context manager for a sqlite3 connection: with sqlite3.connect(my.database,timeout=10) as conn: conn.execute('update config_build set datetime=?,result=? where id=?', (datetime.datetime.now(), success, self.b['id'])) my question

Re: multiprocessing timing issue

2011-08-11 Thread Tim Arnold
On 8/10/2011 11:36 PM, Philip Semanchuk wrote: On Aug 9, 2011, at 1:07 PM, Tim Arnold wrote: Hi, I'm having problems with an empty Queue using multiprocessing. The task: I have a bunch of chapters that I want to gather data on individually and then update a report database with the re

multiprocessing timing issue

2011-08-09 Thread Tim Arnold
ocessing before, but never with a Queue like this. Any notes or suggestions are very welcome. The task starts off with: Reporter(chapters).report() thanks, --Tim Arnold from Queue import Empty from multiprocessing import Process, Queue def run_mp(objects,fn): q = Queue() procs = dict()

Re: Literate Programming

2011-04-11 Thread Tim Arnold
"Hans Georg Schaathun" wrote in message news:aca678-b87@svn.schaathun.net... > On Fri, 8 Apr 2011 12:58:34 -0400, Tim Arnold > wrote: > : If you already know LaTeX, you might experiment with the *.dtx docstrip > : capability. > > Hi. Hmmm. That's a

Re: Literate Programming

2011-04-08 Thread Tim Arnold
;ve got a system in reasonable shape. You have full control over the display and you can make the code files go anywhere you like when you run pdflatex on your file. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pop the interpreter's stack?

2010-12-15 Thread Tim Arnold
"Ethan Furman" wrote in message news:mailman.4.1292379995.6505.python-l...@python.org... > kj wrote: >> The one thing I don't like about this strategy is that the tracebacks >> of exceptions raised during the execution of __pre_spam include one >> unwanted stack level (namely, the one correspondi

Re: remote server and effective uid

2010-11-16 Thread Tim Arnold
"Tim Harig" wrote in message news:ibs8h9$jm...@speranza.aioe.org... > On 2010-11-15, Tim Arnold wrote: >> On Nov 15, 10:41 am, Tim Harig wrote: >>> On 2010-11-15, Tim Arnold wrote: >>> >>> > How can I enable the server process to write into

Re: remote server and effective uid

2010-11-15 Thread Tim Arnold
On Nov 15, 10:41 am, Tim Harig wrote: > On 2010-11-15, Tim Arnold wrote: > > > How can I enable the server process to write into the client's > > directories? > > If I change the inetd service to run as 'root', I guess that would > > work, but then t

remote server and effective uid

2010-11-15 Thread Tim Arnold
re a way I can switch the effective uid of the server process without asking clients to login? Or is there a better way to solve the problem? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

parsing string into dict

2010-09-01 Thread Tim Arnold
tandard library (I'm running 2.7). Here's what I've got, and it works. I wonder if there's a simpler way? thanks, --Tim Arnold The 'line' is like my example above but it comes in without the ending bracket, so I append one on the 6th lin

Re: triangle python user's group?

2010-08-31 Thread Tim Arnold
"Albert Hopkins" wrote in message news:mailman.219.1283200967.29448.python-l...@python.org... > On Mon, 2010-08-30 at 12:38 -0700, Tim Arnold wrote: >> Hi, >> Is there a python users group in the Research Triangle Park area >> (North Carolina, USA)? > >

triangle python user's group?

2010-08-30 Thread Tim Arnold
Hi, Is there a python users group in the Research Triangle Park area (North Carolina, USA)? If there is not one and you're in the area and would be interested, please send an email to jtim.arnold at gmail.com and I'll organize a get-together to get one started. I'll try to find a locale convenien

Re: Working with PDFs?

2010-08-24 Thread Tim Arnold
about the pdfs after the builds. I'd like to be able to do more with it, like find out whether any fonts in the doc are not embedded for example. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing and accessing server's stdout

2010-06-01 Thread Tim Arnold
On May 28, 7:47 pm, "Martin P. Hellwig" wrote: > On 05/28/10 21:44, Adam Tauno Williams wrote: > > > On Fri, 2010-05-28 at 15:41 +0100, Martin P. Hellwig wrote: > >> On 05/28/10 13:17, Adam Tauno Williams wrote: > >> > >>> You should be able to point it any any file-like object.  But, again, > >>

Re: multiprocessing and accessing server's stdout

2010-05-27 Thread Tim Arnold
On May 26, 4:52 pm, Adam Tauno Williams wrote: > On Wed, 2010-05-26 at 11:47 -0700, Tim Arnold wrote: > > Hi, > > I'm using multiprocessing's BaseManager to create a server on one > > machine and a client on another. The client fires a request and the > >

multiprocessing and accessing server's stdout

2010-05-26 Thread Tim Arnold
ine to see the stdout of the process running on the server. Not sure this is doable--I've been unable to google anything useful on this one. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: design question

2010-05-04 Thread Tim Arnold
On May 4, 3:39 am, Bruno Desthuilliers wrote: > Alf P. Steinbach a écrit : > (snip) > > > Re efficiency it seems to be a complete non-issue, but correctness is > > much more important: is there any way that the config details can be > > (inadvertently) changed while the build is going on? > > +1

design question

2010-05-03 Thread Tim Arnold
This is a question about system design I guess. I have a django website that allows users to change/view configuration details for documentation builds. The database is very small. The reason I'm using a database in the first place is to make it easy for users to change the configuration of their b

Re: pass object or use self.object?

2010-04-08 Thread Tim Arnold
On Apr 8, 4:20 am, Bruno Desthuilliers wrote: > Lie Ryan a écrit : > > > > > > > On 04/07/10 18:34, Bruno Desthuilliers wrote: > >> Lie Ryan a écrit : > >> (snip) > > >>> Since in function in python is a first-class object, you can instead do > >>> something like: > > >>> def process(document): >

Re: pass object or use self.object?

2010-04-07 Thread Tim Arnold
On Apr 6, 11:19 am, Jean-Michel Pichavant wrote: > Tim Arnold wrote: > > Hi, > > I have a few classes that manipulate documents. One is really a > > process that I use a class for just to bundle a bunch of functions > > together (and to keep my call signatu

pass object or use self.object?

2010-04-06 Thread Tim Arnold
Hi, I have a few classes that manipulate documents. One is really a process that I use a class for just to bundle a bunch of functions together (and to keep my call signatures the same for each of my manipulator classes). So my question is whether it's bad practice to set things up so each method

Re: multiprocessing on freebsd

2010-03-18 Thread Tim Arnold
"Martin P. Hellwig" wrote in message news:hnrabj$c4...@news.eternal-september.org... > On 03/17/10 13:30, Tim Arnold wrote: >> Hi, >> I'm checking to see if multiprocessing works on freebsd for any >> version of python. My server is about to get upgraded fro

Re: multiprocessing on freebsd

2010-03-17 Thread Tim Arnold
On Mar 17, 11:26 am, Philip Semanchuk wrote: > On Mar 17, 2010, at 9:30 AM, Tim Arnold wrote: > > > > > > > Hi, > > I'm checking to see if multiprocessing works on freebsd for any > > version of python. My server is about to get upgraded from 6.3 to 8.

multiprocessing on freebsd

2010-03-17 Thread Tim Arnold
onization primitives needed will not function, see issue 3770. thanks for any info, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
On Mar 2, 12:59 pm, Tim Arnold wrote: > On Mar 2, 11:52 am, Philip Semanchuk wrote: > > On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: > > > > Hi, > > > I'm intending to use multiprocessing on a freebsd machine (6.3 > > > release, quad core,

Re: freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
On Mar 2, 11:52 am, Philip Semanchuk wrote: > On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: > > > > > > > Hi, > > I'm intending to use multiprocessing on a freebsd machine (6.3 > > release, quad core, 8cpus, amd64). I see in the doc that on

freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
ut. Is anyone using multiprocessing on FreeBSD and run into any other gotchas? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

best way to create a dict from string

2010-02-18 Thread Tim Arnold
Hi, I've got some text to parse that looks like this text = ''' blah blah blah \Template[Name=RAD,LMRB=False,LMRG=True]{tables} ho dee ho ''' I want to extract the bit between the brackets and create a dictionary. Here's what I'm doing now: def options(text): d = dict() options = text[te

Re: HTML Parser which allows low-keyed local changes (upon serialization)

2010-02-01 Thread Tim Arnold
"Robert" wrote in message news:hk729b$na...@news.albasani.net... > Stefan Behnel wrote: >> Robert, 01.02.2010 14:36: >>> Stefan Behnel wrote: Robert, 31.01.2010 20:57: > I tried lxml, but after walking and making changes in the element > tree, > I'm forced to do a full serializ

Re: Splitting text at whitespace but keeping the whitespace in thereturned list

2010-01-25 Thread Tim Arnold
(\s+)', "Hello world!") > ['Hello', ' ', 'world!'] also, partition works though it returns a tuple instead of a list. >>> s = 'hello world' >>> s.partition(' ') ('hello', ' ', 'world') >>> --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE for MacOS-X

2010-01-19 Thread Tim Arnold
"Jean Guillaume Pyraksos" wrote in message news:wissme-9248e1.08090319012...@news.free.fr... > What's the best one to use with beginners ? > Something with integrated syntax editor, browser of doc... > Thanks, > >JG eclipse + pydev works well f

Re: a simple unicode question

2009-10-28 Thread Tim Arnold
y "related" to Unicode. > > How is that possible? > > CJ When I first saw it, my first thought was that the subjectline was an oxymoron. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: calling server side function

2009-10-28 Thread Tim Arnold
ckling. > > -- > Gabriel Genellina > Also, have a look at RPyc. I've been playing with it for a few days and it sounds it may be what you're after. http://rpyc.wikidot.com/ http://www.ibm.com/developerworks/linux/library/l-rpyc/index.html --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess executing shell

2009-10-22 Thread Tim Arnold
"Gabriel Genellina" wrote in message news:mailman.1840.1256202325.2807.python-l...@python.org... > En Wed, 21 Oct 2009 12:24:37 -0300, Tim Arnold > escribió: > >> Hi, I'm writing a script to capture a command on the commandline and run >> it >&

subprocess executing shell

2009-10-21 Thread Tim Arnold
in(action))) p.wait() if __name__ == '__main__': action = sys.argv[1:] or list() main() Since the shell is executing in the child process anyway, is the only difference when using shell=True is that environment variables can be expande

Re: subprocess hangs on reading stdout

2009-10-15 Thread Tim Arnold
; > > > -- > Thanks, > --Minesh Hi Minesh, Looks like I need to learn about signals--that code looks nice. I'm using python2.6. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

subprocess hangs on reading stdout

2009-10-14 Thread Tim Arnold
p.kill() print 'skipping' # this works ok break s = '' if p: s = p.stdout.read() # trhis will hang occasionally if not s: continue ------------

Re: using queue

2009-09-03 Thread Tim Arnold
"Jan Kaliszewski" wrote in message news:mailman.895.1251958800.2854.python-l...@python.org... > 06:49:13 Scott David Daniels wrote: > >> Tim Arnold wrote: > >>> (1) what's wrong with having each chapter in a separate thread? Too >>> much going o

Re: using queue

2009-09-02 Thread Tim Arnold
"MRAB" wrote in message news:mailman.835.1251886213.2854.python-l...@python.org... > Tim Arnold wrote: >> Hi, I've been using the threading module with each thread as a key in a >> dictionary. I've been reading about Queues though and it looks like >&

using queue

2009-09-01 Thread Tim Arnold
seudocode for what I'm thinking: q = Queue(maxsize=80) for chap in [x.config['name'] for x in self.document.chapter_objects]: c = self.compiler(self.document.config['name'], chap) t = threading.Thread(target=c.compile) t.start() q.put(t) q.join() is that the r

2.6 windows install

2009-08-20 Thread Tim Arnold
ed are set wide-open for everyone. Any ideas on what I'm missing here? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: coding for multiple versions of python

2009-08-14 Thread Tim Arnold
"Tim Arnold" wrote in message news:h61gld$it...@foggy.unx.sas.com... > Hi, > I've got a python based system that has to run on hp unix and red hat > linux. The Python version on the HP is 2.4 and the version on the Linux > box is 2.6. There's nothing I can do ab

coding for multiple versions of python

2009-08-13 Thread Tim Arnold
Hi, I've got a python based system that has to run on hp unix and red hat linux. The Python version on the HP is 2.4 and the version on the Linux box is 2.6. There's nothing I can do about that. I think that means I must have two different libraries since the pyc files are not cross-version com

Re: Using Python to automate builds

2009-08-05 Thread Tim Arnold
"Kosta" wrote in message news:84d9ae10-3aee-40a8-97ac-05799da0d...@f18g2000prf.googlegroups.com... >I am a Python newbie, tasked with automating (researching) building > Windows drivers using the WDK build environment. I've been looking > into Python for this (instead of writing a bunch of batc

oNVDL validation docbook 5

2009-08-05 Thread Tim Arnold
r. Any suggestions or pointers welcome. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: LaTeXing python programs

2009-05-20 Thread Tim Arnold
"John Reid" wrote in message news:mailman.458.1242842132.8015.python-l...@python.org... > Edward Grefenstette wrote: >> I'm typing up my master's thesis and will be including some of the >> code used for my project in an appendix. The question is thus: is >> there a LaTeX package out there that

Re: piping input to an external script

2009-05-12 Thread Tim Arnold
"Dave Angel" wrote in message news:mailman.25.1242113076.8015.python-l...@python.org... > Tim Arnold wrote: >> Hi, I have some html files that I want to validate by using an external >> script 'validate'. The html files need a doctype header attached before &

piping input to an external script

2009-05-11 Thread Tim Arnold
Hi, I have some html files that I want to validate by using an external script 'validate'. The html files need a doctype header attached before validation. The files are in utf8 encoding. My code: --- import os,sys import codecs,subprocess HEADER = '' filename = 'mytest.html' fd = c

Re: Using lxml to screen scrap a site, problem with charset

2009-02-02 Thread Tim Arnold
"?? ???" wrote in message news:ciqh56-ses@archaeopteryx.softver.org.mk... > So, I'm using lxml to screen scrap a site that uses the cyrillic > alphabet (windows-1251 encoding). The sites HTML doesn't have the ..content-type.. charset=..> header, but does have a HTTP header that >

Re: python resource management

2009-01-19 Thread Tim Arnold
"Philip Semanchuk" wrote in message news:mailman.7530.1232375454.3487.python-l...@python.org... > > On Jan 19, 2009, at 3:12 AM, S.Selvam Siva wrote: > >> Hi all, >> >> I am running a python script which parses nearly 22,000 html files >> locally >> stored using BeautifulSoup. >> The problem is

drive a desktop app from python?

2009-01-08 Thread Tim Arnold
browser, but I have thousands of files I need it to analyze every night. Is there any lib or recipe(s) for doing something like this via python? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: Printed Documentation

2009-01-08 Thread Tim Arnold
into Volumes, which I'd rather not have > to do. > > Has anyone tried this before? Is the documentation already available > in print? > > Thanks, > > drfloob just a datapoint, but I used lulu.com to print the latex sources (525 pages) hardbound for a cost of $25 US. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: parse/slice/...

2009-01-07 Thread Tim Arnold
"rcmn" wrote in message news:51451b8a-6377-45d7-a8c8-54d4cadb2...@n33g2000pri.googlegroups.com... > I'm not sure how to call it sorry for the subject description. > Here what i'm trying to accomplish. > the script i'm working on, take a submitted list (for line in file) > and generate thread fo

modifying a codec

2008-11-05 Thread Tim Arnold
.write(line) fd1.close() The codec is doing its job, but I want to override the codepoint for this character (plus others) to use the html entity instead (from \227 to — in this case). I see hints writing your own codec and updating the decoding_map, but I could us

Re: storing a string data in access

2008-11-03 Thread Tim Arnold
ng a data. How can I do this? > > t = "string representing a datum" > access.Fields("Time").value = t maybe OP means t = "string representing a date", but I'm just guessing. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: lxml removing tag, keeping text order

2008-10-27 Thread Tim Arnold
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold schrieb: >> Hi, >> Using lxml to clean up auto-generated xml to validate against a dtd; I >> need >> to remove an element tag but keep the text in order. F

lxml removing tag, keeping text order

2008-10-24 Thread Tim Arnold
it's wrong, but not how to make it right. It returns: first text emphasized text ladida last text Maybe I should send the outside element (via tostring) to a regexp for removing the child and return that string? Regexp? Getting desperate, hey. Any pointers much appreciated, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple processes, private working directories

2008-09-25 Thread Tim Arnold
"Tim Arnold" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a bunch of processes to run and each one needs its own working > directory. I'd also like to know when all of the processes are > finished. Thanks for the ideas everyone--I now have

Re: multiple processes with private working dirs

2008-09-25 Thread Tim Arnold
On Sep 25, 12:11 am, alex23 <[EMAIL PROTECTED]> wrote: > On Sep 25, 3:37 am, "Tim Arnold" <[EMAIL PROTECTED]> wrote: > > > Am I missing something? > > Do you mean something other than the replies you got the last time you > asked the exact same q

multiple processes with private working dirs

2008-09-24 Thread Tim Arnold
fixes that). Am I missing something? Is there a better way? I hate to rewrite this method as a script since I've got a lot of object metadata that I'll have to regenerate with each call of the script. thanks for any suggestions, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

multiple processes, private working directories

2008-09-24 Thread Tim Arnold
fixes that). Am I missing something? Is there a better way? I hate to rewrite this method as a script since I've got a lot of object metadata that I'll have to regenerate with each call of the script. thanks for any suggestions, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: Build tool for Python

2008-07-30 Thread Tim Arnold
ned SCons, http://www.scons.org/ I've used it a bit and found it pretty good, out of the box. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread Tim Arnold
"cirfu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there an IDE for python of the same quality as Eclipse or DEVC++? > > I am currently using the editor that coems iwth python and it is all > fine but for bigger projects it would be nice to have some way to > easier browse th

Re: regex for balanced parentheses?

2008-06-12 Thread Tim Arnold
ilk since the mid-80's so my TeXpertise is > long rusted away.) > > I know of two projects that have taken on the problem using pyparsing > - one is the mathtext module in John Hunter's matplotlib, and Tim > Arnold posted some questions on the subject a while back - try >

Re: pass data from optparse to other class instances

2008-06-10 Thread Tim Arnold
On Jun 9, 5:42 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Tim Arnold schrieb: > > > > > Hi, > > I'm writing a command-line interface using optparse. The cli takes > > several options with a single action and several parameters to be u

pass data from optparse to other class instances

2008-06-09 Thread Tim Arnold
Hi, I'm writing a command-line interface using optparse. The cli takes several options with a single action and several parameters to be used in the resulting worker classes. I've been passing parameters from optparse to the workers in two ways: (1) creating a Globals.py module, set parameters onc

Re: using PIL for good screenshots

2008-05-13 Thread Tim Arnold
ers use to get the screenshot. They give me a 8-bit png screenshots (sometimes 24-bit) captured at 96 dpi. The part I can control comes after that--I need a workflow for getting the screenshot into print, looking as good as possible. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

using PIL for good screenshots

2008-05-12 Thread Tim Arnold
for going up in size, antialias for going down in size. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: convert xhtml back to html

2008-04-25 Thread Tim Arnold
xml when I move to RH linux next month. I've been using hp10.20 and never could get the requisite libraries to compile. Once I make that move, maybe I won't have as many markup related questions here! thanks again to all for the great suggestions. --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: convert xhtml back to html

2008-04-24 Thread Tim Arnold
"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Tim Arnold" <[EMAIL PROTECTED]> writes: > >> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop >> to >> create CHM files.

Re: convert xhtml back to html

2008-04-24 Thread Tim Arnold
"Gary Herron" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold wrote: >> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop >> to create CHM files. That application really hates xhtml, so I need to >> conv

convert xhtml back to html

2008-04-24 Thread Tim Arnold
to figure out that lookahead stuff. I'm not sure where to start now; I looked at BeautifulSoup and BeautifulStoneSoup, but I can't see how to modify the actual tag. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: set file permission on windows

2008-04-09 Thread Tim Arnold
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold wrote: >> "Mike Driscoll" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROT

Re: set file permission on windows

2008-04-08 Thread Tim Arnold
"Mike Driscoll" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Apr 8, 12:03 pm, "Tim Arnold" <[EMAIL PROTECTED]> wrote: >> > According to the following thread, you can use os.chmod on Windows: > > http://mail.python.org/p

set file permission on windows

2008-04-08 Thread Tim Arnold
all I know is the Group names and the permissions I need to allow. thanks for any pointers, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: first interactive app

2008-03-27 Thread Tim Arnold
"Miki" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Tim, >> >> Any ideas on a simple interface for this? >> > How about something like: > > Chapter 1 (001-200 200) > Chapter 2 (200-300 100) > -- 001-300 300 > Chapter 3 (300-450 150) > Chapter 4 (450-500 50) >

first interactive app

2008-03-26 Thread Tim Arnold
hi, I want to write a tiny interactive app for the following situation: I have books of many chapters that must be split into volumes before going to the printer. A volume can have up to 600 pages. We obviously break the book into volumes only at chapter breaks. Since some chapters make a natural

using scons as a library

2008-02-08 Thread Tim Arnold
I would gain by using SCons is to let my code hand-off tasks to SCons like making and cleaning directories, creating zip files, interacting with CVS, etc. Has anyone tried this before? It seems doable, but if someone has an example that would help to shorten my learning curve. thanks, --Tim Arnol

build tool opinions

2008-02-01 Thread Tim Arnold
Hi, I'm going through the various build tools (i.e., make-like) available and could use some advice. My documentation-build system is written in python and uses the pdflatex and plasTeX engines to create pdfs, html, and docbook XML from latex source files. All that is ok, but I can clean up a l

Re: insert comments into elementtree

2007-11-19 Thread Tim Arnold
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold wrote: >> Hi, I'm using the TidyHTMLTreeBuilder to generate some elementtrees from >> html. One by-product is that I'm losing comments embedded in the html. > &

insert comments into elementtree

2007-11-16 Thread Tim Arnold
7;: comElem = ET.SubElement(elem,ET.Comment('stopindex')) self.addComments(tree) filename = os.path.join(self.deliverloc,name) self.htmlcontent.write(tree,filename,encoding=self.encoding when I try this I get errors from the ElementTree _write method: TypeError: c

Re: elementtree w/utf8

2007-10-29 Thread Tim Arnold
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold wrote: >> On a related note, I have another question--where/how can I get the >> cElementTree.py module? Sorry for something so basic, but I tried >> installing >&

Re: elementtree w/utf8

2007-10-26 Thread Tim Arnold
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 25 Oct 2007 17:15:36 -0400, Tim Arnold wrote: > >> Hi, I'm getting the by-now-familiar error: >> return codecs.charmap_decode(input,errors,decodin

elementtree w/utf8

2007-10-25 Thread Tim Arnold
sic, but I tried installing cElementTree, but while I could compile with setup.py build, I didn't end up with a cElementTree.py file anywhere. The directory structure on my system (HPux, but no root access) doesn't work well with setup.py install. thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: image resize question

2007-10-19 Thread Tim Arnold
"Matimus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Oct 18, 11:56 am, "Tim Arnold" <[EMAIL PROTECTED]> wrote: >> Hi, I'm using the Image module to resize PNG images from 300 to 100dpi >> for >> use in HTML pages, bu

image resize question

2007-10-18 Thread Tim Arnold
image.png') Can someone point me to a better way so I don't lose the reference lines in the images? thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

Re: elementtree question

2007-09-24 Thread Tim Arnold
Thanks for the great answers--I learned a lot. I'm looking forward to the ET 1.3 version. I'm currently working on some older HP10.20ux machines and haven't been able to compile lxml all the way through yet. thanks again, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

elementtree question

2007-09-21 Thread Tim Arnold
ody' tag and somehow copying the rest of the tree under that SubElement, but it's beyond my comprehension. How can I accomplish this? (I know I could put the class on the body tag itself, but that won't satisfy the powers-that-be). thanks, --Tim Arnold -- http://mail.python.org/mailman/listinfo/python-list

cvs module

2007-09-18 Thread Tim Arnold
Hi, I need to do some scripting that interacts with CVS. I've been just doing system calls and parsing the output to figure out what's going on, but it would be nice to deal with CVS directly. Does anyone know of a python module I can use to interface with CVS? thanks, --Tim Arnold

Re: encode/decode misunderstanding

2007-07-30 Thread Tim Arnold
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tim Arnold schrieb: >> Hi, I'm beginning to understand the encode/decode string methods, but I'd >> like confirmation that I'm still thinking in the right direction: >

Re: encode/decode misunderstanding

2007-07-27 Thread Tim Arnold
> If I read in the latin1 file using > codecs.open(filename,encoding='latin1') and write out the utf8 file by > opening with > codecs.open(othername,encoding='utf8'), would I no longer have a > problem -- I could just read in latin1 and write out utf8 with no more > worries about encoding? > >

encoding misunderstanding

2007-07-27 Thread Tim Arnold
Hi, I'm beginning to understand the encode/decode string methods, but I'd like confirmation that I'm still thinking in the right direction: I have a file of latin1 encoded text. Let's say I put one line of that file into a string variable 'tocline', as follows: tocline = 'Ficha Datos de p\xe9rdid

encode/decode misunderstanding

2007-07-26 Thread Tim Arnold
Hi, I'm beginning to understand the encode/decode string methods, but I'd like confirmation that I'm still thinking in the right direction: I have a file of latin1 encoded text. Let's say I put one line of that file into a string variable 'tocline', as follows: tocline = 'Ficha Datos de p\xe9rdi

pypdf assert error on documentinfo

2007-06-28 Thread Tim Arnold
Using pyPdf, nice user interface. Maybe it doesn't handle pdf 1.4? I'm getting an assertion error from the following code. The pdf file shows it does have a title in its document info (using acrobat 8 or reader 5). pdf is version 1.4, produced with pdfeTex (pdflatex) 1.304 using python 2.4.1 #=

  1   2   >