Hi! I downloaded the KevinScript interpreter on Python. There is a packet structure. The author says that you need to run the REPL like this:

You can experiment with KS right away by using the REPL. Execute `src/ks.py` with no arguments. C:\programming\Github projects\KevinScript>src\ks.py >>> print("Hello, world!") ... Hello, world! 

But there is no ks.py file. It is written in setup.py

 from setuptools import setup, find_packages setup( name='KevinScript', version='1.0.0', packages=find_packages(), entry_points={ 'console_scripts': [ 'kevinscript=ks:main' ] } ) 

In init there is a REPL code and a main function. In main, it calls the main function. I try to run from (.) Like this:

 >python ks/__main__.py Но выходит ошибка: Traceback (most recent call last): File "ks/__main__.py", line 1, in <module> from ks import main ModuleNotFoundError: No module named 'ks' D:.(D:\Python_code\LRParserFromGitHub\KevinScript) | .gitignore | README.md | setup.cfg | setup.py | | +---ks | | eval_ast.py | | kobjects.py | | language.txt | | native_builtin_initialization.k | | tokens.txt | | __init__.py | | __main__.py | | | +---parser | | ast.py | | followset.py | | lex.py | | LRParser.py | | overview.txt | | parserExceptions.py | | parseRules.py | | prettyprint.py | | primitives.py | | SLRtable.py | | table.py | | util.py | | __init__.py | | | \---__pycache__ | __main__.cpython-36.pyc | +---samples | hello_world.k | prime_detector.k | \---tests test.py 
  • It's not clear how to run github.com/kms70847/KevinScript/issues/7 - andreymal
  • one
    Try python -m ks - andreymal
  • Thank you! It works that way. - Constantine
  • Please tell me (if this can be attributed to this topic). I made the file myOwnGram.py in the parser folder, which uses the function from util.py. How to start the file myOwnGram.py from (.). After all, the package structure should be preserved. python -m ks myOwnGram.py? - Constantine

0