_Py_FatalErrorFunc not found

2021-01-28 Thread Klaus Dittrich
changed in python-3.9.1? If yes what is its name now? hplip version is the latest, hplip-3.20.11, but they have not taken notice of the problem as far as i know. Any help is much appreciated -- Klaus -- https://mail.python.org/mailman/listinfo/python-list

Syntax question

2020-08-16 Thread Klaus Jantzen
Hi, the other day I came across the book "Classic Computer Science Problems in Python" by David Kopec. The function definitions in the examples  like = def fib2(n: int) -> int:     if n < 2:  # base case     return n     return fib2(n - 2) + fib2(n - 1)  # recursive case if __name__

[SOLVED] Re: Installing Python 3.8.3 with tkinter

2020-07-24 Thread Klaus Jantzen
On 7/22/20 12:20 PM, Klaus Jantzen wrote: Hi, Trying to install Python 3.8.3 with tkinter I run configure with the following options ./configure --enable-optimizations --with-ssl-default-suites=openssl --with-openssl=/usr/local --enable-loadable-sqlite-extensions --with-pydebug --with

Re: Installing Python 3.8.3 with tkinter

2020-07-22 Thread Klaus Jantzen
On 7/22/20 11:05 PM, Ned Deily wrote: On 2020-07-22 06:20, Klaus Jantzen wrote: Trying to install Python 3.8.3 with tkinter I run configure with the following options ./configure --enable-optimizations --with-ssl-default-suites=openssl --with-openssl=/usr/local --enable-loadable-sqlite

Installing Python 3.8.3 with tkinter

2020-07-22 Thread Klaus Jantzen
Hi, Trying to install Python 3.8.3 with tkinter I run configure with the following options ./configure --enable-optimizations --with-ssl-default-suites=openssl --with-openssl=/usr/local --enable-loadable-sqlite-extensions --with-pydebug --with-tcltk-libs='-L/opt/ActiveTcl-8.6/lib/tcl8.6' --

Py 3.6 tarfile

2017-09-23 Thread Klaus Jantzen
Hi, if I understand the documentation of the tarfile module correctly writing TarfileObject.add(".../path/to/filename", recursive=False) means that the directory structure of the file object will not be included in the archive. In the following script only "testtext1.pdf" is s

Re: Recompilation of Python3.6.x

2017-03-23 Thread Klaus Jantzen
On 03/23/2017 12:23 AM, Jon Ribbens wrote: On 2017-03-22, Grant Edwards wrote: On 2017-03-22, Thomas Nyberg wrote: On 03/22/2017 03:22 PM, Jon Ribbens wrote: A simple table with a list of the library names, the debian package names, and the rpm names would provide the information in a way th

Re: Recompilation of Python3.6.x

2017-03-22 Thread Klaus Jantzen
On 03/22/2017 06:34 PM, Thomas Nyberg wrote: On 03/22/2017 12:42 PM, Klaus Jantzen wrote: Hello, in order to have the Python-SQLite support available one has to recompile Python. For the recompiliation to succeed a number of 'modules/libs' have to

Recompilation of Python3.6.x

2017-03-22 Thread Klaus Jantzen
Hello, in order to have the Python-SQLite support available one has to recompile Python. For the recompiliation to succeed a number of 'modules/libs' have to be present. In the internet I found the following list build-essential libz-dev libreadline-dev libncursesw5-dev libssl-dev libgdbm-de

Re: SQLite

