Skip to content
Snippets Groups Projects
Commit 8d5134a9 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[enh] make redbaron.py executable for fnu

parent 61f9d28c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -804,3 +804,17 @@ class HelpLexer(RegexLexer):
(r'\s+', Text),
]
}
if __name__ == '__main__':
if not len(sys.argv[1:]):
print("Give me a filename as first argument")
sys.exit(1)
from IPython.terminal.embed import InteractiveShellEmbed
red = RedBaron(open(sys.argv[1]).read())
shell = InteractiveShellEmbed()
shell.push("a,RedBaron,red", interactive=True)
shell()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment