Skip to content
Snippets Groups Projects
Commit 34670c55 authored by Chris Smith's avatar Chris Smith
Browse files

New function io.io_utils.check_ssh

Checks the environment to see if the code is being run over an SSH connection.
parent 834bd96c
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ Created on Tue Nov 3 21:14:25 2015
"""
from __future__ import division, print_function, absolute_import, unicode_literals
import os
from multiprocessing import cpu_count
from time import strftime
from psutil import virtual_memory as vm
......@@ -18,6 +19,10 @@ __all__ = ['getAvailableMem', 'getTimeStamp', 'transformToTargetType', 'transfor
'recommendCores', 'uiGetFile']
def check_ssh():
return 'SSH_CLIENT' in os.environ or 'SSH_TTY' in os.environ
def uiGetFile(filter='H5 file (*.h5)', caption='Select File'):
"""
Presents a File dialog used for selecting the .mat file
......
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