Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pycgtool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Graham
pycgtool
Commits
08b193b3
Commit
08b193b3
authored
8 years ago
by
James Graham
Browse files
Options
Downloads
Patches
Plain Diff
Add better error messages in two cases
Using Python2 Terminal is too small for gui
parent
ede6ec50
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pycgtool.py
+6
-3
6 additions, 3 deletions
pycgtool.py
pycgtool/interface.py
+4
-1
4 additions, 1 deletion
pycgtool/interface.py
with
10 additions
and
4 deletions
pycgtool.py
+
6
−
3
View file @
08b193b3
...
@@ -3,9 +3,12 @@
...
@@ -3,9 +3,12 @@
import
argparse
import
argparse
import
sys
import
sys
try
:
from
pycgtool.pycgtool
import
main
,
map_only
from
pycgtool.pycgtool
import
main
,
map_only
from
pycgtool.interface
import
Options
from
pycgtool.interface
import
Options
from
pycgtool.functionalforms
import
FunctionalForms
from
pycgtool.functionalforms
import
FunctionalForms
except
SyntaxError
:
raise
RuntimeError
(
"
PyCGTOOL requires Python 3.2 or greater
"
)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
parser
=
argparse
.
ArgumentParser
(
description
=
"
Perform coarse-grain mapping of atomistic trajectory
"
)
parser
=
argparse
.
ArgumentParser
(
description
=
"
Perform coarse-grain mapping of atomistic trajectory
"
)
...
...
This diff is collapsed.
Click to expand it.
pycgtool/interface.py
+
4
−
1
View file @
08b193b3
...
@@ -146,7 +146,10 @@ class Options:
...
@@ -146,7 +146,10 @@ class Options:
for
i
,
(
key
,
value
)
in
enumerate
(
self
):
for
i
,
(
key
,
value
)
in
enumerate
(
self
):
window_keys
.
addstr
(
i
,
0
,
key
)
window_keys
.
addstr
(
i
,
0
,
key
)
try
:
text_edit_wins
.
append
(
window_vals
.
derwin
(
1
,
30
,
i
,
0
))
text_edit_wins
.
append
(
window_vals
.
derwin
(
1
,
30
,
i
,
0
))
except
curses
.
error
as
e
:
raise
RuntimeError
(
"
Your terminal is too small to fit the interface, please expand it
"
)
from
e
text_edit_wins
[
-
1
].
addstr
(
0
,
0
,
str
(
value
))
text_edit_wins
[
-
1
].
addstr
(
0
,
0
,
str
(
value
))
text_inputs
.
append
(
curses
.
textpad
.
Textbox
(
text_edit_wins
[
-
1
]))
text_inputs
.
append
(
curses
.
textpad
.
Textbox
(
text_edit_wins
[
-
1
]))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment