forked from geekcomputers/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubpinsta.py
More file actions
29 lines (25 loc) · 702 Bytes
/
Copy pathsubpinsta.py
File metadata and controls
29 lines (25 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# trggering the process
import os
import subprocess
import sys
def instasubprocess(user, tags, type, productId):
try:
child_env = sys.executable
file_pocessing = (
os.getcwd()
+ "/insta_datafetcher.py "
+ user
+ " "
+ tags
+ " "
+ type
+ " "
+ productId
)
command = child_env + " " + file_pocessing
result = subprocess.Popen(command, shell=True)
result.wait()
except:
print("error::instasubprocess>>", sys.exc_info()[1])
if __name__ == "__main__":
instasubprocess(user="u2", tags="food", type="hashtags", productId="abc")