Skip to content

Commit

Permalink
py3
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlei committed May 25, 2018
1 parent aac946d commit 245d9c8
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
6 changes: 4 additions & 2 deletions smop/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

import logging
logger = logging.getLogger(__name__)
import node,options
from node import extend,exceptions

from . import node
from . import options
from . node import extend,exceptions

indent = " "*4

Expand Down
2 changes: 1 addition & 1 deletion smop/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
import ply.lex as lex
from ply.lex import TOKEN
import options
from . import options


tokens = [
Expand Down
5 changes: 2 additions & 3 deletions smop/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
from . import parse
from . import resolve
from . import backend
from version import __version__

from . import version

def print_header(fp):
if options.no_header:
return
print("# Running Python %s" % sys.version, file=fp)
print("# Generated with SMOP ", __version__, file=fp)
print("# Generated with SMOP ", version.__version__, file=fp)
print("from libsmop import *", file=fp)
print("#", options.filename, file=fp)

Expand Down
5 changes: 3 additions & 2 deletions smop/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

from __future__ import print_function
from collections import namedtuple
from recipes import recordtype
import copy,sys,inspect
import options

from . recipes import recordtype
from . import options

# def preorder(u):
# if isinstance(u,traversable):
Expand Down
4 changes: 3 additions & 1 deletion smop/options.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import sys
import argparse,textwrap
from textwrap import dedent
from version import __version__

from . import version
from . version import __version__

parser = argparse.ArgumentParser(
"smop",
Expand Down
12 changes: 6 additions & 6 deletions smop/parse.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# SMOP compiler -- Simple Matlab/Octave to Python compiler
# Copyright 2011-2016 Victor Leikehman

import ply.yacc as yacc
import lexer
from lexer import tokens, raise_exception
import node
from node import exceptions
import options
from ply import yacc
from . import lexer
from . lexer import tokens, raise_exception
from . import node
from . node import exceptions
from . import options

# ident properties (set in parse.py)
# ----------------------------------
Expand Down
5 changes: 2 additions & 3 deletions smop/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@

import copy

import node
from node import extend
import networkx as nx
from . import node
from . node import extend


def graphviz(t, fp, func_name):
Expand Down
2 changes: 1 addition & 1 deletion smop/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__='0.39.1'
__version__='0.39.1-3-gaac946d'

0 comments on commit 245d9c8

Please sign in to comment.