Pyrex: problem with blanks in string

H

Hans Terlouw

Hi,

When trying to wrap C code using Pyrex, I encountered a strange problem with a
piece of pure Python code. I tried to isolate the problem. The following code
causes Pyrex to generate C code which gcc cannot compile:

class Axis:
axtype = "unknown type of axis"

def __init__(self):
pass

When I substitute the blanks in the string for something else, then the problem
disappears:

class Axis:
axtype = "unknown_type_of_axis"

def __init__(self):
pass

Does anybody have an idea?

Hans Terlouw
 
M

Michael Hoffman

Hans said:
When trying to wrap C code using Pyrex, I encountered a strange problem
with a piece of pure Python code. I tried to isolate the problem. The
following code causes Pyrex to generate C code which gcc cannot compile:

It works for me. Try posting your error messages and versions of
Pyrex/Python/GCC. Better yet, do this in the Pyrex mailing list rather
than here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top