11 March 2016 - Forum Rules
Started by Zanerus, June 09, 2020, 01:40:52 AM
Quote from: pianohombre on June 25, 2020, 03:38:26 AMMicrosoft Visual Basic is a great program and it's in more than one language. Plus if you're a college student, or through some work you can get the program for free.
Quotefh = open("somefilename", "rb")data = fh.read()byteLen = len(data)chunk = data[byteLen-54:]
Quote from: glennxserge on July 02, 2020, 11:43:53 PMIf you are just trying to get the last 54 bytes of data from a file. I think it's easiest to just read the file data and then use the right indexing to capture it. Python has a pretty elegant way of managing lists/arraysTry this:That will grab the last 54 bytes stored in data, that you read from your file. How you choose to display it and build your GUI, is up to you.I'd say if you go the python route tKinter is a nice module that makes setting up an interface pretty easy. Lots of examples too. Good luck!
# Bytes to ASCII stringvalue = fh.read(length).decode('ascii')# Bytes to UTF-8 stringvalue = fh.read(length).decode('utf-8')# Bytes to SJIS stringvalue = fh.read(length).decode('sjis')# Bytes to Integervalue = int.from_bytes(fh.read(lenght), byteorder='big')# Integer to Bytesvalue = 0x1000byte_value = value.to_bytes(2, byteorder='big')
Quote from: FAST6191 on June 25, 2020, 11:29:23 AMDo you mean Microsoft's Visual Studio IDE program? Which is to say the program microsoft provides to write code, debug code, have it analyse code as you are writing it and compile/assemble/pack code? This will support multiple programming languages but in and of itself is not a programming language. We would also have to have the are IDEs something worth using or a crutch that makes you weak discussion? In general I go with use whatever gets the job done ( https://xkcd.com/378/ ) but at the same time I have seen the damage done by too much hand holding from an IDE.
Page created in 0.077 seconds with 19 queries.