Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Global modules
import subprocess
# PYPX modules
from .base import Base
class Move(Base):
"""docstring for Move."""
def __init__(self, arg):
super(Move, self).__init__(arg)
def command(self, opt={}):
command = '--move ' + opt['aet_listener']
command += ' --timeout 5'
command += ' -k QueryRetrieveLevel=SERIES'
command += ' -k SeriesInstanceUID=' + opt['series_uid']
return self.executable + ' ' + command + ' ' + self.commandSuffix()
def run(self, opt={}):
response = subprocess.run(
self.command(opt), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
return self.handle(response)
# Global modules
import subprocess, re, collections
# PYPX modules
from .base import Base
class Find(Base):
"""docstring for Find."""
def __init__(self, arg):
super(Find, self).__init__(arg)
# to be moved out
self.postfilter_parameters = {
'PatientSex': '',
'PerformedStationAETitle': '',
'StudyDescription': '',
'SeriesDescription': ''
}
def command(self, opt={}):
command = '-xi -S'
return self.executable + ' ' + command + ' ' + self.query(opt) + ' ' + self.commandSuffix()
# Global modules
import subprocess
import pudb
import json
import pfmisc
from pfmisc._colors import Colors
# PYPX modules
from .base import Base
class Echo(Base):
"""
The 'Echo' class is essentially a stripped down module that
simply runs an 'echoscp' on the system shell.
"""
def __init__(self, arg):
"""
Constructor.
Largely simple/barebones constructor that calls the Base()
and sets up the executable name.
"""
super(Echo, self).__init__(arg)
self.dp = pfmisc.debug(
verbosity = self.verbosity,