Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hru-delin-dev
hru-delin
Commits
3da564c7
Unverified
Commit
3da564c7
authored
Apr 22, 2020
by
Julien Veyssier
Browse files
fix step1 tqdm import (only if executed)
Signed-off-by:
Julien Veyssier
<
eneiluj@posteo.net
>
parent
8523d22d
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/hrudelin_1_init.py
View file @
3da564c7
...
...
@@ -45,16 +45,6 @@ except Exception as e:
print
(
'or if you don
\'
t have superuser access:
\n
'
)
print
(
'%spip3 install dbf%s
\n
'
%
(
COLOR_GREEN
,
COLOR_RESET
))
try
:
from
tqdm
import
tqdm
except
Exception
as
e
:
print
(
'!!! %s tqdm python3 module not found !!%s
\n
'
%
(
COLOR_RED
,
COLOR_RESET
))
print
(
'On Debian/Ubuntu/Linux Mint you can install it with:
\n
'
)
print
(
'%ssudo apt install python3-tqdm%s
\n
'
%
(
COLOR_GREEN
,
COLOR_RESET
))
print
(
'or if you don
\'
t have superuser access:
\n
'
)
print
(
'%spip3 install tqdm%s
\n
'
%
(
COLOR_GREEN
,
COLOR_RESET
))
sys
.
exit
(
1
)
MY_ABS_PATH
=
os
.
path
.
abspath
(
__file__
)
MY_DIR
=
os
.
path
.
dirname
(
MY_ABS_PATH
)
DATA_PATH
=
os
.
path
.
join
(
MY_DIR
,
'..'
,
'data'
)
...
...
@@ -349,6 +339,16 @@ if __name__ == '__main__':
from
progressColors
import
*
from
parallel
import
buildGrassEnv
from
ogr2ogr
import
main
as
ogr2ogrMain
try
:
from
tqdm
import
tqdm
except
Exception
as
e
:
print
(
'!!! %s tqdm python3 module not found !!%s
\n
'
%
(
COLOR_RED
,
COLOR_RESET
))
print
(
'On Debian/Ubuntu/Linux Mint you can install it with:
\n
'
)
print
(
'%ssudo apt install python3-tqdm%s
\n
'
%
(
COLOR_GREEN
,
COLOR_RESET
))
print
(
'or if you don
\'
t have superuser access:
\n
'
)
print
(
'%spip3 install tqdm%s
\n
'
%
(
COLOR_GREEN
,
COLOR_RESET
))
sys
.
exit
(
1
)
parms_file
=
'hrudelin_config.cfg'
if
len
(
sys
.
argv
)
>
1
:
parms_file
=
sys
.
argv
[
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment