I find this method to be far easier, but sometimes more clumsy. You can achieve similar results with sockets as well, and it will come down to performance and preference which you choose. So, you can use, say, java to communicate with the shell, which then passes vars through to a python script, which then communicates back to the shell, which then goes back into the java program. What makes this special, is when you realize that you can do this same thing with other languages as well. We can communicate from the shell to Python as we saw earlier, and now we see we can communicate from Python to the shell. The reason this matters is for the same reason that we can communicate from the shell to Python. So what we're able to do here is communicate to the shell commands from our Python script. # IF YOU ARE NOT IN A SHELL, YOU WILL SEE NO OUTPUT! py file but not when I run the txt file with subprocess. # you can change that if you'd like, eventually. It works perfectly fine when I use it with built-in modules such as tkinter or random but when I try to use external packages (that I have previously installed. # Open yours up, type python, or python3, and then follow. ![]() That said: # This tutorial is best followed in a shell / command prompt. ![]() While you probably can just get by with the others without watching the video, this one is going to probably make no sense without the video. So this tutorial is a lot more than just the sample code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |