How To Open External Programs With Tkinter - Python Tkinter GUI Tutorial #74

  Рет қаралды 37,068

Codemy.com

Codemy.com

4 жыл бұрын

In this video I'll show you how to open external programs in your TKinter app.
Opening external programs is super easy, we'll just use the OS module along with the diledialog widget.
The os module comes with Python by needs to be imported at the top of our app, along with the filedialog widget.

Пікірлер: 81
@Codemycom
@Codemycom 4 жыл бұрын
▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My KZbin Channel: bit.ly/2UFLKgj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
@techtricks9981
@techtricks9981 4 жыл бұрын
Thanks for sharing this video with us I watched all tkinter tutorials
@Codemycom
@Codemycom 4 жыл бұрын
awesome!
@cuitaro
@cuitaro 3 жыл бұрын
@@techtricks9981 You can't watch ALL tkinter tutorials! New ones keep coming. I for one: 1) Am a big fan of John Elder 2) Would never want the series to end
@mujassimjamal24
@mujassimjamal24 4 жыл бұрын
Thank you sir for these another awesome video❤❤
@Codemycom
@Codemycom 4 жыл бұрын
My pleasure!
@dr1ft703
@dr1ft703 Жыл бұрын
Really Helpful!! Thanks :)
@Codemycom
@Codemycom Жыл бұрын
Welcome
@py_tok5589
@py_tok5589 3 жыл бұрын
lovely , nice tutorial, many thanks Indeed
@Codemycom
@Codemycom 3 жыл бұрын
You're Welcome
@RyanDanielG
@RyanDanielG 2 жыл бұрын
Hit that like button Python Fans! Great tutorial. Feed the Algorithm!
@EngineerToTrader
@EngineerToTrader 4 жыл бұрын
Graet Sir Awesome ,Really You are Masical programmer.....
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@ntcellulartutorials1195
@ntcellulartutorials1195 4 жыл бұрын
Great great great thank you very much sir
@Codemycom
@Codemycom 4 жыл бұрын
Thanks for watching!
@alexbutane5550
@alexbutane5550 Жыл бұрын
Great Tutorial, very easy to understand and to implement. I wanted to ask one question, how do you search for a specific file by name using OS module or some other module without loops and elements? is there a way to do that In one line of code?
@olariviitak423
@olariviitak423 Жыл бұрын
How can you open another files inside the window you made, like the button, you press it and the app will display next to it (on specific cords)?
@chaimrydlewicz7472
@chaimrydlewicz7472 2 жыл бұрын
Thanks for the video, it was really helpful. I would like to ask; how do you export the input data from tkinter into other external modules? Thanks for helping
@Codemycom
@Codemycom 2 жыл бұрын
Depends on the data and the external thing
@py_tok5589
@py_tok5589 3 жыл бұрын
at 6:23, I can open PDF files too, nice one Prof
@Codemycom
@Codemycom 3 жыл бұрын
Cool
@merijns3446
@merijns3446 3 жыл бұрын
why not use str() to fix the problem in 6:15?
@ghaithsmasters5131
@ghaithsmasters5131 Жыл бұрын
Could this be used to open a file using a given application, say to open a .txt file in word
@cezargoncalves3220
@cezargoncalves3220 2 жыл бұрын
Hi, in my program when I click at the button "Notepad" it is open a cmd windows under notepad. This It's prevents me from opening another program clicking in a second button while I maintein the notepad opened. How to close the cmd windows to allow to the user open a new window by clicking in one the buttons, while maintein the firts program oppened? Thanks
@LaurentChastain
@LaurentChastain 4 жыл бұрын
hello, well explained as usual but what if I select a file of type scratch in the list and it opens directly in scratch3 for example? thank you
@Codemycom
@Codemycom 4 жыл бұрын
I dunno, don't do that? lol
@jeffreyclendening9046
@jeffreyclendening9046 3 жыл бұрын
how would you a program like notepad++. there are ++ in path and the file name
@augustinjoshua7504
@augustinjoshua7504 2 жыл бұрын
Sir, I have a dobut. I have done all the steps that you mentioned in this video. But I got one error that is 'c:/Users/folder' is not recognised as an internal or external command, operable program or batch file.
@Codemycom
@Codemycom 2 жыл бұрын
Check your code for errors.
@AISNomad
@AISNomad 3 ай бұрын
Hi, thanks for your video. I was wondering if python tkinter GUI can create a program interface to display other program window. For example, if I use Tkinter GUI to launch the notepad.exe, the notepad is displayed inside of the tkinter GUI with toolbars, instead of opening another window. Please suggest how to develop it. Thank you very much.
@Codemycom
@Codemycom 3 ай бұрын
Not that I know of
@Teedies-oh7gi
@Teedies-oh7gi 2 жыл бұрын
Would like to ask, how do you close a running python file, like those that required you to press Ctrl + C to stop those kind of close
@Codemycom
@Codemycom 2 жыл бұрын
Uh, press Crtrl+c
@pirro1212
@pirro1212 2 жыл бұрын
Hi, I enjoyed the video and learned a lot. The problem that i am getting with the code is that once you opend the program the other buttons dont work. Is there a work around for this?
@Codemycom
@Codemycom 2 жыл бұрын
I suppose you could try threading
@ks.545
@ks.545 3 жыл бұрын
Hello sir, is it possible to use GUI to open a .py program file and change the address file (ex.video path) then run it? Appreciate your help 🙏🏻
@Codemycom
@Codemycom 3 жыл бұрын
Sure, you could do that.
@jdsguam
@jdsguam 3 жыл бұрын
why not just use Popen?
@matthewduck302
@matthewduck302 3 жыл бұрын
If I wanted to take this further and open a specific program, but instead of opening the application traditionally in its own window, I wanted to open it within the Python GUI Box, how could I do that? Thanks a lot!
@Codemycom
@Codemycom 3 жыл бұрын
you couldn't
@jamestackett6945
@jamestackett6945 3 жыл бұрын
I’m programming on a raspberry pi. Iv done the same thing as you. When I try to open a external program I get a permission error. Do you know how I would fix this? Thank you for the help.
@Codemycom
@Codemycom 3 жыл бұрын
Sorry, I don't know anything about Raspberry pi
@channelfun2565
@channelfun2565 4 жыл бұрын
Great!
@Codemycom
@Codemycom 4 жыл бұрын
Glad you like it!
@slayeroff7798
@slayeroff7798 4 жыл бұрын
Hello sir at 6:20 can we use a f string?
@Codemycom
@Codemycom 4 жыл бұрын
try it and see
@akramelomrani8728
@akramelomrani8728 3 жыл бұрын
@@Codemycom no we cant I've tryed
@sheilaquan9824
@sheilaquan9824 3 жыл бұрын
I try to run my gui.exe to open someone else's .exe file and it shows failed to execute the exe. The spyder window shows the .exe file is not recognized as an internal or external command. I can open the .exe by double click the icon but can't with the code in my gui. I can run other exe such as Zoom and Teams..dont know why ...
@Codemycom
@Codemycom 3 жыл бұрын
You don't run exe from spyder. Just open them on their own.
@abhinandvb7843
@abhinandvb7843 4 жыл бұрын
Can you show us how to close it
@afridinaseer
@afridinaseer 4 жыл бұрын
Hi sir can we upload a .doc file from the system or pc or laptop and save it to database using mysql and python? How please?
@Codemycom
@Codemycom 4 жыл бұрын
a doc file isn't really in the right format...you can upload a csv or excel file
@afridinaseer
@afridinaseer 4 жыл бұрын
@@Codemycom thanks for reply. Sir do you have any yours tutorial for this thanks
@redcenter3186
@redcenter3186 4 жыл бұрын
Can you make an login and register system with tk?
@Codemycom
@Codemycom 4 жыл бұрын
why not?
@PC-xh4qp
@PC-xh4qp 2 жыл бұрын
What to do if some external apps are causing your app to not respond what to do then ?
@Codemycom
@Codemycom 2 жыл бұрын
close them
@krish3d385
@krish3d385 4 жыл бұрын
Nice vedio sir. Learned something. But can we open a pdf file using this code?.
@Codemycom
@Codemycom 4 жыл бұрын
try it and see
@krish3d385
@krish3d385 4 жыл бұрын
Ohh yeah, it works fine. Thank you very much. You are much needed person. I have a lot to learn from. Keep rocking.
@Codemycom
@Codemycom 4 жыл бұрын
@@krish3d385 will do!
@kmp922
@kmp922 4 жыл бұрын
I converted Py to exe but exe file is not opening rather getting error like fatal error, failed to execute script sample. Please guide me
@Codemycom
@Codemycom 4 жыл бұрын
did you use pyinstaller to create the exe? You can't just rename a .py to a .exe
@kmp922
@kmp922 4 жыл бұрын
@@Codemycom yes I used pyinstaller
@Acem8887
@Acem8887 3 жыл бұрын
@@kmp922 make sure that your program doesnt show up any errors or has every file that needed in the same dir as the exe file you made. i added iconbitmap thing and program wont open without the .ico file in the same dir.
@hamayunhanif6397
@hamayunhanif6397 4 жыл бұрын
Sir how we open csv file throught dislog box in tkinter gui
@Codemycom
@Codemycom 4 жыл бұрын
Use openpyxl...I'll likely do videos on this in the future.
@hamayunhanif6397
@hamayunhanif6397 4 жыл бұрын
@@Codemycom kindly sir make video on this topic asap.
@kavin69420
@kavin69420 3 жыл бұрын
Every file says that erno 2 no such file or dir
@Codemycom
@Codemycom 3 жыл бұрын
You have typos in your code...it has to be exact
@hellobro8837
@hellobro8837 3 жыл бұрын
Sir, I couldn't get how ' "%s" ' % my program works. I mean why " " used inside ' ', generally it's written as '%s' or "%s" and it converts something passed into it into string. But in (' "%s" ' % my program), what my program was converted into?
@Codemycom
@Codemycom 3 жыл бұрын
Sorry not sure what you're asking
@hellobro8837
@hellobro8837 3 жыл бұрын
@@Codemycom I mean what's the purpose of using " " inside ' ' & generally %s converts something into string, but you already tried with string version...then what the location of my program converted into?
@bharaths1396
@bharaths1396 4 жыл бұрын
sir why do we need two quotations like why ' " " ' and not just one ' ' please help
@Codemycom
@Codemycom 4 жыл бұрын
because it won't work otherwise. Try it and see.
@bharaths1396
@bharaths1396 4 жыл бұрын
@@Codemycom Yess Sir it didn't work
@gr3gtf2
@gr3gtf2 Жыл бұрын
dude has 2 tb of space damn
@Codemycom
@Codemycom Жыл бұрын
much more than that lol
@kavin69420
@kavin69420 3 жыл бұрын
Sir this isnt. Workin actually
@Codemycom
@Codemycom 3 жыл бұрын
Then you have a typo in your code
Уроки Python / Делаем веб сервер на Питоне, считываем данные из формы, обрабатываем их на Python
14:17
Изучаем мир ИТ / Олег Шпагин / Программирование
Рет қаралды 35 М.
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 34 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 50 МЛН
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 21 МЛН
Start Automating Your Life Using Python! (File Management with Python Tutorial)
13:07
Convert Tkinter Python App to Executable (.Exe) File [pyinstaller]
9:11
Code First with Hala
Рет қаралды 134 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,5 МЛН
Setting and getting widget data in tkinter
13:43
Atlas
Рет қаралды 9 М.
Use a Drag & Drop Editor to Make Tkinter Python GUI Applications!
11:16
STOP Learning These Programming Languages (for Beginners)
5:25
Andy Sterkowitz
Рет қаралды 661 М.
Multiple Tabs in Tkinter - Python GUI Tutorial
9:26
NeuralNine
Рет қаралды 3,6 М.
Using button functions with arguments in tkinter
8:04
Atlas
Рет қаралды 15 М.
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 34 МЛН