What is Python equivalent to Java's FileInputStream?
I got this code from the game osu!droid its supposed load the replay file given with its filename. I dont understand much of Java but I can at least convert it, except for one thing which is FileInputStream. I researched on everything in its conversion, even its definition and it doesnt seem to give me the answer. For anyone who knows Java and Python, what is Python equivalent of FileInputStream? Here is the code if you're curious. public boolean load(final String filename) { ObjectInputStream os; try { final ZipInputStream zip = new ZipInputStream(new FileInputStream( new File(filename))); zip.getNextEntry(); os = new ObjectInputStream(zip); // zip.close(); } catch (final Exception e) { Debug.e("Cannot load replay: " + e.getMessage(), e); return false; } //some code that isnt important }