Return values from one script to another script

前端 未结 3 1557
死守一世寂寞
死守一世寂寞 2021-01-01 06:12

I have the following script that will run each script (sequentially) in a directory:

import os

directory = []

for dirpath, dirnames, filenames in os.walk(\         


        
3条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 07:03

    x is local to the script1 function, so it's not visible in the outer scope. If you put the code inside script1 at the top level of the file, it should work.

提交回复
热议问题