Re: efficient 'tail' implementation

2005-12-08 Thread Jerry Sievers
split that chunk into lines and now output the last 3 or however many you need. If the read fails to hold enough lines, seek back a bit further and do same but you'll have to be prepared to concat the second and Nth last chunks together. Have fun -- --------

Re: Newbie Python & XML

2005-06-04 Thread Jerry Sievers
and if the file matches one that requires this XML treatment, do it in real time. May not be worth the trouble to implement in a low volume system however. -- ------- Jerry Sievers 305 854-3001 (home) WWW ECommerc

Re: Easy "here documents" ??

2004-12-19 Thread Jerry Sievers
ls(), locals()) foo() -- Now all else that we need to make this pretty would be macros, a la cpp m4 or similar define(`VARS', `multiDict(locals(), globals())') print "..." % VARS You get the idea. -- ---

flex/bison like module in Python?

2004-12-15 Thread Jerry Sievers
hough complex they are general purpose and very useful. I am trying to avoid having to do the lexer/parser part in C if possible. Thanks. -- --- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant

Re: Need help on program!!!

2004-12-03 Thread Jerry Sievers
to make it look like done by a stressed out student. HTH -- ----------- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobilehttp://www.JerrySievers.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt on a Server

2004-12-03 Thread Jerry Sievers
config file? -- --- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobilehttp://www.JerrySievers.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: comment out more than 1 line at once?

2004-11-30 Thread Jerry Sievers
d I get; def foo(): HTH -- ----------- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobilehttp://www.JerrySievers.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: using os

2004-11-29 Thread Jerry Sievers
from os import listdir from os.path import isdir dir = '/tmp/' onlyDirs = filter(lambda entry: isdir(dir + entry), listdir(dir)) HTH -- ----------- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant

Re: slicing, mapping types, ellipsis etc.

2004-11-29 Thread Jerry Sievers
o object of mapping types Thank you -- ------- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobil

slicing, mapping types, ellipsis etc.

2004-11-29 Thread Jerry Sievers
on how this is used and/or pointer to more reading is greatly appreciated. Thanks -- --- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobilehttp

Re: PyQt on a Server

2004-11-29 Thread Jerry Sievers
for a shared lib r-x is typical. HTH > > Bob > > -- > Bob Parnes > [EMAIL PROTECTED] -- --- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobilehttp://www.JerrySievers.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Closing files

2004-11-28 Thread Jerry Sievers
fun; while True: file('/tmp/foo') I bet this runs forever and you don't run out of open file descriptors :-) [+] > > Thanks, > Henrik Holm -- --- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobilehttp://www.JerrySievers.com/ -- http://mail.python.org/mailman/listinfo/python-list