Skip to content

Commit 0a79dbd

Browse files
author
Troy Melhase
committed
Tweaks.
1 parent df576ee commit 0a79dbd

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

doc/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ The [Translation Details][] page documents how the package translates Java
1515
syntax to Python.
1616

1717
#### Usage
18+
1819
The [Usage][] page explains how to run the `j2py` script.
1920

2021

2122
#### Customization
23+
2224
The [Customization][] doc describes how to customize translation behavior.
2325

2426

doc/translation.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
## Translation Features
22

3-
The java2python package can translate any syntactically valid Java source code
4-
file. The generated Python code is not guaranteed to run, nor is guaranteed to
5-
be syntactically valid Python. However, java2python works well many cases, and
6-
in some of those, it creates perfectly usable and workable Python code.
7-
83

94
### General Approach
105

readme.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
Simple but effective tool to translate Java source code into Python.
44

55

6+
The java2python package can translate any syntactically valid Java source code
7+
file. The generated Python code is not guaranteed to run, nor is guaranteed to
8+
be syntactically valid Python. However, java2python works well many cases, and
9+
in some of those, it creates perfectly usable and workable Python code.
10+
611
There are [lots of docs][], [plenty of tests][], and [many options][] for
712
controlling code generation.
813

9-
I'm in the process of finalizing the documentation and packaging a release.
10-
That will be release 0.5 when it's done. If you're looking for old releases,
11-
check the [downloads][] link above.
14+
If you're looking for old releases, check the [downloads][] link above.
1215

13-
Here's a very simple example. First we show the file:
16+
Here's a very simple example:
1417

1518
```bash
1619
$ cat HelloWorld.java
1720
```
18-
19-
And we get this:
20-
2121
```java
2222
// This is the HelloWorld class with a single method.
2323
class HelloWorld {
@@ -33,24 +33,17 @@ Next we run our program:
3333
```bash
3434
$ j2py HelloWorld.java
3535
```
36-
37-
And we get this:
38-
3936
```python
4037
#!/usr/bin/env python
41-
""" generated source for module HelloWorld
38+
""" generated source for module HelloWorld """
4239

43-
"""
4440
# This is the HelloWorld class with a single method.
4541
class HelloWorld(object):
46-
""" generated source for class HelloWorld
42+
""" generated source for class HelloWorld """
4743

48-
"""
4944
@classmethod
5045
def main(cls, args):
51-
""" generated source for method main
52-
53-
"""
46+
""" generated source for method main """
5447
print "Hello, world."
5548

5649
if __name__ == '__main__':

0 commit comments

Comments
 (0)