all: start using pathlib
Change-Id: I2b0d6ff8f534382913414fa9b35150d6f697acb4 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/34463 Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de> Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
This commit is contained in:
@ -24,10 +24,10 @@
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
|
||||
# Add import path for inplace usage
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
||||
|
||||
from frappy.client.interactive import init, run, clientenv, interact
|
||||
|
||||
@ -36,7 +36,7 @@ def parseArgv(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-i', '--include',
|
||||
help='file to execute after connecting to the clients', metavar='file',
|
||||
type=str, action='append', default=[])
|
||||
type=Path, action='append', default=[])
|
||||
parser.add_argument('-o', '--only-execute',
|
||||
help='Do not go into interactive mode after executing files. \
|
||||
Has no effect without --include.', action='store_true')
|
||||
|
@ -26,10 +26,10 @@ from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
|
||||
# Add import path for inplace usage
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
||||
|
||||
import logging
|
||||
from mlzlog import ColoredConsoleHandler
|
||||
|
@ -22,10 +22,10 @@
|
||||
# *****************************************************************************
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
|
||||
# Add import path for inplace usage
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
||||
|
||||
from frappy.client.interactive import Console
|
||||
from frappy.playground import play, USAGE
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
|
||||
# Add import path for inplace usage
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
||||
|
||||
from frappy.lib import generalConfig
|
||||
from frappy.logging import logger
|
||||
|
@ -34,13 +34,13 @@ Use cases, mainly for test purposes:
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
import asyncore
|
||||
import socket
|
||||
import time
|
||||
|
||||
# Add import path for inplace usage
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
sys.path.insert(0, str(Path(__file__).absolute().parents[1]))
|
||||
|
||||
from frappy.lib import get_class, formatException, mkthread
|
||||
|
||||
|
Reference in New Issue
Block a user