![]() ``start:stop`` or ``start:stop:step``, where any of the fields may be empty. Tags written as `` # we should change directory here, so that datafiles are found # Paraview defined current_script_path but that only works when run from Paraview # if 'current_script_path' in dir(): d=os.path.dirname(current_script_path) if d: os.chdir(d) # create zip archive if hasattr(sys,'argv') and len(sys.argv)>1: import argparse,re parser=argparse.ArgumentParser() parser.add_argument('-zip',help='Create self-contained zip file from data files.',dest='zip',type=str,default='') parser.add_argument('-slice',type=str,default='',dest='slice',help='Slice for packing files, to avoid large volumes of data the slice must be in python format, i.e. ![]() :param str out: script name written (if None, temporary file is used). * :obj:`S.id `, if enabled, is exported to indicate spatial distribution of dissipated energy. ![]() def fromEngines ( S, out = None, launch = False, noDataOk = False, ** extraKw ): '''Write paraview script showing data from the current VTK-related engines and objects: * :obj:`` is queried for files already written, and those are returned * :obj:`` is made to export its internal data at the moment of calling this function * :obj:`` indicates there are particles traces, which are exported by calling :obj:``. EnumValue ( pvKey, i ) if key = '' : pvExec = val '/bin/paraview' break if not pvExec : return None # raise RuntimeError('ParaView installation: found in registry, but default key is missing.?') return pvExec else : # on Linux, find it in $PATH import woo.utils return woo. QueryInfoKey ( pvKey )): key, val, T = winreg. itemgetter ( 1 )) if not pv : return None # raise RuntimeError('ParaView installation not found in registry.') pvName, pvKey = pv pvExec = '' for i in range ( 0, winreg. append (( keyname, subKey )) # sort lexically using key name and use the last one (highest version) pv = sorted ( paraviews, key = operator. startswith ( 'ParaView ' ): # print 'no match:',keyname continue subKey = winreg. QueryInfoKey ( aKey )): keyname = winreg. OpenKey ( aReg, r 'SOFTWARE\Wow6432Node\Kitware, Inc.' ) except WindowsError : continue for i in range ( 0, winreg. ![]() ConnectRegistry ( None, reg ) try : aKey = winreg. # - HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Kitware Inc.\ParaView 3.8.X (64bit machines single user install) # - HKEY_CURRENT_USER\SOFTWARE\Kitware Inc.\ParaView 3.8.X (32bit machines single user install) # - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Kitware Inc.\ParaView 3.8.X (64bit machines all users) # - HKEY_LOCAL_MACHINE\SOFTWARE\Kitware Inc.\ParaView 3.8.X (32bit machines all users) # we don't care about 32 bit, do just 64bit import winreg as winreg path = r 'SOFTWARE\Wow6432Node\Kitware Inc.' paraviews = for reg in ( winreg. Returns ``None`` is Paraview is not found.' import sys, operator if sys. Under Windows (64bit only), this entails searching the registry (see `this post `_) under Linux, look in ``$PATH44 for executable called ``paraview``. Def findPV (): 'Find Paraview executable in the system. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |