This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#! /doesnotexist/python3 | ||
|
||
try: | ||
from sage_conf import * | ||
except ImportError: | ||
pass | ||
|
||
from sys import prefix as SAGE_VENV | ||
|
||
def _main(): | ||
from argparse import ArgumentParser | ||
from sys import exit, stdout | ||
parser = ArgumentParser() | ||
parser.add_argument('--version', help="show version", action="version", | ||
version='%(prog)s ' + VERSION) | ||
parser.add_argument("VARIABLE", nargs='?', help="output the value of VARIABLE") | ||
args = parser.parse_args() | ||
d = globals() | ||
if args.VARIABLE: | ||
stdout.write('{}\n'.format(d[args.VARIABLE])) | ||
else: | ||
for k, v in d.items(): | ||
if not k.startswith('_'): | ||
stdout.write('{}={}\n'.format(k, v)) | ||
|
||
if __name__ == "__main__": | ||
_main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters