C-Style Python v0.0.1
This contains the first initial public release of C-Style-Python. Please report any issues found or any suggestions you have on the issue tracker.
Links
- Download *…
Published 07/02/2024
C-Style Python pre-processor. Allows you to write Python with brackets defining the scope instead of tabs. + Similiar to Bython.
Bython to Python, Python to C-Style Python, C-Style Python to PythonIf statements, for loops & while loops are C/Java like.
/// defines a single-line comment, we also inherit python comments with #/* starts a multi-line comment, it ends with */if (a == 5)config.ini and provide your python paths for the version you want to use.def demo():
# Variable assignments
x = 10
y = 5
# Conditional statement
if x > y:
print("x is greater than y")
else:
print("x is not greater than y")
# Loop with error handling
for i in range(5):
try:
result = x / (y - i)
print(f"Result of division: {result}")
except ZeroDivisionError:
print("Division by zero occurred")
# Call the function
demo()
def demo() {
# Variable assignments
x = 10;
y = 5;
# Conditional statement
if (x > y) {
print("x is greater than y");
} else {
print("x is not greater than y");
}
# Loop with error handling
for (i in range(5)) {
try {
result = x / (y - i);
print(f"Result of division: {result}");
} catch (ZeroDivisionError) {
print("Division by zero occurred");
}
}
}
# Call the function
demo();
This contains the first initial public release of C-Style-Python. Please report any issues found or any suggestions you have on the issue tracker.