SUAVE  2.5.2
An Aerospace Vehicle Environment for Designing Future Aircraft
SUAVE.Core.redirect.folder Class Reference
Inheritance diagram for SUAVE.Core.redirect.folder:

Public Member Functions

def __init__ (self, folder, pull=None, link=None, force=True)
def __enter__ (self)
def __exit__ (self, exc_type, exc_value, traceback)

Public Attributes


Detailed Description

Temporarily redirects to a working folder, pulling 
    and pushing needed files
    folder = 'temp'                    
    pull   = ['file1.txt','file2.txt'] 
    link   = ['file3.big']             
    force  = True                      
    # original path
    import os
    print os.getcwd()
    # enter folder
    with,pull,link,force) as push:
        print os.getcwd()
        # code
    #: with folder redirection
    # returned to original path
    print os.getcwd()
        folder - working folder, relative or absolute
        pull   - list of files to pull (copy to working folder)
        link   - list of files to link (symbolic link in working folder)
        force  - True/False overwrite existing files in working folder
        push   - list of files to push (copy to originating path)
        push must be appended or extended, not overwritten
        links in Windows not supported, will simply copy

Constructor & Destructor Documentation

◆ __init__()

def SUAVE.Core.redirect.folder.__init__ (   self,
  pull = None,
  link = None,
  force = True 
folder redirection initialization
    see help( folder ) for more info

The documentation for this class was generated from the following file: