Run External Python script on clicking HTML button | Script Output on Html Page Part2

preview_player
Показать описание
#external #python #script #html #button

Hey, this is Part2 of executing external script on clicking html using python django and subprocess run and pipe function

Рекомендации по теме
Комментарии
Автор

Whenever I hear an Indian accent in a tutorial I know I am getting quality information

SpudNuggetTV
Автор

Good sir, words can't begin to express the level of gratitude I have toward you for making this tutorial. You are both a gentleman and a scholar!

anarkbn
Автор

First of all, great video it solved by problem! And for those getting b'xxxx\r\n' you need to add ".decode('utf-8')" after "out.stdout", so it would be "out.stdout.decode('utf-8')". The b means its a bytes literal. I believe Pabliyo already answered this but in spanish. Consider liking this post if you have the same problem just for visibility as it seems like many people in the comments also had this issue.

corymatsumoto
Автор

!! Very good details. Thank you very much !!

abinashkumarsinha
Автор

thank you so much brooo you solved the problem which hours of googling couldn't.... your videos are very easy to follow and are very i am gonna definitely watch your django tutorials....

soumyadeeppaul
Автор

Hi! I’m new to python. My dream is to be a ethical hacker! Something that would help a lot for beginners like me is to put the code in the Description. Thanks for seeing my comment!

BaconDaPro
Автор

Exactly what I was looking for. Thanks!

dbassett
Автор

Hi, Thanks for the video.
My external Script generates a Json file contains some dict data. And I have a html (including JavaScipt function)file.
How to proceed after making my external python script run? where to save my jason, and where to put my html (that creates some graph from json data)?

nahian
Автор

Thanks dude, your video helped me a lot with my project! Much appreciated!

Chiny_w_Pigulce
Автор

This was a great tutorial and thank you for including the code!

rtwo
Автор

Hi, after all day of googlin and trying to firuge out how to do this, i found you video. THANK YOU THANK YOU You are my GOD, for sure :-)
Now i'm able to shere the results over web.
But i have one question, how get results, eg. prints of running script on the fly?
I have one script which is running about one minute, and i have a results via html onse it finished.
For instance, you have script where at the begining you have one print, after eg. 30 secunds you have second print and so on.
How to have generated htm with first print and later reloaded html with both prints and other ones?

Once again, thank You my friend

sulanowskiable
Автор

Good tutorial. Thx! How can you cause the HTML button to call a python script and prompt a user to authenticate to a server by entering his credentials. Basically what I am trying to understand is this: 1. The user click on the HTML button, 2. The python script is called. 3. Inside the python script authentication is required and I'd like to know if a form can be presented to the user at this point in the program to enter his username and password. 4. Display data back to the HTML page in a dropdown list. Thx in advance for your response.

dorson
Автор

Gracias brother. Para los que necesiten convertir el string de bytes a utf-8 out.stdout.decode('utf-8')

PabliyoCR
Автор

Thanks for this tutorial, dude. I have a question: I'm planning to make this usable in multiple PC's without making changes. ¿Is there a way to execute the script without calling the sys.executable? You know, the routes are going to be different between the PCS. Thanks for your answer.

danielaraya
Автор

how we can show python output on html page without clicking

dewanshsrivastava
Автор

it shows an error while i run this code on pycharm-
Using the URLconf defined in DEMOPROJECT.urls, Django tried these URL patterns, in this order:

1. ^admin/
2. ^$
3. ^output [name='script']
4. ^external
The current path, “/external/“, didn’t match any of these.

ItsNikkuG
Автор

bro everything is best, just please remove that black dot in your thumbnail, under the python logo
I cleaned my screen for 10 min Man, and after i realize that dot is in your thumbnail 😅😅😅

neek
Автор

please i need help how i can remove b' and \n

this is my output

b'Hi alex current time is 2022-01-07 18:31:02.682214\n'

alexdin
Автор

Thanks Vro! That's what i am looking for...btw you sounds like my professor exactly :)

valobhediya
Автор

PLEASE HELP
I have followed your every step and still got an error. I am using windows and I suspect my error is on this line vvv
out = run(sys.executable, ['//C://Users//USER//PycharmProjects//whatsapp//main.py', inp], shell=False, stdout=PIPE)

How do you write the path on windows?

mysterious