Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
8ca085a7
Commit
8ca085a7
authored
Jul 04, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed order of parsing startup config files and -e commands
parent
54e208a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
pronsole.py
pronsole.py
+12
-4
pronterface.py
pronterface.py
+0
-2
No files found.
pronsole.py
View file @
8ca085a7
...
...
@@ -359,8 +359,6 @@ class pronsole(cmd.Cmd):
del
rci
,
rco
def
preloop
(
self
):
if
not
self
.
rc_loaded
:
self
.
load_default_rc
()
print
"Welcome to the printer console! Type
\"
help
\"
for a list of available commands."
cmd
.
Cmd
.
preloop
(
self
)
...
...
@@ -1028,12 +1026,22 @@ class pronsole(cmd.Cmd):
def
parse_cmdline
(
self
,
args
):
import
getopt
opts
,
args
=
getopt
.
getopt
(
args
,
"c:e:
"
,
[
"conf="
,
"config=
"
])
opts
,
args
=
getopt
.
getopt
(
args
,
"c:e:
h"
,
[
"conf="
,
"config="
,
"help
"
])
for
o
,
a
in
opts
:
#print repr((o,a))
if
o
in
(
"-c"
,
"--conf"
,
"--config"
):
self
.
load_rc
(
a
)
elif
o
==
"-e"
:
elif
o
in
(
"-h"
,
"--help"
):
print
"Usage: "
+
sys
.
argv
[
0
]
+
' [-c filename [-c filename2 ... ] ] [-e "command" ...]'
print
" -c | --conf | --config - override startup .pronsolerc file"
print
" may chain config files, settings auto-save will go into last file in the chain"
print
' -e <command> - executes command after configuration/.pronsolerc is loaded'
print
" macros/settings from these commands are not autosaved"
sys
.
exit
()
if
not
self
.
rc_loaded
:
self
.
load_default_rc
()
for
o
,
a
in
opts
:
if
o
==
"-e"
:
self
.
processing_args
=
True
self
.
onecmd
(
a
)
self
.
processing_args
=
False
...
...
pronterface.py
View file @
8ca085a7
...
...
@@ -84,8 +84,6 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
custombuttons
=
[]
self
.
btndict
=
{}
self
.
parse_cmdline
(
sys
.
argv
[
1
:])
if
not
self
.
rc_loaded
:
self
.
load_default_rc
(
".pronsolerc"
)
customdict
=
{}
try
:
execfile
(
"custombtn.txt"
,
customdict
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment