diff --git a/scripts/transcript_extractor.py b/scripts/transcript_extractor.py index cdc859c0ff6e21f397a22c25b32358d6b83e4fde..5c81bcd838d4dff57c44989ea07edc0a4ee2e3a7 100644 --- a/scripts/transcript_extractor.py +++ b/scripts/transcript_extractor.py @@ -1,14 +1,29 @@ #### Transcript extractor ##### """Transcript extractor -Version 1.1.0""" +Version 1.2.0""" ### Called Packages ### import re import os import time -### Functions ### - +python_version = "3.7.13" +module_list =[re,os,time] +modul_name_list = ["re","os","time"] +### Functions ### +def version_control(module_list,modul_name_list,python_version): + with open("required.txt","a") as req: + + for i in range(len(module_list)): + + try: + version = module_list[i].__version__ + entry = modul_name_list[i]+"\t"+str(version)+"\n" + req.write(entry) + except: + version = python_version + entry = modul_name_list[i]+"\t"+str(version)+"\n" + req.write(entry) def __parameter_editor(file_name,source_pathway_name,deposit_pathway_name): """This function allows for changing the parameters after running the program""" @@ -307,6 +322,7 @@ def extract_transcript(file_name = "test",source_pathway_name = os.getcwd(),depo #### Dev part #### if __name__ == "__main__": + #version_control(module_list,modul_name_list,python_version) extract_transcript() #This line allows the file to be executed on its own also from