2016-03-06 Thread Klaus Jantzen
On 02/22/2016 09:32 AM, Klaus Jantzen wrote: On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote: (Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: [[1]1]python-list@python.

Re: SQLite

2016-02-22 Thread Klaus Jantzen
On 02/22/2016 02:44 AM, Chris Angelico wrote: On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam [1] wrote: IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python That may well work, but it's probably easier to work this way: sudo apt-get build

Re: SQLite

2016-02-22 Thread Klaus Jantzen
On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote: (Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: [1]python-list@python.org > From: [2]k.d.jant...@mailbox.org > Subject: SQLite

SQLite

2016-02-21 Thread Klaus Jantzen
Hello, I have downloaded Python3.5.1 as .targz, compiled it(configure, make,...) and it works (under Debian Wheezy AMD64) up to the moment I wanted to use SQLite. I get the following message: === jantzen@PC4:~$ python Python 3.5.0 (default, Dec  2 2015, 14:16:16) [GCC 4

Re: ERROR:root:code for hash md5 was not found

2012-09-27 Thread Klaus
I had that problem after moving my Python installation into another directory. Reinstalling Python helped. -- http://mail.python.org/mailman/listinfo/python-list

Re: use strings to call functions

2010-02-10 Thread Klaus Neuner
> Or perhaps is it me that failed to re-read a bit more of the thread > before answering - I obviously missed the irony (and made an a... of > myself), sorry :-/ There is nothing to be sorry about. I am grateful to all participants of this thread. I know a lot more about Python than before. -- ht

Re: use strings to call functions

2010-02-10 Thread Klaus Neuner
On Feb 10, 12:55 pm, Bruno Desthuilliers wrote: > KlausNeunera écrit : > > > > > All right, I admit that eval() is evil and should never be used. > > Can you tell the difference between your above statement and the following: As already pointed out in my second post (though perhaps not explicitly

Re: use strings to call functions

2010-02-10 Thread Klaus Neuner
On Feb 9, 11:01 am, Stefan Behnel wrote: > KlausNeuner, 09.02.2010 10:04: > > > my program is supposed to parse files that I have created myself and that > > are on my laptop. It is not supposed to interact with anybody else > > than me. > > Famous last words. > > Stefan All right, I admit that e

Re: use strings to call functions

2010-02-09 Thread Klaus Neuner
> go to hell ;-), it is part of the language, it seems to match the > aforementioned question. Thats right. In fact, your code is the precise analogy of my Prolog example in Python. Obviously, eval() and call() are both inherently dangerous. They should never be used in programs that are used in p

Re: use strings to call functions

2010-02-08 Thread Klaus Neuner
> > A file extension is not necessarily 3 chars long. No, of course not. But it is, if I choose to use only (self-made) file endings that are 3 chars long. Anyway, it was just an example. > handlers = { >     ".txt" : handle_txt, >     ".py" : handle_py, >     # etc >     } > That is exactly wha

use strings to call functions

2010-02-08 Thread Klaus Neuner
t, I would prefer to do something of the following kind: func = file[-3:] apply_func(func, file) Can something of this kind be done in Python? Klaus -- http://mail.python.org/mailman/listinfo/python-list

Re: pickling a circular object inherited from list

2008-12-10 Thread Klaus Kopec
Ned Deily wrote: In article <[EMAIL PROTECTED]>, Klaus Kopec <[EMAIL PROTECTED]> wrote: What did I do wrong? Old Python version? :) Seems to work in 3.0 (don't have 2.6 currently to check but IMO it's fixed there as well). It works for me with v3.0 as well, but not with

Re: pickling a circular object inherited from list

2008-12-09 Thread Klaus Kopec
What did I do wrong? Old Python version? :) Seems to work in 3.0 (don't have 2.6 currently to check but IMO it's fixed there as well). It works for me with v3.0 as well, but not with v2.6.1 (same error as stated before for v2.4). Is there any way to fix this in v2.6.1 or even v2.4? Right now I

pickling a circular object inherited from list

2008-12-09 Thread Klaus Kopec
easy example case of my problem. What did I do wrong? Best regards, Klaus source: class myList(list): pass class myObject: def __init__(self, parent=None): self.parent = parent if __name__ == '__main__': r = myList() r.append( myObject(r) ) f

Re: beginners question about return value of re.split

2008-03-24 Thread klaus
On Fri, 21 Mar 2008 13:34:27 -0700, John Machin wrote: > On Mar 22, 2:53 am, klaus <[EMAIL PROTECTED]> wrote: >> On Fri, 21 Mar 2008 10:31:20 -0500, Tim Chase wrote: >> >> <..> >> >> Ok thank you ! >> >> I think I got a bit lost in

Re: beginners question about return value of re.split

2008-03-21 Thread klaus
On Fri, 21 Mar 2008 10:31:20 -0500, Tim Chase wrote: <..> Ok thank you ! I think I got a bit lost in all the possibilities python has to offer. But your answers did the trick. Thank you all again for responding and elaborating. Cheers, KL. -- http://mail.python.org/mailman/listinfo

beginners question about return value of re.split

2008-03-21 Thread klaus
Hello, I have a question regarding the return value of re.split() since I have been unable to find any answers in the regular sources of documentation. Please consider the following: #!/usr/bin/env python import re if __name__ == "__main__": datum = "2008-03-14" the_date = re.split('^

Re: a beginner, beginners question

2008-03-19 Thread klaus
On Wed, 19 Mar 2008 05:57:04 -0500, Tim Chase wrote: >> class example: >> def __init__(self, foo, bar): >> self.foo = foo >> self.bar = bar >> >> def method(self): >> print "method ... :" >> print self.foo >> print self.bar >> >> if __name__ == "__

a beginner, beginners question

2008-03-19 Thread klaus
Hello, I'm trying to learn python programming and so far so good. However when trying to master the oop side I ran into a small problem. I think I've done everything ok as outlined below. But I just don't understand why the `method' of `class' example isn't printing any of the variables that I

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-09 Thread Klaus Schilling
f the Symbolic Expressions, but continue rejoycing in infix Syntax. Klaus Schilling -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-01 Thread Klaus Schilling
Ken Tilton <[EMAIL PROTECTED]> writes: > > Oh, I missed that. I just saw something about software should be > shared of course it should, as otherwise it would be immoral, > and programmers should be content with an hourly wage, not > sales. > only greedy creeps wo

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-09-30 Thread Klaus Schilling
s has nothing > to do with freedom in /any/ sense of the word, it has to do with a > political agenda opposed to the idea of private property. > private property is unethical Klaus Schilling -- http://mail.python.org/mailman/listinfo/python-list

Re: List Moderator

2007-05-20 Thread Klaus Alexander Seistrup
Grant Edwards wrote: > Maybe I've got a beter news server, but I don't see much > spam at all in c.l.p. Neither do I. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.path

2007-05-08 Thread Klaus Alexander Seistrup
HMS Surprise wrote: > Have I misused .extend? The .extend() method expects an iterable, try .append() instead. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: number generator

2007-03-10 Thread Klaus Alexander Seistrup
Raymond Hettinger wrote: > To make the solutions equi-probable, a simple approach is to > recursively enumerate all possibilities and then choose one > of them with random.choice(). Or create a list using the biased method, then use .shuffle() to return another permutation. Cheers,

Re: IP address

2007-01-28 Thread Klaus Alexander Seistrup
Colin J. Williams wrote: > Your one-liner doesn't work for me, with Windows XP, but the > following does, within Python. Could it be due to shell-escaping issues? I don't know anything about Windows... Cheers, -- Klaus Alexander Seistrup http://klaus.seistr

Re: IP address

2007-01-28 Thread Klaus Alexander Seistrup
EMAIL PROTECTED]:~ $ python -c 'import socket; print socket.gethostbyaddr(socket.gethostname())' ('zdani.szn.dk', [], ['2001:1448:89::1']) [EMAIL PROTECTED]:~ $ #v- Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: IP address

2007-01-28 Thread Klaus Alexander Seistrup
urlopen("http://myip.dk/";).read())[0]' 217.157.1.202 [EMAIL PROTECTED]:~ $ #v- Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: IP address

2007-01-28 Thread Klaus Alexander Seistrup
e, urllib; print re.findall("Your IP: (.+?)", urllib.urlopen("http://myip.dk/";).read())[0]' #v- Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: nntplib downloads content with extra linebreaks

2007-01-06 Thread Klaus Alexander Seistrup
Rweth wrote: > so afile contains a filename. > One single aline looks like so: >'' Beats me where those empty lines come from, it doesn't seem to happen in nntplib. Does the same thing happen if you pass .body() a filepointer? Cheers, -- Klaus Alexander Seistrup

Re: nntplib downloads content with extra linebreaks

2007-01-06 Thread Klaus Alexander Seistrup
Rweth wrote: >for aline in buf: > bufHeal.append(aline.replace('\r\n', '\n')) What does one single aline look like? > s.body(id,afile) Does the 'afile' contain a filename or a filepointer? Cheers, -- Klaus Alexander Seistrup http://klaus.s

Re: nntplib downloads content with extra linebreaks

2007-01-06 Thread Klaus Alexander Seistrup
ody method The 'linebreaks' are probably '\r\n' pairs, so you could do a buf.replace('\r\n', '\n') to convert all such pairs to single LFs (buf being the buffer or string that holds the text with 'linebreaks'). Cheers, -- Klaus Alexander Seist

RE: Is htmlGen still alive?

2006-12-20 Thread Klaus Muller
Thank you for this input. I was primarily looking for a download site. I downloaded HyperText and definitely will give it a try. It looks good. Klaus > -Original Message- > From: Gabriel Genellina [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 19, 2006 8:49 PM >

Re: shell command needs whitespace characters escaped

2006-12-08 Thread Klaus Alexander Seistrup
o escaping was done. Using "cd '%s' ; unzip '%s'" as your formatting string should work. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF8 & HTMLParser

2006-11-30 Thread Klaus Alexander Seistrup
ing. You might also want to trap errors in a try-except statement. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Remarkable results with psyco and sieve of Eratosthenes

2006-11-30 Thread Klaus Alexander Seistrup
Pekka Karjalainen wrote: > You can omit the call to math.sqrt if you test this instead. > > y*y > x > > in place of if y > maxfact: . Or use sqrt = lambda x: x ** .5 Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/ma

Re: How to sort list

2006-11-22 Thread Klaus Alexander Seistrup
Fredrik Lundh wrote: > note that DSU is built into Python these days: > > L.sort(key=transform) Sweet, thanks for the hint. Cheers, -- Klaus Alexander Seistrup http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Unescape HTML entities

2006-10-31 Thread Klaus Alexander Seistrup
Rares Vernica wrote: > How does your code deal with ' like entities? It doesn't, it deals with named entities only. But take a look at Fredrik's example. Cheers, -- Klaus Alexander Seistrup København, Danmark, EU http://klaus.seistrup.dk/ -- http://mail.python.org/mailm

Re: unescape HTML entities

2006-10-28 Thread Klaus Alexander Seistrup
odepoint.keys()) + ');') def dehtml(s): return re.sub( myrx, lambda m: unichr(htmlentitydefs.name2codepoint[m.group(1)]), s ) # end def dehtml if __name__ == '__main__': import sys print dehtml(sys.stdin.read()).encode('utf-8') # end

Re: List splitting

2006-08-21 Thread Klaus Alexander Seistrup
ot;t"], > ["c", "a", "t" ] ] #v+ >>> t = [ "a", "b", "c", "n", "a", "a", "t", "t", "t" ] >>> [t[i::3] for i in range(3)] [['a', 'n', 't'], ['b', 'a', 't'], ['c', 'a', 't']] >>> #v- Cheers, -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting argv to variable

2006-07-22 Thread Klaus Alexander Seistrup
Tom skrev: > newDirectory = str(sys.argv[1:]) Try newDir = '/'.join(sys.argv[1:]) or newDir = sys.argv[1] or for newDir in sys.argv[1:]: : or something along those lines, depending on how you wish to interpret the commandline. Cheers, -- Kl

Re: How can I avoid abusing lists?

2006-07-07 Thread Klaus Alexander Seistrup
[EMAIL PROTECTED] wrote: > if histogram.has_key(s): > histogram[s] += 1 > else: > histogram[s] = 1 I wonder if histogram[s] = histogram.get(s, 0) + 1 would be more efficient... Cheers, -- Kla

Re: How do you use this list?

2006-06-27 Thread Klaus Alexander Seistrup
Grant Edwards wrote: > Find an NNTP server and read it as a newsgroup. Or Google Groups: http://groups.google.com/group/comp.lang.python Cheers, -- Klaus Alexander Seistrup Dyssegård, Denmark http://surdej.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Blog source code in Python

2006-06-22 Thread Klaus Alexander Seistrup
Lazy Lad wrote: > Is there a blog application source available in Python? Several. Did you try Google before you posted your question? The search term "python blog" has <http://wiki.python.org/moin/PythonBlogSoftware> within the first 10 hits. Cheers, -- Klaus

Re: How to extract 2 integers from a string in python?

2006-06-08 Thread Klaus Alexander Seistrup
gt; import re >>> re.findall(r'\d+', 'Total size: 173233 (371587)') ['173233', '371587'] >>> #v- Mvh, -- Klaus Alexander Seistrup Copenhagen, Denmark http://surdej.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing unicode data?

2006-06-03 Thread Klaus Alexander Seistrup
thon interpreter. > in other words, you get whatever version that was used to create > the Unicode data set in your Python distribution. I see. > iirc, 2.4 uses Unicode 3.2, and 2.5 uses Unicode 4.1. to update, > use the tools under Tools/unicode. Thanks for the hint. Mvh,

Missing unicode data?

2006-06-03 Thread Klaus Alexander Seistrup
ters seems to be missing from the unicodedata module (2477 missing characters when checking against the latest database from unicode.org¹). Is this a deliberate omission? Cheers, Klaus. ¹) http://www.unicode.org/Public/UNIDATA/UnicodeData.txt -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Member index in toples

2006-06-01 Thread Klaus Alexander Seistrup
r lists or dictionaries? Lists have an index method: #v+ >>> L = list(T) >>> L.index('Three') 2 >>> #v- Dictionaries are unordered and hence indices don't make much sense. Mvh, -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating random passwords ... for a csv file with user details

2006-05-28 Thread Klaus Alexander Seistrup
A simple algorithm is sufficient > for passwords #v+ >>> import sha >>> sha.sha('userid,fullname,passwword,dateofbith').digest().encode('base64')[:10] 'q0nCDQ1YdL' >>> #v- Mvh, -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find out a date/time difference

2006-05-24 Thread Klaus Alexander Seistrup
Nico Grubert skrev: > you could do this: > > >>> a = datetime.datetime(2006, 5, 24, 16, 1, 26) > >>> b = datetime.datetime(2006, 5, 20, 12, 1, 26) > >>> a-b > datetime.timedelta(4) > # 4 days Or #v+ >>> print (a-b).days 4 >>>

Re: How to find out a date/time difference

2006-05-24 Thread Klaus Alexander Seistrup
Lad skrev: > How can I find out the date/time difference ( in days) of such > two fields? Did you try to subtract one value from the other? Mvh, -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: filter list fast

2006-03-18 Thread Klaus Alexander Seistrup
15)) >>> b set([5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) >>> a.difference(b) set([0, 1, 2, 3, 4]) >>> a-b set([0, 1, 2, 3, 4]) >>> list(a-b) [0, 1, 2, 3, 4] >>> #v- Cheers, -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Making dir's

2006-01-22 Thread Klaus Alexander Seistrup
it does not exist. This is recursive. #v- Cheers, -- Klaus Alexander Seistrup Copenhagen, Denmark http://seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python...

2005-12-05 Thread Klaus Alexander Seistrup
Falc wrote: > So if you have any books you could reccomend me that would rock, I > can't really afford a book so if online that would be excellent. Have you looked into: <http://wiki.python.org/moin/BeginnersGuide> <http://python.org/doc/Intros.html> Cheers, -- K

Re: What's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Klaus Alexander Seistrup
Justin Ezequiel wrote: > Try > > lambda_hrs = lambda x: (x/60,x%60) Or #v+ lambda_hrs = lambda x: divmod(x, 60) #v- Cheers, -- Klaus Alexander Seistrup PNX · http://pnx.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why use #!/usr/bin/env python rather than #!python?

2005-12-02 Thread Klaus Alexander Seistrup
Adriano Ferreira wrote: > So that "#!/usr/bin/env python" is more portable than "#! python" > and that's probably why it worked for me with cygwin/bash but not > for Klaus on whatever platform he used. /me is using bash on linux. > I agree. Only a very str

Re: Why use #!/usr/bin/env python rather than #!python?

2005-12-02 Thread Klaus Alexander Seistrup
Adriano Ferreira skrev: >> #v+ >> >> $ ls -l /tmp/hello.py >> -rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py >> $ cat /tmp/hello.py >> #! python >> print 'Hello, world!' >> # eof >> $ /tmp/hello.py >> b

Re: Why use #!/usr/bin/env python rather than #!python?

2005-12-02 Thread Klaus Alexander Seistrup
Adriano Ferreira wrote: > Many Python scripts I see start with the shebang line > > #!/usr/bin/env python > > What is the difference from using just > > #!python #v+ $ ls -l /tmp/hello.py -rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py $ cat /tmp/hello.py #

Re: Reading a subprocesses stdout on Windows

2005-11-21 Thread Klaus Alexander Seistrup
BroLewis wrote: > I have been trying for several weeks now to write a program that > allows me to read the stdout of a process that I spawn and once > I receive feedback, act appropriately. Have you looked into the 'commands' module? Cheers, -- Klaus Alexander Seistrup

Re: How to convert a "long in a string" to a "long"?

2005-11-18 Thread Klaus Alexander Seistrup
>> >> What can I do? >> >> Thank you in advance. >> Stefan > > Leave out the "0x" prefix and tell long() that you're using > base 16: > >>>> long("", 16) > 4294967295L It's sufficient to tell long() th

Re: How do I create a dir using Python?

2005-11-09 Thread Klaus Alexander Seistrup
the rightmost) will be created if it does not exist. This is recursive #v- Cheers, -- Klaus Alexander Seistrup Copenhagen, Denmark http://seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How do you do this in python?

2005-11-04 Thread Klaus Alexander Seistrup
[EMAIL PROTECTED] wrote: > perl -e 'print "Hello, world\n"' python -c 'print "Hello, world"' Cheers, -- Klaus Alexander Seistrup Copenhagen, Denmark http://seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Replacing utf-8 characters

2005-10-05 Thread Klaus Alexander Seistrup
sides on whether then-Attorney General John Ashcroft had the power under federal law in 2001 to bar distribution of controlled drugs to assist suicides, regardless of state law. >>> #v- Cheers, -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

NNTP module capable of "MODE STREAM"

2005-10-04 Thread Klaus Alexander Seistrup
Hi, I need a Python NNTP module that is capable of doing "MODE STREAM" as client and as server. Does anyone here know of such a module except the twisted.protocols.nntp module? Cheers, -- Klaus Alexander Seistrup Copenhagen, Denmark http://streetkids.dk/ -- http://mail.python.o

helpviewer and a wxpython application crash

2005-09-28 Thread klaus . roedel
ly. Why did it crash, when I open the helpbook in it? I'm using python v2.4.1, wx.python v2.6.1.0 and boa constructor v0.4.4 on windows XP. thanks for any help. greets Klaus -- http://mail.python.org/mailman/listinfo/python-list

py2exe 0.6.2 version resources

2005-09-20 Thread klaus . roedel
error: error in setup.cfg: command 'py2exe' has no such option 'version_legalcopyright' until I've deleted all options. I'm using python 2.4.1 and py2exe 0.6.2 on Windows XP SP2. Thanks for any help. Greets, Klaus PS: Here my example setup.py: from distutils.core im

wxnotebook and tooltips

2005-08-30 Thread klaus . roedel
reets Klaus -- http://mail.python.org/mailman/listinfo/python-list

Re: where to find the doc about python regular expression?

2005-06-02 Thread Klaus Alexander Seistrup
ÒÊÃÉɽÈË wrote: > thanks Did you try Google: <http://www.google.com/search?q=python+regular+expressions> First hit is: <http://www.amk.ca/python/howto/regex/> -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://

Re: Null String Variable

2005-05-16 Thread Klaus Alexander Seistrup
Rotary wrote: > I want to say something like that: if msg is empty ...then do > something. So how can i figure that msg is empty string (no > character, msg = ''). #v+ if not msg: print 'msg is empty' #v- -- Klaus Alexander Seistrup Magnetic Ink, Copenh

Re: Reading files into a 2D list.

2005-05-11 Thread Klaus Alexander Seistrup
ileLines0] [fileName1][fileLines1] ... [fileNameN][fileLinesN] #v- In that case try something like: #v+ >>> files_and_lines = [] >>> for name in file_names: >>> files_and_lines.append([name, open(name, 'r').readlines()]) >>> print

Re: A Faster Way...

2005-05-10 Thread Klaus Alexander Seistrup
2, 3, 23, 4, 24, 5, 25, . If the order is unimportant you could use: #v+ >>> tuple(set(range(10)) | set(range(20,30))) (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29) >>> #v- Cheers, -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Den

Re: Python & SQLite

2005-05-03 Thread Klaus Alexander Seistrup
dcrespo wrote: > Does PySQLite run on Linux? There are specific python modules for SQLite on Linux. -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: WordPress Python Library 1.0

2005-05-02 Thread Klaus Alexander Seistrup
Michele Ferretti wrote: > ok, sorry, but subject is very explicit! Still, it's insufficient for those of us who don't know what WordPress is, and it's a waste of time for those of us who don't speak Italian. C'mon, pal, you can do much better than that! -- Klaus

Re: WordPress Python Library 1.0

2005-05-02 Thread Klaus Alexander Seistrup
Michele Ferretti wrote: > ok, sorry, but subject is very explicit! Still, it's insufficient for those of us who doesn't know what WordPress is, and it's a waste of time for those of us who don't speak Italian. C'mon, pal, you can do much better than that!

Re: popen2 psql

2005-05-02 Thread Klaus Alexander Seistrup
Mage wrote: > I tried to write a proxy script for "psql" command. I need some > query log. I failed to read from the file object. The psql command is probably linked against readline; did you look in the ~/.psql_history file? Cheers, -- Klaus Alexander Seistrup Magnetic

Re: Locale and cookies

2005-05-02 Thread Klaus Alexander Seistrup
[EMAIL PROTECTED] wrote: > I tried to fix this by changing the locale back to "English" > before creating cookies and that works on Windows but not for > Linux. If I use "en_EN.ISO8859-1" it works on Linux but not > on Windows. How about setting locale to &quo

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-19 Thread Klaus Alexander Seistrup
Say, are floats implemented? Comparisons seem to work, but print'ing doesn't: #v+ >>> 1.0 > 0.5 True >>> print 1.23 %.*g >>> #v- -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Parse command line options

2005-04-18 Thread Klaus Alexander Seistrup
y: (opts, args) = getopt.getopt(argv[1:], shortOpts, longOpts) except getopt.error, msg: die(msg) # end try # [...] for (opt, arg) in opts: # Handle all options : # end for #v- Additional, non-option, arguments will be in the "args" variable. Cheers, -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode "em space" in regex

2005-04-16 Thread Klaus Alexander Seistrup
#x27;s name: >>> EM_SPACE = u'\N{EM SPACE}' >>> fracture = myline.split(EM_SPACE) ? Cheers, -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python 2.3.2 for PalmOS available

2005-04-16 Thread Klaus Alexander Seistrup
lmOS 5.2.1). The .prc installs without any problems, and I can start the Python interpreter, but nothing happens if I ring in a Python expression and press return -- the prompt just "hangs" and never returns. Any ideas? -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark h

Re: database in python ?

2005-04-10 Thread Klaus Alexander Seistrup
e for Python: <http://pysqlite.org/>. Cheers, -- Klaus Alexander Seistrup Magnetic Ink, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

list of all type names

2005-03-01 Thread Klaus Neuner
e list of all those names, but I could not find it. (The Python Reference Manual only says that there is the type "Dictionary" in Python, but not that 'dict' is a semi-reserved word.) Can you point me to such a list? Klaus -- http://mail.python.org/mailman/listinfo/python-list

fast list lookup

2005-01-26 Thread Klaus Neuner
Hello, what is the fastest way to determine whether list l (with len(l)>3) contains a certain element? Klaus -- http://mail.python.org/mailman/listinfo/python-list

RE: Python Users Nederland - python-nl mailing list

2004-12-23 Thread Klaus Muller
Ik zal aan deze bijeenkomst deelnemen. Ik ben de developer van SimPy (Simulation in Python). Als er belangstelling bestaat, kan ik op een van de toekomstige meetings een presentatie over SimPy geven. Klaus Müller simpy.sourceforge.net > -Original Message- > From: Johannes Gi

Thanks (Re: gather information from various files efficiently)

2004-12-15 Thread Klaus Neuner
e try-solution the process took 37 seconds. With the if-solution the process took so much time that I didn't bother to wait. Klaus -- http://mail.python.org/mailman/listinfo/python-list

gather information from various files efficiently

2004-12-13 Thread Klaus Neuner
become much larger. At the moment, the process takes several hours. As it is a process that I have to run very often, I would like it to be faster. How could the problem be solved more efficiently? Klaus -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.4 (final)

2004-12-01 Thread Klaus Meyer
Anthony Baxter schrieb: happy to announce the release of Python 2.4. Thanks! minor remarks: First line from C:\Python24\README.txt This is Python version 2.4 alpha 3 In C:\Python24\Tools in various subdirs the README.TXT files disappeared. -- regards kgm -- http://mail.python.org/mailman/listinfo/p