GithubHelp home page GithubHelp logo

huawei_ch's People

Contributors

cnlhc avatar tarpelite avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

deamonyang

huawei_ch's Issues

关于源代码目录组织的问题

1.  将输入文本复制至如下目录
“SDK/SDK_python/CodeCraft-2019/config/car.txt”
“SDK/SDK_python/CodeCraft-2019/config/road.txt”
“SDK/SDK_python/CodeCraft-2019/config/cross.txt”
2.  执行如下命令进行运行:
“python CodeCraft-2019.py ../config/car.txt ../config/road.txt ../config/cross.txt ../config/answer.txt”

摘自 工程编译指导书-python

根据官方指导书中的声明, 我们可以得知 Python 运行的根目录是 SDK/SDK_python/CodeCraft-2019/src (因为 CodeCraft-2019.py在这个目录内)

鉴于 python 内置的 sys.path 环境变量会在顶部自动加入运行时的根目录并根据该目录进行module查询,因此我们在src目录下新建hwdata hwalgorighm 两个 sub-package, 并在import 时使用类似于 import hwdata.Cross as cr 的文法。

如果 linter 提示无法import,大概率是因为IDE自动将../SDK/ 而非 SDK/SDK_python/CodeCraft-2019/src 作为python运行的根目录,这会导致无法找到项目添加的模块。

  1. 对于Visual studio code 请考虑设置 PYTHONHOME环境变量
  2. 对于Pycharm 请将SDK/SDK_python/CodeCraft-2019/src 标记为 Sources Root

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.