Coder Social home page Coder Social logo

kbengine-python-tips's Introduction

KBEngine-Python-Tips

github地址(海外):https://github.com/likecg2010/KBEngine-Python-Tips

开源**地址(**镜像):http://git.oschina.net/likecg/KBEngine-Python-Tips

这个项目是为了给KBEngine服务端编写Python脚本的时候,让IDE有语法提示。

1.用法

1.1下载项目之后,把tips目录下的所有文件拷贝到python安装目录的Lib下即可使用,比如windows平台上的,C:\Python34\Lib。

1.2使用Python IDE编辑器就可以出现语法提示了。

1.3写Baseapp的python脚本的时候,导入请写

from BaseApp import KBEngine #IDE语法提示时候用,放入服务端时候,注释掉这行

#import KBEngine #放入服务端时候,启用这行

语法提示的时候请用第一行的导入语句,完成脚本编写之后,注释掉,用启用第二行的语句。因为实际源于KBEngine模块

1.4写Cellapp的python脚本的时候,导入请写

from CellApp import KBEngine #IDE语法提示时候用,放入服务端时候,注释掉这行

#import KBEngine #放入服务端时候,启用这行

语法提示的时候请用第一行的导入语句,完成脚本编写之后,注释掉,用启用第二行的语句。因为实际源于KBEngine模块

1.5建议是使用Pycharm做Python IDE编辑器,提示效果最好,可以提高开发效率。

2.Pycharm语法提示效果

2.1 想要重写继承父类的子类的函数,鼠标右键Generate,可以选择重写哪个函数。

2.1图

列表列出父类可供重写的方法

点击想要重写的方法,Pycharm生成重写的方法

2.2 调用父类函数,可以语法提示

2.2图 语法提示效果

2.3 在函数上按住Ctrl+Q键可以看到函数的相关文档

2.3图 文档提示效果

**备注,项目中的两个Python脚本文件只是用于IDE提示,里面只是函数的签名和文档,没有实际运行的效果,如果项目存在错漏,请大家帮助完善。

kbengine-python-tips's People

Contributors

likecg2010 avatar

Watchers

 avatar

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.