skeinforge_tools.skeinforge_utilities.gcodec ($Date: 2008/21/04 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/skeinforge_utilities/gcodec.py

Gcodec is a collection of utilities to decode and encode gcode.
 
To run gcodec, install python 2.x on your machine, which is avaliable from http://www.python.org/download/
 
Then in the folder which gcodec is in, type 'python' in a shell to run the python interpreter.  Finally type 'from gcodec import *' to import this program.
 
Below is an example of gcodec use.  This example is run in a terminal in the folder which contains Hollow Square.gcode and gcodec.py.
 
>>> from gcodec import *
>>> getFileText('Hollow Square.gcode')
'( GCode generated by April 17,2007 Skeinforge )
( Extruder Initialization )
M100 P210
M103
M105
(<extrusionDiameter> P0.7
(<extrusionWidth> P0.654
(<layerThickness> P0.654
G21
G90
G28
( Extruder Movement )
( Extruder paths for layer 0 of Hollow Square )
(<extrusionStart>
G1 X2.727 Y-2.505 Z0.33 F600.0
 
..
many lines of text
..

 
Modules
       
__init__
os
sys

 
Functions
       
createInitFile()
Create the __init__.py file.
getDoubleAfterFirstLetter(word)
Get the double value of the word after the first letter.
 
Keyword arguments:
word -- string with value starting after the first letter
getDoubleForLetter(letter, splitLine)
Get the double value of the word after the first occurence of the letter in the split line.
getDoubleFromCharacterSplitLineValue(character, splitLine, value)
Get the double value of the string after the first occurence of the character in the split line.
getFeedrateMinute(feedrateMinute, splitLine)
Get the feedrate per minute if the split line has a feedrate.
getFileText(filename, readMode='r')
Get the entire text of a file.
getFilesWithFileTypeWithoutWords(fileType, words=[], fileInDirectory='')
Get files which have a given file type, but with do not contain a word in a list.
 
Keyword arguments:
fileType -- file type required
words -- list of words which the file must not have
getFilesWithFileTypesWithoutWords(fileTypes, words=[], fileInDirectory='')
Get files which have a given file type, but with do not contain a word in a list.
 
Keyword arguments:
fileType -- file types required
words -- list of words which the file must not have
getGcodeFileText(filename, gcodeText)
Get the gcode text from a file if it the gcode text is empty and if the file is a gcode file.
getLocationFromSplitLine(oldLocation, splitLine)
Get the location from the split line.
getModule(filename, folderName, moduleFilename)
Get the module from the filename and folder name.
getPluginFilenames(folderName, moduleFilename)
Get the filenames of the python plugins in the export_plugins folder.
getPythonDirectoryNames(directoryName)
Get the python directories.
getPythonDirectoryNamesRecursively(directoryName='')
Get the python directories recursively.
getPythonFilenamesExceptInit(fileInDirectory='')
Get the python filenames of the directory which the fileInDirectory is in, except for the __init__.py file.
getPythonFilenamesExceptInitRecursively(directoryName='')
Get the python filenames of the directory recursively, except for the __init__.py files.
getSummarizedFilename(filename)
Get the filename basename if the file is in the current working directory, otherwise return the original full name.
getTextLines(text)
Get the all the lines of text of a text.
getUnmodifiedGCodeFiles(fileInDirectory='')
Get gcode files which are not modified.
indexOfStartingWithSecond(letter, splitLine)
Get index of the first occurence of the given letter in the split line, starting with the second word.  Return - 1 if letter is not found
isFileWithFileTypeWithoutWords(fileType, filename, words)
Determine if file has a given file type, but with does not contain a word in a list.
 
Keyword arguments:
fileType -- file type required
filename -- name of the file
words -- list of words which the filename must not have
isProcedureDone(gcodeText, procedure)
Determine if the procedure has been done on the gcode text.
replaceWords(filenames, original, replacement)
Replace in files the original with the replacement.
writeFileMessageEnd(end, filename, fileText, message)
Write to a filename with a suffix and print a message.
writeFileText(filename, fileText, writeMode='w+')
Write a text to a file.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/21/04 $'
__license__ = 'GPL 3.0'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

 
Author
        Enrique Perez (perez_enrique@yahoo.com)