Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import subprocess as sub
- import pathlib
- import io
- from magic import libmagic
- f1 = open(f"0409115.rar.TXT", "r")
- print(f1.read())
- """f2 = open(f"F0409115_KO-0600_S_20220101.xml", "r")
- print(f2.read())"""
- """f3 = open(f"test1.rar.txt")
- print(f3.read())"""
- """with io.open(f"test1") as file:
- for line in file:
- print(line)"""
- #print("File Extension: ", file_extension)
- blob = open('test1"', 'rb').read()
- m = libmagic.open(libmagic.MAGIC_MIME_ENCODING)
- m.load()
- encoding = m.buffer(blob)
- print(encoding)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement