Pass variables to Python (external script)

More
2 years 4 months ago #23163 by prashant
Using Directory Monitor , whenever a new file is added , I had like run a python script and provide the file location to it. Assuming abc.json was added the directory

I had like to execute
C:\Python39\python.exe c:\abc.py C:\xyz\abc.json.

 

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #23164 by Peter.Jonson

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #23166 by prashant
Hellos , I did see the page , but all of the Information seem to involve doing the python script within ETL , I wish to simplify pass the variable of file changed to it externally run the script. 

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #23168 by admin
This one works

import sys

for arg in sys.argv:
    print(arg)
    
wait = input("Press Enter to continue.")    
    


Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save