Hans wrote:
> I want to define a couple of constant strings, like in C:
> #define mystring "This is my string"
> or using a const char construction.
>
> Is this really not possible in Python?
No, this is not really not possible in Python:
$ ls
preprocess.pyp
$ cat preprocess.pyp
#define MYSTRING "Hello, world"
def f():
print "Goodbye, " MYOTHERSTRING
print MYSTRING
f()
$ gcc -DMYOTHERSTRING="'sanity'" -xc -E preprocess.pyp -o preprocess.py
$ python preprocess.py
Hello, world
Goodbye, sanity
$
:-)
Peter
--
http://mail.python.org/mailman/listinfo/python-list