Commit ace92963 authored by Cresson Remi's avatar Cresson Remi
Browse files

Merge branch '7-tqdm_autonotebook' into 'develop'

ENH: use tqdm.autonotebook instead of tqdm.tqdm

Closes #7

See merge request !24
1 merge request!24ENH: use tqdm.autonotebook instead of tqdm.tqdm
Showing with 4 additions and 4 deletions
+4 -4
...@@ -9,7 +9,7 @@ import io ...@@ -9,7 +9,7 @@ import io
import json import json
from urllib.parse import urlencode from urllib.parse import urlencode
import pycurl import pycurl
import tqdm from tqdm.autonotebook import tqdm
def bbox2str(bbox): def bbox2str(bbox):
...@@ -102,7 +102,7 @@ def curl_url(url, postdata, verbose=False, fp=None, header=None): ...@@ -102,7 +102,7 @@ def curl_url(url, postdata, verbose=False, fp=None, header=None):
if download_d > 0: if download_d > 0:
nonlocal progress_bar, last_download_d nonlocal progress_bar, last_download_d
if not progress_bar: if not progress_bar:
progress_bar = tqdm.tqdm(total=download_t, unit='iB', unit_scale=True) progress_bar = tqdm(total=download_t, unit='iB', unit_scale=True)
progress_bar.update(download_d - last_download_d) progress_bar.update(download_d - last_download_d)
last_download_d = download_d last_download_d = download_d
......
...@@ -3,7 +3,7 @@ This module contains Spot 6/7 classes. It implements sources, imagery and scene. ...@@ -3,7 +3,7 @@ This module contains Spot 6/7 classes. It implements sources, imagery and scene.
""" """
import datetime import datetime
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
import tqdm from tqdm.autonotebook import tqdm
import pyotb import pyotb
from scenes import utils from scenes import utils
from scenes.core import Source, Imagery, Scene from scenes.core import Source, Imagery, Scene
...@@ -41,7 +41,7 @@ def get_spot67_scenes(root_dir): ...@@ -41,7 +41,7 @@ def get_spot67_scenes(root_dir):
# Create scenes list # Create scenes list
scenes = [] scenes = []
errors = {} errors = {}
for dimap_file_xs in tqdm.tqdm(dimap_xs_files): for dimap_file_xs in tqdm(dimap_xs_files):
try: try:
# Find pairs of XS/PAN DIMAPS # Find pairs of XS/PAN DIMAPS
pan_path = dimap_file_xs[:dimap_file_xs.find("/PROD_SPOT")] pan_path = dimap_file_xs[:dimap_file_xs.find("/PROD_SPOT")]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment