L
L
Le-mit2019-08-15 19:08:58
Python
Le-mit, 2019-08-15 19:08:58

How to make input from a file (script2.py) requested in the graphical shell (script1.py)?

the situation is this: there is a graphical shell written in python + tkinter (script1) and there are several files written in python + selenium (script2, script3, etc.).
so I'm trying to run files from the graphical shell (script1) (script2, script3, etc.). I output the result of execution (i.e. output) of these files to the graphical shell, namely to the label, with the following code:

def script2_cmd(self):
        text2 = subprocess.check_output('python C:\\dr\\script2.py')
        decoded = text2.decode('utf-8')
        label = tk.Label(text=decoded)
        label.pack()

Now I have a problem:
How to make the input from a file (script2) requested in the graphical shell (script1)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2019-08-15
@dimonchik2013

in concepts, the code is not needed,
any data can be exchanged, at least - through a file, database, and even directly - sockets and even more so
change required between scripts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question