Category : file

So.. My intentions are: 1) to scan a traceback that looks like this: Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 104, in <module> main() 2) to iterate in order to make a list (of tuples) of all the ..

Read more

I have a .txt file with these contents: ACC210: Luther, Martin Spurgeon, Charles CS121P: Bunyan, John Henry, Matthew Luther, Martin CS132S: Calvin, John Knox, John Owen, John I need to create a dictionary so it will look like this {ACC210: ‘Luther, Martin, Spurgeon, Charles’ CS121P: ‘Bunyan, John Henry, Matthew Luther, Martin’ CS132S: ‘Calvin, John Knox, ..

Read more

Coming across the above error when trying to call a function from another python file. The main file is: import glob import os from . import fileread2 dat = filereader() print(dat) The function ‘fileread2’ is: import glob import os import csv def filereader(): folder_path = os.path.join(os.path.expanduser("~"), "Desktop/RG new") comlist = [] for filename in glob.glob(os.path.join(folder_path, ..

Read more