pyNastran  0.5.0
pyNastran BDF Reader/Writer, OP2 Parser, and GUI
pyNastran::general::general Namespace Reference

Functions

def printBadPath
def getFilesOfType
 gets all the files in the specified directory with a given extension
def deObscure
 unpacks an "obscured" number...similar to binary, but base 52 A base 52 value takes up a fewer characters than a base 10 number which helps to do Mat12345678 when there's an 8 character limit on variable names.
def obscure
 takes a large number and shrinks it down...similar to binary, but base 52 A base 52 value takes up a fewer characters than a base 10 number which helps to do Mat12345678 when there's an 8 character limit on variable names.
def is_binary
 Return true if the given filename is binary.
def ListPrint
 Prints a list, numpy array, or numpy matrix in an abbreviated format.

Variables

int n = 99999999
tuple o = obscure(n)

Function Documentation

Definition at line 30 of file general.py.

References getFilesOfType().

def pyNastran.general.general.getFilesOfType (   dirname,
  extension = '.txt',
  maxSize = 100. 
)

gets all the files in the specified directory with a given extension

Parameters:
dirnamethe directory name
extensionlist of filetypes to get (default='.txt')
maxSizesize in MB for max file size

Definition at line 48 of file general.py.

References deObscure().

Referenced by printBadPath().

unpacks an "obscured" number...similar to binary, but base 52 A base 52 value takes up a fewer characters than a base 10 number which helps to do Mat12345678 when there's an 8 character limit on variable names.

Definition at line 70 of file general.py.

References obscure(), and pyNastran::bdf::cards::aero.type.

Referenced by getFilesOfType(), and ListPrint().

takes a large number and shrinks it down...similar to binary, but base 52 A base 52 value takes up a fewer characters than a base 10 number which helps to do Mat12345678 when there's an 8 character limit on variable names.

Definition at line 97 of file general.py.

References is_binary().

Referenced by deObscure(), and ListPrint().

Return true if the given filename is binary.

EnvironmentError: if the file does not exist or cannot be accessed.

Attention:
: found @ http://bytes.com/topic/python/answers/21222-determine-file-type-binary-text on 6/08/2010
Author:
: Trent Mick <TrentM@ActiveState.com>
: Jorge Orpinel <jorge@orpinel.com>
Warning:
this may not work for str...

Definition at line 134 of file general.py.

References ListPrint().

Referenced by obscure(), and pyNastran.converters.cart3d.cart3d_reader.Cart3DBinaryReader.readRegions().

Prints a list, numpy array, or numpy matrix in an abbreviated format.

Useful for debugging.

Parameters:
listAlist, numpy array, or numpy matrix
Return values:
msgthe clean string representation of the object

Definition at line 156 of file general.py.

References deObscure(), and obscure().

Referenced by is_binary(), and pyNastran.bdf.cards.coordinateSystems.Cord2x.transformToGlobal().


Variable Documentation

Definition at line 199 of file general.py.

Definition at line 200 of file general.py.

 All Classes Namespaces Files Functions Variables