Skip to content
Snippets Groups Projects
Commit 85ed7b94 authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

STYLE : Add comments for new python scripts

parent 79a7e1be
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,9 @@ import func_utils ...@@ -19,6 +19,9 @@ import func_utils
# Util fct for autocompletion # Util fct for autocompletion
def complete(text, state): def complete(text, state):
"""
Function for autocompletion
"""
return (glob.glob(text+'*')+[None])[state] return (glob.glob(text+'*')+[None])[state]
# Print with colors # Print with colors
...@@ -33,6 +36,9 @@ def prBlack(skk): print("\033[98m {}\033[00m" .format(skk)) ...@@ -33,6 +36,9 @@ def prBlack(skk): print("\033[98m {}\033[00m" .format(skk))
# Input with colors # Input with colors
def genericInput(skk, color) : def genericInput(skk, color) :
"""
Override input function for colors and exceptions
"""
try: try:
return input(color .format(skk)) return input(color .format(skk))
except KeyboardInterrupt : except KeyboardInterrupt :
...@@ -54,6 +60,11 @@ def inBlack(skk): return genericInput(skk, "\033[98m {}\033[00m") ...@@ -54,6 +60,11 @@ def inBlack(skk): return genericInput(skk, "\033[98m {}\033[00m")
# Questions to user for SAR_MultiSlc* chains # Questions to user for SAR_MultiSlc* chains
def askForMultiSlc(dataConfig) : def askForMultiSlc(dataConfig) :
"""
Q&A for SAR_MultiSlc* chains
Modify the dataConfig following user's awnsers
"""
# Select sensor if SAR_MultiSlc # Select sensor if SAR_MultiSlc
sensor = "S1IW" sensor = "S1IW"
if (response == "SAR_MultiSlc") : if (response == "SAR_MultiSlc") :
...@@ -188,6 +199,11 @@ def askForMultiSlc(dataConfig) : ...@@ -188,6 +199,11 @@ def askForMultiSlc(dataConfig) :
# Questions to user for diapOTB* chains # Questions to user for diapOTB* chains
def askForDiapOTB(dataConfig) : def askForDiapOTB(dataConfig) :
"""
Q&A for diapOTB* chains
Modify the dataConfig following user's awnsers
"""
# Select sensor if diapOTB # Select sensor if diapOTB
sensor = "S1IW" sensor = "S1IW"
if (response == "diapOTB") : if (response == "diapOTB") :
......
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""
getEOFFromESA.py
================
Python script to retrieve from ESA website, the EOF files
"""
import re import re
import os import os
import time import time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment