Re: best book about Webdesign with Django

2011-06-09 Thread Thomas Guettler
h about CSS and Javascript. I guess you need buy two books :-) Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

coverage.py: Highlight hot spots in source code

2011-06-22 Thread Thomas Guettler
don't have a nice HTML output for every python source file. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the Usenet to mailing list gateway borked?

2011-06-30 Thread Thomas Guettler
responsible *please* fix this? I am willing to provide > assistance, see also my suggestion in > <news:5337093.9j7nak4...@pointedears.de>. Hi, Who is responsible? I think in the past there were not many broken threads. I wonder what changed this. Thomas -- Thomas Guettler, http

HeaderParseError

2011-07-04 Thread Thomas Guettler
"", line 1, in File "/usr/lib64/python2.6/email/header.py", line 101, in decode_header raise HeaderParseError email.errors.HeaderParseError How can I parse this in Python? Thomas Same question on Stackoverflow: http://stackoverflow.com/questions/6568596/heade

Re: HeaderParseError

2011-07-04 Thread Thomas Guettler
On 04.07.2011 11:51, Peter Otten wrote: > Thomas Guettler wrote: > >> I get a HeaderParseError during decode_header(), but Thunderbird can >> display the name. >> >>>>> from email.header import decode_header >>>>> > decode_header('=?i

Re: HeaderParseError

2011-07-05 Thread Thomas Guettler
On 04.07.2011 13:20, Peter Otten wrote: > Thomas Guettler wrote: > >> On 04.07.2011 11:51, Peter Otten wrote: >>> Thomas Guettler wrote: >>> >>>> I get a HeaderParseError during decode_header(), but Thunderbird can >>>> display the nam

Re: Learning multiple languages (question for general discussion)

2005-11-03 Thread Thomas Guettler
You can learn both languages by reading the python solutions in pleac, an try to translate them to C#. Please submit the code to the project. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoking Python from Python

2005-11-08 Thread Thomas Guettler
-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: which feature of python do you like most?

2005-11-08 Thread Thomas Guettler
erl is no fun. I switched from perl to python because the emacs-perl mode was not able to understand all those backslashed anymore (the code was correct). Regards, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: generate HTML

2005-11-15 Thread Thomas Guettler
nd("") rows=''.join(rows) date=time.strftime() html=""" Today: %(date)s %(rows)s """ % locals() outfile="out.html" fd=open(outfile, "wt") fd.write(html) fd.close() print "Created %s" % outfile HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple photo collage using Python and PIL

2005-11-23 Thread Thomas Guettler
. At the end create png from pnm with convert. I hope this helps. Thomas [1] convert: http://www.imagemagick.org [2] pnm: http://netpbm.sourceforge.net/doc/pnm.html -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] --

Re: How to get started in GUI Programming?

2005-11-25 Thread Thomas Guettler
g, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread Thomas Guettler
appy Learning, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: date/time

2005-01-05 Thread Thomas Guettler
Am Wed, 05 Jan 2005 15:08:37 +0100 schrieb Nader Emami: > L.S., > > Could somebody help me how I can get the next format of date > from the time module? I don't understand your question. Do you want to have the next day? 20041231 --> 20050101 ? You can do it like this: - parse the string with

Re: Powerful CGI libraries for Python?

2005-01-10 Thread Thomas Guettler
Am Mon, 10 Jan 2005 10:11:16 +0800 schrieb sam: > Hi, > > I m looking for a CGI libraries just like perl's CGI.pm for Python. > From google, I found quite a few of CGI libraries already written for > python. But I haven't had experience to try any of them in Python. > > Can anyone share your

Re: Help With Python

2005-01-26 Thread Thomas Guettler
Am Wed, 26 Jan 2005 15:55:28 + schrieb Judi Keplar: > > I am currently taking a course to learn Python and was looking for > some help. I need to write a Python statement to print a comma- > separated repetition of the word, "Spam", written 511 times ("Spam, > Spam, … Spam"). > > Can anyb

Re: Prepending to traceback

2005-02-02 Thread Thomas Guettler
Am Wed, 02 Feb 2005 13:55:24 +0100 schrieb Stefan Behnel: > Hi! > > I'm writing a parser using pyparsing and I would like to augment the > ParserException tracebacks with information about the actual error line *in > the parsed text*. Pyparsing provides me with everything I need (parsed line >

Re: Popularizing SimpleHTTPServer and CGIHTTPServer

2005-02-03 Thread Thomas Guettler
Am Wed, 02 Feb 2005 22:37:34 -0800 schrieb Michele Simionato: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/365606 >The standard library modules SimpleHTTPServer and CGIHTTPServer are >extremely >useful, but the documentation hides their virtues. I hope to improve the >situation with t

Re: import via pathname

2005-06-20 Thread Thomas Guettler
Am Mon, 20 Jun 2005 06:31:38 -0700 schrieb passion_to_be_free: > Okay, so in my li'l python script I'm importing a few 3rd party modules > that I have installed on my comp. I need to distribute this script to > several other people, but I won't have access to install the modules on > their comp's

Re: Allowing only one instance of a script?

2005-06-23 Thread Thomas Guettler
Am Wed, 22 Jun 2005 23:49:21 -0700 schrieb Ali: > Hi, > > I have a script which I double-click to run. If i double-click it > again, it will launch another instance of the script. > > Is there a way to allow only one instance of a script, so that if > another instance of the script is launched,

Re: PEP 304 - is anyone really interested?

2005-06-23 Thread Thomas Guettler
Am Wed, 22 Jun 2005 18:01:51 -0500 schrieb Skip Montanaro: > > I wrote PEP 304, "Controlling Generation of Bytecode Files": > > http://www.python.org/peps/pep-0304.html > ... Hi, I am interested in a small subset: I want to import a file without a '.pyc' being generated. Background: I

Re: PEP ? os.listdir enhancement

2005-06-23 Thread Thomas Guettler
Am Wed, 22 Jun 2005 17:57:14 +0200 schrieb Riccardo Galli: > Hi, > I noticed that when I use os.listdir I need to work with absolute paths > 90% of times. > While I can use a for cycle, I'd prefere to use a list comprehension, > but it becomes too long. Hi, I like it. But as you noticed, too, "

Re: Favorite non-python language trick?

2005-06-24 Thread Thomas Guettler
Am Fri, 24 Jun 2005 00:55:38 -0600 schrieb Joseph Garvin: > As someone who learned C first, when I came to Python everytime I read > about a new feature it was like, "Whoa! I can do that?!" Slicing, dir(), > getattr/setattr, the % operator, all of this was very different from C. > > I'm curious

Re: Help wanted in piping in Windows

2005-06-24 Thread Thomas Guettler
Am Fri, 24 Jun 2005 01:28:38 +0530 schrieb Apple Grew: > I want to develope a Winboard like application which will support > Winboard protocol. For that I require to know how to handle piping in > Python. I seperated out module popen2, but when I use > fileObject.readline() then it halts the pr

Re: Reading output from a child process non-blockingly

2005-06-29 Thread Thomas Guettler
Am Wed, 29 Jun 2005 16:08:54 +0800 schrieb Yuan HOng: > In my program I have to call an external program and parse its output. > For that I use the os.popen2 function, and then read the output > stream. [cut] > I tried use select.select on the output stream returned by os.popen2, > but it returns

Re: Python exception hook simple example needed

2005-07-05 Thread Thomas Guettler
Am Tue, 05 Jul 2005 16:07:44 +0200 schrieb [EMAIL PROTECTED]: > Hi ! > > I wrote some mails to wxPy, and this list about "wxPython and global > exception handling" theme. > I need to port my Delphi apps to wxPy, and I want to use same exception > mechanism like Delphi use. > > When any excepti

Re: importing files from a directory

2005-07-11 Thread Thomas Guettler
Am Sat, 09 Jul 2005 20:30:04 -0700 schrieb spike grobstein: > I'm a total Python newbie, so bear with me here... > > I'm writing a program that has a user-configurable, module-based > architecture. it's got a directory where modules are stored (.py files) > which subclass one of several master cl

Re: httplib/HTTPS Post Problem

2005-07-11 Thread Thomas Guettler
Am Mon, 11 Jul 2005 06:29:23 -0700 schrieb michaelparkin: > Hi, > > Sorry to post what might seem like a trivial problem here, but its > driving me mad! > > I have a simple https client that uses httplib to post data to a web > server. > > When I post over http & https using curl the data is re

Re: append one file to another

2005-07-12 Thread Thomas Guettler
Am Tue, 12 Jul 2005 06:47:50 -0700 schrieb [EMAIL PROTECTED]: > Hi, > > I want to append one (huge) file to another (huge) file. The current > way I'm doing it is to do something like: > > infile = open (infilename, 'r') > filestr = infile.read() > outfile = open(outfilename, 'a') > outfile.wri

Re: Search & Replace with RegEx

2005-07-12 Thread Thomas Guettler
Am Tue, 12 Jul 2005 01:11:44 -0700 schrieb [EMAIL PROTECTED]: > Hi Pythonistas, > > Here's my problem: I'm using a version of MOOX Firefox > (http://moox.ws/tech/mozilla/) that's been modified to run completely > from a USB Stick. It works fine, except when I install or uninstall an > extension,

Re: Missing Something Simple

2005-07-12 Thread Thomas Guettler
Am Tue, 12 Jul 2005 14:44:00 +0100 schrieb John Abel: > Hi, > > I have a list of variables, which I am iterating over. I need to set > the value of each variable. My code looks like: > > varList = [ varOne, varTwo, varThree, varFour ] > > for indivVar in varList: > indivVar = returnVarFr

Re: Importing User-defined Modules

2005-07-25 Thread Thomas Guettler
Am Sun, 24 Jul 2005 13:12:04 -0400 schrieb Walter Brunswick: > I need to import modules with user-defined file extensions that differ from > '.py', and also (if possible) redirect the bytecode > output of the file to a file of a user-defined extension. > I've already read PEP 302 (http://www.pyt

Re: regex problem

2005-07-26 Thread Thomas Guettler
Am Tue, 26 Jul 2005 09:57:23 + schrieb Odd-R.: > Input is a string of four digit sequences, possibly > separated by a -, for instance like this > > "1234,-,4567," > > My regular expression is like this: > > rx1=re.compile(r"""\A(\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)*\Z""") Hi, try it

Re: Graphics files & Python

2005-07-28 Thread Thomas Guettler
Am Thu, 28 Jul 2005 10:40:05 + schrieb Pekka Karjalainen: > How can I create image files and animations with Python? You can create image files with PIL: http://www.pythonware.com/products/pil/ I don't know if you can make animated gifs. You can use ImageMagick, too: http://www.imagemagic

Re: ideas for university project ??

2005-08-26 Thread Thomas Guettler
Am Fri, 26 Aug 2005 11:49:34 +0100 schrieb Jon Hewer: > Hi > > I'm about to start my third, and final, year in computer science at > cambridge uni, and i need to come up with an idea for a software > project, but i'm really struggling for ideas, and i was wondering > whether anyone here had any s

Re: ideas for university project ??

2005-08-29 Thread Thomas Guettler
Am Fri, 26 Aug 2005 12:21:36 -0400 schrieb Steve Holden: > Thomas Guettler wrote: >> Am Fri, 26 Aug 2005 11:49:34 +0100 schrieb Jon Hewer: >> you could port Python to the WRT54. >> The Linksys WRT54 is a WLAN-Router which runs Linux. >> See http://openwrt.org/ >>

Re: 'ps -A' command freezes Popen3

2005-08-31 Thread Thomas Guettler
Am Wed, 31 Aug 2005 07:12:49 -0700 schrieb gao_bolin: > Does anybody know why the following lines would freeze python [2.4.1 on > Linux]: > > import popen2 > a = popen2.Popen3('ps -A') > a.wait() Because "ps -A" produces a lot of output to stdout, so that it blocks. It blocks until you read from

Re: Is there anything "better" than impalib/poplib?

2005-09-07 Thread Thomas Guettler
you like this more than poplib. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing duplicates from a list

2005-09-14 Thread Thomas Guettler
huge list and mine's going to typically have less than 1000 > elements. > > What do you think? Hi, I would use "set": mylist=list(set(mylist)) Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGTK or wXPython?

2005-09-14 Thread Thomas Guettler
I don't know if you can create standalone applications for windows, without installing gtk on the client. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Self reordering list in Python

2005-09-15 Thread Thomas Guettler
the bisect module is what you need: "This module provides support for maintaining a list in sorted order without having to sort the list after each insertion." HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de S

Re: re and escape character

2005-09-15 Thread Thomas Guettler
oes not match a newline. You have to use the re.DOTALL option if you want this. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Search Engine app

2005-09-15 Thread Thomas Guettler
gt; guys' minds on this. Hi, I use ZODB (not ZOPE) with ZCTextIndex. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching for a working example of a curses application that resizes in xterm

2005-09-19 Thread Thomas Guettler
t;mutt" or "less". HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: low-end persistence strategies?

2005-02-16 Thread Thomas Guettler
Am Tue, 15 Feb 2005 18:57:47 -0800 schrieb Paul Rubin: > I've started a few threads before on object persistence in medium to > high end server apps. This one is about low end apps, for example, a > simple cgi on a personal web site that might get a dozen hits a day. > The idea is you just want t

supress creation of .pyc files

2005-02-16 Thread Thomas Guettler
Hi, Is there a way to import a file without creating a .pyc file? Of course you can delete the pyc in my script after the import statement, but maybe there is a switch that I have not found yet. The imported file is a config file, not a script. Thomas -- Thomas Güttler, http://www.thomas-gue

Re: Stable GUI

2005-02-17 Thread Thomas Guettler
Am Wed, 16 Feb 2005 06:19:27 -0800 schrieb Viktor: > Which GUI is the most stable one? I don't need any fancy looking > widgets (look and feel doesn't realy matter to me), I "just" need it > to be rock stable and fast... Hi, For me pygtk is enough stable and fast. The reference is good: http://

Re: how can i randomly choose keys in dictionary

2005-02-18 Thread Thomas Guettler
Am Thu, 17 Feb 2005 18:13:46 -0800 schrieb neutrinman: > Hi,there. How can I choose a key in dictionary randomly? > > Say, random.choice() in lists, > > or in lists: > lists = [1,2,3,4] > position = random.range(len(lists)) > word = lists[position] Hi, try this: import random mydict={1: "one"

Re: user interface for python

2005-02-23 Thread Thomas Guettler
Am Tue, 22 Feb 2005 20:09:50 -0800 schrieb Raghul: > Hi, >Which of the UI I can used for my program that I can use both in > windows and in Linux. Is it possible for me to use Wxpython for my > program so that it can run on both the windows and linux machine? Will > it be platform independent?

assert 0, "foo" vs. assert(0, "foo")

2005-02-23 Thread Thomas Guettler
Hi, Python 2.3.3 (#1, Feb 5 2005, 16:22:10) [GCC 3.3.3 (SuSE Linux)] on linux2 >>> assert 0, "foo" Traceback (most recent call last): File "", line 1, in ? AssertionError: foo >>> assert(0, "foo") >>> If you use parenthesis for the assert statement, it never raises an exception. Up to now I

Re: running a shell command from a python program

2005-02-23 Thread Thomas Guettler
Am Wed, 23 Feb 2005 07:00:31 -0800 schrieb Sandman: > Hi, >I'm a newbie, so please be gentle :-) > > How would I run a shell command in Python? [cut] > Is popen the answer? Also, where online would I get access to good > sample code that I could peruse? Yes, popen is the answer. I recommend

Re: parsing a date string

2005-03-07 Thread Thomas Guettler
Am Sun, 06 Mar 2005 19:35:23 + schrieb MikeyG: > Hi, > > I have a date string in the ctime() format ('Sat Mar 5 10:38:07 2005') > and I want to know how long ago that was in whole days. > > So far I have: > > import time > import datetime > age = > (datetime.date.fromtimestamp(time.mktim

Re: Speeding up CGIHTTPServer (Tim Roberts)

2005-03-08 Thread Thomas Guettler
Am Tue, 08 Mar 2005 13:56:57 +0200 schrieb Johan Kohler: > On Tue, 8 Mar 2005 10:25:46 +0100 (CET), <[EMAIL PROTECTED]> > wrote: > >> I'm using CGIHTTPServer (via its test() method) to test some CGI on my >> Windoze 98 box. I find that the execution is very slow. Is there >> anything I can d

Re: Simple XML-to-Python conversion

2005-03-17 Thread Thomas Guettler
Am Wed, 16 Mar 2005 14:19:49 -0800 schrieb [EMAIL PROTECTED]: > I've been searching high and low for a way to simply convert a small > XML configuration file to Python data structures. I came across gnosis > XML tools, but need a built-in option for doing something similar. > > My knowledge of D

Re: Splitting with Regular Expressions

2005-03-17 Thread Thomas Guettler
Am Thu, 17 Mar 2005 06:51:19 -0800 schrieb qwweeeit: > Splitting with RE has (for me!) misterious behaviour! > > I want to get the words from this string: > s= 'This+(that)= a.string!!!' > > in a list like that ['This', 'that', 'a.string'] > considering "a.string" as a word. Hi, try this: re.

Re: How did you learn Python?

2004-12-03 Thread Thomas Guettler
Am Fri, 03 Dec 2004 09:54:36 -0500 schrieb Shawn Milo: > I was just wondering what the best books were for learning Python. > > Which books are good for getting started, and which should be saved for > later, or or not useful except as a reference for the learned? Hi, I learned a lot by reading

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Thomas Guettler
Am Tue, 07 Dec 2004 09:25:57 -0600 schrieb Philippe C. Martin: > This is a basic question I'm sure but I do not know wether to use > __builtin__, > global, or a static method: > > I have a very large XML file that I load into dictionnaries defined in a > class > located in a module that is i

Re: writing to mailboxes

2004-12-08 Thread Thomas Guettler
Am Tue, 07 Dec 2004 15:30:13 -0500 schrieb Eric S. Johansson: > I've been searching around for the equivalent to the mailbox module > except with the capability of writing messages as well as reading. If > it makes it easier, I only need to write to maildir mailboxes. Hi, there is a script ca

Re: Parse XML using Python

2004-12-09 Thread Thomas Guettler
Am Wed, 08 Dec 2004 23:25:49 -0800 schrieb anilby: > Hi, > > I wanted to write a script that will read the below file: Hi, Here is an example how to use sax: http://pyxml.sourceforge.net/topics/howto/node12.html Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.pyt

Re: need some help quickly

2004-12-13 Thread Thomas Guettler
Am Tue, 14 Dec 2004 04:46:24 -0800 schrieb Allan Irvine: > HI > > Hope this is the right place for this, I am new. I have a spec to > create > a (dual screen) framework application that > > 1 displays mp3, flash, jpegs etc. on top screen > 2: displays buttons on bottom screen which alter image w

Re: pywhich script - where is that module?

2004-12-17 Thread Thomas Guettler
Am Fri, 17 Dec 2004 09:09:25 + schrieb Keith Dart: > Have you ever wondered where your python modules get imported from? > Here is a little script, called "pywhich", that will tell you. Nice, you could add it to the python cookbook. Thomas -- Thomas Güttler, http://www.thomas-guettler.de

Re: Potential improvement on delegation via explicit calls and super

2004-12-17 Thread Thomas Guettler
Am Fri, 17 Dec 2004 02:17:38 -0600 schrieb Robert Dick: > Derived classes sometimes need to delegate portions of the work in overridden > methods to methods in their base classes. This was traditionally done with > explicit calls in python, e.g., > > class Base: > def __init__(self): > p

type method-wrapper?

2004-12-20 Thread Thomas Guettler
Hi, l=[] print type(l.__delattr__) # --> I didn't find a corresponding type in the modules "types". Is it missing or am I blind? (Python 2.3.3) -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursive structures

2004-12-20 Thread Thomas Guettler
Am Mon, 20 Dec 2004 04:22:24 -0800 schrieb bearophileHUGS: > I've seen that I'd like to > have a function that tells me if a given data structure contains one or > more cyclic references Hi, does this help you? from types import * def isrecursive(obj, dict=None): if dict==None: dic

Re: Email filters in python

2004-12-20 Thread Thomas Guettler
Am Fri, 17 Dec 2004 15:07:26 + schrieb sf: > Would someome like to post their email filters code. Its so common that > probably some standard library > supports it or many would have written it already. Look for "getmail". This is a small python script which is an alternative for fetchmail.

Re: Change vars in the parent process

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 06:20:09 -0800 schrieb Markus Franz: > Hi! > > > Is there any possibility to change vars inside a parent process from > the inside of a child process? > Thanks Hi, No, that's impossible. At least on unix. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- h

Re: Read word tables

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 11:24:35 + schrieb Rameshwari: > > Hi, > > I would like to read a ms-word document using python. > > Basically the word document contains number of tables and the rows > in each table do not have same number of columns. > > Does anyone have a sample code to read a tab

Re: getting env variable from bourne shell script

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 07:51:53 -0800 schrieb biner: > Hello, > > I have file called PARAMETRES that is used in bourne shell script to > define variable. In order to do so I put a ". PARAMETRES" line and the > script has acces to all the variable defined in the PARAMETRES file. Hi, you can run "

Re: PyGTK Button Size Question

2005-03-23 Thread Thomas Guettler
Am Wed, 23 Mar 2005 03:02:44 -0800 schrieb Harlin Seritt: > How does one set the width of a gtk.Button explicitly? and height for > that matter as well... I think it is gtk.Widget.set_size_request: http://www.pygtk.org/pygtk2reference/class-gtkwidget.html#method-gtkwidget--set-size-request HT

Re: wanted: visual report templating system

2005-03-23 Thread Thomas Guettler
Am Tue, 22 Mar 2005 20:58:12 + schrieb robin: > I am looking for a client/server reporting tool to use with a web > application built in Python. > > It would consist of three parts: > 1. a data definition & retrieval engine that interfaces to RDBMS or > other data files > 2. a visual designe

get date from email

2011-12-01 Thread Thomas Guettler
.mktime_tz(date_tuple)) if date: ... # valid date found Somehow this looks too complicated. Any chance to integrate the datetime module into the email module? related: http://stackoverflow.com/questions/1790795/python-parsing-date-with-timezone-from-an-email -- Thomas Guettler, http://

Re: do people really complain about significant whitespace?

2006-08-08 Thread Thomas Guettler
Am Mon, 07 Aug 2006 14:43:04 -0700 schrieb infidel: > Where are they-who-hate-us-for-our-whitespace? Are "they" really that > stupid/petty? Are "they" really out there at all? "They" almost sound > like a mythical caste of tasteless heathens that "we" have invented. > It just sounds like so muc

Re: loop until keypress (Windows XP)

2006-08-10 Thread Thomas Guettler
Am Wed, 09 Aug 2006 22:19:24 -0700 schrieb placid: > Hi all, > > > Im using the cmd module and i have command that loops and keeps on > printing text, what i want to be able to do is loop until the user > presses a particular key, say Q/q ? I tried the following code; > There is a portable get

stdout not flushed before os.execvp()

2006-10-17 Thread Thomas Guettler
homas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem: Python search path - module order

2006-10-17 Thread Thomas Guettler
code. -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: is mod_python borked?

2006-11-02 Thread Thomas Guettler
#x27;t use it with a different webserver. I use quixote with plain old CGI. It is fast enough for my stuff. If there is heavy load, I would try SCGI. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL

Re: cgi and popen

2006-06-07 Thread Thomas Guettler
the subprocesses is finished. You can try to start the script like this: nohup nice mein-script >> $HOME/log/mein-script.log 2>&1 http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: (pre)forking server framework?

2006-06-12 Thread Thomas Guettler
rker processes. http://www.mems-exchange.org/software/quixote/ HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is fun (useless social thread) ;-)

2006-06-15 Thread Thomas Guettler
improve? There are some things in Python I don't know very well: Decorators and generators. But somehow I don't think that I really need them. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http:

Re: Threads and Progress Bar

2006-09-15 Thread Thomas Guettler
On Fri, 01 Sep 2006 21:43:46 +0530 Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote: > Hi, > > I have a small application, written in Python, that uses threads. > The application uses function foo() to download files from the web. As it > reads > data from the web server, it runs a progress bar by ca

Re: what is the best practice to separate Pygtk and long running thread code

2006-09-22 Thread Thomas Guettler
called if there are no actions in the event-loop. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the best practice to separate Pygtk and long running thread code

2006-09-25 Thread Thomas Guettler
thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Pimping the 'cgi' module

2006-11-24 Thread Thomas Guettler
one else who can do this) will decide to choose one soon. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML Table-of-Content Extraction Script

2006-11-28 Thread Thomas Guettler
Güttler, http://www.thomas-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

len() and PEP 3000

2006-12-06 Thread Thomas Guettler
-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: os.popen3 hangs in Windows XP SP1, SP2. Python 2.5 & 2.4. Consistent test case.

2006-12-12 Thread Thomas Guettler
-guettler.de/ http://www.tbz-pariv.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to determine if a certain PID is still running

2006-02-03 Thread Thomas Guettler
ory. This should be the pid if your script. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de Spam Catcher: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Webmail with Python

2006-02-04 Thread Thomas Guettler
Hi, Is there an application like Squirrelmail[1] written in python? I want to access IMAP folder with a web-browser. Google shows me some dead projects. Most webmail applications seem to be written in PHP. Is there a useable webmailer written in python? Thomas -- Thomas Guettler, http

Re: Webmail with Python

2006-02-05 Thread Thomas Guettler
On Sat, 04 Feb 2006 15:50:00 -0600, Larry Bates wrote: > Thomas Guettler wrote: >> Hi, >> >> Is there an application like Squirrelmail[1] written in python? >> >> I want to access IMAP folder with a web-browser. >> >> Google shows me some dead proj

Re: Webmail with Python

2006-02-06 Thread Thomas Guettler
Am Mon, 06 Feb 2006 11:36:37 +0100 schrieb Max M: > Thomas Guettler wrote: >> Hi, >> >> Is there an application like Squirrelmail[1] written in python? >> >> I want to access IMAP folder with a web-browser. >> >> Google shows me some dead proj

Re: best way to do this ...

2005-05-17 Thread Thomas Guettler
Am Tue, 17 May 2005 05:26:15 -0700 schrieb Tonino: > Hi ALL, > > I am having a issue with a particular storage of data problem and > wanted to know if I am going about it the wrong way. > > I have a list of reference numbers associated with a product and I have > a socket that listens on a port.

Twisted an several CPUs

2005-05-19 Thread Thomas Guettler
Hi, Out of sheer curiosity: Does Twisted scale if the server has several CPUs? As far as I know twisted uses one interpreter. This means a prefork server modul might be better to server database driven web-apps. Has anyone experience high load and twisted? Thomas -- Thomas Güttler, http://w

Re: converting jpg to pdf

2005-05-26 Thread Thomas Guettler
Am Thu, 26 May 2005 07:00:21 -0700 schrieb Raghul: > Hi friends > Is it possible to convert jpg to pdf in python. I need a > program to convert jpg format file to pdf. Is there any sample or any > library to do that? Pls guide me. Hi, import os os.system("convert foo.jpg foo.pdf")

Re: File list from listdir or shell?

2005-05-26 Thread Thomas Guettler
Am Thu, 26 May 2005 06:31:40 -0700 schrieb qwweeeit: Hi, > ls -1 *.py (for the filenames only) or This can be done with the module "glob" of the standard library. HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

ConfigParser, mapping one key to multiple values

2005-06-01 Thread Thomas Guettler
Hi, I need a config like this: [sync files] ignore=".*/foodir/.*\.pyc" ignore=".*/foodir/.*~" ... The ConfigParser of the standard library can't handle this, because one key maps to multiple values. Is there a simple and lightweight config parser which can handle this? Thomas PS: Needs to be

Re: ConfigParser, mapping one key to multiple values

2005-06-02 Thread Thomas Guettler
Am Wed, 01 Jun 2005 17:18:42 -0500 schrieb Larry Bates: > I accomplish this by using the following construct > with ConfigParser: > > [sync files] > ignore_001=.*/foodir/.*\.pyc > ignore_002=.*/foodir/.*~ Hi, I found out, that you can have newlines in the value: ignore_regex = .*/CVS(/.*)?

Re: Formatting Time

2005-06-03 Thread Thomas Guettler
Am Fri, 03 Jun 2005 09:29:41 +0100 schrieb Ognjen Bezanov: > I never thought id need help with such a thing as time formatting > (admittadly i never did it before) but ok, i guess there is a first for > everything. > > I have a float variable representing seconds, and i want to format it > like t

Re: circular import Module

2005-06-08 Thread Thomas Guettler
Am Wed, 08 Jun 2005 01:11:50 -0700 schrieb [EMAIL PROTECTED]: > Hello, > > I have two modules (file1.py and file2.py) > Is that ok in python (without any weird implication) if my module > import each other. I mean in module file1.py there exist command import > file2 and in module file2.py there

Re: Generating HTML from python

2005-06-09 Thread Thomas Guettler
Am Thu, 09 Jun 2005 12:43:19 + schrieb Philippe C. Martin: > Hi, > > I wish to use an easy way to generate reports from wxPython and feel > wxHtmlEasyPrinting could be a good solution. > > I now need to generate the HTML wxHtmlEasyPrinting can print I don't know wxPython, but generating HTM

Re: os.system

2005-06-10 Thread Thomas Guettler
Am Fri, 10 Jun 2005 17:10:23 +0800 schrieb Austin: > My code is " os.system("NET SEND computer hihi") " > i use this funtion on Windows server 2003. > it's ok. > > But the same code running on Windows XP SP2, it shows the command window > twice. > How do i remove the command window? Hi, You ca

  1   2   >