If you like organisation and design, everything OO/classes etc, choose java
If you want something you can hack together and test easily, or more procedural code, choose python
It still depends on the application. If you plan to have any kind of interface then Java as the user will be moving from code block to code block. If it's just one big script, then python would be better.