Execute Python Script From Node Js | Without Any External Library

preview_player
Показать описание
Node. js can run python script by using the standard child_process module. If we use the exec() function, our command will run and its output will be available to us in a callback. If we use the spawn() module, its output will be available via event listeners.

------------------------------------------------
Follow me on:
-----------------------------------------------
#pythonFromNodeJs #nodejsChildProcess
Рекомендации по теме
Комментарии
Автор

this was exactly what i needed. i like such short and to the point videos helps a lot. keep doing these

nishantpatil
Автор

Thank you very much! This answered my questions for the problem I was facing and gave me the way forward.

michaelheimburger
Автор

Informative. Keep it up.
Many congratulations for 10K subs.

AsisPatra
Автор

Thank you so much. I’ve been looking through SO for quite some time, but this is a perfect showcase of what I needed. Thank you.

redomylifeplease
Автор

Very useful and straightforward stuff. Thank you indeed, sir!

ilgazsenyuz
Автор

me also, Thank you so much💖
I find this type of video 2-3 hours, for my projects

kalyansantra
Автор

thx a straight to the point tutorial, very helpful

adambhouri
Автор

Many thanks for your simulation in practice!

truongngo
Автор

Can you show some examples of passing python variables / data back to the node side now? Anytime you want to pass data back from the python child process, you need to use print() function, and stringify the data, passing it into print? Then on node js side, turning the stringified data back into an object, for example?

mattorrock
Автор

Great!!! thank you, very simple and complet

Saturno..
Автор

From Brazil Thank you very much for your video.

kzuy_
Автор

Thank you so much for making such a great video.

ayushbudhwani
Автор

What if my python script has dependencies like opencv and pytorch ? how would I make sure that these dependencies dont cause an error while executing the python script?

shravanvenkatesh
Автор

Nice work, maybe you can let auto translate in video settings.

umut
Автор

Amazing video! Do you have any videos that show how this would work calling the python script from a push button within the JS/HTML frameworks?

everydayt
Автор

Heyy ! I want to run my python file that is in the format .ipnyb ! Is it possible ?

Saptisunil
Автор

Hello! Let’s say that this python script has two functions. How to call only one of them in the TypeScript file?

jhenyffervaz
Автор

how can we get results from python script instead of printing it in shell?

JustGamingJG
Автор

is there a way to pass variables to the python script from the nodJS side so that you can take input from a web app for example and then push a set point to python so it can be used with micropython to control a raspberry pi?

kreecha
Автор

I want to read data back to my script and dont want to be printed on console.. Any suggestion?

shilpag