i want to run another file into one script and run continously with loop...
in the first loop all import file
works fine...
- def my_function_1
- def my_function_2
- def my_function_3 #import
- def my_function_4 #import
- def my_function_5
but in the seconds loop, those all import file
not working and the work flow jump,
with flow like this:
- def my_function_1
- def my_function_2
- def my_function_5
this the code ive try:
acc = 'infos/acc-list.json'
f = open(acc,)
datas = json.load(f)
def main(data):
def my_function_1():
print('Login')
my_function_1()
def my_function_2():
print('Create new Post')
my_function_2()
def my_function_3():
import anotherFile1 #python File to do Liking
my_function_3()
def my_function_4():
import anotherFile2 #python File to do Comments
my_function_4()
def my_function_5():
print('Log Out')
my_function_5()
for data in datas:
main(data)
So. after logout, it will run again with another account from list in acc-list.json
and in the second loop / second account, those function_3
and function_4
not execute....
so the flow just like:
- login # function_1
- Create new post # function_2
- log Out # Function_5