View Full Version : Python help about opening .vmg file ..
December 7th, 2012, 08:08 AM
Hi , i have some .vmg files , i can open this file using "cat" but not with "nano" , but my question is how can i open this using python ? i try open() method ... but it gives me some numbers not the actual message :(
December 7th, 2012, 12:26 PM
I think you will need to open it in binary mode i think, as it contains null characters.
if i were doing this i would read it into a bytearray type in python, split it up into it's various fields, and convert those fields back to strings, ints etc.
The reason that cat can read the data is it probably ignores the non-ascii printable and null characters.
December 7th, 2012, 03:40 PM
Thank u so much :)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.