Search found 2 matches

by davidsmith
Fri Aug 05, 2022 1:05 am
Forum: General Discussion and Questions
Topic: problem to uncompreess .tar file
Replies: 1
Views: 2221

Re: problem to uncompreess .tar file

the example py script don't close file def tar_extract(file_name): """This function extracts an uncompressed tar file into the directory name it was archived from""" tar = utarfile.TarFile(file_name) for i in tar: print(i) if i.type == utarfile.DIRTYPE: if i.name != './': os.mkdir(i.name.strip('/'))...
by davidsmith
Thu Jun 10, 2021 10:15 am
Forum: General Discussion and Questions
Topic: Can I pass parameter to Timer callback?
Replies: 5
Views: 6506

Re: Can I pass parameter to Timer callback?

t1 = Timer(1)
z = 400
t1.init(period=2000, mode=Timer.ONE_SHOT, callback=lambda b: test(z))
it work for me