2021-01-12 09:36:42 +00:00
|
|
|
|
$pythonVersion = Invoke-Expression -Command "python -V" 2>&1
|
|
|
|
|
$python3Version = Invoke-Expression -Command "python3 -V" 2>&1
|
|
|
|
|
$numberVersion = $pythonVersion.Split(" ")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(![string]::IsNullOrEmpty($pythonVersion))
|
|
|
|
|
{
|
|
|
|
|
if($numberVersion[1] -like "3*")
|
|
|
|
|
{
|
|
|
|
|
python telegramexporter.py
|
2021-01-12 16:24:33 +00:00
|
|
|
|
Read-Host -Prompt "Press enter to continue..."
|
2021-01-12 09:36:42 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Write-Output "Too low Python version found. Please, install a Python version >= 3.6"
|
2021-01-12 16:24:33 +00:00
|
|
|
|
Read-Host -Prompt "Press enter to continue..."
|
2021-01-12 09:36:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
elseif(![string]::IsNullOrEmpty($python3Version))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
python3 telegramexporter.py
|
2021-01-12 16:24:33 +00:00
|
|
|
|
Read-Host -Prompt "Press enter to continue..."
|
2021-01-12 09:36:42 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Write-Output "No Python versions found. Please, install a Python version >= 3.6"
|
2021-01-12 16:24:33 +00:00
|
|
|
|
Read-Host -Prompt "Press enter to continue..."
|
2021-01-12 09:36:42 +00:00
|
|
|
|
}
|