You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
362 B

# CASE 1 - from flask.ext.foo import bam --> from flask_foo import bam
# CASE 2 - from flask.ext import foo --> import flask_foo as foo
from redbaron import RedBaron
import sys
with open("test.py", "r") as source_code:
red = RedBaron(source_code.read())
print red.dumps()
# with open("code.py", "w") as source_code:
# source_code.write(red.dumps())