Skip to content

Commit

Permalink
Import improvements
Browse files Browse the repository at this point in the history
and the possibility to run the code in 2.7 even without installing the
future module (though it is not recommended to not install it)
  • Loading branch information
arjunane authored and arjunane committed May 20, 2016
1 parent f775989 commit b204509
Show file tree
Hide file tree
Showing 8 changed files with 13,488 additions and 6 deletions.
15 changes: 9 additions & 6 deletions code/osmTGmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,31 @@

# Imports Database Modules

from builtins import input

import psycopg2
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT as _il # Needed for creating Databases

import subprocess
import os
import io

import datetime
import sys
import stat
import platform

if (sys.version_info > (3, 0)):
# Python 3 import
# Python 3 only import
import urllib.request
else:
# Python 2 import
# Python 2 only import
import urllib
from urllib2 import urlopen

try:
from builtins import input #First check if future module has been installed
except ImportError:
if hasattr(__builtins__, 'raw_input'):
input=raw_input
import io

#import shutil

import general_funcs
Expand Down
1,331 changes: 1,331 additions & 0 deletions results/2_branch_data.csv

Large diffs are not rendered by default.

896 changes: 896 additions & 0 deletions results/2_bus_data.csv

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions results/2_dcline_data.csv

Large diffs are not rendered by default.

644 changes: 644 additions & 0 deletions results/2_nuts3_subst.csv

Large diffs are not rendered by default.

8,285 changes: 8,285 additions & 0 deletions results/2_plz_subst.csv

Large diffs are not rendered by default.

1,840 changes: 1,840 additions & 0 deletions results/2_problem_log.csv

Large diffs are not rendered by default.

477 changes: 477 additions & 0 deletions results/2_substations.csv

Large diffs are not rendered by default.

0 comments on commit b204509

Please sign in to comment.