From 004b603d91d5ff83f0376838a0db646f057dfcbf Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Mon, 13 Nov 2023 23:26:00 -0400 Subject: [PATCH] FTP server uses venv --- SimpleFTP/SimpleFTP.ps1 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/SimpleFTP/SimpleFTP.ps1 b/SimpleFTP/SimpleFTP.ps1 index 1f57008..80fbed4 100644 --- a/SimpleFTP/SimpleFTP.ps1 +++ b/SimpleFTP/SimpleFTP.ps1 @@ -1,5 +1,16 @@ -# Is working for video files? -python3 -m pyftpdlib +# Create virtual environment +if (-not (Test-Path venv)) { + virtualenv venv +} + +# Activate virtual environment +.\venv\Scripts\activate.ps1 + +# Install dependencies +pip install pyftpdlib + +# Run FTP server +python -m pyftpdlib # Not working for streaming video files # twistd -n ftp -r . \ No newline at end of file