java2python
java2python copied to clipboard
Suggestions for little improvements
Hello,
I tried your tool and had some problems which you might like to know for future improvement. I tell you every point so you can decide which are useful for you.
- The tool coudn't convert sourcecode with German Umlauts, even if the Umlauts where only in comments.
- Java import statements where left in which where useless in Python.
- The converter inserted cls as self-reference. It added cls. before variables, but not before functions, so the functions wheren't found when running.
- Javas functions from librarys are left untouched. It would be possible to exchange "Math.abs(Random().nextInt()) % 6" by Pythons "random.randint(0, 6)"
- stdin = BufferedReader(InputStreamReader(System.in_)) is left in and not useful anymore. (Only "BufferedReader" before stdin was thrown out.)
- String eing = stdin.readLine(); was completly thrown out by the tool. I would like it to be exchanged by eing = raw_input("")
- If a variable is declared as something else as a string and is concatenated with a string, it would be nice to put str() around it. For example: int counter = 0; System.out.println("The counter is: " + counter); should become counter = 0 print "The counter is: " + str(counter)
Thanks for the great work, I like your tool as it is. Please take this points as suggestions, without need to accept.