First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Python file to compare output [closed]

asked Aug 29 '2

alexius gravatar image

Hi, I have different output file that I have to check if they are equal. Is there a quick way maybe with Python?

Closed for the following reason the question is answered, right answer was accepted by alexius
close date 2022-09-05 02:21:24.192494

Comments

Do you mean result files from dynamic simulations (.out) or any other kind of output from PSSE?

perolofl gravatar imageperolofl (Aug 30 '2)

Yes exactly dynamic simultions .out

alexius gravatar imagealexius (Aug 30 '2)

2 answers

Sort by » oldest newest most voted
1

answered Aug 30 '2

perolofl gravatar image

One way may be to open both files with dyntools and compare the channel values.

link
1

answered Aug 30 '2

jconto gravatar image

The OUT file is in binary format. To compare two OUT files in python, go to the internet and search for "python binary file compare". One of such links is "https://codereview.stackexchange.com/questions/171003/python-code-that-compares-two-files-byte-by-byte".

BTW, you can compare binary files on any other language and commercial programs are available.

To compare attributes of a OUT file, like difference in channels, use the dyntools module and python code around it. I have not seen yet a tool that do that.

link

Question Tools

1 follower

Stats

Asked: Aug 29 '2

Seen: 570 times

Last updated: Aug 30 '22