-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
7d5ace0
commit 3e98283
Showing
12 changed files
with
123 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
import sys | ||
|
||
import docopt | ||
|
||
|
||
DEMO_DOCOPT = """ | ||
""" | ||
Usage: | ||
demo <inp> | ||
""" | ||
|
||
import docopt | ||
|
||
|
||
def main(): | ||
args = docopt.docopt(DEMO_DOCOPT) | ||
args = docopt.docopt(__doc__) | ||
|
||
try: | ||
open(args['<inp>']) | ||
print(f"[DEMO] Args: {' '.join(sys.argv)}") | ||
except FileNotFoundError: | ||
print('[DEMO] Input file not found.') | ||
exit(1) | ||
|
||
path = ''.join(args['<inp>'].split('.')[:-1]) + '.outp' | ||
with open(path, 'x') as file: | ||
print(path) | ||
file.write('MCNP Output! :)') |
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
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
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,9 @@ | ||
from . import nps | ||
from . import clean | ||
from . import empty | ||
|
||
__all__ = [ | ||
'nps', | ||
'clean', | ||
'empty', | ||
] |
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import shutil | ||
import pathlib | ||
|
||
|
||
def main(path): | ||
path = pathlib.Path(path) | ||
|
||
for file_or_dir in path.rglob('*'): | ||
if file_or_dir.is_file(): | ||
file_or_dir.unlink() | ||
else: | ||
file_or_dir.rmdir() | ||
shutil.rmtree(file_or_dir) | ||
|
||
path.rmdir() |
File renamed without changes.
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
Oops, something went wrong.