pypreprocessor
pypreprocessor copied to clipboard
A c-style macro preprocessor written in Python
Hi, I decided to contribute to this project as I had needs for C-preprocessors in Python with support for #if. I split my contribution in one "feature" per commit for...
Hello. I tested pypreprocessor as following In "py2and3.py" ``` import sys from pypreprocessor import pypreprocessor #exclude if sys.version[:3].split('.')[0] == '2': pypreprocessor.defines.append('python2') if sys.version[:3].split('.')[0] == '3': pypreprocessor.defines.append('python3') pypreprocessor.parse() #endexclude from print_python_version...
Following is the error log during install from pip ``` root@158b838dff06:/app# pip3 install pypreprocessor==0.7.7 Collecting pypreprocessor==0.7.7 Downloading pypreprocessor-0.7.7.tar.gz (10 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python3...
I don't know what people expect: The following code is valid according to the current algorithm ``` #if A print('A') #elseif B print('B') #elseif C print('C') #else print('D') #endif #endif...
Hi hi! here other one that thinks...., is a great project! I check your examples and doc, I can't found how it works with modules, if we write several modules...
Hi Evan! Cool project! I also recently started with a C preprocessor in python, can be seen here: https://github.com/windelbouwman/ppci-mirror/blob/master/examples/c/hello/demo_pycparser.py Maybe it is a good idea to add some travis integration...
See if the build process can be simplified/updated https://packaging.python.org/tutorials/packaging-projects/ Drop support for 2.x Add Testing
I used the debug2production.py script as a base. When I try to use a function from an import inside a function that I created, it says the name of the...
Please try the "if __name__ == '__main__':" construction in your program, it may solve all your pypreprocessor problems.
I tried putting this in a file other than my main first, it failed with an error in the "on-the-fly" function of pypreprocessor. To test I put it in my...