You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
3
3
The script helps to convert C/C++ sources to C/C++ -like Python sources.
4
4
5
-
It does some simple edit operations like removing semicolons and type declarations. After it you must edit code manually, but you'll probably spend less time doing it.
5
+
It does some simple edit operations like removing semicolons and type declarations.
6
+
After it you must edit code manually, but you'll probably spend less time doing it.
6
7
7
8
Example:
8
9
```
@@ -12,17 +13,20 @@ if (a && b) --> if a and b:
12
13
} -->
13
14
```
14
15
15
-
The utility **will** make mistakes and **will not** generate ready for use code, therefore it won't be useful for you unless you know both C/C++ and Python.
16
+
The utility **will** make mistakes and **will not** generate ready for use code,
17
+
therefore it won't be useful for you unless you know both C/C++ and Python.
16
18
17
-
For better result, it is recommended to format your code to ANSI style before performing conversion.
19
+
For better result, it is recommended to format your code to ANSI style
20
+
before performing conversion.
18
21
19
22
```
20
23
astyle --style=ansi your.cpp source.cpp files.cpp
21
24
```
22
25
23
26
### Usage
24
27
25
-
cpp2python.py DIR Find C/C++ files in the directory by suffix and process.
28
+
cpp2python.py DIR Find C/C++ files in the directory
29
+
by suffix and process.
26
30
cpp2python.py FILE Process the file
27
31
cpp2python.py -v|--version|-h|--help Display the help message
0 commit comments