lines = text.splitlines()
# First read all include statements
for i in range(len(lines)):
lines = text.splitlines()
# First read all include statements
for i in range(len(lines)):
if shortname:
# Check if code is to be typeset as static
# Markdown code (e.g., shortname=py-t)
if shortname:
# Check if code is to be typeset as static
# Markdown code (e.g., shortname=py-t)
- filename = filename[:-3] + '.ipynb'
- with open(filename, 'w') as f:
+ outputfile = inputfile[:-3]+'.ipynb' if outputfile == '-' else outputfile
+ with open(outputfile, 'w') as f: