⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 options.py

📁 CNC 的开放码,EMC2 V2.2.8版
💻 PY
字号:
#!/usr/bin/env python#    This is a component of AXIS, a front-end for emc#    Copyright 2004, 2005, 2006 Jeff Epler <jepler@unpythonic.net>##    This program is free software; you can redistribute it and/or modify#    it under the terms of the GNU General Public License as published by#    the Free Software Foundation; either version 2 of the License, or#    (at your option) any later version.##    This program is distributed in the hope that it will be useful,#    but WITHOUT ANY WARRANTY; without even the implied warranty of#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#    GNU General Public License for more details.##    You should have received a copy of the GNU General Public License#    along with this program; if not, write to the Free Software#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USAimport nf, osfor candidate in 'share/emc/tcl', 'tcl':    EMC_TCL = os.path.join(nf.PREFIX, candidate, 'emc.tcl')    if os.path.exists(EMC_TCL): breakoptions = '''. configure -bg #d9d9d9set BASE_FONT [emc::standard_font]set FIXED_FONT [emc::standard_fixed_font]option add *highlightBackground #d9d9d9 $OPTIONLEVELoption add *background #d9d9d9 $OPTIONLEVELoption add *foreground black $OPTIONLEVELoption add *Button.borderWidth 2 $OPTIONLEVELoption add *Button.font $BASE_FONT $OPTIONLEVELoption add *Checkbutton.borderWidth 1 $OPTIONLEVELoption add *Checkbutton.font $BASE_FONT $OPTIONLEVELoption add *Entry.background white $OPTIONLEVELoption add *Entry.borderWidth 2 $OPTIONLEVELoption add *Entry.font $BASE_FONT $OPTIONLEVELoption add *Entry.selectBackground #08246b $OPTIONLEVELoption add *Entry.selectForeground white $OPTIONLEVELoption add *Frame.borderWidth 0 $OPTIONLEVELoption add *Hierbox.borderWidth 2 $OPTIONLEVELoption add *Hierbox.selectBackground #08246b $OPTIONLEVELoption add *Hierbox.selectForeground white $OPTIONLEVELoption add *Label.font $BASE_FONT $OPTIONLEVELoption add *Label.borderWidth 1 $OPTIONLEVELoption add *Listbox.background white $OPTIONLEVELoption add *Listbox.font $BASE_FONT $OPTIONLEVELoption add *Listbox.borderWidth 2 $OPTIONLEVELoption add *Listbox.selectBackground #08246b $OPTIONLEVELoption add *Listbox.selectForeground white $OPTIONLEVELoption add *Menu.activeBorderWidth 0 $OPTIONLEVELoption add *Menu.borderWidth 1 $OPTIONLEVELoption add *Menu.font $BASE_FONT $OPTIONLEVELoption add *Menu.activeBackground #08246b $OPTIONLEVELoption add *Menu.activeForeground white $OPTIONLEVELoption add *Menubutton.borderWidth 1 $OPTIONLEVELoption add *Menubutton.font $BASE_FONT $OPTIONLEVELoption add *Menubutton.indicatorOn 1 $OPTIONLEVELoption add *Menubutton.relief raised $OPTIONLEVELoption add *Message.borderWidth 1 $OPTIONLEVELoption add *Message.font $BASE_FONT $OPTIONLEVELoption add *Radiobutton.borderWidth 1 $OPTIONLEVELoption add *Radiobutton.font $BASE_FONT $OPTIONLEVELoption add *Scrollbar.borderWidth 2 $OPTIONLEVELoption add *Scrollbar.takeFocus 0 $OPTIONLEVELoption add *Scrollbar.troughColor #d9d9d9 $OPTIONLEVELoption add *Scrollbar.elementBorderWidth 2 $OPTIONLEVELoption add *Text.background white $OPTIONLEVELoption add *Text.borderWidth 2 $OPTIONLEVELoption add *Text.font $FIXED_FONT $OPTIONLEVELoption add *Text.selectBackground #08246b $OPTIONLEVELoption add *Text.selectForeground white $OPTIONLEVELoption add *Labelframe.borderWidth 2 $OPTIONLEVELoption add *Labelframe.relief groove $OPTIONLEVELoption add *Labelframe.font $BASE_FONT $OPTIONLEVELoption add *work.borderWidth 3 $OPTIONLEVELoption add *buttons*Button.default normal $OPTIONLEVELoption add *Vspace.height 6 $OPTIONLEVELoption add *Hspace.width 20 $OPTIONLEVELoption add *Vrule.borderWidth 1 $OPTIONLEVELoption add *Vrule.relief sunken $OPTIONLEVELoption add *Vrule.width 2 $OPTIONLEVELoption add *Hrule.borderWidth 1 $OPTIONLEVELoption add *Hrule.relief sunken $OPTIONLEVELoption add *Hrule.height 2 $OPTIONLEVELoption add *Togl.back #000 startupFileoption add *Togl.dwell #ff8080 startupFileoption add *Togl.m1xx #8080ff startupFileoption add *Togl.straight_feed #ffffff startupFileoption add *Togl.arc_feed #ffffff startupFileoption add *Togl.traverse #4c8080 startupFileoption add *Togl.backplotjog yellow startupFileoption add *Togl.backplotfeed #c04040 startupFileoption add *Togl.backplotarc #c04080 startupFileoption add *Togl.backplottraverse #4c8080 startupFileoption add *Togl.backplottoolchange orange startupFileoption add *Togl.backplotprobing purple startupFileoption add *Togl.backplotjog_alpha .75 startupFileoption add *Togl.backplotfeed_alpha .75 startupFileoption add *Togl.backplotarc_alpha .75 startupFileoption add *Togl.backplottraverse_alpha .25 startupFileoption add *Togl.backplottoolchange_alpha .25 startupFileoption add *Togl.backplotprobing_alpha .75 startupFileoption add *Togl.selected #00ffff startupFileoption add *Togl.overlay_foreground #ffffff startupFileoption add *Togl.overlay_alpha .75 startupFileoption add *Togl.overlay_background #000000 startupFileoption add *Togl.label_limit #ff353a startupFileoption add *Togl.label_ok #ff8287 startupFileoption add *Togl.small_origin #00ffff startupFileoption add *Togl.axis_x #33ff33 startupFileoption add *Togl.axis_y #ff3333 startupFileoption add *Togl.axis_z #3333ff startupFileoption add *Togl.tool_diffuse #999999 startupFileoption add *Togl.tool_ambient #666666 startupFileoption add *Togl.tool_light_x 1 startupFileoption add *Togl.tool_light_y -1 startupFileoption add *Togl.tool_light_z 1 startupFileoption add *Togl.tool_alpha .2 startupFileoption add *Togl.lathetool #cccccc startupFileoption add *Togl.lathetool_alpha .1 startupFile'''import commands, sysdef install(root = None):    if root is None: root = Tkinter._default_root    o = root.option_get("optionLevel", "Level") or "interactive"    if hasattr(root, 'tk'): root = root.tk    root.call('source', EMC_TCL)    root.call('set', 'OPTIONLEVEL', o)    root.call('eval', options)# vim:sw=4:sts=4:et:ts=8:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -