Permalink
Browse files

Shell functions to list the Python imports in Oil.

This helps me figure out what to do to break the dependency on CPython.
  • Loading branch information...
Andy Chu
Andy Chu committed Jan 27, 2018
1 parent 12c8a6b commit 86df7680c06e2a3e884f8e9b76ae1d5c0ff0a2a6
Showing with 13 additions and 5 deletions.
  1. +1 −1 core/alloc_test.py
  2. +1 −1 core/libstr_test.py
  3. +1 −1 core/word_eval_test.py
  4. +1 −1 core/word_test.py
  5. +9 −1 scripts/count.sh
View
@@ -5,7 +5,7 @@
import unittest
import alloc # module under test
from core import alloc # module under test
class AllocTest(unittest.TestCase):
View
@@ -5,7 +5,7 @@
import unittest
import libstr # module under test
from core import libstr # module under test
class LibStrTest(unittest.TestCase):
View
@@ -11,7 +11,7 @@
import unittest
import word_eval # module under test
from core import word_eval # module under test
class WordEvalTest(unittest.TestCase):
View
@@ -5,7 +5,7 @@
import unittest
import word # module under test
from core import word # module under test
class WordTest(unittest.TestCase):
View
@@ -180,8 +180,16 @@ instructions() {
objdump -d $bin | cut -f3 | grep -oE "^[a-z]+" | sort | uniq -c | sort -n
}
hist() {
sort | uniq -c | sort -n
}
stdlib-imports() {
oil-osh-files | xargs grep --no-filename '^import' | hist
}
imports() {
grep --no-filename import */*.py | sort | uniq -c | sort -n
oil-osh-files | xargs grep --no-filename -w import | hist
}
# For the compiler, see what's at the top level.

0 comments on commit 86df768

Please sign in to comment.