开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 0

qpython-android/qpython.org

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
master
master
分支 (1)
master
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
master
index.html 6.46 KB
一键复制 编辑 原始数据 按行查看 历史
River 提交于 2020年01月25日 12:13 +08:00 . Update style
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" lang="en-US">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html lang="en-US">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Quick Start | QPyPI</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="https://qpython.com/qrcode/wp-content/themes/twentyeleven/style.css" />
<script type='text/javascript' src='//code.jquery.com/jquery-1.8.3.min.js'></script>
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}
button {
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
color: #ffffff;
background-color: #5cb85c;
border-color: #4cae4c;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
white-space: nowrap;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
</style>
</head>
<body class="page page-id-472 page-template-default single-author singular one-column content" style='background:white'>
<div id="page" class="hfeed">
<header id="branding" role="banner" style='border-top:0px'>
<nav id="access" role="navigation">
<div class="menu"></div>
</nav><!-- #access -->
</header><!-- #branding -->
<div id="main" style='padding-top:0px'>
<div id="primary">
<div id="content" role="main">
<article id="post-472" class="post-472 page type-page status-publish hentry">
<header class="entry-header"><h1 class="entry-title">Quick Start</h1></header><!-- .entry-header -->
<div class="entry-content" style='padding:0px'>
<div>
<h2>A hands-on introduction to Python for beginning programmers</h2>
<p>If you are a new guy to QPython, you should watch the tutorial video and just follow the steps to learn how to run script with QPython
</p>
<div style='text-align:center'><button style="display:inline" type="submit" value="" class="btn_c" id="step5-btn">Watch Tutorial</button></div>
</div>
<div style="padding-top:30px">
<h2>Running with Console</h2>
<p>Running QPython&#8217;s simple script with console model</p>
<pre style="box-shadow:inset 0 1px 1px rgba(0,0,0,0.1);border:1px solid #ddd" id="step1-code">#qpy:2
#qpy:console
#qpy:http://qpython.com/s/qpy-sample.py
class Calculator(object):
#define class to simulate a simple calculator
def __init__ (self):
#start with zero
self.current = 0
def add(self, amount):
#add number to current
self.current += amount
def getCurrent(self):
return self.current
myBuddy = Calculator() # make myBuddy into a Calculator object
myBuddy.add(2) #use myBuddy's new add method derived from the Calculator class
print(myBuddy.getCurrent()) #print myBuddy's current instance variable
</pre>
<div style='text-align:center'><button style="display:inline" type="submit" value="" class="btn_c" id="step1-btn">Run ...</button></div>
</div>
<div style="padding-top:30px">
<h2>Running with Kivy</h2>
<p>Running QPython&#8217;s script with GUI model ( Kivy library )</p>
<pre style="box-shadow:inset 0 1px 1px rgba(0,0,0,0.1);border:1px solid #ddd" id="step2-code">#qpy:2
#qpy:kivy
#qpy:http://qpython.com/s/qpy-guisample.py
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
# display a button with the text : Hello QPython
return Button(text='Hello QPython')
TestApp().run()
</pre>
<div style='text-align:center'><button style="display:inline" type="submit" value="" class="btn_c" id="step2-btn">Run ...</button></div>
</div>
<div style="padding-top:30px">
<h2>Running as Web App</h2>
<p>Running Web App with QPython</p>
<pre style="box-shadow:inset 0 1px 1px rgba(0,0,0,0.1);border:1px solid #ddd" id="step6-code">#qpy:2
#qpy:webapp:Hello Qpython
#qpy://localhost:8080/hello
"""
This is a sample for qpython webapp
"""
from bottle import route, run
@route('/hello')
def hello():
return "Hello World!"
run(host='localhost', port=8080)</pre>
<div style='text-align:center'><button style="display:inline" type="submit" value="Run ..." class="btn_c" id="step6-btn">Run ...</button></div>
</div>
<div style='padding:20px'></div>
<hr />
<div style='padding:20px'></div>
<div style='text-align:center'><button style="display:inline" type="submit" value="" class="btn_c" id="step7-btn">Donate author</button></div>
<p style='text-align:center'><span id='total'>0</span> pepole donate.Thank you for donating, which should encourage author greatly</p>
<script>
var milib;
if (milib==undefined) {
var milib = function(){
};
milib.qeditor = function(str){
alert('please open it with QPython browser')
};
milib.a8playVideoFromGW= function(url){
window.open(url)
};
milib.qpylibinstall = function(cat,url,target){
window.open(url)
};
milib.gotoIfPay = function(url, packageId, packageUrl){
window.open(url)
};
} else {
}
$(document).ready(function() {
$('#step7-btn').click(function(e){
milib.openPurchaseActivity('quick-guide');
});
$('#step1-btn').click(function(e){
milib.qeditor($('#step1-code').html())
});
$('#step2-btn').click(function(e){
milib.qeditor($('#step2-code').html())
});
$('#step6-btn').click(function(e){
milib.qeditor($('#step6-code').html())
});
$('#step3-btn').click(function(e){
location.href='http://packages.qpython.org'
});
$('#step4-btn').click(function(e){
location.href='http://wiki.qpython.org'
});
$('#step5-btn').click(function(e){
milib.openUrl("https://m.youtube.com/results?q=python+programming&#038;sm=3");
//milib.a8playVideoFromGW('http://www.youtube.com/watch?v=72RKMMyLxS8')
//milib.a8playVideoFromGW('http://www.youtube.com/watch?v=N-ae8Q_7iCA')
});
var total = milib.getPurchaseNumber('quick-start');
$('#total').html(total)
});
</script></p>
</div><!-- .entry-content -->
<footer class="entry-meta"></footer><!-- .entry-meta -->
</article><!-- #post-472 -->
<div id="comments"></div><!-- #comments -->
</div><!-- #content -->
</div><!-- #primary -->
</div><!-- #main -->
</div><!-- #page -->
</body>
</html>
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

QPython contributor & sugguestion & question homepage
暂无标签
Apache-2.0
使用 Apache-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/qpython-android/qpython.org.git
git@gitee.com:qpython-android/qpython.org.git
qpython-android
qpython.org
qpython.org
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /