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
c289e93d
Commit
c289e93d
authored
May 30, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tabcomplete bahaviour on Windows
parent
f32c5868
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
pronsole.py
pronsole.py
+9
-4
No files found.
pronsole.py
View file @
c289e93d
...
@@ -9,10 +9,11 @@ if os.name=="nt":
...
@@ -9,10 +9,11 @@ if os.name=="nt":
READLINE
=
True
READLINE
=
True
try
:
try
:
import
readline
import
readline
except
:
try
:
try
:
import
pyreadline
readline
.
rl
.
mode
.
show_all_if_ambiguous
=
"on"
#config pyreadline on windows
except
:
except
:
pass
except
:
READLINE
=
False
#neither readline module is available
READLINE
=
False
#neither readline module is available
def
dosify
(
name
):
def
dosify
(
name
):
...
@@ -89,7 +90,11 @@ class pronsole(cmd.Cmd):
...
@@ -89,7 +90,11 @@ class pronsole(cmd.Cmd):
print
"Connect to printer"
print
"Connect to printer"
print
"connect <port> <baudrate>"
print
"connect <port> <baudrate>"
print
"If port and baudrate are not specified, connects to first detected port at 115200bps"
print
"If port and baudrate are not specified, connects to first detected port at 115200bps"
ports
=
self
.
scanserial
()
if
(
len
(
ports
)):
print
"Available ports: "
,
" "
.
join
(
ports
)
else
:
print
"No serial ports were automatically found."
def
complete_connect
(
self
,
text
,
line
,
begidx
,
endidx
):
def
complete_connect
(
self
,
text
,
line
,
begidx
,
endidx
):
if
(
len
(
line
.
split
())
==
2
and
line
[
-
1
]
!=
" "
)
or
(
len
(
line
.
split
())
==
1
and
line
[
-
1
]
==
" "
):
if
(
len
(
line
.
split
())
==
2
and
line
[
-
1
]
!=
" "
)
or
(
len
(
line
.
split
())
==
1
and
line
[
-
1
]
==
" "
):
...
...
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