Re: GURU NEEDED : break a command into several lines and comment each line

2011-01-13 Thread Berthold Höllmann
bolega writes: > Basically, I have spent a few hours experimenting and searching on the > comp.unix.shell > > how to break a command with several switches into more than one line > AND to be able to put some comment on each line. > > #!/bin/bash -xv > > command \ # comment1 > -sw1

Re: Refcount problem in ceval.c

2008-09-11 Thread Berthold Höllmann
Christian Heimes <[EMAIL PROTECTED]> writes: > Berthold Höllmann wrote: >> Is there any "common" reason to for such a strange object on the command >> stack, or is it more likely that any of my extension modules is causing >> havoc? > > It's

Refcount problem in ceval.c

2008-09-10 Thread Berthold Höllmann
I have a problem with my debug Python 2.5.2 executable with Py_REF_DEBUG and Py_TRACE_REFS set. With one of my scripts I get: ... Fatal Python error: Python/ceval.c:947 object at 0x2aa3f4d840 has negative ref count -2604246222170760230 Program received signal SIGABRT, Aborted. [Switching to Thre

Re: Moving class used in pickle

2007-05-21 Thread Berthold Höllmann
Jeffrey Barish <[EMAIL PROTECTED]> writes: > I have a class derived from string that is used in a pickle. In the new > version of my program, I moved the module containing the definition of the > class. Now the unpickle fails because it doesn't find the module. I was > thinking that I could mak

Decorator cllass hides docstring from doctest?

2006-09-21 Thread Berthold Höllmann
Saving the following code to a file and running the code through python does not give the expected error. disableling the "@decor" line leads to the expected error message. Is this a bug or an overseen feature? --- snip dectest.py --- class decor(object): def __init__(self, f): self.f

Re: Python 2.4 under WinXP, free VC71 toolkit and VC6 libraries

2005-09-28 Thread Berthold Höllmann
Peter Hansen <[EMAIL PROTECTED]> writes: > Berthold Höllmann wrote: >> As I understand it, ctypes is not really a solution. The code is about >> data handling and FE analysis. It has not GUI component. I'm not sure >> how well ctypes works with Numeric arrays, but

Re: Python 2.4 under WinXP, free VC71 toolkit and VC6 libraries

2005-09-27 Thread Berthold Höllmann
"F. Petitjean" <[EMAIL PROTECTED]> writes: > Le Tue, 27 Sep 2005 17:48:47 +0200, Berthold Höllmann a écrit : >> I have wrapped some inhouse libraries for Python. > How ? Directly coding C code ? Depends :-) f2py, directly coding C, SWIG. >> The developm

Python 2.4 under WinXP, free VC71 toolkit and VC6 libraries

2005-09-27 Thread Berthold Höllmann
I have wrapped some inhouse libraries for Python. The development team uses VC6 and DF6.1 for development of these libraries under WinXP. I would like to wrap the libraries for Python and use the official Win Python from python.org. Now I get a segmentation fault in (access violation in NTDLL.DLL).

Syntax error in files with with 'iso-8859-15' coding header

2005-09-21 Thread Berthold Höllmann
I have a default coding header # -*- coding: iso-8859-15 -*- in my python files. I now have Problems with this settings. I swithched to Python 2.4.1 under Windows. When I import files with the above coding header I get frequent syntax errors with files that work flawlessly under Linux. The Synta

Re: tuple to string?

2005-07-22 Thread Berthold Höllmann
Francois De Serres <[EMAIL PROTECTED]> writes: > hiho, > > what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D) > to the string 'spam'? .>>> t = (0x73, 0x70, 0x61, 0x6D) .>>> ''.join('%c' % c for c in t) 'spam' -- "Es gelten die Regeln der christlichen Seefahrt: Rot und Grün mar

Re: avl tree

2005-05-30 Thread Berthold Höllmann
Zunbeltz Izaola <[EMAIL PROTECTED]> writes: > Hi, > > I'm trying to install avl module from > http://www.nightmare.com/squirl/python-ext/avl > > and i had the following instruction to install > > Building: > > Unix: > First, cd $(AVL_LIB), then 'make libavl.a' > > Then copy AVLmodule.c into your M

Re: modules and namespaces

2005-04-19 Thread Berthold Höllmann
Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes: >>However it doesn't work until I import the string module into m1 and m2 >>modules. I found in the manual that imported modules will be searched in >>the container module first. Is it more efficient to import the string >>module into main and m1 and m

compiling python 2.4.1 on Linux_X86_64 using PGI compiler fails

2005-04-18 Thread Berthold Höllmann
I am trying to compile Python on an Opteron machine using the PGI C compiler under Linux. I use: CC=pgcc ./configure --prefix=/usr/local/gltools/python/Python-2.2.1 \ --exec-prefix=/usr/local/gltools/python/Python-2.2.1/$GL_ARCH \ --with-cxx=pgCC but make fails with: pgCC -Xlinker -expo

Re: Building unique comma-delimited list?

2005-01-05 Thread Berthold Höllmann
[EMAIL PROTECTED] (Roy Smith) writes: > I've got a silly little problem that I'm solving in C++, but I got to > thinking about how much easier it would be in Python. Here's the > problem: > > You've got a list of words (actually, they're found by searching a > data structure on the fly, but for n