Files
OctoPrint/run
T
MirceaDan e0543de8ef print is a function + header
made print a function and added imports from future and encoding
2018-12-02 02:30:47 -08:00

25 lines
660 B
Python
Executable File

#!/usr/bin/env python2
# coding=utf-8
from __future__ import absolute_import, division, print_function
import os
import sys
basedir = os.path.dirname(os.path.realpath(__file__))
old = os.path.join(basedir, "octoprint")
if os.path.exists(old):
# rename left-overs from old file structure
print("""
Found left-overs from old file structure, renaming to
"octoprint.backup". Please remove this manually (I don't
dare to do so myself since you might have changes in there
I don't know anything about).
""")
os.rename(old, os.path.join(basedir, "octoprint.backup"))
sys.path.insert(0, os.path.join(basedir, "src"))
import octoprint
octoprint.main()