subprocess support #2509
Unanswered
NasserMashpery
asked this question in
Q&A
Replies: 4 comments
-
Have you tried to use full path?? It might be helpful. Regards. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can either use from customtkinter import *
from subprocess import call
import os
root = CTk()
root.geometry('200x100')
frame = CTkFrame(root)
frame.pack(pady=20, padx=20)
def Open():
script_path = os.path.join(os.path.dirname(__file__), 'test.py')
call(["python", script_path])
btn = CTkButton(frame, text='Open File', command=Open)
btn.pack()
root.mainloop() Regards. |
Beta Was this translation helpful? Give feedback.
0 replies
-
not working :(
في السبت، 20 يوليو 2024 في 6:54 ص تمت كتابة ما يلي بواسطة Dipesh
Samrawat ***@***.***>:
… You can either use pathlib module of os.path library.
Here is an updated version of your code provided in the issue
<#2508 (comment)>
.
from customtkinter import *from subprocess import callimport os
root = CTk()root.geometry('200x100')frame = CTkFrame(root)frame.pack(pady=20, padx=20)
def Open():
script_path = os.path.join(os.path.dirname(__file__), 'test.py')
call(["python", script_path])
btn = CTkButton(frame, text='Open File', command=Open)btn.pack()
root.mainloop()
Regards.
—
Reply to this email directly, view it on GitHub
<#2509 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASBKXF6RJVE7UQHWWKPNSP3ZNHNOZAVCNFSM6AAAAABLEZDXCOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMJQGA2DMNA>
.
You are receiving this because you authored the thread.Message ID:
<TomSchimansky/CustomTkinter/repo-discussions/2509/comments/10100464@
github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You may try the following:
Regards. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
is customtkinter support subprocess between two files python with including customtkinter ?
Beta Was this translation helpful? Give feedback.
All reactions