File size: 604 Bytes
908e980
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import subprocess
import os

# change current working directory to binare/linux/mu
os.chdir(os.getcwd())
os.chdir("../../binaries/linux/x86_64")

# construct and run the command
command = "PYTHONPATH=$PYTHONPATH:.:../../../python LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH python ../../../scripts/alpr/license_plate_recognizer.py --image ../../../assets/images/lic_us_1280x720.jpg --assets ../../../assets"
process = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE)

# send newline character to standard input
process.communicate(input='\n'.encode())

# wait for the subprocess to exit
process.wait()