Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snipper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
tuhe
snipper
Commits
bfd6aefe
Commit
bfd6aefe
authored
2 years ago
by
tuhe
Browse files
Options
Downloads
Patches
Plain Diff
Robust approach to python executable for virtual environments
parent
8af33d05
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/codesnipper.egg-info/PKG-INFO
+1
-1
1 addition, 1 deletion
src/codesnipper.egg-info/PKG-INFO
src/snipper/fix_i.py
+4
-2
4 additions, 2 deletions
src/snipper/fix_i.py
src/snipper/version.py
+1
-1
1 addition, 1 deletion
src/snipper/version.py
with
6 additions
and
4 deletions
src/codesnipper.egg-info/PKG-INFO
+
1
−
1
View file @
bfd6aefe
Metadata-Version: 2.1
Metadata-Version: 2.1
Name: codesnipper
Name: codesnipper
Version: 0.1.18.
5
Version: 0.1.18.
6
Summary: A lightweight framework for censoring student solutions files and extracting code + output
Summary: A lightweight framework for censoring student solutions files and extracting code + output
Home-page: https://lab.compute.dtu.dk/tuhe/snipper
Home-page: https://lab.compute.dtu.dk/tuhe/snipper
Author: Tue Herlau
Author: Tue Herlau
...
...
This diff is collapsed.
Click to expand it.
src/snipper/fix_i.py
+
4
−
2
View file @
bfd6aefe
...
@@ -2,6 +2,8 @@ import functools
...
@@ -2,6 +2,8 @@ import functools
import
textwrap
import
textwrap
from
snipper.legacy
import
block_process
from
snipper.legacy
import
block_process
from
snipper.block_parsing
import
full_strip
from
snipper.block_parsing
import
full_strip
import
sys
import
os
import
os
if
os
.
name
==
'
nt
'
:
if
os
.
name
==
'
nt
'
:
import
wexpect
as
we
import
wexpect
as
we
...
@@ -22,7 +24,7 @@ def rsession(analyzer, lines, extra):
...
@@ -22,7 +24,7 @@ def rsession(analyzer, lines, extra):
print
(
k
[
'
output
'
])
print
(
k
[
'
output
'
])
import
time
import
time
an
=
we
.
spawn
(
"
python
"
,
encoding
=
"
utf-8
"
,
timeout
=
20
)
an
=
we
.
spawn
(
sys
.
executable
,
encoding
=
"
utf-8
"
,
timeout
=
20
)
try
:
try
:
an
.
setwinsize
(
400
,
400
)
# set window size to avoid truncated output or input.
an
.
setwinsize
(
400
,
400
)
# set window size to avoid truncated output or input.
except
AttributeError
as
e
:
except
AttributeError
as
e
:
...
@@ -133,7 +135,7 @@ def run_i(lines, file, output):
...
@@ -133,7 +135,7 @@ def run_i(lines, file, output):
# an.setecho(True) # TH January 2023: Seems to fix an issue on linux with truncated lines. May cause problems on windows?
# an.setecho(True) # TH January 2023: Seems to fix an issue on linux with truncated lines. May cause problems on windows?
if
extra
[
'
python
'
]
is
None
:
if
extra
[
'
python
'
]
is
None
:
an
=
we
.
spawn
(
"
python
"
,
encoding
=
"
utf-8
"
,
timeout
=
20
)
an
=
we
.
spawn
(
sys
.
executable
,
encoding
=
"
utf-8
"
,
timeout
=
20
)
try
:
try
:
an
.
setwinsize
(
400
,
400
)
# set window size to avoid truncated output or input.
an
.
setwinsize
(
400
,
400
)
# set window size to avoid truncated output or input.
except
AttributeError
as
e
:
except
AttributeError
as
e
:
...
...
This diff is collapsed.
Click to expand it.
src/snipper/version.py
+
1
−
1
View file @
bfd6aefe
__version__
=
"
0.1.18.
5
"
__version__
=
"
0.1.18.
6
"
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