rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
QToolTip.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation."))
QToolTip.add(self.core_electrons_checkbox,self.__tr("Include both the valence and core electrons in the MP2 calculation"))
def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) Q...
QToolTip.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) QWhatsThis.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation."))
QToolTip.add(self.density_conv_combox,self.__tr("Accuracy of the electron density convergence (CONV)")) QWhatsThis.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the calculation (CONV)."))
def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) Q...
QToolTip.add(self.run_job_btn,self.__tr("Save GAMESS parameters and launch job."))
QToolTip.add(self.run_job_btn,self.__tr("Save GAMESS parameters and launch job")) QWhatsThis.add(self.run_job_btn,self.__tr("Save GAMESS parameters, generates the INP file and launches the GAMESS job."))
def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) Q...
QToolTip.add(self.cancel_btn,self.__tr("Closes this window.")) QWhatsThis.add(self.cancel_btn,self.__tr("Closes this window."))
QToolTip.add(self.cancel_btn,self.__tr("Cancel")) QWhatsThis.add(self.cancel_btn,self.__tr("Cancels changes and closes dialog."))
def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) Q...
method( menu, SIGNAL("aboutToShow()"), self.remake_UI_menuitems )
pass
def connect_or_disconnect_menu_signals(self, connectQ): win = self.assy.w if connectQ: method = win.connect else: method = win.disconnect for menu in self.menus: method( menu, SIGNAL("aboutToShow()"), self.remake_UI_menuitems ) ####k return
self.archive.checkpoint( cptype = 'user_explicit' )
self.checkpoint( cptype = 'user_explicit' ) def checkpoint(self, *args, **kws): res = self.archive.checkpoint( *args, **kws ) self.remake_UI_menuitems() return res
def menu_cmd_checkpoint(self): self.archive.checkpoint( cptype = 'user_explicit' )
self.archive.checkpoint( cptype = 'begin_cmd' )
self.checkpoint( cptype = 'begin_cmd' )
def undo_checkpoint_before_command(self, cmdname = ""): """###doc [returns a value which should be passed to undo_checkpoint_after_command; we make no guarantees at all about what type of value that is, whether it's boolean true, etc] """ #e should this be renamed begin_cmd_checkpoint() or begin_command_checkpoint() li...
self.archive.checkpoint( cptype = 'end_cmd' ) self.remake_UI_menuitems()
self.checkpoint( cptype = 'end_cmd' )
def undo_checkpoint_after_command(self, begin_retval): assert begin_retval in [False, True], "begin_retval should not be %r" % (begin_retval,) if begin_retval: # this means [as of 060123] that debug pref for undo checkpointing is enabled if undo_archive.debug_undo2: env.history.message(" debug_undo2: end_cmd_checkpoin...
env.history.message( redmsg( msg))
env.history.message( orangemsg( msg))
def current_selgroup_changed(self, prior = 0): #bruce 050131 for Alpha "#doc; caller has already stored new valid one; prior == 0 means unknown -- caller might pass None" #e in future (post-Alpha) this might revise self.molecules, what to show in glpane, etc # for now, make sure nothing outside it is picked! # This is ...
def bruce_print_node(self, node, indent=""): print indent + "a node %r:" % node, node.name, node.__class__.__name__,"dad =",node.dad if not self.nodeItem(node): print indent + "... has no tree item" else: print indent + "its tree item:" self.bruce_print_item(self.nodeItem(node), " "+indent) return def bruce_print_ite...
def mt_update(self, nodetree = None): ###@@@ review name of this function, whether subclasses need to override it """External code (or event bindings in a subclass, if they don't do enough repainting themselves) should call this when it might have changed any state that should affect what's shown in the tree. (Specific...
if platform.atom_debug:
if platform.atom_debug and debug_prints:
def update(self): if platform.atom_debug: self.dprinttime() ##print "fyi: modelTree.update() called (by Qt, or by a bug in our own code, which should call mt.mt_update; or by our new code)" print_compact_stack("stack in update(): ") ## this happens twice early, not from exec_loop: # stack in update(): [atom.py:75] [MWs...
assert(not ColorSorter.sorting, "Called ColorSorter.start but already sorting?!")
assert not ColorSorter.sorting, "Called ColorSorter.start but already sorting?!"
def start(): """Start sorting - objects provided to "schedule" will be stored for a sort at the time "finish" is called.""" assert(not ColorSorter.sorting, "Called ColorSorter.start but already sorting?!") ColorSorter.sorting = True ColorSorter.sorted_by_color = {} ColorSorter.schedule = staticmethod(ColorSorter._add_t...
self.new = None
self.new = None self.modified = 0 self.pastable = None
def Enter(self): # bruce 040922 split setMode into Enter and init_gui (fyi) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) basicMode.Enter(self) self.o.assy.unpickatoms() self.o.assy.unpickparts() self.saveDisp = self.o.display self.o.setDisplay(diTUBES) self.o.assy.selwhat = 0 self.new = None self.o.selatom = None ...
self.modified = 0 self.pastable = None
def Enter(self): # bruce 040922 split setMode into Enter and init_gui (fyi) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) basicMode.Enter(self) self.o.assy.unpickatoms() self.o.assy.unpickparts() self.saveDisp = self.o.display self.o.setDisplay(diTUBES) self.o.assy.selwhat = 0 self.new = None self.o.selatom = None ...
"called once each time the mode is entered; should be called only by code in modes.py"
def init_gui(self): "called once each time the mode is entered; should be called only by code in modes.py"
"can be called many times during the mode; should be called only by code in modes.py"
if self.dont_update_gui: return
def update_gui(self): "can be called many times during the mode; should be called only by code in modes.py" # update the contents and current item of self.w.pasteComboBox # to match the clipboard self.w.pasteComboBox.clear() cx = 0 if self.o.assy.shelf.members: # We have something on the clipboard self.pastable = self....
self.pastable = self.o.assy.shelf.members[0] for ob,i in zip(self.o.assy.shelf.members, range(len(self.o.assy.shelf.members))):
members = list(self.o.assy.shelf.members) members.reverse() self.pastable = members[0] for ob,i in zip(members, range(len(members))):
def update_gui(self): "can be called many times during the mode; should be called only by code in modes.py" # update the contents and current item of self.w.pasteComboBox # to match the clipboard self.w.pasteComboBox.clear() cx = 0 if self.o.assy.shelf.members: # We have something on the clipboard self.pastable = self....
if self.o.assy.shelf.members: self.pastable = self.o.assy.shelf.members[cx]
if self.o.assy.shelf.members: try: self.pastable = self.o.assy.shelf.members[-1-cx] except: self.pastable = None else: self.pastable = None self.dont_update_gui = 1 try: self.o.assy.shelf.unpick() if self.pastable: self.pastable.pick() finally: self.dont_update_gui = 0 self.o.assy.mt.update() return
def setPaste(self): self.w.pasteP = True self.w.depositAtomDashboard.pasteRB.setOn(True) cx = self.w.pasteComboBox.currentItem() if self.o.assy.shelf.members: self.pastable = self.o.assy.shelf.members[cx]
self.o.assy.shelf.addmember(new)
self.o.assy.shelf.setopen() if self.o.assy.shelf.members: self.o.assy.shelf.members[0].addmember(new) else: self.o.assy.shelf.addmember(new)
def setHotSpot(self): """if called on a singlet, make that singlet the hotspot for the molecule. (if there's only one, it's automatically the hotspot) """ if self.o.selatom and self.o.selatom.element == Singlet: self.o.selatom.molecule.hotspot = self.o.selatom new = self.o.selatom.molecule.copy(None) new.move(-new.cen...
self.UpdateDashboard()
return
def setHotSpot(self): """if called on a singlet, make that singlet the hotspot for the molecule. (if there's only one, it's automatically the hotspot) """ if self.o.selatom and self.o.selatom.element == Singlet: self.o.selatom.molecule.hotspot = self.o.selatom new = self.o.selatom.molecule.copy(None) new.move(-new.cen...
assert atom1.sets == [ atomset.key ] assert atom2.sets == [ atomset.key ] assert atom3.sets == [ atomset.key ]
assert atom1.sets.tolist() == [ atomset.key ] assert atom2.sets.tolist() == [ atomset.key ] assert atom3.sets.tolist() == [ atomset.key ]
def test_atomset_gracefulRemoves(self): """\ del atomset[atom.key] """ atom1 = AtomBase() atom1.key = genkey() atom2 = AtomBase() atom2.key = genkey() atom3 = AtomBase() atom3.key = genkey() atomset = AtomSetBase() atomset.key = genkey() atomset.add(atom1) atomset.add(atom2) atomset.add(atom3) assert len(atomset) == 3 ...
assert atom1.sets == [ ] assert atom2.sets == [ ] assert atom3.sets == [ ]
assert atom1.sets.tolist() == [ ] assert atom2.sets.tolist() == [ ] assert atom3.sets.tolist() == [ ]
def test_atomset_gracefulRemoves(self): """\ del atomset[atom.key] """ atom1 = AtomBase() atom1.key = genkey() atom2 = AtomBase() atom2.key = genkey() atom3 = AtomBase() atom3.key = genkey() atomset = AtomSetBase() atomset.key = genkey() atomset.add(atom1) atomset.add(atom2) atomset.add(atom3) assert len(atomset) == 3 ...
exit_nh()
exit_nh(nh_socket, kill_nh)
def run_nh_simulation(assy, sim_id, sim_parms, sims_to_run, results_to_save): '''Run a Nano-Hive simulation on the part (assy). Only the MPQC_ESP plug-in used for creating an ESP Image file is supported in A7. sim_id is the simulation id of the simulation. It is used to construct the basename of all the simulation f...
"""return the position of an atom (or, any vector -- kluge, sorry)
"""return the position of an atom
def posn_str(self, atm): #bruce 041123 """return the position of an atom (or, any vector -- kluge, sorry) as a string for use in our status messages """ try: x,y,z = atm.posn() except AttributeError: x,y,z = atm # kluge to accept either arg type return "(%.2f, %.2f, %.2f)" % (x,y,z)
self.pivot = self.pivax = self.dragmol = None self.bareMotion(event)
def leftDown(self, event): """If there's nothing nearby, deposit a new atom. If cursor is on a singlet, deposit an atom bonded to it. If it is a real atom, drag it around. """ ## self.reset_drag_vars() # bruce 041124 bugfix-experiment [soon... ###@@@] a = self.o.selatom el = PeriodicTable[self.w.Element] self.modified...
elif len(a.molecule.atoms) == 1 + len(a.bonds): self.dragmol = a.molecule else: self.dragmol = a.molecule
def leftDown(self, event): """If there's nothing nearby, deposit a new atom. If cursor is on a singlet, deposit an atom bonded to it. If it is a real atom, drag it around. """ ## self.reset_drag_vars() # bruce 041124 bugfix-experiment [soon... ###@@@] a = self.o.selatom el = PeriodicTable[self.w.Element] self.modified...
""" drag the new atom around
""" drag a new atom or an old atom's molecule
def leftDrag(self, event): """ drag the new atom around
"""If there's nothing nearby, do nothing If cursor is on a
"""If there's nothing nearby, do nothing. If cursor is on a
def leftShiftDown(self, event): """If there's nothing nearby, do nothing If cursor is on a singlet, drag it around, rotating the atom it's bonded to if possible. If it is a real atom, drag it around. """ a = self.o.selatom if not a: return # now, if something was "lit up" self.modified = 1 self.o.assy.modified = 1 if ...
possible. If it is a real atom, drag it around.
possible. If it is a real atom, drag it around (but not the real atoms it's bonded to).
def leftShiftDown(self, event): """If there's nothing nearby, do nothing If cursor is on a singlet, drag it around, rotating the atom it's bonded to if possible. If it is a real atom, drag it around. """ a = self.o.selatom if not a: return # now, if something was "lit up" self.modified = 1 self.o.assy.modified = 1 if ...
""" drag the new atom around
""" drag the atom around
def leftShiftDrag(self, event): """ drag the new atom around
self.dragatom.molecule.shakedown()
def leftShiftUp(self, event): if not self.dragatom: return self.dragatom.molecule.shakedown() self.baggage = [] self.line = None self.bareMotion(event, True) if self.dragatom.is_singlet(): if self.o.selatom and self.o.selatom != self.dragatom: dragatom = self.dragatom selatom = self.o.selatom if selatom.is_singlet(): #...
m = a.molecule
def leftCntlDown(self, event): a = self.o.selatom if a: # this may change hybridization someday if a.element == Singlet: return m = a.molecule a.kill() if m.atoms: m.shakedown() else: m.kill() self.o.assy.modified = 1 self.w.update()
if m.atoms: m.shakedown() else: m.kill()
self.o.selatom = None
def leftCntlDown(self, event): a = self.o.selatom if a: # this may change hybridization someday if a.element == Singlet: return m = a.molecule a.kill() if m.atoms: m.shakedown() else: m.kill() self.o.assy.modified = 1 self.w.update()
(self._e_the_expr,) = self.args
self._e_args = self.args assert len(self.args) == 1
def _internal_Expr_init(self): (self._e_the_expr,) = self.args
res = self._e_the_expr._e_eval(env, ipath) print_compact_stack("debug_evals_of_Expr(%r) evals it to %r at: " % (self._e_the_expr, res))
the_expr = self._e_args[0] res = the_expr._e_eval(env, ipath) print_compact_stack("debug_evals_of_Expr(%r) evals it to %r at: " % (the_expr, res))
def _e_eval(self, env, ipath): res = self._e_the_expr._e_eval(env, ipath) print_compact_stack("debug_evals_of_Expr(%r) evals it to %r at: " % (self._e_the_expr, res)) return res
attr = Arg( type, optional default value )
attr = Arg( type, optional default value expr )
def Arg( type_expr, dflt_expr = _E_REQUIRED_ARG_, _attr_expr = None): ###IMPLEM _E_REQUIRED_ARG_ - do we tell _i_instance somehow? """To declare an Instance-argument in an expr class, use an assignment like this, directly in the class namespace: attr = Arg( type, optional default value ) Order matters (specifically, ex...
or the default value was used). If the default value is not supplied, there is no default value (i.e. the arg is required).
or the default value expr was used). If the default value expr is not supplied, there is no default value (i.e. the arg is required). If it is supplied, it is processed through canon_expr (as if Arg was an Expr constructor), unless it's one of the special case symbols (meant only for private use by this family of macro...
def Arg( type_expr, dflt_expr = _E_REQUIRED_ARG_, _attr_expr = None): ###IMPLEM _E_REQUIRED_ARG_ - do we tell _i_instance somehow? """To declare an Instance-argument in an expr class, use an assignment like this, directly in the class namespace: attr = Arg( type, optional default value ) Order matters (specifically, ex...
dflt_expr
dflt_expr will be asserted not None (kluge, since canon_expr could accept None), then passed through canon_expr
def _ArgOption_helper( attr_expr, argpos_expr, type_expr, dflt_expr ): """[private helper for Arg, Option, and maybe ArgOrOption] attr_expr should be None, or some sort of expr (in practice always _E_ATTR so far) that will get replaced by a constant_Expr for the current attr (in ExprsMeta's FormulaScanner), according t...
print("using debug_evals_of_Expr on held_dflt_expr %r, will it work?" % held_dflt_expr)
def _ArgOption_helper( attr_expr, argpos_expr, type_expr, dflt_expr ): """[private helper for Arg, Option, and maybe ArgOrOption] attr_expr should be None, or some sort of expr (in practice always _E_ATTR so far) that will get replaced by a constant_Expr for the current attr (in ExprsMeta's FormulaScanner), according t...
if self.modkey is not 'Delete':
if self.modkey != 'Shift+Control':
def leftDouble(self, event): # mark 060126. '''Double click event handler for the left mouse button. ''' if self.cursor_over_when_LMB_pressed == 'Empty Space': if self.modkey is not 'Delete': # Fixes bug 1503. mark 060218. deposited_obj = self.deposit_from_MMKit(self.getCoords(event)) # does win_update(). if deposited...
if self.modkey == 'Delete':
if self.modkey == 'Shift+Control':
def singletLeftDown(self, s, event): if self.modkey == 'Delete': self.cursor_over_when_LMB_pressed = 'Empty Space' self.select_2d_region(event) else: self.cursor_over_when_LMB_pressed = 'Singlet' self.singletSetup(s)
drawwirecube(self.color, a.molecule.basepos[a.index], rad)
drawwirecube(self.color, a.posn(), rad)
def draw(self, win, dispdef):
drawwirecube(self.color, a.molecule.basepos[a.index], rad)
drawwirecube(self.color, a.posn(), rad)
def draw(self, win, dispdef): for a in self.atoms: disp, rad = a.howdraw(dispdef) drawwirecube(self.color, a.molecule.basepos[a.index], rad)
self.Menu_spec_shift = [ ('(change pastable element:)', noop, 'disabled'), ('Carbon(sp3)', self.setCarbon_sp3), ('Carbon(sp2)', self.setCarbon_sp2), ('Hydrogen', self.w.setHydrogen), ('Oxygen', self.w.setOxygen), ('Nitrogen', self.w.setNitrogen) ]
def makeMenus(self): #bruce 050705 revised this to support bond menus "#doc" selatom, selobj = self.update_selatom_and_selobj( None) # bruce 050612 added this [as an update_selatom call] -- not needed before since bareMotion did it (I guess). # [replaced with update_selatom_and_selobj, bruce 050705] self.Menu_spec = [...
self.Menu_spec_control = [ ('Passivate', self.o.assy.modifyPassivate), ('Hydrogenate', self.o.assy.modifyHydrogenate), ('Dehydrogenate', self.o.assy.modifyDehydrogenate) ]
def makeMenus(self): #bruce 050705 revised this to support bond menus "#doc" selatom, selobj = self.update_selatom_and_selobj( None) # bruce 050612 added this [as an update_selatom call] -- not needed before since bareMotion did it (I guess). # [replaced with update_selatom_and_selobj, bruce 050705] self.Menu_spec = [...
for line in lines:
for line in lines[::-1]:
def get_energy_from_gms_outfile(filename): '''Returns a string containing the final energy value from a GAMESS OUT file. Works for both PC GAMESS and GAMESS-US. ''' # This now returns a return code (0=Success, 1=Failed) along with the energy. # The caller checks the return code. I'd like to ask Bruce if this is a good...
self.setCaption( jig.__class__.__name__ + " Properties")
jigtype_name = jig.__class__.__name__ from Utility import imagename_to_pixmap pixmap = imagename_to_pixmap(jigtype_name + "-border.png") self.setIcon(pixmap) self.setCaption(jigtype_name + " Properties")
def __init__(self, jig, glpane):
if env.prefs[ startupMode_prefs_key ] not in startup_modes: env.prefs[ startupMode_prefs_key ] = startup_modes[0] self.startup_mode_combox.setCurrentItem(startup_modes.index(env.prefs[ startupMode_prefs_key ]))
smode = env.prefs[ startupMode_prefs_key ] if smode not in startup_modes: smode = startup_modes[0] self.startup_mode_combox.setCurrentItem(startup_modes.index(smode))
def _setup_modes_page(self): ''' Setup widgets to initial (default or defined) values on the Modes page. ''' # Set the mode drop box to the current mode, # or "Select Chunks" if the mode is not in the "modes" list. if self.glpane.mode.modename in modes: self.mode_combox.setCurrentItem(modes.index(self.glpane.mode.moden...
todo("I'm pretty sure os.linesep is not used correctly here")
todo("I'm not sure os.linesep is used correctly here")
def readstring(self, lines): todo("I'm pretty sure os.linesep is not used correctly here") lines = lines.split(os.linesep) numAtoms = string.atoi(lines[0]) lines = lines[2:] for i in range(numAtoms): a = Atom() element, x, y, z = lines[i].split() a.elem = _PeriodicTable.index(element) a.x, a.y, a.z = map(string.atof, (...
numAtoms = string.atoi(lines[0])
numAtoms = string.atoi(lines[0].strip())
def readstring(self, lines): todo("I'm pretty sure os.linesep is not used correctly here") lines = lines.split(os.linesep) numAtoms = string.atoi(lines[0]) lines = lines[2:] for i in range(numAtoms): a = Atom() element, x, y, z = lines[i].split() a.elem = _PeriodicTable.index(element) a.x, a.y, a.z = map(string.atof, (...
env.history.message(self.cmd + "Creating nanotube. This may take a moment...") else: env.history.message(self.cmd + "Creating nanotube.")
env.history.message(self.cmd + "This may take a moment...")
def build_struct(self, name, params, position, mol=None, createPrinted=False): length, n, m, bond_length, zdist, xydist, \ twist, bend, members, endings, numwalls, spacing = params # This can take a few seconds. Inform the user. # 100 is a guess on my part. Mark 051103. if not createPrinted: # If it's a multi-wall tube...
"," + povpoint(c1) + "," + povpoint(c2) + "," +
"," + povpoint(c2) + "," + povpoint(c1) + "," +
def writepov(self, file, dispdef, col): disp=max(self.atom1.display, self.atom2.display) if disp == diDEFAULT: disp= dispdef color1 = self.atom1.element.color * V(1,1,-1) color2 = self.atom2.element.color * V(1,1,-1) a1pos = self.atom1.posn() a2pos = self.atom2.posn() vec = a2pos - a1pos len = 0.98 * vlen(vec) c1 = a1p...
print_compact_traceback("exception ignored: ")
print_compact_traceback("exception in testdraw.py's drawfunc call ignored: ")
def display_list_helper(self, glpane, drawfunc): "self needs .havelist and .displist" wantlist = USE_DISPLAY_LIST_OPTIM if wantlist and self.havelist == havelist_counters(glpane): ## == (disp, eltprefs, matprefs, drawLevel): # value must agree with set of havelist, below ##print "calllist (redraw %d)" % env.redraw_coun...
from exprs import basic, test
from exprs import basic from exprs import test
## def drawtext(text, color, pt, size, glpane)
testexpr_7c = Boxed(testexpr_7b)
testexpr_7c = Boxed(testexpr_7b) testexpr_7d = Boxed(testexpr_7c)
def draw(self, *args): #e or do this in some init routine? ## guy = self.args[0] ##### will this be an instance?? i doubt it guy = self.delegate print "guy = %r, guy._e_is_instance = %r" % (guy, guy._e_is_instance) ## attrs = self.args[1:] attrs = self.attrs if type(attrs) == type("kluge"): attrs = [attrs] printnim("ne...
testexpr = testexpr_7c
testexpr = testexpr_7d
def draw(self, *args): #e or do this in some init routine? ## guy = self.args[0] ##### will this be an instance?? i doubt it guy = self.delegate print "guy = %r, guy._e_is_instance = %r" % (guy, guy._e_is_instance) ## attrs = self.args[1:] attrs = self.attrs if type(attrs) == type("kluge"): attrs = [attrs] printnim("ne...
self.buildSourcePath = os.path.join(self.rootPath, self.appName)
raise AbstractMethod
def setupBuildSourcePath(self): self.buildSourcePath = os.path.join(self.rootPath, self.appName)
self.clean(self.rootPath, cleanAll = True)
clean(self.rootPath, cleanAll=True)
def createDirectories(self): """Create directories structure, return true if success""" if os.path.isdir(self.rootPath): self.clean(self.rootPath, cleanAll = True) else: os.mkdir(self.rootPath)
self.clean(cvsDir, True)
clean(cvsDir, True)
def removeCVSFiles(self, rootDir): """Remove all CVS files and the directory for any cvs checkout directory under <root>. """ for root, dirs, files in os.walk(rootDir): for name in dirs: if name == 'CVS': cvsDir = os.path.join(root, name) self.clean(cvsDir, True) os.rmdir(cvsDir)
def clean(self, rootPath, cleanAll=False): """Clean everything created temporarily""" for root, dirs, files in os.walk(rootPath, topdown=False): for name in files: if cleanAll: os.remove(os.path.join(root, name)) elif not (name.endswith('w32.exe') or name.endswith('.dmg') or name.endswith('.tar.gz')): os.remove(os.path...
def removeCVSFiles(self, rootDir): """Remove all CVS files and the directory for any cvs checkout directory under <root>. """ for root, dirs, files in os.walk(rootDir): for name in dirs: if name == 'CVS': cvsDir = os.path.join(root, name) self.clean(cvsDir, True) os.rmdir(cvsDir)
cadDir = os.path.join(os.getcwd(), "cad") if sourceDirectory: system("rm -rf " + cadDir) system("cp -r %s %s" % (os.path.join(sourceDirectory, "cad"), cadDir)) elif cvsTag: system("cvs -Q -z9 checkout -r %s cad/src/version.py" % cvsTag) else: system("cvs -Q -z9 checkout cad/src/version.py")
if not sourceDirectory: if cvsTag: system("cvs -Q -z9 checkout -r %s cad/src/version.py" % cvsTag) else: system("cvs -Q -z9 checkout cad/src/version.py")
def main(): shortargs = 'ho:i:s:t:v:p' longargs = ['help', 'outdir=', 'iconfile=', 'sourcedir=', 'tag=', 'version=', 'premature-exit'] try: opts, args = getopt.getopt(sys.argv[1:], shortargs, longargs) except getopt.GetoptError: usage() sys.exit(2) currentDir = os.getcwd() appName = "nanoENGINEER-1" rootDir = None if...
sys.path.append(os.path.join(cadDir, "src"))
sys.path.append(os.path.join(sourceDirectory, "cad", "src"))
def main(): shortargs = 'ho:i:s:t:v:p' longargs = ['help', 'outdir=', 'iconfile=', 'sourcedir=', 'tag=', 'version=', 'premature-exit'] try: opts, args = getopt.getopt(sys.argv[1:], shortargs, longargs) except getopt.GetoptError: usage() sys.exit(2) currentDir = os.getcwd() appName = "nanoENGINEER-1" rootDir = None if...
while answer not in ['yes', 'no']: answer = raw_input(("Do you want to use the existing directory %s? " + "All its contents will be erased (yes or no): ") % rootDir) if answer == 'no':
answer = raw_input(("The directory %s already exists. " + "Destroy it and all its contents? (yes or no): ") % rootDir) if answer.lower() != 'yes': sys.exit() clean(rootDir, cleanAll=True) if os.path.isdir(rootDir): if os.listdir(rootDir): print "Expected " + rootDir + " would be empty, but it isn't"
def main(): shortargs = 'ho:i:s:t:v:p' longargs = ['help', 'outdir=', 'iconfile=', 'sourcedir=', 'tag=', 'version=', 'premature-exit'] try: opts, args = getopt.getopt(sys.argv[1:], shortargs, longargs) except getopt.GetoptError: usage() sys.exit(2) currentDir = os.getcwd() appName = "nanoENGINEER-1" rootDir = None if...
builder.clean(cadDir, True) os.rmdir(cadDir)
def main(): shortargs = 'ho:i:s:t:v:p' longargs = ['help', 'outdir=', 'iconfile=', 'sourcedir=', 'tag=', 'version=', 'premature-exit'] try: opts, args = getopt.getopt(sys.argv[1:], shortargs, longargs) except getopt.GetoptError: usage() sys.exit(2) currentDir = os.getcwd() appName = "nanoENGINEER-1" rootDir = None if...
if sys.platform == "win32": builder.clean(rootDir) if os.path.isdir(rootDir) and not os.listdir(rootDir): os.rmdir(rootDir)
if True: clean(rootDir) if os.path.isdir(rootDir) and not os.listdir(rootDir): os.rmdir(rootDir)
def main(): shortargs = 'ho:i:s:t:v:p' longargs = ['help', 'outdir=', 'iconfile=', 'sourcedir=', 'tag=', 'version=', 'premature-exit'] try: opts, args = getopt.getopt(sys.argv[1:], shortargs, longargs) except getopt.GetoptError: usage() sys.exit(2) currentDir = os.getcwd() appName = "nanoENGINEER-1" rootDir = None if...
self.image108 = QPixmap(image108_data) self.image109 = QPixmap(image109_data) self.image110 = QPixmap(image110_data)
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.ccGraphiteAction = QAction(self,"ccGraphiteAction") self.ccGraphiteAction.setIconSet(QIconSet(self.image41))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.orient100Action.setIconSet(QIconSet(self.image42))
self.orient100Action.setIconSet(QIconSet(self.image41))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.orient110Action.setIconSet(QIconSet(self.image43))
self.orient110Action.setIconSet(QIconSet(self.image42))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.orient111Action.setIconSet(QIconSet(self.image44))
self.orient111Action.setIconSet(QIconSet(self.image43))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewFrontAction.setIconSet(QIconSet(self.image45))
self.setViewFrontAction.setEnabled(1) self.setViewFrontAction.setIconSet(QIconSet(self.image44))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewBackAction.setIconSet(QIconSet(self.image46))
self.setViewBackAction.setIconSet(QIconSet(self.image45))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewTopAction.setIconSet(QIconSet(self.image47))
self.setViewTopAction.setIconSet(QIconSet(self.image46))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewBottomAction.setIconSet(QIconSet(self.image48))
self.setViewBottomAction.setEnabled(1) self.setViewBottomAction.setIconSet(QIconSet(self.image47))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewRightAction.setIconSet(QIconSet(self.image49))
self.setViewRightAction.setIconSet(QIconSet(self.image48))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewLeftAction.setIconSet(QIconSet(self.image50))
self.setViewLeftAction.setIconSet(QIconSet(self.image49))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewHomeAction.setIconSet(QIconSet(self.image51))
self.setViewHomeAction.setIconSet(QIconSet(self.image50))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewRecenterAction.setIconSet(QIconSet(self.image52))
self.setViewRecenterAction.setIconSet(QIconSet(self.image51))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.jigsLinearMotorAction.setIconSet(QIconSet(self.image53))
self.jigsLinearMotorAction.setIconSet(QIconSet(self.image52))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsStartOverAction.setIconSet(QIconSet(self.image54))
self.toolsStartOverAction.setIconSet(QIconSet(self.image53))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsBackUpAction.setIconSet(QIconSet(self.image55))
self.toolsBackUpAction.setIconSet(QIconSet(self.image54))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyCopyBondAction.setIconSet(QIconSet(self.image56))
self.modifyCopyBondAction.setIconSet(QIconSet(self.image55))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyEdgeBondAction.setIconSet(QIconSet(self.image57))
self.modifyEdgeBondAction.setIconSet(QIconSet(self.image56))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyWeldAction.setIconSet(QIconSet(self.image58))
self.modifyWeldAction.setIconSet(QIconSet(self.image57))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyDehydrogenateAction.setIconSet(QIconSet(self.image59))
self.modifyDehydrogenateAction.setIconSet(QIconSet(self.image58))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispCPKAction.setIconSet(QIconSet(self.image60))
self.dispCPKAction.setIconSet(QIconSet(self.image59))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispDefaultAction.setIconSet(QIconSet(self.image61))
self.dispDefaultAction.setIconSet(QIconSet(self.image60))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispInvisAction.setIconSet(QIconSet(self.image62))
self.dispInvisAction.setIconSet(QIconSet(self.image61))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispLinesAction.setIconSet(QIconSet(self.image63))
self.dispLinesAction.setIconSet(QIconSet(self.image62))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispTubesAction.setIconSet(QIconSet(self.image64))
self.dispTubesAction.setEnabled(1) self.dispTubesAction.setIconSet(QIconSet(self.image63))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispVdWAction.setIconSet(QIconSet(self.image65))
self.dispVdWAction.setIconSet(QIconSet(self.image64))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewOrthoAction.setIconSet(QIconSet(self.image66))
self.setViewOrthoAction.setIconSet(QIconSet(self.image65))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewPerspecAction.setIconSet(QIconSet(self.image67))
self.setViewPerspecAction.setIconSet(QIconSet(self.image66))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsDepositAtomAction.setIconSet(QIconSet(self.image68))
self.toolsDepositAtomAction.setEnabled(1) self.toolsDepositAtomAction.setIconSet(QIconSet(self.image67))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsCookieCutAction.setIconSet(QIconSet(self.image69))
self.toolsCookieCutAction.setIconSet(QIconSet(self.image68))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsExtrudeAction.setIconSet(QIconSet(self.image70))
self.toolsExtrudeAction.setIconSet(QIconSet(self.image69))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsRevolveAction.setIconSet(QIconSet(self.image71))
self.toolsRevolveAction.setIconSet(QIconSet(self.image70))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsMirrorAction.setIconSet(QIconSet(self.image72))
self.toolsMirrorAction.setIconSet(QIconSet(self.image71))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsMirrorCircularBoundaryAction.setIconSet(QIconSet(self.image73)) self.toolsAlignToCommonAxisAction = QAction(self.toolsModeActionGroup,"toolsAlignToCommonAxisAction") self.toolsAlignToCommonAxisAction.setToggleAction(1) self.toolsAlignToCommonAxisAction.setIconSet(QIconSet(self.image74))
self.toolsMirrorCircularBoundaryAction.setIconSet(QIconSet(self.image72))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsMoviePlayerAction.setIconSet(QIconSet(self.image75))
self.toolsMoviePlayerAction.setIconSet(QIconSet(self.image73))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()