Skip to content

Commit 4b73a45

Browse files
author
Paddy Costelloe
authored
Updated connec_test.py
Updated with a function to install missing required files upon running first time.
1 parent a0ab6b4 commit 4b73a45

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

connec_test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@
77
# Tested on: Ubuntu 21.10 (GNU/Linux) & Windows 10
88
# Python: 3.9
99

10-
# Imports
10+
# Imports 1/2
1111
import subprocess
12+
13+
# Install missing packages
14+
def _install_missing():
15+
subprocess.call(['python3', '-m', 'pip', 'install', '--upgrade', 'pip'])
16+
subprocess.call(['python3', '-m', 'pip', 'install', '--upgrade', 'pillow'])
17+
_install_missing()
18+
19+
# Imports 2/2
1220
import platform
1321
import urllib.request
1422
import socket

0 commit comments

Comments
 (0)