diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index de5fc53..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index d47662b..fe46c1e 100755 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,12 @@ nosetests.xml .pydevproject .log + +.idea +qpython-docs/venv/* +qpython-docs/build/* +qpython-docs/static/* +venv +site +.DS_Store +qpython diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..381bb57 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,107 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This is the QPython website and documentation repository (www.qpython.org). QPython is a Python script engine for Android devices. The site is built with [Sphinx](https://www.sphinx-doc.org/) using reStructuredText (.rst) source files. + +## Build Commands + +All build commands should be run from the `qpython-docs/` directory: + +```bash +cd qpython-docs +``` + +### Development Build (Local Testing) + +Build HTML documentation for local testing: + +```bash +make html +``` + +Output will be in `qpython-docs/build/html/`. Open `build/html/index.html` in a browser to preview. + +### Production Build (Deployment) + +Build the full site including analytics, static file processing, and copy to the deployment directory: + +```bash +./build.sh +``` + +This script: +1. Removes the existing `docs/` folder at the repository root +2. Runs `make html` to build the documentation +3. Adds Google Analytics and Facebook comments via `add-analytics.py` +4. Renames `_static/` to `static/` and `_images/` to `images/` +5. Copies additional static files (CNAME, favicon.ico, index.html, privacy pages, etc.) +6. Outputs final site to `/docs/` (which is deployed via GitHub Pages) + +### Other Useful Commands + +```bash +make clean # Remove build artifacts +make linkcheck # Check for broken external links +make doctest # Run doctests in documentation +``` + +## Project Architecture + +### Directory Structure + +``` +qpython-docs/ +├── source/ # Documentation source files (.rst) +│ ├── document.rst # Main toctree (entry point) +│ ├── conf.py # Sphinx configuration +│ ├── _static/ # Static assets (CSS, images) +│ ├── en/ # English documentation +│ │ ├── guide.rst +│ │ ├── faq.rst +│ │ └── ... +│ ├── zh/ # Chinese documentation +│ └── qpython_theme/ # Custom Sphinx theme +│ └── __init__.py +├── build.sh # Production build script +├── add-analytics.py # Post-processor for analytics injection +├── extra.txt # Analytics code template +├── requirements.txt # Python dependencies +└── Makefile # Sphinx build commands + +docs/ # Built site (deployment target) +├── index.html # Site homepage +├── document.html # Documentation homepage +├── en/ # Built English docs +├── _sources/ # Source archives (for Sphinx) +└── ... +``` + +### Key Files + +- **`qpython-docs/source/conf.py`**: Sphinx configuration including theme (`qpython_theme`), version, and extensions +- **`qpython-docs/source/document.rst`**: Main documentation entry point with toctree +- **`qpython-docs/build.sh`**: Production build script that processes the Sphinx output and prepares it for deployment +- **`qpython-docs/extra.txt`**: Template for injecting Google Analytics and Facebook comments into HTML +- **`docs/CNAME`**: Configures custom domain (www.qpython.org) for GitHub Pages + +### Custom Theme + +The documentation uses a custom Sphinx theme located at `qpython-docs/source/qpython_theme/`. The theme path is registered in `conf.py` via the `qpython_theme` package. + +### Documentation Languages + +- English: `qpython-docs/source/en/` +- Chinese: `qpython-docs/source/zh/` + +Each language has its own toctree structure. The master document (`document.rst`) includes the English guide by default and links to Chinese content via `zhindex.rst`. + +### Deployment + +The `docs/` folder at the repository root is the deployment target. It is served via GitHub Pages. After making changes: + +1. Run `./build.sh` to rebuild the site +2. Commit the changes in both `qpython-docs/source/` (source) and `docs/` (built output) +3. Push to deploy diff --git a/README.md b/README.md index 29bef17..9f3d368 100755 --- a/README.md +++ b/README.md @@ -1,58 +1,9 @@ -# QPython Project -

+# About -Welcome to read the QPython guide! +QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. -QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. It’s Python on Android! +This is the www.qpython.org website and documentation's project. +## More information -QPython has several millions users in the world already, it's a great project for programming users, welcome to join us for contributing to this project NOW. - - -What's NEW ------------------------- -QPython project include the QPython https://play.google.com/store/apps/details?id=org.qpython.qpy and QPython3 https://play.google.com/store/apps/details?id=org.qpython.qpy3 applications. - -QPython application is using the **Python 2.7.2** , and QPython application is using the **Python 3.2.2** . - - -QPython's newest version is 1.3.0 (Released on 2017/3/20) , QPython3's newest version is 1.0.2 (Released on 2017/3/29), New versions include many amazing features, please upgrade to the newest version as soon from google play, amazon appstore etc. - - -Thanks these guys who are contributing ----------------------------------------- -They are pushing on the QPython project moving forward. - -River, Mae, Zoom.Quiet, MathiasLuo, liyuanrui, Kyle kersey ... - - -Do you want to join the great QPython team ? You could Ask qustions on twitter https://twitter.com/qpython or email us mailto:support@qpython.org. -And you could fork us on github https://github.com/qpython-android/qpython and send pull request. - - -QPython Communities ----------------------- -**There are many active QPython communities where you could meet the QPython users like you** - -* Join Facebook community https://www.facebook.com/groups/qpython -* Join Google group https://groups.google.com/forum/#!forum/qpython -* Join Gitter chat https://gitter.com/qpython-android/qpython -* Join G+ community https://plus.google.com/communities/111759148772865961493 -* QPython on Stackoverflow http://stackoverflow.com/questions/tagged/qpython - -**And you could talk to us through social network** - -* Like us on facebook https://www.facebook.com/QPython -* Follow us on twitter https://twitter.com/qpython - -* Report issue https://github.com/qpython-android/qpython/issues -* Email us mailto:support@qpython.org - - -Support -------------- -We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implemented soon for we lack resources. - -So if you have any issue need the core developer team to solve with higher priority, you could try the https://www.bountysource.com . - -**It's the official QPython Users & Contributors' Guide, please follow http://www.qpython.org for more information.** +Please visit [QPython Project Readme](https://github.com/qpython-android/qpython/blob/master/README.md) diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..80c0b04 --- /dev/null +++ b/build.sh @@ -0,0 +1,121 @@ +#!/bin/bash + +# Build script for QPython documentation +# Supports both English and Chinese + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" + +PYTHON="python3.12" + +echo "Building QPython documentation..." +echo "" + +# Clean previous build +echo "Cleaning previous build..." +rm -rf site + +# Build English site +echo "Building English site..." +$PYTHON -m mkdocs build + +# Build Chinese site +echo "Building Chinese site..." +$PYTHON -m mkdocs build -f mkdocs-zh.yml + +# Create root index.html +echo "Creating root index.html..." +cat > site/index.html << 'EOF' + + + + + QPython Documentation + + + + +
+ +

Choose your language / 选择语言

+
+ English + 中文 +
+
+ + +EOF + +# Copy additional HTML files from source to site +if ls source/*.html 1> /dev/null 2>&1; then + echo "Copying additional HTML files..." + cp source/*.html site/ +fi + +# Copy CNAME file if exists +if [ -f source/CNAME ]; then + echo "Copying CNAME file..." + cp source/CNAME site/ +fi + +# Remove "Made with Material for MkDocs" footer from all HTML files +echo "Removing MkDocs Material footer..." +find site -name "*.html" -exec sed -i '/Made with/,/<\/a>/d' {} \; + +echo "" +echo "Build complete!" +echo "" +echo "Output directories:" +echo " - English: site/en/" +echo " - Chinese: site/zh/" +echo " - Root: site/index.html" +echo "" +echo "To preview locally:" +echo " cd site && python -m http.server 8000" diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..4195983 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +# Deploy script for QPython documentation +# Builds the site and deploys to gh-pages branch + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" + +# Run build first +echo "Building site..." +./build.sh + +# Check if git repository +if [ ! -d .git ]; then + echo "Error: Not a git repository" + exit 1 +fi + +# Get current branch +CURRENT_BRANCH=$(git branch --show-current) +echo "Current branch: $CURRENT_BRANCH" + +# Check if there are uncommitted changes +if ! git diff-index --quiet HEAD --; then + echo "Warning: You have uncommitted changes. Please commit them first." + echo "Uncommitted files:" + git status --short + read -p "Do you want to continue anyway? (y/N) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Aborted." + exit 1 + fi +fi + +# Deploy to gh-pages +echo "" +echo "Deploying to gh-pages branch..." + +# Create a temporary directory for the site +TEMP_DIR=$(mktemp -d) +cp -r site/* "$TEMP_DIR/" + +# Switch to gh-pages branch (create if doesn't exist) +if git show-ref --verify --quiet refs/heads/gh-pages; then + git checkout gh-pages +else + git checkout --orphan gh-pages + git rm -rf . -- ':!deploy.sh' +fi + +# Remove old files (except .git and deploy.sh) +find . -maxdepth 1 ! -name '.git' ! -name 'deploy.sh' ! -name '.' ! -name '..' -exec rm -rf {} \; + +# Copy new site content +cp -r "$TEMP_DIR"/* . + +# Add all files +git add -A + +# Commit +COMMIT_MSG="Deploy site - $(date '+%Y-%m-%d %H:%M:%S')" +if git diff --cached --quiet; then + echo "No changes to commit" +else + git commit -m "$COMMIT_MSG" + echo "Committed: $COMMIT_MSG" +fi + +# Push to remote with force (gh-pages is safe to force push) +read -p "Push to origin/gh-pages? (y/N) " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + git push origin gh-pages --force + echo "" + echo "Deployed successfully!" + echo "Site will be available at: https://qpython-android.github.io/qpython.org/" +else + echo "Push aborted. You can push manually with: git push origin gh-pages --force" +fi + +# Cleanup +rm -rf "$TEMP_DIR" + +# Switch back to original branch +git checkout "$CURRENT_BRANCH" + +echo "" +echo "Done!" diff --git a/docs/.buildinfo b/docs/.buildinfo deleted file mode 100644 index 9ae14c2..0000000 --- a/docs/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 58624441babc3dbb65e1c406374e7bff -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_sources/contributors.rst.txt b/docs/_sources/contributors.rst.txt deleted file mode 100644 index 904f5d7..0000000 --- a/docs/_sources/contributors.rst.txt +++ /dev/null @@ -1,59 +0,0 @@ -Contributors -=============== - -Thanks contributers for helping with QPython projects. - -We want you to join us, If you want to join us, please email us support@qpython.org - - -Developers ------------ -`River `_ - -`kyle kersey `_ - -`Mae `_ - -`ZRH `_ - -*How to contribute* - -Please send an email to us with your self introduction and what kind of development do you want to contribute. - - - - -Communities Organizers ----------------------- -`LR `_ (Chinese QQ Group: 540717901) - -*How to run a QPython Community* - -We appreciate that you build a QPython topic community, you can invite us to join for answering any question about qpython by sending an email to us for telling how to join. - - -Localization ----------------------- -`Fogapod `_ (Russian) - -`Frodo821 `_ (Japanese) - -`Darciss Rehot'acc `_ (Turkish) - -`Christo phe `_ (French) - -*How to contribute localization translate* - -We appreciate that you are willing to help with translate QPython / QPython3. - -`This repo `_ is the localization project, you can post pull request and send en email to us, then we will merge it and publish in next update. - - -If you don't want to use git, you can just translate the words which do not contains translatable="false" in the following files. - -- `strings.xml `_ -- `toasts.xml `_ - -And there is the description file - -- `en-US-intro.md `_ diff --git a/docs/_sources/document.rst.txt b/docs/_sources/document.rst.txt deleted file mode 100644 index 7ef4e7e..0000000 --- a/docs/_sources/document.rst.txt +++ /dev/null @@ -1,111 +0,0 @@ -.. QPython documentation master file, created by - sphinx-quickstart on Fri Apr 7 15:07:35 2017. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -.. image:: _static/bestpython.png - - -Welcome to read the QPython guide! -============================================= - -QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. It’s Python on Android! - - -QPython has several millions users in the world already, it's a great project for programming users, welcome to join us for contributing to this project NOW. - - -What's NEW ------------------------- -QPython project include the `QPython `_ and `QPython3 `_ applications. - -QPython application is using the **Python 2.7.2** , and QPython application is using the **Python 3.2.2** . - - -QPython's newest version is 1.3.2 (Released on 2017/5/12) , QPython3's newest version is 1.0.2 (Released on 2017/3/29), New versions include many amazing features, please upgrade to the newest version as soon from google play, amazon appstore etc. - - -Thanks these guys who are contributing ----------------------------------------- -They are pushing on the QPython project moving forward. - -.. image:: https://avatars0.githubusercontent.com/u/3059527?v=3&s=60 - :target: https://github.com/riverfor - :alt: River is the project's organizer and the current online QPython's author. - -.. image:: https://avatars0.githubusercontent.com/u/10812534?v=3&s=60 - :target: https://github.com/pollyfat - :alt: Mae is a beautiful and talented girl developer who is good at python & android programming. - -.. image:: https://avatars0.githubusercontent.com/u/22494?v=3&s=60 - :target: https://github.com/ZoomQuiet - :alt: Zoom.Quiet is a knowledgeable guy who is famous in many opensource communities. - -.. image:: https://avatars3.githubusercontent.com/u/10219741?v=3&s=60 - :target: https://github.com/mathiasluo - :alt: MathiasLuo is a android geek developer - -.. image:: https://avatars2.githubusercontent.com/u/25975283?v=3&s=60 - :target: https://github.com/liyuanrui - :alt: liyuanrui is a Chinese geek - -.. image:: https://avatars3.githubusercontent.com/u/5159173?v=3&s=60 - :target: https://github.com/kylelk - :alt: Kyle kersey is a US geek - - -Do you want to join the great QPython team ? You could `Ask qustions on twitter `_ or `email us `_. -And you could `fork us on github `_ and send pull request. - - -QPython Communities ----------------------- -**There are many active QPython communities where you could meet the QPython users like you** - -* `Join Facebook community `_ -* `Join Google group `_ -* `Join Gitter chat `_ -* `Join G+ community(For QPython testers) `_ -* `QPython on Stackoverflow `_ - -**And you could talk to us through social network** - -* `Like us on facebook `_ -* `Follow us on twitter `_ - -* `Report issue `_ -* `Email us `_ - - -**It's the official QPython Users & Contributors' Guide, please follow these steps for using and contributing.** - -Support -------------- -We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implemented soon for we lack resources. - -So if you have any issue need the core developer team to solve with higher priority, you could try the `bountysource service `_. - - - -Now, let's GO ---------------- -.. toctree:: - :maxdepth: 2 - - en/guide - -Others ---------------- -.. toctree:: - :maxdepth: 2 - - en/faq - - -For Chinese users -------------------- -.. toctree:: - :maxdepth: 2 - - zhindex - diff --git a/docs/_sources/en/faq.rst.txt b/docs/_sources/en/faq.rst.txt deleted file mode 100644 index 2bee981..0000000 --- a/docs/_sources/en/faq.rst.txt +++ /dev/null @@ -1,26 +0,0 @@ -FAQ -==== - - -**How to run qpython script from other terminals ?** - -- You could "share to" qpython from 3rd apps. - -- You need to root the android device first, then soure the env vars (Just like the qpython wiki link you mentioned) and execute the /data/data/org.qpython.qpy/bin/python or /data/data/org.qpython.qpy/bin/python-android5 (for android 5 above) - - -`Share to case sample `_ - - - -**Support pygame ?** - -Even you could import pygame in QPython, but QPython doesn't support pygame now. - -We will consider to support it later, please follow us on facebook to get it's progress. - - -`Pygame case sample `_ - - - diff --git a/docs/_sources/en/guide.rst.txt b/docs/_sources/en/guide.rst.txt deleted file mode 100644 index f5cef59..0000000 --- a/docs/_sources/en/guide.rst.txt +++ /dev/null @@ -1,47 +0,0 @@ -Getting started -========================== -How to start quickly ? Just follow the following steps: - -.. toctree:: - :maxdepth: 2 - - guide_howtostart - guide_helloworld - - -Programming Guide -======================== - -If you you want to know more about how to program through qpython, just follow these steps: - - -.. toctree:: - :maxdepth: 2 - - guide_program - guide_ide - guide_libraries - guide_extend - - -**QPython project is not only a powerful Python engine for android, but is a active technology community also.** - -Developer Guide -======================= -QPython developers' goal is pushing out a great Python for android. - -.. toctree:: - :maxdepth: 2 - - guide_developers - - -Contributor Guide -======================== - -Welcome to join QPython contributors team, you are not just a user, but a creator of QPython. - -.. toctree:: - :maxdepth: 2 - - guide_contributors diff --git a/docs/_sources/en/guide_androidhelpers.rst.txt b/docs/_sources/en/guide_androidhelpers.rst.txt deleted file mode 100644 index 4a9c194..0000000 --- a/docs/_sources/en/guide_androidhelpers.rst.txt +++ /dev/null @@ -1,2042 +0,0 @@ -The Scripting Layer for Android (abridged as SL4A, and previously named Android Scripting Environment or ASE) is a library that allows the creation and running of scripts written in various scripting languages directly on Android devices. QPython start to extend the SL4A project and integrate it. - - -.. image:: ../_static/sl4a.jpg - -There are many SL4A APIs, if you found any issue, please `report an issue `_. - -AndroidFacade -=============== - -Clipboard APIs ----------------- -.. py:function:: setClipboard(text) - - Put text in the clipboard - - :param str text: text - -.. py:function:: getClipboard(text) - - Read text from the clipboard - - :return: The text in the clipboard - - -:: - - from androidhelper import Android - droid = Android() - - #setClipboard - droid.setClipboard("Hello World") - - #getClipboard - clipboard = droid.getClipboard().result - - -Intent & startActivity APIs ----------------------------------- -.. py:function:: makeIntent(action, uri, type, extras, categories, packagename, classname, flags) - - Starts an activity and returns the result - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param list categories(Optional): a List of categories to add to the Intent - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - :param int flags(Optional): Intent flags - - :return: An object representing an Intent - - -:: - - sample code to show makeIntent - - -.. py:function:: getIntent() - - Returns the intent that launched the script - -:: - - sample code to show getIntent - - -.. py:function:: startActivityForResult(action, uri, type, extras, packagename, classname) - - Starts an activity and returns the result - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - - :return: A Map representation of the result Intent - - -:: - - sample code to show startActivityForResult - - -.. py:function:: startActivityForResultIntent(intent) - - Starts an activity and returns the result - - :param Intent intent: Intent in the format as returned from makeIntent - - :return: A Map representation of the result Intent - - -:: - - sample code to show startActivityForResultIntent - -.. py:function:: startActivityIntent(intent, wait) - - Starts an activity - - :param Intent intent: Intent in the format as returned from makeIntent - :param bool wait(Optional): block until the user exits the started activity - -:: - - sample code to show startActivityIntent - - -.. py:function:: startActivity(action, uri, type, extras, wait, packagename, classname) - - Starts an activity - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param bool wait(Optional): block until the user exits the started activity - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - -:: - - sample code to show startActivityForResultIntent - - -SendBroadcast APIs -------------------- -.. py:function:: sendBroadcast(action, uri, type, extras, packagename, classname) - - Send a broadcast - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - - -:: - - sample code to show sendBroadcast - -.. py:function:: sendBroadcastIntent(intent) - - Send a broadcast - - :param Intent intent: Intent in the format as returned from makeIntent - -:: - - sample code to show sendBroadcastIntent - - -Vibrate ----------- -.. py:function:: vibrate(intent) - - Vibrates the phone or a specified duration in milliseconds - - :param int duration: duration in milliseconds - -:: - - sample code to show vibrate - - -NetworkStatus ---------------- -.. py:function:: getNetworkStatus() - - Returns the status of network connection - -:: - - sample code to show getNetworkStatus - -PackageVersion APIs ------------------------------- -.. py:function:: requiredVersion(requiredVersion) - - Checks if version of QPython SL4A is greater than or equal to the specified version - - :param int requiredVersion: requiredVersion - - :return: true or false - - -.. py:function:: getPackageVersionCode(packageName) - - Returns package version code - - :param str packageName: packageName - - :return: Package version code - -.. py:function:: getPackageVersion(packageName) - - Returns package version name - - :param str packageName: packageName - - :return: Package version name - - -:: - - sample code to show getPackageVersionCode & getPackageVersion - - -System APIs --------------------------------- -.. py:function:: getConstants(classname) - - Get list of constants (static final fields) for a class - - :param str classname: classname - - :return: list - -:: - - sample code to show getConstants - -.. py:function:: environment() - - A map of various useful environment details - - :return: environment map object includes id, display, offset, TZ, SDK, download, appcache, availblocks, blocksize, blockcount, sdcard - -:: - - sample code to show environment - -.. py:function:: log(message) - - Writes message to logcat - - :param str message: message - -:: - - sample code to show log - - -SendEmail ----------- -.. py:function:: sendEmail(to, subject, body, attachmentUri) - - Launches an activity that sends an e-mail message to a given recipient - - :param str to: A comma separated list of recipients - :param str subject: subject - :param str body: mail body - :param str attachmentUri(Optional): message - -:: - - sample code to show sendEmail - - -Toast, getInput, getPassword, notify APIs ------------------------------------------------- -.. py:function:: makeToast(message) - - Displays a short-duration Toast notification - - :param str message: message - -:: - - sample code to show makeToast - -.. py:function:: getInput(title, message) - - Queries the user for a text input - - :param str title: title of the input box - :param str message: message to display above the input box - -:: - - sample code to show getInput - -.. py:function:: getPassword(title, message) - - Queries the user for a password - - :param str title: title of the input box - :param str message: message to display above the input box - -:: - - sample code to show getPassword - -.. py:function:: notify(title, message, url) - - Displays a notification that will be canceled when the user clicks on it - - :param str title: title - :param str message: message - :param str url(optional): url - -:: - import androidhelper - droid = androidhelper.Android() - droid.notify('Hello','QPython','http://qpython.org') # you could set the 3rd parameter None also - - - -ApplicationManagerFacade -========================= - -Manager APIs -------------- - -.. py:function:: getLaunchableApplications() - - Returns a list of all launchable application class names - - :return: map object - -:: - - sample code to show getLaunchableApplications - - -.. py:function:: launch(classname) - - Start activity with the given class name - - :param str classname: classname - -:: - - sample code to show launch - -.. py:function:: getRunningPackages() - - Returns a list of packages running activities or services - - :return: List of packages running activities - -:: - - sample code to show getRunningPackages - -.. py:function:: forceStopPackage(packageName) - - Force stops a package - - :param str packageName: packageName - -:: - - sample code to show forceStopPackage - - -CameraFacade -========================= - -.. py:function:: cameraCapturePicture(targetPath) - - Take a picture and save it to the specified path - - :return: A map of Booleans autoFocus and takePicture where True indicates success - -.. py:function:: cameraInteractiveCapturePicture(targetPath) - - Starts the image capture application to take a picture and saves it to the specified path - -CommonIntentsFacade -========================= - -Barcode ----------- -.. py:function:: scanBarcode() - - Starts the barcode scanner - - :return: A Map representation of the result Intent - -View APIs ----------- -.. py:function:: pick(uri) - - Display content to be picked by URI (e.g. contacts) - - :return: A map of result values - -.. py:function:: view(uri, type, extras) - - Start activity with view action by URI (i.e. browser, contacts, etc.) - -.. py:function:: viewMap(query) - - Opens a map search for query (e.g. pizza, 123 My Street) - -.. py:function:: viewContacts() - - Opens the list of contacts - -.. py:function:: viewHtml(path) - - Opens the browser to display a local HTML file - -.. py:function:: search(query) - - Starts a search for the given query - -ContactsFacade -========================= - -.. py:function:: pickContact() - - Displays a list of contacts to pick from - - :return: A map of result values - -.. py:function:: pickPhone() - - Displays a list of phone numbers to pick from - - :return: The selected phone number - -.. py:function:: contactsGetAttributes() - - Returns a List of all possible attributes for contacts - - :return: a List of contacts as Maps - -.. py:function:: contactsGetIds() - - Returns a List of all contact IDs - -.. py:function:: contactsGet(attributes) - - Returns a List of all contacts - -.. py:function:: contactsGetById(id) - - Returns contacts by ID - -.. py:function:: contactsGetCount() - - Returns the number of contacts - -.. py:function:: queryContent(uri, attributes, selection, selectionArgs, order) - - Content Resolver Query - - :return: result of query as Maps - -.. py:function:: queryAttributes(uri) - - Content Resolver Query Attributes - - :return: a list of available columns for a given content uri - -EventFacade -========================= - -.. py:function:: eventClearBuffer() - - Clears all events from the event buffer - -.. py:function:: eventRegisterForBroadcast(category, enqueue) - - Registers a listener for a new broadcast signal - -.. py:function:: eventUnregisterForBroadcast(category) - - Stop listening for a broadcast signal - -.. py:function:: eventGetBrodcastCategories() - - Lists all the broadcast signals we are listening for - -.. py:function:: eventPoll(number_of_events) - - Returns and removes the oldest n events (i.e. location or sensor update, etc.) from the event buffer - - :return: A List of Maps of event properties - -.. py:function:: eventWaitFor(eventName, timeout) - - Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer - - :return: Map of event properties - -.. py:function:: eventWait(timeout) - - Blocks until an event occurs. The returned event is removed from the buffer - - :return: Map of event properties - -.. py:function:: eventPost(name, data, enqueue) - - Post an event to the event queue - -.. py:function:: rpcPostEvent(name, data) - - Post an event to the event queue - -.. py:function:: receiveEvent() - - Returns and removes the oldest event (i.e. location or sensor update, etc.) from the event buffer - - :return: Map of event properties - -.. py:function:: waitForEvent(eventName, timeout) - - Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer - - :return: Map of event properties - -.. py:function:: startEventDispatcher(port) - - Opens up a socket where you can read for events posted - -.. py:function:: stopEventDispatcher() - - Stops the event server, you can't read in the port anymore - -LocationFacade -========================= - -Providers APIs ------------------ - -.. py:function:: locationProviders() - - Returns availables providers on the phone - -.. py:function:: locationProviderEnabled(provider) - - Ask if provider is enabled - -Location APIs ------------------ -.. py:function:: startLocating(minDistance, minUpdateDistance) - - Starts collecting location data - -.. py:function:: readLocation() - - Returns the current location as indicated by all available providers - - :return: A map of location information by provider - -.. py:function:: stopLocating() - - Stops collecting location data - -.. py:function:: getLastKnownLocation() - - Returns the last known location of the device - - :return: A map of location information by provider - -*sample code* -:: - - Droid = androidhelper.Android() - location = Droid.getLastKnownLocation().result - location = location.get('network', location.get('gps')) - - -GEO ------------ -.. py:function:: geocode(latitude, longitude, maxResults) - - Returns a list of addresses for the given latitude and longitude - - :return: A list of addresses - -PhoneFacade -========================= - -PhoneStat APIs ----------------- - -.. py:function:: startTrackingPhoneState() - - Starts tracking phone state - -.. py:function:: readPhoneState() - - Returns the current phone state and incoming number - - :return: A Map of "state" and "incomingNumber" - -.. py:function:: stopTrackingPhoneState() - - Stops tracking phone state - - -Call & Dia APIs ----------------- - -.. py:function:: phoneCall(uri) - - Calls a contact/phone number by URI - -.. py:function:: phoneCallNumber(number) - - Calls a phone number - -.. py:function:: phoneDial(uri) - - Dials a contact/phone number by URI - -.. py:function:: phoneDialNumber(number) - - Dials a phone number - - - -Get information APIs ------------------------- -.. py:function:: getCellLocation() - - Returns the current cell location - -.. py:function:: getNetworkOperator() - - Returns the numeric name (MCC+MNC) of current registered operator - -.. py:function:: getNetworkOperatorName() - - Returns the alphabetic name of current registered operator - -.. py:function:: getNetworkType() - - Returns a the radio technology (network type) currently in use on the device - -.. py:function:: getPhoneType() - - Returns the device phone type - -.. py:function:: getSimCountryIso() - - Returns the ISO country code equivalent for the SIM provider's country code - -.. py:function:: getSimOperator() - - Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits - -.. py:function:: getSimOperatorName() - - Returns the Service Provider Name (SPN) - -.. py:function:: getSimSerialNumber() - - Returns the serial number of the SIM, if applicable. Return null if it is unavailable - -.. py:function:: getSimState() - - Returns the state of the device SIM card - -.. py:function:: getSubscriberId() - - Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return null if it is unavailable - -.. py:function:: getVoiceMailAlphaTag() - - Retrieves the alphabetic identifier associated with the voice mail number - -.. py:function:: getVoiceMailNumber() - - Returns the voice mail number. Return null if it is unavailable - -.. py:function:: checkNetworkRoaming() - - Returns true if the device is considered roaming on the current network, for GSM purposes - -.. py:function:: getDeviceId() - - Returns the unique device ID, for example, the IMEI for GSM and the MEID for CDMA phones. Return null if device ID is not available - -.. py:function:: getDeviceSoftwareVersion() - - Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available - -.. py:function:: getLine1Number() - - Returns the phone number string for line 1, for example, the MSISDN for a GSM phone. Return null if it is unavailable - -.. py:function:: getNeighboringCellInfo() - - Returns the neighboring cell information of the device - -MediaRecorderFacade -========================= - - -Audio --------- - -.. py:function:: recorderStartMicrophone(targetPath) - - Records audio from the microphone and saves it to the given location - -Video APIs ------------ - -.. py:function:: recorderStartVideo(targetPath, duration, videoSize) - - Records video from the camera and saves it to the given location. - Duration specifies the maximum duration of the recording session. - If duration is 0 this method will return and the recording will only be stopped - when recorderStop is called or when a scripts exits. - Otherwise it will block for the time period equal to the duration argument. - videoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480. - - -.. py:function:: recorderCaptureVideo(targetPath, duration, recordAudio) - - Records video (and optionally audio) from the camera and saves it to the given location. - Duration specifies the maximum duration of the recording session. - If duration is not provided this method will return immediately and the recording will only be stopped - when recorderStop is called or when a scripts exits. - Otherwise it will block for the time period equal to the duration argument. - -.. py:function:: startInteractiveVideoRecording(path) - - Starts the video capture application to record a video and saves it to the specified path - - -Stop --------- -.. py:function:: recorderStop() - - Stops a previously started recording - - -SensorManagerFacade -========================= - -Start & Stop -------------- -.. py:function:: startSensingTimed(sensorNumber, delayTime) - - Starts recording sensor data to be available for polling - -.. py:function:: startSensingThreshold(ensorNumber, threshold, axis) - - Records to the Event Queue sensor data exceeding a chosen threshold - -.. py:function:: startSensing(sampleSize) - - Starts recording sensor data to be available for polling - -.. py:function:: stopSensing() - - Stops collecting sensor data - -Read data APIs ---------------- -.. py:function:: readSensors() - - Returns the most recently recorded sensor data - -.. py:function:: sensorsGetAccuracy() - - Returns the most recently received accuracy value - -.. py:function:: sensorsGetLight() - - Returns the most recently received light value - -.. py:function:: sensorsReadAccelerometer() - - Returns the most recently received accelerometer values - - :return: a List of Floats [(acceleration on the) X axis, Y axis, Z axis] - -.. py:function:: sensorsReadMagnetometer() - - Returns the most recently received magnetic field values - - :return: a List of Floats [(magnetic field value for) X axis, Y axis, Z axis] - -.. py:function:: sensorsReadOrientation() - - Returns the most recently received orientation values - - :return: a List of Doubles [azimuth, pitch, roll] - -*sample code* -:: - - Droid = androidhelper.Android() - Droid.startSensingTimed(1, 250) - sensor = Droid.sensorsReadOrientation().result - Droid.stopSensing() - - -SettingsFacade -========================= - -Screen ----------- - -.. py:function:: setScreenTimeout(value) - - Sets the screen timeout to this number of seconds - - :return: The original screen timeout - -.. py:function:: getScreenTimeout() - - Gets the screen timeout - - :return: the current screen timeout in seconds - -AirplanerMode ---------------------- - -.. py:function:: checkAirplaneMode() - - Checks the airplane mode setting - - :return: True if airplane mode is enabled - -.. py:function:: toggleAirplaneMode(enabled) - - Toggles airplane mode on and off - - :return: True if airplane mode is enabled - -Ringer Silent Mode ---------------------- - -.. py:function:: checkRingerSilentMode() - - Checks the ringer silent mode setting - - :return: True if ringer silent mode is enabled - -.. py:function:: toggleRingerSilentMode(enabled) - - Toggles ringer silent mode on and off - - :return: True if ringer silent mode is enabled - -Vibrate Mode ---------------------- - -.. py:function:: toggleVibrateMode(enabled) - - Toggles vibrate mode on and off. If ringer=true then set Ringer setting, else set Notification setting - - :return: True if vibrate mode is enabled - -.. py:function:: getVibrateMode(ringer) - - Checks Vibration setting. If ringer=true then query Ringer setting, else query Notification setting - - :return: True if vibrate mode is enabled - -Ringer & Media Volume ---------------------- - -.. py:function:: getMaxRingerVolume() - - Returns the maximum ringer volume - -.. py:function:: getRingerVolume() - - Returns the current ringer volume - -.. py:function:: setRingerVolume(volume) - - Sets the ringer volume - -.. py:function:: getMaxMediaVolume() - - Returns the maximum media volume - -.. py:function:: getMediaVolume() - - Returns the current media volume - -.. py:function:: setMediaVolume(volume) - - Sets the media volume - -Screen Brightness ---------------------- - -.. py:function:: getScreenBrightness() - - Returns the screen backlight brightness - - :return: the current screen brightness between 0 and 255 - -.. py:function:: setScreenBrightness(value) - - Sets the the screen backlight brightness - - :return: the original screen brightness - -.. py:function:: checkScreenOn() - - Checks if the screen is on or off (requires API level 7) - - :return: True if the screen is currently on - - -SmsFacade -========================= - -.. py:function:: smsSend(destinationAddress, text) - - Sends an SMS - - :param str destinationAddress: typically a phone number - :param str text: - -.. py:function:: smsGetMessageCount(unreadOnly, folder) - - Returns the number of messages - - :param bool unreadOnly: typically a phone number - :param str folder(optional): default "inbox" - -.. py:function:: smsGetMessageIds(unreadOnly, folder) - - Returns a List of all message IDs - - :param bool unreadOnly: typically a phone number - :param str folder(optional): default "inbox" - -.. py:function:: smsGetMessages(unreadOnly, folder, attributes) - - Returns a List of all messages - - :param bool unreadOnly: typically a phone number - :param str folder: default "inbox" - :param list attributes(optional): attributes - - :return: a List of messages as Maps - -.. py:function:: smsGetMessageById(id, attributes) - - Returns message attributes - - :param int id: message ID - :param list attributes(optional): attributes - - :return: a List of messages as Maps - -.. py:function:: smsGetAttributes() - - Returns a List of all possible message attributes - -.. py:function:: smsDeleteMessage(id) - - Deletes a message - - :param int id: message ID - - :return: True if the message was deleted - -.. py:function:: smsMarkMessageRead(ids, read) - - Marks messages as read - - :param list ids: List of message IDs to mark as read - :param bool read: true or false - - :return: number of messages marked read - -SpeechRecognitionFacade -========================= - -.. py:function:: recognizeSpeech(prompt, language, languageModel) - - Recognizes user's speech and returns the most likely result - - :param str prompt(optional): text prompt to show to the user when asking them to speak - :param str language(optional): language override to inform the recognizer that it should expect speech in a language different than the one set in the java.util.Locale.getDefault() - :param str languageModel(optional): informs the recognizer which speech model to prefer (see android.speech.RecognizeIntent) - - :return: An empty string in case the speech cannot be recongnized - - -ToneGeneratorFacade -========================= - -.. py:function:: generateDtmfTones(phoneNumber, toneDuration) - - Generate DTMF tones for the given phone number - - :param str phoneNumber: phone number - :param int toneDuration(optional): default 100, duration of each tone in milliseconds - - -WakeLockFacade -========================= - -.. py:function:: wakeLockAcquireFull() - - Acquires a full wake lock (CPU on, screen bright, keyboard bright) - -.. py:function:: wakeLockAcquirePartial() - - Acquires a partial wake lock (CPU on) - -.. py:function:: wakeLockAcquireBright() - - Acquires a bright wake lock (CPU on, screen bright) - -.. py:function:: wakeLockAcquireDim() - - Acquires a dim wake lock (CPU on, screen dim) - -.. py:function:: wakeLockRelease() - - Releases the wake lock - -WifiFacade -========================= - -.. py:function:: wifiGetScanResults() - - Returns the list of access points found during the most recent Wifi scan - -.. py:function:: wifiLockAcquireFull() - - Acquires a full Wifi lock - -.. py:function:: wifiLockAcquireScanOnly() - - Acquires a scan only Wifi lock - -.. py:function:: wifiLockRelease() - - Releases a previously acquired Wifi lock - -.. py:function:: wifiStartScan() - - Starts a scan for Wifi access points - - :return: True if the scan was initiated successfully - -.. py:function:: checkWifiState() - - Checks Wifi state - - :return: True if Wifi is enabled - -.. py:function:: toggleWifiState(enabled) - - Toggle Wifi on and off - - :param bool enabled(optional): enabled - - :return: True if Wifi is enabled - -.. py:function:: wifiDisconnect() - - Disconnects from the currently active access point - - :return: True if the operation succeeded - -.. py:function:: wifiGetConnectionInfo() - - Returns information about the currently active access point - -.. py:function:: wifiReassociate() - - Returns information about the currently active access point - - :return: True if the operation succeeded - -.. py:function:: wifiReconnect() - - Reconnects to the currently active access point - - :return: True if the operation succeeded - - -BatteryManagerFacade -========================= - -.. py:function:: readBatteryData() - - Returns the most recently recorded battery data - -.. py:function:: batteryStartMonitoring() - - Starts tracking battery state - -.. py:function:: batteryStopMonitoring() - - Stops tracking battery state - -.. py:function:: batteryGetStatus() - - Returns the most recently received battery status data: - 1 - unknown; - 2 - charging; - 3 - discharging; - 4 - not charging; - 5 - full - -.. py:function:: batteryGetHealth() - - Returns the most recently received battery health data: - 1 - unknown; - 2 - good; - 3 - overheat; - 4 - dead; - 5 - over voltage; - 6 - unspecified failure - -.. py:function:: batteryGetPlugType() - - Returns the most recently received plug type data: - -1 - unknown - 0 - unplugged - 1 - power source is an AC charger - 2 - power source is a USB port - - -.. py:function:: batteryCheckPresent() - - Returns the most recently received battery presence data - -.. py:function:: batteryGetLevel() - - Returns the most recently received battery level (percentage) - -.. py:function:: batteryGetVoltage() - - Returns the most recently received battery voltage - -.. py:function:: batteryGetTemperature() - - Returns the most recently received battery temperature - -.. py:function:: batteryGetTechnology() - - Returns the most recently received battery technology data - - -ActivityResultFacade -========================= - -.. py:function:: setResultBoolean(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - - -.. py:function:: setResultByte(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultShort(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultChar(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - - -.. py:function:: setResultInteger(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultLong(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultFloat(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultDouble(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultString(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultBooleanArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultByteArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultShortArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultCharArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultIntegerArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultLongArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultFloatArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultDoubleArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultStringArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultSerializable(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - - -MediaPlayerFacade -========================= - -Control ------------------ -.. py:function:: mediaPlay(url, tag, play) - - Open a media file - - :param str url: url of media resource - :param str tag(optional): string identifying resource (default=default) - :param bool play(optional): start playing immediately - - :return: true if play successful - -.. py:function:: mediaPlayPause(tag) - - pause playing media file - - :param str tag: string identifying resource (default=default) - - :return: true if successful - -.. py:function:: mediaPlayStart(tag) - - start playing media file - - :param str tag: string identifying resource (default=default) - - :return: true if successful - -.. py:function:: mediaPlayClose(tag) - - Close media file - - :param str tag: string identifying resource (default=default) - - :return: true if successful - -.. py:function:: mediaIsPlaying(tag) - - Checks if media file is playing - - :param str tag: string identifying resource (default=default) - - :return: true if successful - - -.. py:function:: mediaPlaySetLooping(enabled, tag) - - Set Looping - - :param bool enabled: default true - :param str tag: string identifying resource (default=default) - - :return: True if successful - -.. py:function:: mediaPlaySeek(msec, tag) - - Seek To Position - - :param int msec: default true - :param str tag: string identifying resource (default=default) - - :return: New Position (in ms) - -Get Information ------------------ -.. py:function:: mediaPlayInfo(tag) - - Information on current media - - :param str tag: string identifying resource (default=default) - - :return: Media Information - -.. py:function:: mediaPlayList() - - Lists currently loaded media - - :return: List of Media Tags - - -PreferencesFacade -========================= - -.. py:function:: prefGetValue(key, filename) - - Read a value from shared preferences - - :param str key: key - :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences. - - -.. py:function:: prefPutValue(key, value, filename) - - Write a value to shared preferences - - :param str key: key - :param str value: value - :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences. - -.. py:function:: prefGetAll(filename) - - Get list of Shared Preference Values - - :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences. - - -QPyInterfaceFacade -========================= - -.. py:function:: executeQPy(script) - - Execute a qpython script by absolute path - - :param str script: The absolute path of the qpython script - - :return: bool - - -TextToSpeechFacade -========================= - -.. py:function:: ttsSpeak(message) - - Speaks the provided message via TTS - - :param str message: message - -.. py:function:: ttsIsSpeaking() - - Returns True if speech is currently in progress - -EyesFreeFacade -========================= - -.. py:function:: ttsSpeak(message) - - Speaks the provided message via TTS - - :param str message: message - - -BluetoothFacade -========================= - -.. py:function:: bluetoothActiveConnections() - - Returns active Bluetooth connections - - -.. py:function:: bluetoothWriteBinary(base64, connID) - - Send bytes over the currently open Bluetooth connection - - :param str base64: A base64 encoded String of the bytes to be sent - :param str connID(optional): Connection id - -.. py:function:: bluetoothReadBinary(bufferSize, connID) - - Read up to bufferSize bytes and return a chunked, base64 encoded string - - :param int bufferSize: default 4096 - :param str connID(optional): Connection id - -.. py:function:: bluetoothConnect(uuid, address) - - Connect to a device over Bluetooth. Blocks until the connection is established or fails - - :param str uuid: The UUID passed here must match the UUID used by the server device - :param str address(optional): The user will be presented with a list of discovered devices to choose from if an address is not provided - - :return: True if the connection was established successfully - -.. py:function:: bluetoothAccept(uuid, timeout) - - Listens for and accepts a Bluetooth connection. Blocks until the connection is established or fails - - :param str uuid: The UUID passed here must match the UUID used by the server device - :param int timeout: How long to wait for a new connection, 0 is wait for ever (default=0) - -.. py:function:: bluetoothMakeDiscoverable(duration) - - Requests that the device be discoverable for Bluetooth connections - - :param int duration: period of time, in seconds, during which the device should be discoverable (default=300) - -.. py:function:: bluetoothWrite(ascii, connID) - - Sends ASCII characters over the currently open Bluetooth connection - - :param str ascii: text - :param str connID: Connection id - -.. py:function:: bluetoothReadReady(connID) - - Sends ASCII characters over the currently open Bluetooth connection - - :param str ascii: text - :param str connID: Connection id - -.. py:function:: bluetoothRead(bufferSize, connID) - - Read up to bufferSize ASCII characters - - :param int bufferSize: default=4096 - :param str connID(optional): Connection id - -.. py:function:: bluetoothReadLine(connID) - - Read the next line - - :param str connID(optional): Connection id - -.. py:function:: bluetoothGetRemoteDeviceName(address) - - Queries a remote device for it's name or null if it can't be resolved - - :param str address: Bluetooth Address For Target Device - -.. py:function:: bluetoothGetLocalName() - - Gets the Bluetooth Visible device name - -.. py:function:: bluetoothSetLocalName(name) - - Sets the Bluetooth Visible device name, returns True on success - - :param str name: New local name - -.. py:function:: bluetoothGetScanMode() - - Gets the scan mode for the local dongle. - Return values: - -1 when Bluetooth is disabled. - 0 if non discoverable and non connectable. - 1 connectable non discoverable. - 3 connectable and discoverable. - -.. py:function:: bluetoothGetConnectedDeviceName(connID) - - Returns the name of the connected device - - :param str connID: Connection id - -.. py:function:: checkBluetoothState() - - Checks Bluetooth state - - :return: True if Bluetooth is enabled - -.. py:function:: toggleBluetoothState(enabled, prompt) - - Toggle Bluetooth on and off - - :param bool enabled: - :param str prompt: Prompt the user to confirm changing the Bluetooth state, default=true - - :return: True if Bluetooth is enabled - -.. py:function:: bluetoothStop(connID) - - Stops Bluetooth connection - - :param str connID: Connection id - -.. py:function:: bluetoothGetLocalAddress() - - Returns the hardware address of the local Bluetooth adapter - -.. py:function:: bluetoothDiscoveryStart() - - Start the remote device discovery process - - :return: true on success, false on error - -.. py:function:: bluetoothDiscoveryCancel() - - Cancel the current device discovery process - - :return: true on success, false on error - -.. py:function:: bluetoothIsDiscovering() - - Return true if the local Bluetooth adapter is currently in the device discovery process - - -SignalStrengthFacade -========================= -.. py:function:: startTrackingSignalStrengths() - - Starts tracking signal strengths - -.. py:function:: readSignalStrengths() - - Returns the current signal strengths - - :return: A map of gsm_signal_strength - -.. py:function:: stopTrackingSignalStrengths() - - Stops tracking signal strength - - -WebCamFacade -========================= - -.. py:function:: webcamStart(resolutionLevel, jpegQuality, port) - - Starts an MJPEG stream and returns a Tuple of address and port for the stream - - :param int resolutionLevel: increasing this number provides higher resolution (default=0) - :param int jpegQuality: a number from 0-10 (default=20) - :param int port: If port is specified, the webcam service will bind to port, otherwise it will pick any available port (default=0) - -.. py:function:: webcamAdjustQuality(resolutionLevel, jpegQuality) - - Adjusts the quality of the webcam stream while it is running - - :param int resolutionLevel: increasing this number provides higher resolution (default=0) - :param int jpegQuality: a number from 0-10 (default=20) - -.. py:function:: cameraStartPreview(resolutionLevel, jpegQuality, filepath) - - Start Preview Mode. Throws 'preview' events - - :param int resolutionLevel: increasing this number provides higher resolution (default=0) - :param int jpegQuality: a number from 0-10 (default=20) - :param str filepath: Path to store jpeg files - - :return: True if successful - -.. py:function:: cameraStopPreview() - - Stop the preview mode - - -UiFacade -========================= - -Dialog --------- -.. py:function:: dialogCreateInput(title, message, defaultText, inputType) - - Create a text input dialog - - :param str title: title of the input box - :param str message: message to display above the input box - :param str defaultText(optional): text to insert into the input box - :param str inputType(optional): type of input data, ie number or text - -.. py:function:: dialogCreatePassword(title, message) - - Create a password input dialog - - :param str title: title of the input box - :param str message: message to display above the input box - -.. py:function:: dialogGetInput(title, message, defaultText) - - Create a password input dialog - - :param str title: title of the input box - :param str message: message to display above the input box - :param str defaultText(optional): text to insert into the input box - -.. py:function:: dialogGetPassword(title, message) - - Queries the user for a password - - :param str title: title of the password box - :param str message: message to display above the input box - -.. py:function:: dialogCreateSeekBar(start, maximum, title) - - Create seek bar dialog - - :param int start: default=50 - :param int maximum: default=100 - :param int title: title - -.. py:function:: dialogCreateTimePicker(hour, minute, is24hour) - - Create time picker dialog - - :param int hour: default=0 - :param int miute: default=0 - :param bool is24hour: default=false - -.. py:function:: dialogCreateDatePicker(year, month, day) - - Create date picker dialog - - :param int year: default=1970 - :param int month: default=1 - :param int day: default=1 - - -NFC -------------- -**Data structs** -*QPython NFC json result* -:: - - { - "role": , # could be self/master/slave - "stat": , # could be ok / fail / cancl - "message": - } - -**APIs** - -.. py:function:: dialogCreateNFCBeamMaster(title, message, inputType) - - Create a dialog where you could create a qpython beam master - - :param str title: title of the input box - :param str message: message to display above the input box - :param str inputType(optional): type of input data, ie number or text - -.. py:function:: NFCBeamMessage(content, title, message) - - Create a dialog where you could create a qpython beam master - - :param str content: message you want to sent - :param str title: title of the input box - :param str message: message to display above the input box - :param str inputType(optional): type of input data, ie number or text - -.. py:function:: dialogCreateNFCBeamSlave(title, message) - - Create a qpython beam slave - - :param str title: title of the input box - :param str message: message to display above the input box - -Progress --------------- -.. py:function:: dialogCreateSpinnerProgress(message, maximumProgress) - - Create a spinner progress dialog - - :param str message(optional): message - :param int maximunProgress(optional): dfault=100 - -.. py:function:: dialogSetCurrentProgress(current) - - Set progress dialog current value - - :param int current: current - -.. py:function:: dialogSetMaxProgress(max) - - Set progress dialog maximum value - - :param int max: max - - -.. py:function:: dialogCreateHorizontalProgress(title, message, maximumProgress) - - Create a horizontal progress dialog - - :param str title(optional): title - :param str message(optional): message - :param int maximunProgress(optional): dfault=100 - - -Alert ----------- -.. py:function:: dialogCreateAlert(title, message) - - Create alert dialog - - :param str title(optional): title - :param str message(optional): message - :param int maximunProgress(optional): dfault=100 - - -Dialog Control ---------------- -.. py:function:: dialogSetPositiveButtonText(text) - - Set alert dialog positive button text - - :param str text: text - -.. py:function:: dialogSetNegativeButtonText(text) - - Set alert dialog negative button text - - :param str text: text - -.. py:function:: dialogSetNeutralButtonText(text) - - Set alert dialog button text - - :param str text: text - -.. py:function:: dialogSetItems(items) - - Set alert dialog list items - - :param list items: items - -.. py:function:: dialogSetSingleChoiceItems(items, selected) - - Set alert dialog list items - - :param list items: items - :param int selected: selected item index (default=0) - -.. py:function:: dialogSetMultiChoiceItems(items, selected) - - Set dialog multiple choice items and selection - - :param list items: items - :param int selected: selected item index (default=0) - -.. py:function:: addContextMenuItem(label, event, eventData) - - Adds a new item to context menu - - :param str label: label for this menu item - :param str event: event that will be generated on menu item click - :param object eventData: event object - -.. py:function:: addOptionsMenuItem(label, event, eventData, iconName) - - Adds a new item to context menu - - :param str label: label for this menu item - :param str event: event that will be generated on menu item click - :param object eventData: event object - :param str iconName: Android system menu icon, see http://developer.android.com/reference/android/R.drawable.html - -.. py:function:: dialogGetResponse() - - Returns dialog response - -.. py:function:: dialogGetSelectedItems() - - This method provides list of items user selected - -.. py:function:: dialogDismiss() - - Dismiss dialog - -.. py:function:: dialogShow() - - Show dialog - - -Layout ---------- -.. py:function:: fullShow(layout) - - Show Full Screen - - :param string layout: String containing View layout - -.. py:function:: fullDismiss() - - Dismiss Full Screen - -.. py:function:: fullQuery() - - Get Fullscreen Properties - -.. py:function:: fullQueryDetail(id) - - Get fullscreen properties for a specific widget - - :param str id: id of layout widget - -.. py:function:: fullSetProperty(id) - - Set fullscreen widget property - - :param str id: id of layout widget - :param str property: name of property to set - :param str value: value to set property to - -.. py:function:: fullSetList(id, list) - - Attach a list to a fullscreen widget - - :param str id: id of layout widget - :param list list: List to set - -.. py:function:: fullKeyOverride(keycodes, enable) - - Override default key actions - - :param str keycodes: id of layout widget - :param bool enable: List to set (default=true) - - - -WebView ------------ -.. py:function:: webViewShow() - - Display a WebView with the given URL - - :param str url: url - :param bool wait(optional): block until the user exits the WebView - -USB Host Serial Facade -====================== - -*QPython 1.3.1+ and QPython3 1.0.3+ contains this feature* - -SL4A Facade for USB Serial devices by Android USB Host API. - - -It control the USB-Serial like devices -from Andoroid which has USB Host Controller . - -The sample -`demonstration is also available at youtube video `_ - - -Requirements -------------- -* Android device which has USB Host controller (and enabled in that firmware). -* Android 4.0 (API14) or later. -* USB Serial devices (see [Status](#Status)). -* USB Serial devices were not handled by Android kernel. - - > I heard some android phone handle USB Serial devices - > make /dev/ttyUSB0 in kernel level. - > In this case, Android does not be able to handle the device - > from OS level. - - please check Android Applications be able to grab the target USB Devices, - such as `USB Device Info `_. - -Status ---------------- -* probably work with USB CDC, like FTDI, Arduino or else. - -* 2012/09/10: work with 78K0F0730 device (new RL78) with Tragi BIOS board. - - `M78K0F0730 `_ - -* 2012/09/24: work with some pl2303 devcies. - -Author -------- -This facade developped by `Kuri65536 `_ -you can see the commit log in it. - - -APIs --------- -.. py:function:: usbserialGetDeviceList() - - Returns USB devices reported by USB Host API. - - :return: Returns "Map of id and string information Map - - -.. py:function:: usbserialDisconnect(connID) - - Disconnect all USB-device - - :param str connID: connection ID - -.. py:function:: usbserialActiveConnections() - - Returns active USB-device connections. - - :return: Returns "Active USB-device connections by Map UUID vs device-name." - - -.. py:function:: usbserialWriteBinary(base64, connID) - - Send bytes over the currently open USB Serial connection. - - :param str base64: - :param str connId: - -.. py:function:: usbserialReadBinary(bufferSize, connID) - - Read up to bufferSize bytes and return a chunked, base64 encoded string - - :param int bufferSize: - :param str connId: - -.. py:function:: usbserialConnect(hash, options) - - Connect to a device with USB-Host. request the connection and exit - - :param str hash: - :param str options: - - :return: Returns messages the request status - -.. py:function:: usbserialHostEnable() - - Requests that the host be enable for USB Serial connections. - - :return: True if the USB Device is accesible - -.. py:function:: usbserialWrite(String ascii, String connID) - - Sends ASCII characters over the currently open USB Serial connection - - :param str ascii: - :param str connID: - -.. py:function:: usbserialReadReady(connID) - - :param str connID: - - :return: True if the next read is guaranteed not to block - - -.. py:function:: usbserialRead(connID, bufferSize) - - Read up to bufferSize ASCII characters. - - :param str connID: - :param int bufferSize: - -.. py:function:: usbserialGetDeviceName(connID) - - Queries a remote device for it's name or null if it can't be resolved - - :param str connID: diff --git a/docs/_sources/en/guide_contributors.rst.txt b/docs/_sources/en/guide_contributors.rst.txt deleted file mode 100644 index 2078554..0000000 --- a/docs/_sources/en/guide_contributors.rst.txt +++ /dev/null @@ -1,40 +0,0 @@ -Welcome contribute -=============================== -Thanks for supporting this project, QPython is a greate project, and we hope you join us to help with make it more greater. - -Please send email to us(support at qpython.org) to introduce youself briefly, and which part do you want to contribute. - -Then we will consider to invite you to join the qpython-collaborator group. - -How to help with test -======================== - -.. toctree:: - :maxdepth: 2 - - guide_contributors_test - -How to contribute documentation -================================ - -How to translate -================================ - - -How to launch a local QPython users community -================================================================ - -How to organise a local qpython user sharing event ---------------------------------------------------- - -How to became the developer member -==================================== - -How to develop qpython built-in programs ----------------------------------------- - -How to sponsor QPython project -==================================== - - -More detail coming soon... diff --git a/docs/_sources/en/guide_contributors_test.rst.txt b/docs/_sources/en/guide_contributors_test.rst.txt deleted file mode 100644 index c4c0093..0000000 --- a/docs/_sources/en/guide_contributors_test.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -QPython is keeping develop! -If you are interested about what we are doing and want to make some contribution, follow this guide to make this project better! - - -Join the tester community --------------------------- -We create a G+ community where you could report bugs or offer suggestions -> `QPython tester G+ community(For QPython testers) `_ - -Join us now! - -.. image:: ../_static/1.png - :scale: 50 % - - -Become a tester ----------------- -After join the tester community, you could become a tester! -Click this and become a tester -> `I'm ready for test `_ - -.. image:: ../_static/2.png - -Report or suggest -------------------- -If you find out any bugs or have any cool idea about QPython, please let us know about it. -You could write down your suggestion or bug report on the community. - -.. image:: ../_static/3.png - - - -Feedback ---------- -Send your feedback to QPython using the contact information: support@qpython.org diff --git a/docs/_sources/en/guide_developers.rst.txt b/docs/_sources/en/guide_developers.rst.txt deleted file mode 100644 index add6f43..0000000 --- a/docs/_sources/en/guide_developers.rst.txt +++ /dev/null @@ -1,75 +0,0 @@ -Android -============================== -Android part offers the common Python user interaction functions, like console, editor, file browsing, QRCode reader etc. - - -Console ---------- - - -Editor ------------ - - -File browsing ---------------- - - -QRCode reader ------------------------- - - -QSL4A -============================== -QSL4A is the folk of SL4A for QPython, which allows users being able to program with Python script for android. - - -QPython Core -============================== -Besides Python core, QPython core offer three types programming mode also. - -Python 2.x ------------ - -Python 3.x ------------ - -Console program ---------------- - -Kivy program ------------- - -WebApp program --------------- - - - -Pip and libraries -============================== -Pip and libraries offer great expansion ability for QPython. - -Pip ---------- - -Libraries ----------- - - -Quick tools -============================== -Quick tools offers better guide for using QPython well for different users. - -QPython API ------------- - -FTP --------- - - -QPY.IO (Enterprise service) -============================== -It's a enterprise service which aim at offering quick android development delivery with QPython. - -It's QPython's maintainers' main paid service, but not a opensource project. - diff --git a/docs/_sources/en/guide_extend.rst.txt b/docs/_sources/en/guide_extend.rst.txt deleted file mode 100644 index bda077e..0000000 --- a/docs/_sources/en/guide_extend.rst.txt +++ /dev/null @@ -1,131 +0,0 @@ -QPython Open API -===================================================== -QPython has an open activity which allow you run qpython from outside. - -The MPyAPI's definition seems like the following: - -:: - - - - - - - - - - - - - - - - - - - - - - - - - - - -**So, with it's help, you could:** - -Share some content to QPython's scripts ---------------------------------------------- -You could choose some content in some app, and share to qpython's script, then you could handle the content with the **sys.argv[2]** - -`Watch the demo video on YouTube `_ - - -Run QPython's script from your own application ------------------------------------------------------- - -You can call QPython to run some script or python code in your application by call this activity, like the following sample: - -:: - - // code sample shows how to call qpython API - String extPlgPlusName = "org.qpython.qpy"; // QPython package name - Intent intent = new Intent(); - intent.setClassName(extPlgPlusName, "org.qpython.qpylib.MPyApi"); - intent.setAction(extPlgPlusName + ".action.MPyApi"); - - Bundle mBundle = new Bundle(); - mBundle.putString("app", "myappid"); - mBundle.putString("act", "onPyApi"); - mBundle.putString("flag", "onQPyExec"); // any String flag you may use in your context - mBundle.putString("param", ""); // param String param you may use in your context - - /* - * The Python code we will run - */ - String code = "import androidhelper\n" + - "droid = androidhelper.Android()\n" + - "line = droid.dialogGetInput()\n" + - "s = 'Hello %s' % line.result\n" + - "droid.makeToast(s)\n" - - mBundle.putString("pycode", code); - intent.putExtras(mBundle); - startActivityForResult(intent, SCRIPT_EXEC_PY); - ... - - - - // And you can handle the qpython callabck result in onActivityResult - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == SCRIPT_EXEC_PY) { - if (data!=null) { - Bundle bundle = data.getExtras(); - String flag = bundle.getString("flag"); - String param = bundle.getString("param"); - String result = bundle.getString("result"); // Result your Pycode generate - Toast.makeText(this, "onQPyExec: return ("+result+")", Toast.LENGTH_SHORT).show(); - } else { - Toast.makeText(this, "onQPyExec: data is null", Toast.LENGTH_SHORT).show(); - - } - } - } - - -`Checkout the full project from github `_ - -And there is `a production application - QPython Plugin for Tasker `_ - -QPython Online Service -===================================================== - -Now the QPython online service only open for QPython, not QPython3. - - -QPypi ---------------------------------------------------------- -Can I install some packages which required pre-compiled ? -Sure, you could install some pre-compiled packages from QPypi, you could find it through "Libraries" on dashboard. - - -.. image:: ../_static/guide_extend_pic2.png - -If you couldn't found the package here, you could send email to river@qpython.org . - -QPY.IO ---------------------------------------------------- -Can I build an independent APK from QPython script? - -Sure you can. now the service is **in BETA**, it's a challenging thing. We will publish it as a online service, for we want to let the development process is simple, you don't need to own the development environment set up when you want to build a application. - - -.. image:: ../_static/guide_extend_pic1.png - -If you want to try it out or have some business proposal, please contact with us by sending email to river@qpython.org . diff --git a/docs/_sources/en/guide_helloworld.rst.txt b/docs/_sources/en/guide_helloworld.rst.txt deleted file mode 100644 index ae6d11f..0000000 --- a/docs/_sources/en/guide_helloworld.rst.txt +++ /dev/null @@ -1,121 +0,0 @@ -Writing "Hello World" -======================== - - -Hello world ----------------- -.. image:: ../_static/guide_helloworld_pic1.png - :alt: hello world - -Well, after you became a bit more familiar with QPython, let's create our first program in QPython. Obviously, it will be `helloworld.py`. ;) - -Start QPython, open editor and enter the following code: - -:: - - import androidhelper - droid = androidhelper.Android() - droid.makeToast('Hello, Username!') - -No wonder, it's just similar to any other hello-world program. When executed, it just shows pop-up message on the screen (see screenshot on the top). Anyway, it's a good example of QPython program. - -SL4A library ------------- - -It begins with *import androidhelper* — the most useful module in QPython, which encapsulates almost all interface with Android, available in Python. Any script developed in QPython starts with this statement (at least if it claims to communicate with user). Read more about Python library `here `_ and import statement `here `_ - -By the way, if you're going to make your script compatible with SL4A, you should replace the first line with the following code (and use `android` instead `androidhelper` further in the program): - -:: - -> try: -> import androidhelper as android -> except ImportError: -> import android - -Ok, next we're creating an object `droid` (actually a class), it is necessary to call RPC functions in order to communicate with Android. - -And the last line of our code calls such function, `droid.makeToast()`, which shows a small pop-up message (a "toast") on the screen. - -Well, let's add some more functionality. Let it ask the user name and greet them. - -More samples ---------------- -We can display a simple dialog box with the title, prompt, edit field and buttons **Ok** and **Cancel** using `dialogGetInput` call. Replace the last line of your code and save it as `hello1.py`: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - -Well, I think it should return any respond, any user reaction. That's why I wrote `respond = ...`. But what the call actually returns? Let's check. Just add `print` statement after the last line: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - print respond - -Then save and run it... - -Oops! Nothing printed? Don't worry. Just pull notification bar and you will see "QPython Program Output: hello1.py" — tap it! - - -As you can see, `droid.dialogGetInput()` returns a JSON object with three fields. We need only one — `result` which contains an actual input from user. - -Let's add script's reaction: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - print respond - message = 'Hello, %s!' % respond.result - droid.makeToast(message) - -Last two lines (1) format the message and (2) show the message to the user in the toast. See `Python docs `_ if you still don't know what `%` means. - -Wow! It works! ;) - -Now I'm going to add a bit of logic there. Think: what happen if the user clicks **Cancel** button, or clicks **Ok** leaving the input field blank? - -You can play with the program checking what contains `respond` variable in every case. - -First of all, I want to put text entered by user to a separate variable: `name = respond.result`. Then I'm going to check it, and if it contains any real text, it will be considered as a name and will be used in greeting. Otherwise another message will be shown. Replace fifth line `message = 'Hello, %s!' % respond.result` with the following code: - -:: - - name = respond.result - if name: - message = 'Hello, %s!' % name - else: - message = "Hey! And you're not very polite, %Username%!" - -Use **<** and **>** buttons on the toolbar to indent/unindent lines in if-statement (or just use space/backspace keys). You can read more about indentation in Python `here `_; if-statement described `here `_. - -First of all, we put user input to the variable `name`. Then we check does `name` contain anything? In case the user left the line blank and clicked **Ok**, the return value is empty string `''`. In case of **Cancel** button pressed, the return value is `None`. Both are treated as false in if-statement. So, only if `name` contans anything meaninful, then-statement is executed and greeting "Hello, ...!" shown. In case of empty input the user will see "Hey! And you're not very polite, %Username%!" message. - -Ok, here is the whole program: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - print respond - name = respond.result - if name: - message = 'Hello, %s!' % name - else: - message = "Hey! And you're not very polite, %Username%!" - droid.makeToast(message) - - -`Thanks dmych offer the first draft in his blog `_ - - - - diff --git a/docs/_sources/en/guide_howtostart.rst.txt b/docs/_sources/en/guide_howtostart.rst.txt deleted file mode 100644 index 8575d63..0000000 --- a/docs/_sources/en/guide_howtostart.rst.txt +++ /dev/null @@ -1,133 +0,0 @@ - - -QPython: How To Start -======================== -Now, I will introduce the QPython's features through it's interfaces. - -1. Dashboard ------------------- - -.. image:: ../_static/guide_howtostart_pic1.png - :alt: QPython start - - -After you installed QPython, start it in the usual way by tapping its icon in the menu. Screenshot on the top of this post shows what you should see when QPython just started. - -**Start button** - -By tapping the big button with Python logo in the center of the screen you can - -**Launch your local script or project** - -*Get script from QR code* (funny brand new way to share and distribute your code, you can create QRCode through `QPython's QRCode generator `_ - -Now you can install many 3rd libaries ( pure python libraries mainly ) through pip_console.py script. - -If you want QPython to run some script of project when you click the start button, you can make it by setting default program in setting activity. - - -**Developer kit dashboard** - -If you swipe to the left instead of tapping, you will see another (second) main screen of QPython *(Pic. 2)*. As for me, it is much more useful and comfortable for developer. - -.. image:: ../_static/guide_howtostart_pic2.png - :alt: QPython develop dashboard - - -Tools available here: - -* **Console** — yes, it's regular Python console, feel free to comunicate with interpreter directly -* **Editor** — QPython has a nice text editor integrated with the rest, you can write code and run it without leaving the application -* **My QPython** — here you can find your scripts and projects -* **System** — maintain libraries and components: install and uninstall them -* **Package Index** opens the page `QPyPI `_ in browser allowing to install packages listed there -* **Community** leads to `QPython.org `_ page. Feel free to join or ask&answer questions in the QPython community. - -By long clicking on the console or editor, you have chance to create the shortcut on desktop which allow you enter console or editor directly. - -Next, let's see the console and the editor. - -2. Console and editor -------------------------- - -.. image:: ../_static/guide_howtostart_pic3.png - :alt: QPython console - - -As I said before, there is an ordinary Python console. Many people usually use it to explore objects' properties, consult about syntax and test their ideas. You can type your commands directly and Python interpreter will execute them. You can open additional consoles by tapping the plus button (1) and usedrop-down list on the upper left corner to switch between consoles (2). To close the console just tap the close button (3). - -.. image:: ../_static/guide_howtostart_pic4.png - :alt: QPython notification - - -Please note, there will be notification in the notification bar unless you explicitly close the console and you always can reach the open console by tapping the notification. - - - -.. image:: ../_static/guide_howtostart_pic5.png - :alt: QPython editor - - -The editor allows you obviously (hello Cap!) enter and modify text. Here you can develop your scripts, save them and execute. The editor supports Python syntax highlighting and shows line numbers (there is no ability to go to the line by number though). *(above picture)* - -When typing, you can easily control indentation level (which is critical for Python code) using two buttons on the toolbar (1). Next buttons on the toolbar are **Save** and **Save As** (2), then goes **Run** (3), **Undo**, **Search**, **Recent Files** and **Settings** buttons. Also there are two buttons on the top: **Open** and **New** (5). - -When saving, don't forget to add `.py` estension to the file name since the editor don't do it for you. - -3. Programs --------------------- -You can find the scripts or projects in My QPython. My QPython contains the scripts and Projects. - -By long clicking on script or project, you have chance to create the shortcut for the script or project. Once you have created the shortcuts on desktop, you can directly run the script or project from desktop. - - -**Scripts** -Scripts : A single script. The scripts are in the /sdcard/com.hipipal.qpyplus/scripts directory. -If you want your script could be found in My QPython, please upload it to this directory. - -When you click the script, you can choose the following actions: - -- Run : Run the script -- Open : Edit the script with built-in editor -- Rename : Rename the script -- Delete : Delete the script - -**Projects** -Projects : A directory which should contain the main.py as the project's default launch script, and you can put other dependency 3rd libraries or resources in the same directory, if you want your project could be found in My QPython, please upload them into this directory. - -When you click on the project, you can choose the following actions: - -- Run : run the project -- Open : use it to explore project's resources -- Rename : Rename the project -- Delete : Delete the project - -4. Libraries --------------- - -By installing 3rd libraries, you can extend your qpython's programming ability quickly. There are some ways to install libraries. - -**QPypi** - -You can install some pre-built libraries from QPypi, like numpy etc. - -**Pip console** - -You can install most pure python libraries through pip console. - - -Besides the two ways above, you could copy libraries into the /sdcard/qpython/lib/python2.7/site-packages in your device. - - -*Notice:* -Some libraries mixed with c/c++ files could not be install through pip console for the android lacks the compiler environment, you could ask help from qpython developer team. - - -5. Community --------------- -It will redirect to the QPython.org, including somthe source of this documentation, and there are some qpython user communities' link, many questions of qpython usage or programming could be asked in the community. - - - - -`Thanks dmych offer the first draft in his blog `_ diff --git a/docs/_sources/en/guide_libraries.rst.txt b/docs/_sources/en/guide_libraries.rst.txt deleted file mode 100644 index e4bb3ef..0000000 --- a/docs/_sources/en/guide_libraries.rst.txt +++ /dev/null @@ -1,292 +0,0 @@ -QPython built-in Libraries -========================== -QPython is using the Python 2.7.2 and it support most Python stardard libraries. And you could see their documentation through Python documentation. - -QPython dynload libraries --------------------------------------------------------------- -Just like Python, QPython contains python built-in .so libraries. - -Usually, you don't need to import them manually, they were used in stardard libraries, and could be imported automatically. - -* _codecs_cn.so -* _codecs_hk.so -* _codecs_iso2022.so -* _codecs_jp.so -* _codecs_kr.so -* _codecs_tw.so -* _csv.so -* _ctypes.so -* _ctypes_test.so -* _hashlib.so -* _heapq.so -* _hotshot.so -* _io.so -* _json.so -* _lsprof.so -* _multibytecodec.so -* _sqlite3.so -* _ssl.so -* _testcapi.so -* audioop.so -* future_builtins.so -* grp.so -* mmap.so -* resource.so -* syslog.so -* termios.so -* unicodedata.so - -QPython stardard libraries ---------------------------- -The following libraries are the stardard QPython libraries which are the same as Python: - -- `BaseHTTPServer.py `_ -- `binhex.py `_ -- `fnmatch.py `_ -- mhlib.py -- quopri.py -- sysconfig.py -- Bastion.py -- bisect.py -- formatter.py -- mimetools.py -- random.py -- tabnanny.py -- CGIHTTPServer.py -- bsddb -- fpformat.py -- mimetypes.py -- re.py -- tarfile.py -- ConfigParser.py -- cProfile.py -- fractions.py -- mimify.py -- repr.py -- telnetlib.py -- Cookie.py -- calendar.py -- ftplib.py -- modulefinder.py -- rexec.py -- tempfile.py -- DocXMLRPCServer.py -- cgi.py -- functools.py -- multifile.py -- rfc822.py -- textwrap.py -- HTMLParser.py -- cgitb.py -- genericpath.py -- mutex.py -- rlcompleter.py -- this.py -- chunk.py -- getopt.py -- netrc.py -- robotparser.py -- threading.py -- MimeWriter.py -- cmd.py -- getpass.py -- new.py -- runpy.py -- timeit.py -- Queue.py -- code.py -- gettext.py -- nntplib.py -- sched.py -- toaiff.py -- SimpleHTTPServer.py -- codecs.py -- glob.py -- ntpath.py -- sets.py -- token.py -- SimpleXMLRPCServer.py -- codeop.py -- gzip.py -- nturl2path.py -- sgmllib.py -- tokenize.py -- SocketServer.py -- collections.py -- hashlib.py -- numbers.py -- sha.py -- trace.py -- StringIO.py -- colorsys.py -- heapq.py -- opcode.py -- shelve.py -- traceback.py -- UserDict.py -- commands.py -- hmac.py -- optparse.py -- shlex.py -- tty.py -- UserList.py -- compileall.py -- hotshot -- os.py -- shutil.py -- types.py -- UserString.py -- compiler -- htmlentitydefs.py -- os2emxpath.py -- site.py -- unittest -- _LWPCookieJar.py -- config -- htmllib.py -- smtpd.py -- urllib.py -- _MozillaCookieJar.py -- contextlib.py -- httplib.py -- pdb.py -- smtplib.py -- urllib2.py -- __future__.py -- cookielib.py -- ihooks.py -- pickle.py -- sndhdr.py -- urlparse.py -- __phello__.foo.py -- copy.py -- imaplib.py -- pickletools.py -- socket.py -- user.py -- _abcoll.py -- copy_reg.py -- imghdr.py -- pipes.py -- sqlite3 -- uu.py -- _pyio.py -- csv.py -- importlib -- pkgutil.py -- sre.py -- uuid.py -- _strptime.py -- ctypes -- imputil.py -- plat-linux4 -- sre_compile.py -- warnings.py -- _threading_local.py -- dbhash.py -- inspect.py -- platform.py -- sre_constants.py -- wave.py -- _weakrefset.py -- decimal.py -- io.py -- plistlib.py -- sre_parse.py -- weakref.py -- abc.py -- difflib.py -- json -- popen2.py -- ssl.py -- webbrowser.py -- aifc.py -- dircache.py -- keyword.py -- poplib.py -- stat.py -- whichdb.py -- antigravity.py -- dis.py -- lib-tk -- posixfile.py -- statvfs.py -- wsgiref -- anydbm.py -- distutils -- linecache.py -- posixpath.py -- string.py -- argparse.py -- doctest.py -- locale.py -- pprint.py -- stringold.py -- xdrlib.py -- ast.py -- dumbdbm.py -- logging -- profile.py -- stringprep.py -- xml -- asynchat.py -- dummy_thread.py -- macpath.py -- pstats.py -- struct.py -- xmllib.py -- asyncore.py -- dummy_threading.py -- macurl2path.py -- pty.py -- subprocess.py -- xmlrpclib.py -- atexit.py -- email -- mailbox.py -- py_compile.py -- sunau.py -- zipfile.py -- audiodev.py -- encodings -- mailcap.py -- pyclbr.py -- sunaudio.py -- base64.py -- filecmp.py -- markupbase.py -- pydoc.py -- symbol.py -- bdb.py -- fileinput.py -- md5.py -- pydoc_data -- symtable.py - - - -Python 3rd Libraries -========================== - -- `BeautifulSoup.py(3) `_ -- pkg_resources.py -- androidhelper -- plyer -- `bottle.py `_ -- qpy.py -- qpythoninit.py -- setuptools -- `pip `_ - - -Androidhelper APIs -======================== -To simplify QPython SL4A development in IDEs with a -"hepler" class derived from the default Android class containing -SL4A facade functions & API documentation - - -.. toctree:: - :maxdepth: 2 - - guide_androidhelpers diff --git a/docs/_sources/en/guide_program.rst.txt b/docs/_sources/en/guide_program.rst.txt deleted file mode 100644 index 895615c..0000000 --- a/docs/_sources/en/guide_program.rst.txt +++ /dev/null @@ -1,191 +0,0 @@ -QPython's main features -==================================== - -**With QPython, you could build android applications with android application and script language now.** - - -Why should I choose QPython ------------------------------------------------- -The smartphone is becomming people's essential information & technical assitant, so an flexiable script engine could help people complete most jobs efficiently without complex development. - -QPython offer **an amazing developing experience**, with it's help, you could implement the program easily without complex installing IDE, compiling, package progress etc. - -QPython's main features -------------------------- -You can do most jobs through QPython just like the way that Python does on PC/Laptop. - - -**Libraries** - -- QPython supports most stardard Python libraries. - -- QPython supports many 3rd Python libraries which implemented with pure Python code. - -- QPython supports some Python libraries mixed with C/C++ code which pre-compiled by QPython develop team. - -- QPython allows you put on the libraries by yourself. - -Besides these, QPython offers some extra features which Python doesn't offer, Like: - -- Android APIs Access(Like SMS, GPS, NFC, BLUETOOTH etc) - -*Why QPython require so many permissions?* - -QPython need these permissions to access Android's API. - - -**Runtime modes** - -QPython supports several runtime modes for android. - -**Console mode** - -It's the default runtime mode in QPython, it's very common in PC/laptop. - - -**Kivy mode** - -QPython supports `Kivy `_ as the GUI programming solution. - - -Kivy is an open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps. - -Your device should support opengl2.0 for supporting kivy mode. - -By insert into the following header in your script, you can let your script run with kivy mode. - -:: - - #qpy:kivy - - -*An kivy program in QPython sample* - -:: - - #qpy:kivy - from kivy.app import App - from kivy.uix.button import Button - - class TestApp(App): - def build(self): - return Button(text='Hello World') - - TestApp().run() - - -If your library require the opengl driver, you shoule declare the kivy mode header in your script, like the jnius. - -*NOTE: QPython3 didn't support kivy mode yet, we have plan to support it in the future* - -**WebApp mode** - -We recommend you implement WebApp with QPython for it offer the easy to accomplish UI and Take advantage of Python's fast programming strong point. - -WebApp will start a webview in front, and run a python web service background. -You could use *bottle*(QPython built-in library) to implement the web service, or you could install *django* / *flask* framework also. - - -By insert into the following header in your script, you can let your script run with webapp mode. - -:: - - #qpy:webapp: - #qpy: - #qpy:// - -For example - -:: - - #qpy:webapp:Hello QPython - #qpy://localhost:8080/hello - - -The previous should start a webview which should load the *http://localhost:8080/hello* as the default page, and the webview will keep the titlebar which title is "Hello QPython", if you add the *#qpy:fullscreen* it will hide the titlebar. - - -:: - - #qpy:webapp:Hello Qpython - #qpy://127.0.0.1:8080/ - """ - This is a sample for qpython webapp - """ - - from bottle import Bottle, ServerAdapter - from bottle import run, debug, route, error, static_file, template - - - ######### QPYTHON WEB SERVER ############### - - class MyWSGIRefServer(ServerAdapter): - server = None - - def run(self, handler): - from wsgiref.simple_server import make_server, WSGIRequestHandler - if self.quiet: - class QuietHandler(WSGIRequestHandler): - def log_request(*args, **kw): pass - self.options['handler_class'] = QuietHandler - self.server = make_server(self.host, self.port, handler, **self.options) - self.server.serve_forever() - - def stop(self): - #sys.stderr.close() - import threading - threading.Thread(target=self.server.shutdown).start() - #self.server.shutdown() - self.server.server_close() #<--- alternative but causes bad fd exception - print "# qpyhttpd stop" - - - ######### BUILT-IN ROUTERS ############### - @route('/__exit', method=['GET','HEAD']) - def __exit(): - global server - server.stop() - - @route('/assets/') - def server_static(filepath): - return static_file(filepath, root='/sdcard') - - - ######### WEBAPP ROUTERS ############### - @route('/') - def home(): - return template('

Hello {{name}} !

'+ \ - 'View source',name='QPython') - - - ######### WEBAPP ROUTERS ############### - app = Bottle() - app.route('/', method='GET')(home) - app.route('/__exit', method=['GET','HEAD'])(__exit) - app.route('/assets/', method='GET')(server_static) - - try: - server = MyWSGIRefServer(host="127.0.0.1", port="8080") - app.run(server=server,reloader=False) - except Exception,ex: - print "Exception: %s" % repr(ex) - - -If you want the webapp could be close when you exit the webview, you have to define the *@route('/__exit', method=['GET','HEAD'])* method , for the qpython will request the *http://localhost:8080/__exit* when you exit the webview. So you can release other resource in this function. - -.. image:: ../_static/guide_program_pic1.png - :alt: QPython WebApp Sample - -*Running screenshot* - - -In the other part of the code, you could implement a webserver whish serve on localhost:8080 and make the URL /hello implement as your webapp's homepage. - - -**Q mode** - -If you don't want the QPython display some UI, pelase try to use the QScript mode, it could run a script background, just insert the following header into your script: - -:: - - #qpy:qpyapp diff --git a/docs/_sources/features/2018-09-28-dropbear-cn.rst.txt b/docs/_sources/features/2018-09-28-dropbear-cn.rst.txt deleted file mode 100644 index f6de950..0000000 --- a/docs/_sources/features/2018-09-28-dropbear-cn.rst.txt +++ /dev/null @@ -1,78 +0,0 @@ -如何在QPython 使用 SSH -======================== - -近来悄悄更新了不少好玩的包,但是我最喜欢的是今天介绍的这个特性,刚被集成到QPython中的dropbear SSH工具。 - -Dropbear SSH 是很多嵌入式linux系统首选的ssh工具,结合qpython,能让你方便地进行编程来自动管理服务器或你的手机。 - -如何远程登录 你的服务器? ----------------------------- - -.. image:: https://mmbiz.qpic.cn/mmbiz_jpg/tuObYW62d0iaJIF2ibzmISF2PBd92KzAPnZfLlIbyOglK3NOvD508VccuQafhhic036KuxGeiasAQDqb2YMDmHWo2w/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1 - :alt: 1 Dashboard 长按Terminal, 选择Shell Terminal - -*1 Dashboard 长按Terminal, 选择Shell Terminal* - -.. image:: https://mmbiz.qpic.cn/mmbiz_jpg/tuObYW62d0iaJIF2ibzmISF2PBd92KzAPncIibPKFhA6RtwC5tQyia66nDWcnccv8aSrZJDNKzBiaduvy23rib1oLv5A/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1 - :alt: 2 Shell中输入ssh @ - -*2 Shell中输入ssh @* - -.. image:: https://mmbiz.qpic.cn/mmbiz_jpg/tuObYW62d0iaJIF2ibzmISF2PBd92KzAPnEpC5zNbJJejeGCvnNgEIHDKLX9S72GjVybShlqvtzvPATsh4Fg13Kw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1 - :alt: 3 已经登录到了远端服务器 - -*3 已经登录到了远端服务器* - - -除了从手机上登录服务器外,你还可以登录到你的手机。 - -如何登录到你的手机? ------------------------ - -这个功能适合高级玩家,因为一些权限的问题,在手机上开sshd服务需要root权限。 -第一次使用,需要从shell terminal中进行下初始化操作 - -``` -su - #切换为root用户, - -mkdir dropbear # 在 /data/data/org.qpython.qpy/files下创建dropbear目录 - -初始化对应的key - -dbkey -t dss -f dropbear/dropbear_dss_host_key - -dbkey -t rsa -f dropbear/dropbear_rsa_host_key - -dbkey -t ecdsa -f dropbear/dropbear_ecdsa_host_key -``` - -完成上述步骤之后,即可启动sshd服务。 - -.. image:: https://mmbiz.qpic.cn/mmbiz_jpg/tuObYW62d0iaJIF2ibzmISF2PBd92KzAPnLL1eeZvpzyJXLfBLJT1hmbQEKs1QDodeugXPh8vOvJ77HNvHyT6sDg/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1 - :alt: 启动sshd服务:sshd -p 8088 -P dropbear/db.pid -F # 前台启动,端口 8088 - -*启动sshd服务:sshd -p 8088 -P dropbear/db.pid -F # 前台启动,端口 8088* - -接下来从你的电脑中就可以登录了你的手机了默认密码就是我们的app名字,你懂得。 - -.. image:: https://mmbiz.qpic.cn/mmbiz_png/tuObYW62d0iaJIF2ibzmISF2PBd92KzAPn4FOhNFPVKEpZE8mCibia8Cgf4sUK41cldnFWYpqtaY62LfX6MiabwYquQ/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1 - :alt: 从你的笔记本登录手机 - -*从你的笔记本登录手机* - -**另外还支持下面高级特性:** - -- ssh 支持证书登录,借助dbconvert,可以把你的openssh证书转换过来,存到对应的目录,用 ssh -i 指定证书即可 -- sshd 支持 authorized_keys, 只需要把该文件保存到你的dropbear目录下,即可 -- scp,远程拷贝文件 - -后续计划移植更多有用的工具 - -其他 ------- - -不想玩了记得kill掉sshd进程,之前需要指定pid文件就是方便你获得 pid - -kill `cat dropbear/db.pid` - -`获得QPython App `_ diff --git a/docs/_sources/zh/contributorshowto.rst.txt b/docs/_sources/zh/contributorshowto.rst.txt deleted file mode 100644 index da17ec1..0000000 --- a/docs/_sources/zh/contributorshowto.rst.txt +++ /dev/null @@ -1,36 +0,0 @@ - -QPython文档体系说明 ---------------------- - -QPython 文档体系分为 英文/中文 两部分,我们努力保持两种语言对应内容的准确和同步,其中内容其中又分为 - -* 快速开始 (使用上的帮助) - -* 编程指南 (主要是用QPython来进行编程和开发的指南) - -* QPython黑客指南 (深入折腾的指导) - -* 贡献者指南 (QPython贡献者指南,分为在QPython team内的,和以外的) - - -如何提交文档 -------------------------------- -文档非常重要,我们用sphinx来组织文档,并且文档会通过github page功能直接推到qpython.org网站中 -在想要贡献QPython文档之前仔细阅读我们的指南 - -* git clone http://github.com/qpython-android/qpython - -* 进入到 项目的qpython-docs目录中 - -* 按照sphinx规则编辑source中的文件即可 - -* 最后cd到qpython-docs中并运行build.sh - -* 打开浏览器打开本地文件检查, - -* 如果检查无问题则可以提交,然后浏览qpython.org即可看到最新的更新 - - -如何提交翻译 -------------------------------- -QPython是一个支持多语言的应用,你可以通过以下方式来提交对应国家的翻译 diff --git a/docs/_sources/zh/howtostart.rst.txt b/docs/_sources/zh/howtostart.rst.txt deleted file mode 100644 index 8a1ed07..0000000 --- a/docs/_sources/zh/howtostart.rst.txt +++ /dev/null @@ -1,28 +0,0 @@ -快速开始 -========= - -* `QPython - 使用说明 `_ -* `QPython - 快速开始 `_ -* `“你好,世界!” `_ - -编程指南 -============ - -* `QPython - 开发 WEB APP `_ -* `QPython - Bottle 快速了解 `_ - -QPython黑客指南 -================= - -* `QPython - 编程向导 `_ -* `QPython 黑客 `_ - -贡献者指南 -================= -欢迎加入 QPython 团队 - -.. toctree:: - :maxdepth: 2 - - contributorshowto - diff --git a/docs/_sources/zhindex.rst.txt b/docs/_sources/zhindex.rst.txt deleted file mode 100644 index 6006633..0000000 --- a/docs/_sources/zhindex.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -中文用户向导 -============================================= - -欢迎 ! ------------------------------- -QPython/QPython3 的最新版本1.3.2(QPython), 1.0.2(QPython3) 已经发布,它包含了许多惊艳的特性,请从应用市场安装 - - -QPython 起步 ------------------------- -.. toctree:: - :maxdepth: 2 - - zh/howtostart - - -更多链接 ------------------------------- -* `常见问题 `_ -* `在百度贴吧里讨论 `_ -* `在微博问我们问题 `_ -* `给我们发邮件 `_ -* `报告问题 `_ - -QPython 用户开发组 ------------------------------- -* 请加入 `QPython 用户开发者组 `_ 来和全世界的 QPython 用户一块来玩转QPython。 -* 加入QPython QQ组(Q群:540717901)来和中国活跃的QPython 用户一起玩转 QPython - -如何贡献 ---------- -想成为 QPython 的贡献者么?请 `给我们发邮件 `_ - diff --git a/docs/community.html b/docs/community.html deleted file mode 100644 index 9fe1bc4..0000000 --- a/docs/community.html +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/docs/contributors.html b/docs/contributors.html deleted file mode 100644 index 6d2f13f..0000000 --- a/docs/contributors.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - -Contributors — QPython 0.9 documentation - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- -
-
-
-
    -
  • Guide »
  • -
  • Contributors
  • -
-
-
-
-
-

Contributors

-

Thanks contributers for helping with QPython projects.

-

We want you to join us, If you want to join us, please email us support@qpython.org

-
-

Developers

-

River

-

kyle kersey

-

Mae

-

ZRH

-

How to contribute

-

Please send an email to us <support@qpython.org> with your self introduction and what kind of development do you want to contribute.

-
-
-

Communities Organizers

-

LR (Chinese QQ Group: 540717901)

-

How to run a QPython Community

-

We appreciate that you build a QPython topic community, you can invite us to join for answering any question about qpython by sending an email to us for telling how to join<support@qpython.org>.

-
-
-

Localization

-

Fogapod (Russian)

-

Frodo821 (Japanese)

-

Darciss Rehot’acc (Turkish)

-

Christo phe (French)

-

How to contribute localization translate

-

We appreciate that you are willing to help with translate QPython / QPython3.

-

This repo is the localization project, you can post pull request and send en email to us<support@qpython.org>, then we will merge it and publish in next update.

-

If you don’t want to use git, you can just translate the words which do not contains translatable=”false” in the following files.

- -

And there is the description file

- -
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/discord.html b/docs/discord.html deleted file mode 100644 index 4f7cb82..0000000 --- a/docs/discord.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/document.html b/docs/document.html deleted file mode 100644 index 124e8bb..0000000 --- a/docs/document.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - -Welcome to read the QPython guide! — QPython 0.9 documentation - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- -
-
-
-
    -
  • Guide »
  • -
  • Welcome to read the QPython guide!
  • -
-
-
-
-images/bestpython.png -
-

Welcome to read the QPython guide!

-

QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. It’s Python on Android!

-

QPython has several millions users in the world already, it’s a great project for programming users, welcome to join us for contributing to this project NOW.

-
-

What’s NEW

-

QPython project include the QPython and QPython3 applications.

-

QPython application is using the Python 2.7.2 , and QPython application is using the Python 3.2.2 .

-

QPython’s newest version is 1.3.2 (Released on 2017/5/12) , QPython3’s newest version is 1.0.2 (Released on 2017/3/29), New versions include many amazing features, please upgrade to the newest version as soon from google play, amazon appstore etc.

-
-
-

Thanks these guys who are contributing

-

They are pushing on the QPython project moving forward.

-River is the project's organizer and the current online QPython's author. -Mae is a beautiful and talented girl developer who is good at python & android programming. -Zoom.Quiet is a knowledgeable guy who is famous in many opensource communities. -MathiasLuo is a android geek developer -liyuanrui is a Chinese geek -Kyle kersey is a US geek -

Do you want to join the great QPython team ? You could Ask qustions on twitter or email us. -And you could fork us on github and send pull request.

-
-
-

QPython Communities

-

There are many active QPython communities where you could meet the QPython users like you

- -

And you could talk to us through social network

- -

It’s the official QPython Users & Contributors’ Guide, please follow these steps for using and contributing.

-
-
-

Support

-

We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implemented soon for we lack resources.

-

So if you have any issue need the core developer team to solve with higher priority, you could try the bountysource service.

-
- -
-

Others

-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/faq.html b/docs/en/faq.html deleted file mode 100644 index 8f5a85a..0000000 --- a/docs/en/faq.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - -FAQ — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- -
-
-
- -
-
-
-
-

FAQ

-

How to run qpython script from other terminals ?

-
    -
  • You could “share to” qpython from 3rd apps.
  • -
  • You need to root the android device first, then soure the env vars (Just like the qpython wiki link you mentioned) and execute the /data/data/org.qpython.qpy/bin/python or /data/data/org.qpython.qpy/bin/python-android5 (for android 5 above)
  • -
-

Share to case sample

-

Support pygame ?

-

Even you could import pygame in QPython, but QPython doesn’t support pygame now.

-

We will consider to support it later, please follow us on facebook to get it’s progress.

-

Pygame case sample

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide.html b/docs/en/guide.html deleted file mode 100644 index 6f06cbb..0000000 --- a/docs/en/guide.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - -Getting started — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
-
    -
  • Guide »
  • -
  • Getting started
  • -
-
-
-
-
-

Getting started

-

How to start quickly ? Just follow the following steps:

- -
- -
-

Developer Guide

-

QPython developers’ goal is pushing out a great Python for android.

- -
- -
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_androidhelpers.html b/docs/en/guide_androidhelpers.html deleted file mode 100644 index 7836a7b..0000000 --- a/docs/en/guide_androidhelpers.html +++ /dev/null @@ -1,3680 +0,0 @@ - - - - - -AndroidFacade — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-

The Scripting Layer for Android (abridged as SL4A, and previously named Android Scripting Environment or ASE) is a library that allows the creation and running of scripts written in various scripting languages directly on Android devices. QPython start to extend the SL4A project and integrate it.

-../images/sl4a.jpg -

There are many SL4A APIs, if you found any issue, please report an issue.

-
-

AndroidFacade

-
-

Clipboard APIs

-
-
-setClipboard(text)
-

Put text in the clipboard

- --- - - - -
Parameters:text (str) – text
-
-
-
-getClipboard(text)
-

Read text from the clipboard

- --- - - - -
Returns:The text in the clipboard
-
-
from androidhelper import Android
-droid = Android()
-#setClipboard
-droid.setClipboard("Hello World")
-#getClipboard
-clipboard = droid.getClipboard().result
-
-
-
-
-

Intent & startActivity APIs

-
-
-makeIntent(action, uri, type, extras, categories, packagename, classname, flags)
-

Starts an activity and returns the result

- --- - - - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • categories(Optional) (list) – a List of categories to add to the Intent
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
  • flags(Optional) (int) – Intent flags
  • -
-
Returns:

An object representing an Intent

-
-
-
sample code to show makeIntent
-
-
-
-
-getIntent()
-

Returns the intent that launched the script

-
-
sample code to show getIntent
-
-
-
-
-startActivityForResult(action, uri, type, extras, packagename, classname)
-

Starts an activity and returns the result

- --- - - - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
-
Returns:

A Map representation of the result Intent

-
-
-
sample code to show startActivityForResult
-
-
-
-
-startActivityForResultIntent(intent)
-

Starts an activity and returns the result

- --- - - - - - -
Parameters:intent (Intent) – Intent in the format as returned from makeIntent
Returns:A Map representation of the result Intent
-
-
sample code to show startActivityForResultIntent
-
-
-
-
-startActivityIntent(intent, wait)
-

Starts an activity

- --- - - - -
Parameters:
    -
  • intent (Intent) – Intent in the format as returned from makeIntent
  • -
  • wait(Optional) (bool) – block until the user exits the started activity
  • -
-
-
-
sample code to show startActivityIntent
-
-
-
-
-startActivity(action, uri, type, extras, wait, packagename, classname)
-

Starts an activity

- --- - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • wait(Optional) (bool) – block until the user exits the started activity
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
-
-
-
sample code to show startActivityForResultIntent
-
-
-
-
-

SendBroadcast APIs

-
-
-sendBroadcast(action, uri, type, extras, packagename, classname)
-

Send a broadcast

- --- - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
-
-
-
sample code to show sendBroadcast
-
-
-
-
-sendBroadcastIntent(intent)
-

Send a broadcast

- --- - - - -
Parameters:intent (Intent) – Intent in the format as returned from makeIntent
-
-
sample code to show sendBroadcastIntent
-
-
-
-
-

Vibrate

-
-
-vibrate(intent)
-

Vibrates the phone or a specified duration in milliseconds

- --- - - - -
Parameters:duration (int) – duration in milliseconds
-
-
sample code to show vibrate
-
-
-
-
-

NetworkStatus

-
-
-getNetworkStatus()
-

Returns the status of network connection

-
-
sample code to show getNetworkStatus
-
-
-
-
-

PackageVersion APIs

-
-
-requiredVersion(requiredVersion)
-

Checks if version of QPython SL4A is greater than or equal to the specified version

- --- - - - - - -
Parameters:requiredVersion (int) – requiredVersion
Returns:true or false
-
-
-
-getPackageVersionCode(packageName)
-

Returns package version code

- --- - - - - - -
Parameters:packageName (str) – packageName
Returns:Package version code
-
-
-
-getPackageVersion(packageName)
-

Returns package version name

- --- - - - - - -
Parameters:packageName (str) – packageName
Returns:Package version name
-
-
sample code to show getPackageVersionCode & getPackageVersion
-
-
-
-
-

System APIs

-
-
-getConstants(classname)
-

Get list of constants (static final fields) for a class

- --- - - - - - -
Parameters:classname (str) – classname
Returns:list
-
-
sample code to show getConstants
-
-
-
-
-environment()
-

A map of various useful environment details

- --- - - - -
Returns:environment map object includes id, display, offset, TZ, SDK, download, appcache, availblocks, blocksize, blockcount, sdcard
-
-
sample code to show environment
-
-
-
-
-log(message)
-

Writes message to logcat

- --- - - - -
Parameters:message (str) – message
-
-
sample code to show log
-
-
-
-
-

SendEmail

-
-
-sendEmail(to, subject, body, attachmentUri)
-

Launches an activity that sends an e-mail message to a given recipient

- --- - - - -
Parameters:
    -
  • to (str) – A comma separated list of recipients
  • -
  • subject (str) – subject
  • -
  • body (str) – mail body
  • -
  • attachmentUri(Optional) (str) – message
  • -
-
-
-
sample code to show sendEmail
-
-
-
-
-

Toast, getInput, getPassword, notify APIs

-
-
-makeToast(message)
-

Displays a short-duration Toast notification

- --- - - - -
Parameters:message (str) – message
-
-
sample code to show makeToast
-
-
-
-
-getInput(title, message)
-

Queries the user for a text input

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
sample code to show getInput
-
-
-
-
-getPassword(title, message)
-

Queries the user for a password

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
sample code to show getPassword
-
-
-
-
-notify(title, message, url)
-

Displays a notification that will be canceled when the user clicks on it

- --- - - - -
Parameters:
    -
  • title (str) – title
  • -
  • message (str) – message
  • -
  • url(optional) (str) – url
  • -
-
-
-
-
::
-
import androidhelper -droid = androidhelper.Android() -droid.notify(‘Hello’,’QPython’,’http://qpython.org’) # you could set the 3rd parameter None also
-
-
-
-
-

ApplicationManagerFacade

-
-

Manager APIs

-
-
-getLaunchableApplications()
-

Returns a list of all launchable application class names

- --- - - - -
Returns:map object
-
-
sample code to show getLaunchableApplications
-
-
-
-
-launch(classname)
-

Start activity with the given class name

- --- - - - -
Parameters:classname (str) – classname
-
-
sample code to show launch
-
-
-
-
-getRunningPackages()
-

Returns a list of packages running activities or services

- --- - - - -
Returns:List of packages running activities
-
-
sample code to show getRunningPackages
-
-
-
-
-forceStopPackage(packageName)
-

Force stops a package

- --- - - - -
Parameters:packageName (str) – packageName
-
-
sample code to show forceStopPackage
-
-
-
-
-
-

CameraFacade

-
-
-cameraCapturePicture(targetPath)
-

Take a picture and save it to the specified path

- --- - - - -
Returns:A map of Booleans autoFocus and takePicture where True indicates success
-
-
-
-cameraInteractiveCapturePicture(targetPath)
-

Starts the image capture application to take a picture and saves it to the specified path

-
-
-
-

CommonIntentsFacade

-
-

Barcode

-
-
-scanBarcode()
-

Starts the barcode scanner

- --- - - - -
Returns:A Map representation of the result Intent
-
-
-
-

View APIs

-
-
-pick(uri)
-

Display content to be picked by URI (e.g. contacts)

- --- - - - -
Returns:A map of result values
-
-
-
-view(uri, type, extras)
-

Start activity with view action by URI (i.e. browser, contacts, etc.)

-
-
-
-viewMap(query)
-

Opens a map search for query (e.g. pizza, 123 My Street)

-
-
-
-viewContacts()
-

Opens the list of contacts

-
-
-
-viewHtml(path)
-

Opens the browser to display a local HTML file

-
-
- -

Starts a search for the given query

-
-
-
-
-

ContactsFacade

-
-
-pickContact()
-

Displays a list of contacts to pick from

- --- - - - -
Returns:A map of result values
-
-
-
-pickPhone()
-

Displays a list of phone numbers to pick from

- --- - - - -
Returns:The selected phone number
-
-
-
-contactsGetAttributes()
-

Returns a List of all possible attributes for contacts

- --- - - - -
Returns:a List of contacts as Maps
-
-
-
-contactsGetIds()
-

Returns a List of all contact IDs

-
-
-
-contactsGet(attributes)
-

Returns a List of all contacts

-
-
-
-contactsGetById(id)
-

Returns contacts by ID

-
-
-
-contactsGetCount()
-

Returns the number of contacts

-
-
-
-queryContent(uri, attributes, selection, selectionArgs, order)
-

Content Resolver Query

- --- - - - -
Returns:result of query as Maps
-
-
-
-queryAttributes(uri)
-

Content Resolver Query Attributes

- --- - - - -
Returns:a list of available columns for a given content uri
-
-
-
-

EventFacade

-
-
-eventClearBuffer()
-

Clears all events from the event buffer

-
-
-
-eventRegisterForBroadcast(category, enqueue)
-

Registers a listener for a new broadcast signal

-
-
-
-eventUnregisterForBroadcast(category)
-

Stop listening for a broadcast signal

-
-
-
-eventGetBrodcastCategories()
-

Lists all the broadcast signals we are listening for

-
-
-
-eventPoll(number_of_events)
-

Returns and removes the oldest n events (i.e. location or sensor update, etc.) from the event buffer

- --- - - - -
Returns:A List of Maps of event properties
-
-
-
-eventWaitFor(eventName, timeout)
-

Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-eventWait(timeout)
-

Blocks until an event occurs. The returned event is removed from the buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-eventPost(name, data, enqueue)
-

Post an event to the event queue

-
-
-
-rpcPostEvent(name, data)
-

Post an event to the event queue

-
-
-
-receiveEvent()
-

Returns and removes the oldest event (i.e. location or sensor update, etc.) from the event buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-waitForEvent(eventName, timeout)
-

Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-startEventDispatcher(port)
-

Opens up a socket where you can read for events posted

-
-
-
-stopEventDispatcher()
-

Stops the event server, you can’t read in the port anymore

-
-
-
-

LocationFacade

-
-

Providers APIs

-
-
-locationProviders()
-

Returns availables providers on the phone

-
-
-
-locationProviderEnabled(provider)
-

Ask if provider is enabled

-
-
-
-

Location APIs

-
-
-startLocating(minDistance, minUpdateDistance)
-

Starts collecting location data

-
-
-
-readLocation()
-

Returns the current location as indicated by all available providers

- --- - - - -
Returns:A map of location information by provider
-
-
-
-stopLocating()
-

Stops collecting location data

-
-
-
-getLastKnownLocation()
-

Returns the last known location of the device

- --- - - - -
Returns:A map of location information by provider
-
-

sample code

-
Droid = androidhelper.Android()
-location = Droid.getLastKnownLocation().result
-location = location.get('network', location.get('gps'))
-
-
-
-
-

GEO

-
-
-geocode(latitude, longitude, maxResults)
-

Returns a list of addresses for the given latitude and longitude

- --- - - - -
Returns:A list of addresses
-
-
-
-
-

PhoneFacade

-
-

PhoneStat APIs

-
-
-startTrackingPhoneState()
-

Starts tracking phone state

-
-
-
-readPhoneState()
-

Returns the current phone state and incoming number

- --- - - - -
Returns:A Map of “state” and “incomingNumber”
-
-
-
-stopTrackingPhoneState()
-

Stops tracking phone state

-
-
-
-

Call & Dia APIs

-
-
-phoneCall(uri)
-

Calls a contact/phone number by URI

-
-
-
-phoneCallNumber(number)
-

Calls a phone number

-
-
-
-phoneDial(uri)
-

Dials a contact/phone number by URI

-
-
-
-phoneDialNumber(number)
-

Dials a phone number

-
-
-
-

Get information APIs

-
-
-getCellLocation()
-

Returns the current cell location

-
-
-
-getNetworkOperator()
-

Returns the numeric name (MCC+MNC) of current registered operator

-
-
-
-getNetworkOperatorName()
-

Returns the alphabetic name of current registered operator

-
-
-
-getNetworkType()
-

Returns a the radio technology (network type) currently in use on the device

-
-
-
-getPhoneType()
-

Returns the device phone type

-
-
-
-getSimCountryIso()
-

Returns the ISO country code equivalent for the SIM provider’s country code

-
-
-
-getSimOperator()
-

Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits

-
-
-
-getSimOperatorName()
-

Returns the Service Provider Name (SPN)

-
-
-
-getSimSerialNumber()
-

Returns the serial number of the SIM, if applicable. Return null if it is unavailable

-
-
-
-getSimState()
-

Returns the state of the device SIM card

-
-
-
-getSubscriberId()
-

Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return null if it is unavailable

-
-
-
-getVoiceMailAlphaTag()
-

Retrieves the alphabetic identifier associated with the voice mail number

-
-
-
-getVoiceMailNumber()
-

Returns the voice mail number. Return null if it is unavailable

-
-
-
-checkNetworkRoaming()
-

Returns true if the device is considered roaming on the current network, for GSM purposes

-
-
-
-getDeviceId()
-

Returns the unique device ID, for example, the IMEI for GSM and the MEID for CDMA phones. Return null if device ID is not available

-
-
-
-getDeviceSoftwareVersion()
-

Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available

-
-
-
-getLine1Number()
-

Returns the phone number string for line 1, for example, the MSISDN for a GSM phone. Return null if it is unavailable

-
-
-
-getNeighboringCellInfo()
-

Returns the neighboring cell information of the device

-
-
-
-
-

MediaRecorderFacade

-
-

Audio

-
-
-recorderStartMicrophone(targetPath)
-

Records audio from the microphone and saves it to the given location

-
-
-
-

Video APIs

-
-
-recorderStartVideo(targetPath, duration, videoSize)
-

Records video from the camera and saves it to the given location. -Duration specifies the maximum duration of the recording session. -If duration is 0 this method will return and the recording will only be stopped -when recorderStop is called or when a scripts exits. -Otherwise it will block for the time period equal to the duration argument. -videoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480.

-
-
-
-recorderCaptureVideo(targetPath, duration, recordAudio)
-

Records video (and optionally audio) from the camera and saves it to the given location. -Duration specifies the maximum duration of the recording session. -If duration is not provided this method will return immediately and the recording will only be stopped -when recorderStop is called or when a scripts exits. -Otherwise it will block for the time period equal to the duration argument.

-
-
-
-startInteractiveVideoRecording(path)
-

Starts the video capture application to record a video and saves it to the specified path

-
-
-
-

Stop

-
-
-recorderStop()
-

Stops a previously started recording

-
-
-
-
-

SensorManagerFacade

-
-

Start & Stop

-
-
-startSensingTimed(sensorNumber, delayTime)
-

Starts recording sensor data to be available for polling

-
-
-
-startSensingThreshold(ensorNumber, threshold, axis)
-

Records to the Event Queue sensor data exceeding a chosen threshold

-
-
-
-startSensing(sampleSize)
-

Starts recording sensor data to be available for polling

-
-
-
-stopSensing()
-

Stops collecting sensor data

-
-
-
-

Read data APIs

-
-
-readSensors()
-

Returns the most recently recorded sensor data

-
-
-
-sensorsGetAccuracy()
-

Returns the most recently received accuracy value

-
-
-
-sensorsGetLight()
-

Returns the most recently received light value

-
-
-
-sensorsReadAccelerometer()
-

Returns the most recently received accelerometer values

- --- - - - -
Returns:a List of Floats [(acceleration on the) X axis, Y axis, Z axis]
-
-
-
-sensorsReadMagnetometer()
-

Returns the most recently received magnetic field values

- --- - - - -
Returns:a List of Floats [(magnetic field value for) X axis, Y axis, Z axis]
-
-
-
-sensorsReadOrientation()
-

Returns the most recently received orientation values

- --- - - - -
Returns:a List of Doubles [azimuth, pitch, roll]
-
-

sample code

-
Droid = androidhelper.Android()
-Droid.startSensingTimed(1, 250)
-sensor = Droid.sensorsReadOrientation().result
-Droid.stopSensing()
-
-
-
-
-
-

SettingsFacade

-
-

Screen

-
-
-setScreenTimeout(value)
-

Sets the screen timeout to this number of seconds

- --- - - - -
Returns:The original screen timeout
-
-
-
-getScreenTimeout()
-

Gets the screen timeout

- --- - - - -
Returns:the current screen timeout in seconds
-
-
-
-

AirplanerMode

-
-
-checkAirplaneMode()
-

Checks the airplane mode setting

- --- - - - -
Returns:True if airplane mode is enabled
-
-
-
-toggleAirplaneMode(enabled)
-

Toggles airplane mode on and off

- --- - - - -
Returns:True if airplane mode is enabled
-
-
-
-

Ringer Silent Mode

-
-
-checkRingerSilentMode()
-

Checks the ringer silent mode setting

- --- - - - -
Returns:True if ringer silent mode is enabled
-
-
-
-toggleRingerSilentMode(enabled)
-

Toggles ringer silent mode on and off

- --- - - - -
Returns:True if ringer silent mode is enabled
-
-
-
-

Vibrate Mode

-
-
-toggleVibrateMode(enabled)
-

Toggles vibrate mode on and off. If ringer=true then set Ringer setting, else set Notification setting

- --- - - - -
Returns:True if vibrate mode is enabled
-
-
-
-getVibrateMode(ringer)
-

Checks Vibration setting. If ringer=true then query Ringer setting, else query Notification setting

- --- - - - -
Returns:True if vibrate mode is enabled
-
-
-
-

Ringer & Media Volume

-
-
-getMaxRingerVolume()
-

Returns the maximum ringer volume

-
-
-
-getRingerVolume()
-

Returns the current ringer volume

-
-
-
-setRingerVolume(volume)
-

Sets the ringer volume

-
-
-
-getMaxMediaVolume()
-

Returns the maximum media volume

-
-
-
-getMediaVolume()
-

Returns the current media volume

-
-
-
-setMediaVolume(volume)
-

Sets the media volume

-
-
-
-

Screen Brightness

-
-
-getScreenBrightness()
-

Returns the screen backlight brightness

- --- - - - -
Returns:the current screen brightness between 0 and 255
-
-
-
-setScreenBrightness(value)
-

Sets the the screen backlight brightness

- --- - - - -
Returns:the original screen brightness
-
-
-
-checkScreenOn()
-

Checks if the screen is on or off (requires API level 7)

- --- - - - -
Returns:True if the screen is currently on
-
-
-
-
-

SmsFacade

-
-
-smsSend(destinationAddress, text)
-

Sends an SMS

- --- - - - -
Parameters:
    -
  • destinationAddress (str) – typically a phone number
  • -
  • text (str) –
  • -
-
-
-
-
-smsGetMessageCount(unreadOnly, folder)
-

Returns the number of messages

- --- - - - -
Parameters:
    -
  • unreadOnly (bool) – typically a phone number
  • -
  • folder(optional) (str) – default “inbox”
  • -
-
-
-
-
-smsGetMessageIds(unreadOnly, folder)
-

Returns a List of all message IDs

- --- - - - -
Parameters:
    -
  • unreadOnly (bool) – typically a phone number
  • -
  • folder(optional) (str) – default “inbox”
  • -
-
-
-
-
-smsGetMessages(unreadOnly, folder, attributes)
-

Returns a List of all messages

- --- - - - - - -
Parameters:
    -
  • unreadOnly (bool) – typically a phone number
  • -
  • folder (str) – default “inbox”
  • -
  • attributes(optional) (list) – attributes
  • -
-
Returns:

a List of messages as Maps

-
-
-
-
-smsGetMessageById(id, attributes)
-

Returns message attributes

- --- - - - - - -
Parameters:
    -
  • id (int) – message ID
  • -
  • attributes(optional) (list) – attributes
  • -
-
Returns:

a List of messages as Maps

-
-
-
-
-smsGetAttributes()
-

Returns a List of all possible message attributes

-
-
-
-smsDeleteMessage(id)
-

Deletes a message

- --- - - - - - -
Parameters:id (int) – message ID
Returns:True if the message was deleted
-
-
-
-smsMarkMessageRead(ids, read)
-

Marks messages as read

- --- - - - - - -
Parameters:
    -
  • ids (list) – List of message IDs to mark as read
  • -
  • read (bool) – true or false
  • -
-
Returns:

number of messages marked read

-
-
-
-
-

SpeechRecognitionFacade

-
-
-recognizeSpeech(prompt, language, languageModel)
-

Recognizes user’s speech and returns the most likely result

- --- - - - - - -
Parameters:
    -
  • prompt(optional) (str) – text prompt to show to the user when asking them to speak
  • -
  • language(optional) (str) – language override to inform the recognizer that it should expect speech in a language different than the one set in the java.util.Locale.getDefault()
  • -
  • languageModel(optional) (str) – informs the recognizer which speech model to prefer (see android.speech.RecognizeIntent)
  • -
-
Returns:

An empty string in case the speech cannot be recongnized

-
-
-
-
-

ToneGeneratorFacade

-
-
-generateDtmfTones(phoneNumber, toneDuration)
-

Generate DTMF tones for the given phone number

- --- - - - -
Parameters:
    -
  • phoneNumber (str) – phone number
  • -
  • toneDuration(optional) (int) – default 100, duration of each tone in milliseconds
  • -
-
-
-
-
-

WakeLockFacade

-
-
-wakeLockAcquireFull()
-

Acquires a full wake lock (CPU on, screen bright, keyboard bright)

-
-
-
-wakeLockAcquirePartial()
-

Acquires a partial wake lock (CPU on)

-
-
-
-wakeLockAcquireBright()
-

Acquires a bright wake lock (CPU on, screen bright)

-
-
-
-wakeLockAcquireDim()
-

Acquires a dim wake lock (CPU on, screen dim)

-
-
-
-wakeLockRelease()
-

Releases the wake lock

-
-
-
-

WifiFacade

-
-
-wifiGetScanResults()
-

Returns the list of access points found during the most recent Wifi scan

-
-
-
-wifiLockAcquireFull()
-

Acquires a full Wifi lock

-
-
-
-wifiLockAcquireScanOnly()
-

Acquires a scan only Wifi lock

-
-
-
-wifiLockRelease()
-

Releases a previously acquired Wifi lock

-
-
-
-wifiStartScan()
-

Starts a scan for Wifi access points

- --- - - - -
Returns:True if the scan was initiated successfully
-
-
-
-checkWifiState()
-

Checks Wifi state

- --- - - - -
Returns:True if Wifi is enabled
-
-
-
-toggleWifiState(enabled)
-

Toggle Wifi on and off

- --- - - - - - -
Parameters:enabled(optional) (bool) – enabled
Returns:True if Wifi is enabled
-
-
-
-wifiDisconnect()
-

Disconnects from the currently active access point

- --- - - - -
Returns:True if the operation succeeded
-
-
-
-wifiGetConnectionInfo()
-

Returns information about the currently active access point

-
-
-
-wifiReassociate()
-

Returns information about the currently active access point

- --- - - - -
Returns:True if the operation succeeded
-
-
-
-wifiReconnect()
-

Reconnects to the currently active access point

- --- - - - -
Returns:True if the operation succeeded
-
-
-
-

BatteryManagerFacade

-
-
-readBatteryData()
-

Returns the most recently recorded battery data

-
-
-
-batteryStartMonitoring()
-

Starts tracking battery state

-
-
-
-batteryStopMonitoring()
-

Stops tracking battery state

-
-
-
-batteryGetStatus()
-

Returns the most recently received battery status data: -1 - unknown; -2 - charging; -3 - discharging; -4 - not charging; -5 - full

-
-
-
-batteryGetHealth()
-

Returns the most recently received battery health data: -1 - unknown; -2 - good; -3 - overheat; -4 - dead; -5 - over voltage; -6 - unspecified failure

-
-
-
-batteryGetPlugType()
-

Returns the most recently received plug type data: --1 - unknown -0 - unplugged -1 - power source is an AC charger -2 - power source is a USB port

-
-
-
-batteryCheckPresent()
-

Returns the most recently received battery presence data

-
-
-
-batteryGetLevel()
-

Returns the most recently received battery level (percentage)

-
-
-
-batteryGetVoltage()
-

Returns the most recently received battery voltage

-
-
-
-batteryGetTemperature()
-

Returns the most recently received battery temperature

-
-
-
-batteryGetTechnology()
-

Returns the most recently received battery technology data

-
-
-
-

ActivityResultFacade

-
-
-setResultBoolean(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultByte(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultShort(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultChar(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultInteger(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultLong(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultFloat(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultDouble(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultString(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultBooleanArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultByteArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultShortArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultCharArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultIntegerArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultLongArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultFloatArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultDoubleArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultStringArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultSerializable(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-

MediaPlayerFacade

-
-

Control

-
-
-mediaPlay(url, tag, play)
-

Open a media file

- --- - - - - - -
Parameters:
    -
  • url (str) – url of media resource
  • -
  • tag(optional) (str) – string identifying resource (default=default)
  • -
  • play(optional) (bool) – start playing immediately
  • -
-
Returns:

true if play successful

-
-
-
-
-mediaPlayPause(tag)
-

pause playing media file

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaPlayStart(tag)
-

start playing media file

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaPlayClose(tag)
-

Close media file

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaIsPlaying(tag)
-

Checks if media file is playing

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaPlaySetLooping(enabled, tag)
-

Set Looping

- --- - - - - - -
Parameters:
    -
  • enabled (bool) – default true
  • -
  • tag (str) – string identifying resource (default=default)
  • -
-
Returns:

True if successful

-
-
-
-
-mediaPlaySeek(msec, tag)
-

Seek To Position

- --- - - - - - -
Parameters:
    -
  • msec (int) – default true
  • -
  • tag (str) – string identifying resource (default=default)
  • -
-
Returns:

New Position (in ms)

-
-
-
-
-

Get Information

-
-
-mediaPlayInfo(tag)
-

Information on current media

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:Media Information
-
-
-
-mediaPlayList()
-

Lists currently loaded media

- --- - - - -
Returns:List of Media Tags
-
-
-
-
-

PreferencesFacade

-
-
-prefGetValue(key, filename)
-

Read a value from shared preferences

- --- - - - -
Parameters:
    -
  • key (str) – key
  • -
  • filename(optional) (str) – Desired preferences file. If not defined, uses the default Shared Preferences.
  • -
-
-
-
-
-prefPutValue(key, value, filename)
-

Write a value to shared preferences

- --- - - - -
Parameters:
    -
  • key (str) – key
  • -
  • value (str) – value
  • -
  • filename(optional) (str) – Desired preferences file. If not defined, uses the default Shared Preferences.
  • -
-
-
-
-
-prefGetAll(filename)
-

Get list of Shared Preference Values

- --- - - - -
Parameters:filename(optional) (str) – Desired preferences file. If not defined, uses the default Shared Preferences.
-
-
-
-

QPyInterfaceFacade

-
-
-executeQPy(script)
-

Execute a qpython script by absolute path

- --- - - - - - -
Parameters:script (str) – The absolute path of the qpython script
Returns:bool
-
-
-
-

TextToSpeechFacade

-
-
-ttsSpeak(message)
-

Speaks the provided message via TTS

- --- - - - -
Parameters:message (str) – message
-
-
-
-ttsIsSpeaking()
-

Returns True if speech is currently in progress

-
-
-
-

EyesFreeFacade

-
-
-ttsSpeak(message)
-

Speaks the provided message via TTS

- --- - - - -
Parameters:message (str) – message
-
-
-
-

BluetoothFacade

-
-
-bluetoothActiveConnections()
-

Returns active Bluetooth connections

-
-
-
-bluetoothWriteBinary(base64, connID)
-

Send bytes over the currently open Bluetooth connection

- --- - - - -
Parameters:
    -
  • base64 (str) – A base64 encoded String of the bytes to be sent
  • -
  • connID(optional) (str) – Connection id
  • -
-
-
-
-
-bluetoothReadBinary(bufferSize, connID)
-

Read up to bufferSize bytes and return a chunked, base64 encoded string

- --- - - - -
Parameters:
    -
  • bufferSize (int) – default 4096
  • -
  • connID(optional) (str) – Connection id
  • -
-
-
-
-
-bluetoothConnect(uuid, address)
-

Connect to a device over Bluetooth. Blocks until the connection is established or fails

- --- - - - - - -
Parameters:
    -
  • uuid (str) – The UUID passed here must match the UUID used by the server device
  • -
  • address(optional) (str) – The user will be presented with a list of discovered devices to choose from if an address is not provided
  • -
-
Returns:

True if the connection was established successfully

-
-
-
-
-bluetoothAccept(uuid, timeout)
-

Listens for and accepts a Bluetooth connection. Blocks until the connection is established or fails

- --- - - - -
Parameters:
    -
  • uuid (str) – The UUID passed here must match the UUID used by the server device
  • -
  • timeout (int) – How long to wait for a new connection, 0 is wait for ever (default=0)
  • -
-
-
-
-
-bluetoothMakeDiscoverable(duration)
-

Requests that the device be discoverable for Bluetooth connections

- --- - - - -
Parameters:duration (int) – period of time, in seconds, during which the device should be discoverable (default=300)
-
-
-
-bluetoothWrite(ascii, connID)
-

Sends ASCII characters over the currently open Bluetooth connection

- --- - - - -
Parameters:
    -
  • ascii (str) – text
  • -
  • connID (str) – Connection id
  • -
-
-
-
-
-bluetoothReadReady(connID)
-

Sends ASCII characters over the currently open Bluetooth connection

- --- - - - -
Parameters:
    -
  • ascii (str) – text
  • -
  • connID (str) – Connection id
  • -
-
-
-
-
-bluetoothRead(bufferSize, connID)
-

Read up to bufferSize ASCII characters

- --- - - - -
Parameters:
    -
  • bufferSize (int) – default=4096
  • -
  • connID(optional) (str) – Connection id
  • -
-
-
-
-
-bluetoothReadLine(connID)
-

Read the next line

- --- - - - -
Parameters:connID(optional) (str) – Connection id
-
-
-
-bluetoothGetRemoteDeviceName(address)
-

Queries a remote device for it’s name or null if it can’t be resolved

- --- - - - -
Parameters:address (str) – Bluetooth Address For Target Device
-
-
-
-bluetoothGetLocalName()
-

Gets the Bluetooth Visible device name

-
-
-
-bluetoothSetLocalName(name)
-

Sets the Bluetooth Visible device name, returns True on success

- --- - - - -
Parameters:name (str) – New local name
-
-
-
-bluetoothGetScanMode()
-

Gets the scan mode for the local dongle. -Return values: --1 when Bluetooth is disabled. -0 if non discoverable and non connectable. -1 connectable non discoverable. -3 connectable and discoverable.

-
-
-
-bluetoothGetConnectedDeviceName(connID)
-

Returns the name of the connected device

- --- - - - -
Parameters:connID (str) – Connection id
-
-
-
-checkBluetoothState()
-

Checks Bluetooth state

- --- - - - -
Returns:True if Bluetooth is enabled
-
-
-
-toggleBluetoothState(enabled, prompt)
-

Toggle Bluetooth on and off

- --- - - - - - -
Parameters:
    -
  • enabled (bool) –
  • -
  • prompt (str) – Prompt the user to confirm changing the Bluetooth state, default=true
  • -
-
Returns:

True if Bluetooth is enabled

-
-
-
-
-bluetoothStop(connID)
-

Stops Bluetooth connection

- --- - - - -
Parameters:connID (str) – Connection id
-
-
-
-bluetoothGetLocalAddress()
-

Returns the hardware address of the local Bluetooth adapter

-
-
-
-bluetoothDiscoveryStart()
-

Start the remote device discovery process

- --- - - - -
Returns:true on success, false on error
-
-
-
-bluetoothDiscoveryCancel()
-

Cancel the current device discovery process

- --- - - - -
Returns:true on success, false on error
-
-
-
-bluetoothIsDiscovering()
-

Return true if the local Bluetooth adapter is currently in the device discovery process

-
-
-
-

SignalStrengthFacade

-
-
-startTrackingSignalStrengths()
-

Starts tracking signal strengths

-
-
-
-readSignalStrengths()
-

Returns the current signal strengths

- --- - - - -
Returns:A map of gsm_signal_strength
-
-
-
-stopTrackingSignalStrengths()
-

Stops tracking signal strength

-
-
-
-

WebCamFacade

-
-
-webcamStart(resolutionLevel, jpegQuality, port)
-

Starts an MJPEG stream and returns a Tuple of address and port for the stream

- --- - - - -
Parameters:
    -
  • resolutionLevel (int) – increasing this number provides higher resolution (default=0)
  • -
  • jpegQuality (int) – a number from 0-10 (default=20)
  • -
  • port (int) – If port is specified, the webcam service will bind to port, otherwise it will pick any available port (default=0)
  • -
-
-
-
-
-webcamAdjustQuality(resolutionLevel, jpegQuality)
-

Adjusts the quality of the webcam stream while it is running

- --- - - - -
Parameters:
    -
  • resolutionLevel (int) – increasing this number provides higher resolution (default=0)
  • -
  • jpegQuality (int) – a number from 0-10 (default=20)
  • -
-
-
-
-
-cameraStartPreview(resolutionLevel, jpegQuality, filepath)
-

Start Preview Mode. Throws ‘preview’ events

- --- - - - - - -
Parameters:
    -
  • resolutionLevel (int) – increasing this number provides higher resolution (default=0)
  • -
  • jpegQuality (int) – a number from 0-10 (default=20)
  • -
  • filepath (str) – Path to store jpeg files
  • -
-
Returns:

True if successful

-
-
-
-
-cameraStopPreview()
-

Stop the preview mode

-
-
-
-

UiFacade

-
-

Dialog

-
-
-dialogCreateInput(title, message, defaultText, inputType)
-

Create a text input dialog

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • defaultText(optional) (str) – text to insert into the input box
  • -
  • inputType(optional) (str) – type of input data, ie number or text
  • -
-
-
-
-
-dialogCreatePassword(title, message)
-

Create a password input dialog

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
-
-dialogGetInput(title, message, defaultText)
-

Create a password input dialog

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • defaultText(optional) (str) – text to insert into the input box
  • -
-
-
-
-
-dialogGetPassword(title, message)
-

Queries the user for a password

- --- - - - -
Parameters:
    -
  • title (str) – title of the password box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
-
-dialogCreateSeekBar(start, maximum, title)
-

Create seek bar dialog

- --- - - - -
Parameters:
    -
  • start (int) – default=50
  • -
  • maximum (int) – default=100
  • -
  • title (int) – title
  • -
-
-
-
-
-dialogCreateTimePicker(hour, minute, is24hour)
-

Create time picker dialog

- --- - - - -
Parameters:
    -
  • hour (int) – default=0
  • -
  • miute (int) – default=0
  • -
  • is24hour (bool) – default=false
  • -
-
-
-
-
-dialogCreateDatePicker(year, month, day)
-

Create date picker dialog

- --- - - - -
Parameters:
    -
  • year (int) – default=1970
  • -
  • month (int) – default=1
  • -
  • day (int) – default=1
  • -
-
-
-
-
-

NFC

-

Data structs -QPython NFC json result

-
{
-"role": <role>, # could be self/master/slave
-"stat": <stat>, # could be ok / fail / cancl
-"message": <message get>
-}
-
-
-

APIs

-
-
-dialogCreateNFCBeamMaster(title, message, inputType)
-

Create a dialog where you could create a qpython beam master

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • inputType(optional) (str) – type of input data, ie number or text
  • -
-
-
-
-
-NFCBeamMessage(content, title, message)
-

Create a dialog where you could create a qpython beam master

- --- - - - -
Parameters:
    -
  • content (str) – message you want to sent
  • -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • inputType(optional) (str) – type of input data, ie number or text
  • -
-
-
-
-
-dialogCreateNFCBeamSlave(title, message)
-

Create a qpython beam slave

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
-
-

Progress

-
-
-dialogCreateSpinnerProgress(message, maximumProgress)
-

Create a spinner progress dialog

- --- - - - -
Parameters:
    -
  • message(optional) (str) – message
  • -
  • maximunProgress(optional) (int) – dfault=100
  • -
-
-
-
-
-dialogSetCurrentProgress(current)
-

Set progress dialog current value

- --- - - - -
Parameters:current (int) – current
-
-
-
-dialogSetMaxProgress(max)
-

Set progress dialog maximum value

- --- - - - -
Parameters:max (int) – max
-
-
-
-dialogCreateHorizontalProgress(title, message, maximumProgress)
-

Create a horizontal progress dialog

- --- - - - -
Parameters:
    -
  • title(optional) (str) – title
  • -
  • message(optional) (str) – message
  • -
  • maximunProgress(optional) (int) – dfault=100
  • -
-
-
-
-
-

Alert

-
-
-dialogCreateAlert(title, message)
-

Create alert dialog

- --- - - - -
Parameters:
    -
  • title(optional) (str) – title
  • -
  • message(optional) (str) – message
  • -
  • maximunProgress(optional) (int) – dfault=100
  • -
-
-
-
-
-

Dialog Control

-
-
-dialogSetPositiveButtonText(text)
-

Set alert dialog positive button text

- --- - - - -
Parameters:text (str) – text
-
-
-
-dialogSetNegativeButtonText(text)
-

Set alert dialog negative button text

- --- - - - -
Parameters:text (str) – text
-
-
-
-dialogSetNeutralButtonText(text)
-

Set alert dialog button text

- --- - - - -
Parameters:text (str) – text
-
-
-
-dialogSetItems(items)
-

Set alert dialog list items

- --- - - - -
Parameters:items (list) – items
-
-
-
-dialogSetSingleChoiceItems(items, selected)
-

Set alert dialog list items

- --- - - - -
Parameters:
    -
  • items (list) – items
  • -
  • selected (int) – selected item index (default=0)
  • -
-
-
-
-
-dialogSetMultiChoiceItems(items, selected)
-

Set dialog multiple choice items and selection

- --- - - - -
Parameters:
    -
  • items (list) – items
  • -
  • selected (int) – selected item index (default=0)
  • -
-
-
-
-
-addContextMenuItem(label, event, eventData)
-

Adds a new item to context menu

- --- - - - -
Parameters:
    -
  • label (str) – label for this menu item
  • -
  • event (str) – event that will be generated on menu item click
  • -
  • eventData (object) – event object
  • -
-
-
-
-
-addOptionsMenuItem(label, event, eventData, iconName)
-

Adds a new item to context menu

- --- - - - -
Parameters: -
-
-
-
-dialogGetResponse()
-

Returns dialog response

-
-
-
-dialogGetSelectedItems()
-

This method provides list of items user selected

-
-
-
-dialogDismiss()
-

Dismiss dialog

-
-
-
-dialogShow()
-

Show dialog

-
-
-
-

Layout

-
-
-fullShow(layout)
-

Show Full Screen

- --- - - - -
Parameters:layout (string) – String containing View layout
-
-
-
-fullDismiss()
-

Dismiss Full Screen

-
-
-
-fullQuery()
-

Get Fullscreen Properties

-
-
-
-fullQueryDetail(id)
-

Get fullscreen properties for a specific widget

- --- - - - -
Parameters:id (str) – id of layout widget
-
-
-
-fullSetProperty(id)
-

Set fullscreen widget property

- --- - - - -
Parameters:
    -
  • id (str) – id of layout widget
  • -
  • property (str) – name of property to set
  • -
  • value (str) – value to set property to
  • -
-
-
-
-
-fullSetList(id, list)
-

Attach a list to a fullscreen widget

- --- - - - -
Parameters:
    -
  • id (str) – id of layout widget
  • -
  • list (list) – List to set
  • -
-
-
-
-
-fullKeyOverride(keycodes, enable)
-

Override default key actions

- --- - - - -
Parameters:
    -
  • keycodes (str) – id of layout widget
  • -
  • enable (bool) – List to set (default=true)
  • -
-
-
-
-
-

WebView

-
-
-webViewShow()
-

Display a WebView with the given URL

- --- - - - -
Parameters:
    -
  • url (str) – url
  • -
  • wait(optional) (bool) – block until the user exits the WebView
  • -
-
-
-
-
-
-

USB Host Serial Facade

-

QPython 1.3.1+ and QPython3 1.0.3+ contains this feature

-

SL4A Facade for USB Serial devices by Android USB Host API.

-

It control the USB-Serial like devices -from Andoroid which has USB Host Controller .

-

The sample -demonstration is also available at youtube video

-
-

Requirements

-
    -
  • Android device which has USB Host controller (and enabled in that firmware).

    -
  • -
  • Android 4.0 (API14) or later.

    -
  • -
  • USB Serial devices (see [Status](#Status)).

    -
  • -
  • USB Serial devices were not handled by Android kernel.

    -

    > I heard some android phone handle USB Serial devices -> make /dev/ttyUSB0 in kernel level. -> In this case, Android does not be able to handle the device -> from OS level.

    -

    please check Android Applications be able to grab the target USB Devices, -such as USB Device Info.

    -
  • -
-
-
-

Status

-
    -
  • probably work with USB CDC, like FTDI, Arduino or else.

    -
  • -
  • 2012/09/10: work with 78K0F0730 device (new RL78) with Tragi BIOS board.

    -

    M78K0F0730

    -
  • -
  • 2012/09/24: work with some pl2303 devcies.

    -
  • -
-
-
-

Author

-

This facade developped by Kuri65536 -you can see the commit log in it.

-
-
-

APIs

-
-
-usbserialGetDeviceList()
-

Returns USB devices reported by USB Host API.

- --- - - - -
Returns:Returns “Map of id and string information Map<String, String>
-
-
-
-usbserialDisconnect(connID)
-

Disconnect all USB-device

- --- - - - -
Parameters:connID (str) – connection ID
-
-
-
-usbserialActiveConnections()
-

Returns active USB-device connections.

- --- - - - -
Returns:Returns “Active USB-device connections by Map UUID vs device-name.”
-
-
-
-usbserialWriteBinary(base64, connID)
-

Send bytes over the currently open USB Serial connection.

- --- - - - -
Parameters:
    -
  • base64 (str) –
  • -
  • connId (str) –
  • -
-
-
-
-
-usbserialReadBinary(bufferSize, connID)
-

Read up to bufferSize bytes and return a chunked, base64 encoded string

- --- - - - -
Parameters:
    -
  • bufferSize (int) –
  • -
  • connId (str) –
  • -
-
-
-
-
-usbserialConnect(hash, options)
-

Connect to a device with USB-Host. request the connection and exit

- --- - - - - - -
Parameters:
    -
  • hash (str) –
  • -
  • options (str) –
  • -
-
Returns:

Returns messages the request status

-
-
-
-
-usbserialHostEnable()
-

Requests that the host be enable for USB Serial connections.

- --- - - - -
Returns:True if the USB Device is accesible
-
-
-
-usbserialWrite(String ascii, String connID)
-

Sends ASCII characters over the currently open USB Serial connection

- --- - - - -
Parameters:
    -
  • ascii (str) –
  • -
  • connID (str) –
  • -
-
-
-
-
-usbserialReadReady(connID)
-
--- - - - - - -
Parameters:connID (str) –
Returns:True if the next read is guaranteed not to block
-
-
-
-usbserialRead(connID, bufferSize)
-

Read up to bufferSize ASCII characters.

- --- - - - -
Parameters:
    -
  • connID (str) –
  • -
  • bufferSize (int) –
  • -
-
-
-
-
-usbserialGetDeviceName(connID)
-

Queries a remote device for it’s name or null if it can’t be resolved

- --- - - - -
Parameters:connID (str) –
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_contributors.html b/docs/en/guide_contributors.html deleted file mode 100644 index 73aefae..0000000 --- a/docs/en/guide_contributors.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - -Welcome contribute — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Welcome contribute

-

Thanks for supporting this project, QPython is a greate project, and we hope you join us to help with make it more greater.

-

Please send email to us(support at qpython.org) to introduce youself briefly, and which part do you want to contribute.

-

Then we will consider to invite you to join the qpython-collaborator group.

-
- -
-

How to contribute documentation

-
-
-

How to translate

-
-
-

How to launch a local QPython users community

-
-

How to organise a local qpython user sharing event

-
-
-
-

How to became the developer member

-
-

How to develop qpython built-in programs

-
-
-
-

How to sponsor QPython project

-

More detail coming soon…

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_contributors_test.html b/docs/en/guide_contributors_test.html deleted file mode 100644 index 28a38a9..0000000 --- a/docs/en/guide_contributors_test.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - -Join the tester community — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-

QPython is keeping develop! -If you are interested about what we are doing and want to make some contribution, follow this guide to make this project better!

-
-

Join the tester community

-

We create a G+ community where you could report bugs or offer suggestions -> QPython tester G+ community(For QPython testers)

-

Join us now!

-../images/1.png -
-
-

Become a tester

-

After join the tester community, you could become a tester! -Click this and become a tester -> I’m ready for test

-../images/2.png -
-
-

Report or suggest

-

If you find out any bugs or have any cool idea about QPython, please let us know about it. -You could write down your suggestion or bug report on the community.

-../images/3.png -
-
-

Feedback

-

Send your feedback to QPython using the contact information: support@qpython.org

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_developers.html b/docs/en/guide_developers.html deleted file mode 100644 index 1c58394..0000000 --- a/docs/en/guide_developers.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - -Android — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Android

-

Android part offers the common Python user interaction functions, like console, editor, file browsing, QRCode reader etc.

-
-

Console

-
-
-

Editor

-
-
-

File browsing

-
-
-

QRCode reader

-
-
-
-

QSL4A

-

QSL4A is the folk of SL4A for QPython, which allows users being able to program with Python script for android.

-
-
-

QPython Core

-

Besides Python core, QPython core offer three types programming mode also.

-
-

Python 2.x

-
-
-

Python 3.x

-
-
-

Console program

-
-
-

Kivy program

-
-
-

WebApp program

-
-
-
-

Pip and libraries

-

Pip and libraries offer great expansion ability for QPython.

-
-

Pip

-
-
-

Libraries

-
-
-
-

Quick tools

-

Quick tools offers better guide for using QPython well for different users.

-
-

QPython API

-
-
-

FTP

-
-
-
-

QPY.IO (Enterprise service)

-

It’s a enterprise service which aim at offering quick android development delivery with QPython.

-

It’s QPython’s maintainers’ main paid service, but not a opensource project.

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_extend.html b/docs/en/guide_extend.html deleted file mode 100644 index 509ecae..0000000 --- a/docs/en/guide_extend.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - -QPython Open API — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython Open API

-

QPython has an open activity which allow you run qpython from outside.

-

The MPyAPI’s definition seems like the following:

-
<activity
-android:name="org.qpython.qpylib.MPyApi"
-android:label="@string/qpy_run_with_share"
-android:screenOrientation="user"
-android:configChanges="orientation|keyboardHidden"
-android:exported="true">
-<intent-filter>
-<action android:name="org.qpython.qpylib.action.MPyApi" />
-<category android:name="android.intent.category.DEFAULT" />
-<category android:name="android.intent.category.LAUNCHER" />
-</intent-filter>
-<intent-filter>
-<action android:name="android.intent.action.VIEW" />
-<category android:name="android.intent.category.DEFAULT" />
-<category android:name="android.intent.category.BROWSABLE" />
-<data android:scheme="http" />
-<data android:scheme="https" />
-</intent-filter>
-<intent-filter>
-<action android:name="android.intent.action.SEND"/>
-<category android:name="android.intent.category.DEFAULT"/>
-<data android:mimeType="text/plain"/>
-</intent-filter>
-<intent-filter>
-<action android:name="android.intent.action.SEND"/>
-<category android:name="android.intent.category.DEFAULT"/>
-<data android:mimeType="image/*"/>
-</intent-filter>
-</activity>
-
-
-

So, with it’s help, you could:

-
-

Share some content to QPython’s scripts

-

You could choose some content in some app, and share to qpython’s script, then you could handle the content with the sys.argv[2]

-

Watch the demo video on YouTube

-
-
-

Run QPython’s script from your own application

-

You can call QPython to run some script or python code in your application by call this activity, like the following sample:

-
// code sample shows how to call qpython API
-String extPlgPlusName = "org.qpython.qpy";          // QPython package name
-Intent intent = new Intent();
-intent.setClassName(extPlgPlusName, "org.qpython.qpylib.MPyApi");
-intent.setAction(extPlgPlusName + ".action.MPyApi");
-Bundle mBundle = new Bundle();
-mBundle.putString("app", "myappid");
-mBundle.putString("act", "onPyApi");
-mBundle.putString("flag", "onQPyExec"); // any String flag you may use in your context
-mBundle.putString("param", "");         // param String param you may use in your context
-/*
-* The Python code we will run
-*/
-String code = "import androidhelper\n" +
-"droid = androidhelper.Android()\n" +
-"line = droid.dialogGetInput()\n" +
-"s = 'Hello %s' % line.result\n" +
-"droid.makeToast(s)\n"
-mBundle.putString("pycode", code);
-intent.putExtras(mBundle);
-startActivityForResult(intent, SCRIPT_EXEC_PY);
-...
-// And you can handle the qpython callabck result in onActivityResult
-@Override
-protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-if (requestCode == SCRIPT_EXEC_PY) {
-if (data!=null) {
-Bundle bundle = data.getExtras();
-String flag = bundle.getString("flag");
-String param = bundle.getString("param");
-String result = bundle.getString("result"); // Result your Pycode generate
-Toast.makeText(this, "onQPyExec: return ("+result+")", Toast.LENGTH_SHORT).show();
-} else {
-Toast.makeText(this, "onQPyExec: data is null", Toast.LENGTH_SHORT).show();
-}
-}
-}
-
-
-

Checkout the full project from github

-

And there is a production application - QPython Plugin for Tasker

-
-
-
-

QPython Online Service

-

Now the QPython online service only open for QPython, not QPython3.

-
-

QPypi

-

Can I install some packages which required pre-compiled ? -Sure, you could install some pre-compiled packages from QPypi, you could find it through “Libraries” on dashboard.

-../images/guide_extend_pic2.png -

If you couldn’t found the package here, you could send email to river@qpython.org .

-
-
-

QPY.IO

-

Can I build an independent APK from QPython script?

-

Sure you can. now the service is in BETA, it’s a challenging thing. We will publish it as a online service, for we want to let the development process is simple, you don’t need to own the development environment set up when you want to build a application.

-../images/guide_extend_pic1.png -

If you want to try it out or have some business proposal, please contact with us by sending email to river@qpython.org .

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_helloworld.html b/docs/en/guide_helloworld.html deleted file mode 100644 index a72f8b0..0000000 --- a/docs/en/guide_helloworld.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - -Writing “Hello World” — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Writing “Hello World”

-
-

Hello world

-hello world -

Well, after you became a bit more familiar with QPython, let’s create our first program in QPython. Obviously, it will be helloworld.py. ;)

-

Start QPython, open editor and enter the following code:

-
import androidhelper
-droid = androidhelper.Android()
-droid.makeToast('Hello, Username!')
-
-
-

No wonder, it’s just similar to any other hello-world program. When executed, it just shows pop-up message on the screen (see screenshot on the top). Anyway, it’s a good example of QPython program.

-
-
-

SL4A library

-

It begins with import androidhelper — the most useful module in QPython, which encapsulates almost all interface with Android, available in Python. Any script developed in QPython starts with this statement (at least if it claims to communicate with user). Read more about Python library here and import statement here

-

By the way, if you’re going to make your script compatible with SL4A, you should replace the first line with the following code (and use android instead androidhelper further in the program):

-
>    try:
->        import androidhelper as android
->    except ImportError:
->        import android
-
-
-

Ok, next we’re creating an object droid (actually a class), it is necessary to call RPC functions in order to communicate with Android.

-

And the last line of our code calls such function, droid.makeToast(), which shows a small pop-up message (a “toast”) on the screen.

-

Well, let’s add some more functionality. Let it ask the user name and greet them.

-
-
-

More samples

-

We can display a simple dialog box with the title, prompt, edit field and buttons Ok and Cancel using dialogGetInput call. Replace the last line of your code and save it as hello1.py:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-
-
-

Well, I think it should return any respond, any user reaction. That’s why I wrote respond = …. But what the call actually returns? Let’s check. Just add print statement after the last line:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-print respond
-
-
-

Then save and run it…

-

Oops! Nothing printed? Don’t worry. Just pull notification bar and you will see “QPython Program Output: hello1.py” — tap it!

-

As you can see, droid.dialogGetInput() returns a JSON object with three fields. We need only one — result which contains an actual input from user.

-

Let’s add script’s reaction:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-print respond
-message = 'Hello, %s!' % respond.result
-droid.makeToast(message)
-
-
-

Last two lines (1) format the message and (2) show the message to the user in the toast. See Python docs if you still don’t know what % means.

-

Wow! It works! ;)

-

Now I’m going to add a bit of logic there. Think: what happen if the user clicks Cancel button, or clicks Ok leaving the input field blank?

-

You can play with the program checking what contains respond variable in every case.

-

First of all, I want to put text entered by user to a separate variable: name = respond.result. Then I’m going to check it, and if it contains any real text, it will be considered as a name and will be used in greeting. Otherwise another message will be shown. Replace fifth line message = ‘Hello, %s!’ % respond.result with the following code:

-
name = respond.result
-if name:
-message = 'Hello, %s!' % name
-else:
-message = "Hey! And you're not very polite, %Username%!"
-
-
-

Use < and > buttons on the toolbar to indent/unindent lines in if-statement (or just use space/backspace keys). You can read more about indentation in Python here; if-statement described here.

-

First of all, we put user input to the variable name. Then we check does name contain anything? In case the user left the line blank and clicked Ok, the return value is empty string ‘’. In case of Cancel button pressed, the return value is None. Both are treated as false in if-statement. So, only if name contans anything meaninful, then-statement is executed and greeting “Hello, …!” shown. In case of empty input the user will see “Hey! And you’re not very polite, %Username%!” message.

-

Ok, here is the whole program:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-print respond
-name = respond.result
-if name:
-message = 'Hello, %s!' % name
-else:
-message = "Hey! And you're not very polite, %Username%!"
-droid.makeToast(message)
-
-
-

Thanks dmych offer the first draft in his blog

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_howtostart.html b/docs/en/guide_howtostart.html deleted file mode 100644 index e4d0390..0000000 --- a/docs/en/guide_howtostart.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - -QPython: How To Start — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython: How To Start

-

Now, I will introduce the QPython’s features through it’s interfaces.

-
-

1. Dashboard

-QPython start -

After you installed QPython, start it in the usual way by tapping its icon in the menu. Screenshot on the top of this post shows what you should see when QPython just started.

-

Start button

-

By tapping the big button with Python logo in the center of the screen you can

-

Launch your local script or project

-

Get script from QR code (funny brand new way to share and distribute your code, you can create QRCode through QPython’s QRCode generator

-

Now you can install many 3rd libaries ( pure python libraries mainly ) through pip_console.py script.

-

If you want QPython to run some script of project when you click the start button, you can make it by setting default program in setting activity.

-

Developer kit dashboard

-

If you swipe to the left instead of tapping, you will see another (second) main screen of QPython (Pic. 2). As for me, it is much more useful and comfortable for developer.

-QPython develop dashboard -

Tools available here:

-
    -
  • Console — yes, it’s regular Python console, feel free to comunicate with interpreter directly
  • -
  • Editor — QPython has a nice text editor integrated with the rest, you can write code and run it without leaving the application
  • -
  • My QPython — here you can find your scripts and projects
  • -
  • System — maintain libraries and components: install and uninstall them
  • -
  • Package Index opens the page QPyPI in browser allowing to install packages listed there
  • -
  • Community leads to QPython.org page. Feel free to join or ask&answer questions in the QPython community.
  • -
-

By long clicking on the console or editor, you have chance to create the shortcut on desktop which allow you enter console or editor directly.

-

Next, let’s see the console and the editor.

-
-
-

2. Console and editor

-QPython console -

As I said before, there is an ordinary Python console. Many people usually use it to explore objects’ properties, consult about syntax and test their ideas. You can type your commands directly and Python interpreter will execute them. You can open additional consoles by tapping the plus button (1) and usedrop-down list on the upper left corner to switch between consoles (2). To close the console just tap the close button (3).

-QPython notification -

Please note, there will be notification in the notification bar unless you explicitly close the console and you always can reach the open console by tapping the notification.

-QPython editor -

The editor allows you obviously (hello Cap!) enter and modify text. Here you can develop your scripts, save them and execute. The editor supports Python syntax highlighting and shows line numbers (there is no ability to go to the line by number though). (above picture)

-

When typing, you can easily control indentation level (which is critical for Python code) using two buttons on the toolbar (1). Next buttons on the toolbar are Save and Save As (2), then goes Run (3), Undo, Search, Recent Files and Settings buttons. Also there are two buttons on the top: Open and New (5).

-

When saving, don’t forget to add .py estension to the file name since the editor don’t do it for you.

-
-
-

3. Programs

-

You can find the scripts or projects in My QPython. My QPython contains the scripts and Projects.

-

By long clicking on script or project, you have chance to create the shortcut for the script or project. Once you have created the shortcuts on desktop, you can directly run the script or project from desktop.

-

Scripts -Scripts : A single script. The scripts are in the /sdcard/com.hipipal.qpyplus/scripts directory. -If you want your script could be found in My QPython, please upload it to this directory.

-

When you click the script, you can choose the following actions:

-
    -
  • Run : Run the script
  • -
  • Open : Edit the script with built-in editor
  • -
  • Rename : Rename the script
  • -
  • Delete : Delete the script
  • -
-

Projects -Projects : A directory which should contain the main.py as the project’s default launch script, and you can put other dependency 3rd libraries or resources in the same directory, if you want your project could be found in My QPython, please upload them into this directory.

-

When you click on the project, you can choose the following actions:

-
    -
  • Run : run the project
  • -
  • Open : use it to explore project’s resources
  • -
  • Rename : Rename the project
  • -
  • Delete : Delete the project
  • -
-
-
-

4. Libraries

-

By installing 3rd libraries, you can extend your qpython’s programming ability quickly. There are some ways to install libraries.

-

QPypi

-

You can install some pre-built libraries from QPypi, like numpy etc.

-

Pip console

-

You can install most pure python libraries through pip console.

-

Besides the two ways above, you could copy libraries into the /sdcard/qpython/lib/python2.7/site-packages in your device.

-

Notice: -Some libraries mixed with c/c++ files could not be install through pip console for the android lacks the compiler environment, you could ask help from qpython developer team.

-
-
-

5. Community

-

It will redirect to the QPython.org, including somthe source of this documentation, and there are some qpython user communities’ link, many questions of qpython usage or programming could be asked in the community.

-

Thanks dmych offer the first draft in his blog

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_ide.html b/docs/en/guide_ide.html deleted file mode 100644 index 0e87ec8..0000000 --- a/docs/en/guide_ide.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - -Use the best way for developing — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Use the best way for developing

-
-

Develop from QEditor

-

QEditor is the QPython’s built-in editor, which supports Python / HTML syntax highlight.

-

QEditor’s main features

-
    -
  • Edit / View plain text file, like Python, Lua, HTML, Javascript and so on
  • -
  • Edit and run Python script & Python syntax highlight
  • -
  • Edit and run Shell script
  • -
  • Preview HTML with built-in HTML browser
  • -
  • Search by keyword, code snippets, code share
  • -
-

You could run the QPython script directly when you develop from QEditor, so when you are moving it’s the most convient way for QPython develop.

-
-
-

Develop from browser

-

QPython has a built-in script which is qedit4web.py, you could see it when you click the start button and choose “Run local script”. -After run it, you could see the result.

-QPython qedit4web -

Then, you could access the url from your PC/Laptop’s browser for developing, just like the below pics.

-QPython qedit4web choose project or file -

After choose some project or script, you could start to develop

-QPython qedit4web -

With it’s help, you could write from browser and run from your android phone. It is very convenient.

-
-
-

Develop from your computer

-

Besides the above ways, you could develop the script with your way, then upload to your phone and run with QPython also.

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_libraries.html b/docs/en/guide_libraries.html deleted file mode 100644 index e2c7b1c..0000000 --- a/docs/en/guide_libraries.html +++ /dev/null @@ -1,574 +0,0 @@ - - - - - -QPython built-in Libraries — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython built-in Libraries

-

QPython is using the Python 2.7.2 and it support most Python stardard libraries. And you could see their documentation through Python documentation.

-
-

QPython dynload libraries

-

Just like Python, QPython contains python built-in .so libraries.

-

Usually, you don’t need to import them manually, they were used in stardard libraries, and could be imported automatically.

-
    -
  • _codecs_cn.so
  • -
  • _codecs_hk.so
  • -
  • _codecs_iso2022.so
  • -
  • _codecs_jp.so
  • -
  • _codecs_kr.so
  • -
  • _codecs_tw.so
  • -
  • _csv.so
  • -
  • _ctypes.so
  • -
  • _ctypes_test.so
  • -
  • _hashlib.so
  • -
  • _heapq.so
  • -
  • _hotshot.so
  • -
  • _io.so
  • -
  • _json.so
  • -
  • _lsprof.so
  • -
  • _multibytecodec.so
  • -
  • _sqlite3.so
  • -
  • _ssl.so
  • -
  • _testcapi.so
  • -
  • audioop.so
  • -
  • future_builtins.so
  • -
  • grp.so
  • -
  • mmap.so
  • -
  • resource.so
  • -
  • syslog.so
  • -
  • termios.so
  • -
  • unicodedata.so
  • -
-
-
-

QPython stardard libraries

-

The following libraries are the stardard QPython libraries which are the same as Python:

-
    -
  • BaseHTTPServer.py
  • -
  • binhex.py
  • -
  • fnmatch.py
  • -
  • mhlib.py
  • -
  • quopri.py
  • -
  • sysconfig.py
  • -
  • Bastion.py
  • -
  • bisect.py
  • -
  • formatter.py
  • -
  • mimetools.py
  • -
  • random.py
  • -
  • tabnanny.py
  • -
  • CGIHTTPServer.py
  • -
  • bsddb
  • -
  • fpformat.py
  • -
  • mimetypes.py
  • -
  • re.py
  • -
  • tarfile.py
  • -
  • ConfigParser.py
  • -
  • cProfile.py
  • -
  • fractions.py
  • -
  • mimify.py
  • -
  • repr.py
  • -
  • telnetlib.py
  • -
  • Cookie.py
  • -
  • calendar.py
  • -
  • ftplib.py
  • -
  • modulefinder.py
  • -
  • rexec.py
  • -
  • tempfile.py
  • -
  • DocXMLRPCServer.py
  • -
  • cgi.py
  • -
  • functools.py
  • -
  • multifile.py
  • -
  • rfc822.py
  • -
  • textwrap.py
  • -
  • HTMLParser.py
  • -
  • cgitb.py
  • -
  • genericpath.py
  • -
  • mutex.py
  • -
  • rlcompleter.py
  • -
  • this.py
  • -
  • chunk.py
  • -
  • getopt.py
  • -
  • netrc.py
  • -
  • robotparser.py
  • -
  • threading.py
  • -
  • MimeWriter.py
  • -
  • cmd.py
  • -
  • getpass.py
  • -
  • new.py
  • -
  • runpy.py
  • -
  • timeit.py
  • -
  • Queue.py
  • -
  • code.py
  • -
  • gettext.py
  • -
  • nntplib.py
  • -
  • sched.py
  • -
  • toaiff.py
  • -
  • SimpleHTTPServer.py
  • -
  • codecs.py
  • -
  • glob.py
  • -
  • ntpath.py
  • -
  • sets.py
  • -
  • token.py
  • -
  • SimpleXMLRPCServer.py
  • -
  • codeop.py
  • -
  • gzip.py
  • -
  • nturl2path.py
  • -
  • sgmllib.py
  • -
  • tokenize.py
  • -
  • SocketServer.py
  • -
  • collections.py
  • -
  • hashlib.py
  • -
  • numbers.py
  • -
  • sha.py
  • -
  • trace.py
  • -
  • StringIO.py
  • -
  • colorsys.py
  • -
  • heapq.py
  • -
  • opcode.py
  • -
  • shelve.py
  • -
  • traceback.py
  • -
  • UserDict.py
  • -
  • commands.py
  • -
  • hmac.py
  • -
  • optparse.py
  • -
  • shlex.py
  • -
  • tty.py
  • -
  • UserList.py
  • -
  • compileall.py
  • -
  • hotshot
  • -
  • os.py
  • -
  • shutil.py
  • -
  • types.py
  • -
  • UserString.py
  • -
  • compiler
  • -
  • htmlentitydefs.py
  • -
  • os2emxpath.py
  • -
  • site.py
  • -
  • unittest
  • -
  • _LWPCookieJar.py
  • -
  • config
  • -
  • htmllib.py
  • -
  • smtpd.py
  • -
  • urllib.py
  • -
  • _MozillaCookieJar.py
  • -
  • contextlib.py
  • -
  • httplib.py
  • -
  • pdb.py
  • -
  • smtplib.py
  • -
  • urllib2.py
  • -
  • __future__.py
  • -
  • cookielib.py
  • -
  • ihooks.py
  • -
  • pickle.py
  • -
  • sndhdr.py
  • -
  • urlparse.py
  • -
  • __phello__.foo.py
  • -
  • copy.py
  • -
  • imaplib.py
  • -
  • pickletools.py
  • -
  • socket.py
  • -
  • user.py
  • -
  • _abcoll.py
  • -
  • copy_reg.py
  • -
  • imghdr.py
  • -
  • pipes.py
  • -
  • sqlite3
  • -
  • uu.py
  • -
  • _pyio.py
  • -
  • csv.py
  • -
  • importlib
  • -
  • pkgutil.py
  • -
  • sre.py
  • -
  • uuid.py
  • -
  • _strptime.py
  • -
  • ctypes
  • -
  • imputil.py
  • -
  • plat-linux4
  • -
  • sre_compile.py
  • -
  • warnings.py
  • -
  • _threading_local.py
  • -
  • dbhash.py
  • -
  • inspect.py
  • -
  • platform.py
  • -
  • sre_constants.py
  • -
  • wave.py
  • -
  • _weakrefset.py
  • -
  • decimal.py
  • -
  • io.py
  • -
  • plistlib.py
  • -
  • sre_parse.py
  • -
  • weakref.py
  • -
  • abc.py
  • -
  • difflib.py
  • -
  • json
  • -
  • popen2.py
  • -
  • ssl.py
  • -
  • webbrowser.py
  • -
  • aifc.py
  • -
  • dircache.py
  • -
  • keyword.py
  • -
  • poplib.py
  • -
  • stat.py
  • -
  • whichdb.py
  • -
  • antigravity.py
  • -
  • dis.py
  • -
  • lib-tk
  • -
  • posixfile.py
  • -
  • statvfs.py
  • -
  • wsgiref
  • -
  • anydbm.py
  • -
  • distutils
  • -
  • linecache.py
  • -
  • posixpath.py
  • -
  • string.py
  • -
  • argparse.py
  • -
  • doctest.py
  • -
  • locale.py
  • -
  • pprint.py
  • -
  • stringold.py
  • -
  • xdrlib.py
  • -
  • ast.py
  • -
  • dumbdbm.py
  • -
  • logging
  • -
  • profile.py
  • -
  • stringprep.py
  • -
  • xml
  • -
  • asynchat.py
  • -
  • dummy_thread.py
  • -
  • macpath.py
  • -
  • pstats.py
  • -
  • struct.py
  • -
  • xmllib.py
  • -
  • asyncore.py
  • -
  • dummy_threading.py
  • -
  • macurl2path.py
  • -
  • pty.py
  • -
  • subprocess.py
  • -
  • xmlrpclib.py
  • -
  • atexit.py
  • -
  • email
  • -
  • mailbox.py
  • -
  • py_compile.py
  • -
  • sunau.py
  • -
  • zipfile.py
  • -
  • audiodev.py
  • -
  • encodings
  • -
  • mailcap.py
  • -
  • pyclbr.py
  • -
  • sunaudio.py
  • -
  • base64.py
  • -
  • filecmp.py
  • -
  • markupbase.py
  • -
  • pydoc.py
  • -
  • symbol.py
  • -
  • bdb.py
  • -
  • fileinput.py
  • -
  • md5.py
  • -
  • pydoc_data
  • -
  • symtable.py
  • -
-
-
-
-

Python 3rd Libraries

- -
- -
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/en/guide_program.html b/docs/en/guide_program.html deleted file mode 100644 index a937305..0000000 --- a/docs/en/guide_program.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - -QPython’s main features — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython’s main features

-

With QPython, you could build android applications with android application and script language now.

-
-

Why should I choose QPython

-

The smartphone is becomming people’s essential information & technical assitant, so an flexiable script engine could help people complete most jobs efficiently without complex development.

-

QPython offer an amazing developing experience, with it’s help, you could implement the program easily without complex installing IDE, compiling, package progress etc.

-
-
-

QPython’s main features

-

You can do most jobs through QPython just like the way that Python does on PC/Laptop.

-

Libraries

-
    -
  • QPython supports most stardard Python libraries.
  • -
  • QPython supports many 3rd Python libraries which implemented with pure Python code.
  • -
  • QPython supports some Python libraries mixed with C/C++ code which pre-compiled by QPython develop team.
  • -
  • QPython allows you put on the libraries by yourself.
  • -
-

Besides these, QPython offers some extra features which Python doesn’t offer, Like:

-
    -
  • Android APIs Access(Like SMS, GPS, NFC, BLUETOOTH etc)
  • -
-

Why QPython require so many permissions?

-

QPython need these permissions to access Android’s API.

-

Runtime modes

-

QPython supports several runtime modes for android.

-

Console mode

-

It’s the default runtime mode in QPython, it’s very common in PC/laptop.

-

Kivy mode

-

QPython supports Kivy as the GUI programming solution.

-

Kivy is an open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps.

-

Your device should support opengl2.0 for supporting kivy mode.

-

By insert into the following header in your script, you can let your script run with kivy mode.

-
#qpy:kivy
-
-
-

An kivy program in QPython sample

-
#qpy:kivy
-from kivy.app import App
-from kivy.uix.button import Button
-class TestApp(App):
-def build(self):
-return Button(text='Hello World')
-TestApp().run()
-
-
-

If your library require the opengl driver, you shoule declare the kivy mode header in your script, like the jnius.

-

NOTE: QPython3 didn’t support kivy mode yet, we have plan to support it in the future

-

WebApp mode

-

We recommend you implement WebApp with QPython for it offer the easy to accomplish UI and Take advantage of Python’s fast programming strong point.

-

WebApp will start a webview in front, and run a python web service background. -You could use bottle*(QPython built-in library) to implement the web service, or you could install *django / flask framework also.

-

By insert into the following header in your script, you can let your script run with webapp mode.

-
#qpy:webapp:<app title>
-#qpy:<fullscreen or remove this line>
-#qpy://<ip:port:path>
-
-
-

For example

-
#qpy:webapp:Hello QPython
-#qpy://localhost:8080/hello
-
-
-

The previous should start a webview which should load the http://localhost:8080/hello as the default page, and the webview will keep the titlebar which title is “Hello QPython”, if you add the #qpy:fullscreen it will hide the titlebar.

-
#qpy:webapp:Hello Qpython
-#qpy://127.0.0.1:8080/
-"""
-This is a sample for qpython webapp
-"""
-from bottle import Bottle, ServerAdapter
-from bottle import run, debug, route, error, static_file, template
-######### QPYTHON WEB SERVER ###############
-class MyWSGIRefServer(ServerAdapter):
-server = None
-def run(self, handler):
-from wsgiref.simple_server import make_server, WSGIRequestHandler
-if self.quiet:
-class QuietHandler(WSGIRequestHandler):
-def log_request(*args, **kw): pass
-self.options['handler_class'] = QuietHandler
-self.server = make_server(self.host, self.port, handler, **self.options)
-self.server.serve_forever()
-def stop(self):
-#sys.stderr.close()
-import threading
-threading.Thread(target=self.server.shutdown).start()
-#self.server.shutdown()
-self.server.server_close() #<--- alternative but causes bad fd exception
-print "# qpyhttpd stop"
-######### BUILT-IN ROUTERS ###############
-@route('/__exit', method=['GET','HEAD'])
-def __exit():
-global server
-server.stop()
-@route('/assets/<filepath:path>')
-def serverstatic(filepath):
-return static_file(filepath, root='/sdcard')
-######### WEBAPP ROUTERS ###############
-@route('/')
-def home():
-return template('<h1>Hello {{name}} !</h1>'+ \
-'<a href="/assets/qpython/projects/WebApp Sample/main.py">View source</a>',name='QPython')
-######### WEBAPP ROUTERS ###############
-app = Bottle()
-app.route('/', method='GET')(home)
-app.route('/__exit', method=['GET','HEAD'])(__exit)
-app.route('/assets/<filepath:path>', method='GET')(serverstatic)
-try:
-server = MyWSGIRefServer(host="127.0.0.1", port="8080")
-app.run(server=server,reloader=False)
-except Exception,ex:
-print "Exception: %s" % repr(ex)
-
-
-

If you want the webapp could be close when you exit the webview, you have to define the @route(‘/__exit’, method=[‘GET’,’HEAD’]) method , for the qpython will request the http://localhost:8080/__exit when you exit the webview. So you can release other resource in this function.

-QPython WebApp Sample -

Running screenshot

-

In the other part of the code, you could implement a webserver whish serve on localhost:8080 and make the URL /hello implement as your webapp’s homepage.

-

Q mode

-

If you don’t want the QPython display some UI, pelase try to use the QScript mode, it could run a script background, just insert the following header into your script:

-
#qpy:qpyapp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/features/2018-09-28-dropbear-cn.html b/docs/features/2018-09-28-dropbear-cn.html deleted file mode 100644 index 2a0bfcf..0000000 --- a/docs/features/2018-09-28-dropbear-cn.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - -如何在QPython 使用 SSH — QPython 0.9 documentation - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- -
-
-
-
    -
  • Guide »
  • -
  • 如何在QPython 使用 SSH
  • -
-
-
-
-
-

如何在QPython 使用 SSH

-

近来悄悄更新了不少好玩的包,但是我最喜欢的是今天介绍的这个特性,刚被集成到QPython中的dropbear SSH工具。

-

Dropbear SSH 是很多嵌入式linux系统首选的ssh工具,结合qpython,能让你方便地进行编程来自动管理服务器或你的手机。

-
-

如何远程登录 你的服务器?

-1 Dashboard 长按Terminal, 选择Shell Terminal -

1 Dashboard 长按Terminal, 选择Shell Terminal

-2 Shell中输入ssh <user>@<host> -

2 Shell中输入ssh <user>@<host>

-3 已经登录到了远端服务器 -

3 已经登录到了远端服务器

-

除了从手机上登录服务器外,你还可以登录到你的手机。

-
-
-

如何登录到你的手机?

-

这个功能适合高级玩家,因为一些权限的问题,在手机上开sshd服务需要root权限。 -第一次使用,需要从shell terminal中进行下初始化操作

-

``` -su - #切换为root用户,

-

mkdir dropbear # 在 /data/data/org.qpython.qpy/files下创建dropbear目录

-

初始化对应的key

-

dbkey -t dss -f dropbear/dropbear_dss_host_key

-

dbkey -t rsa -f dropbear/dropbear_rsa_host_key

-

dbkey -t ecdsa -f dropbear/dropbear_ecdsa_host_key -```

-

完成上述步骤之后,即可启动sshd服务。

-启动sshd服务:sshd -p 8088 -P dropbear/db.pid -F # 前台启动,端口 8088 -

启动sshd服务:sshd -p 8088 -P dropbear/db.pid -F # 前台启动,端口 8088

-

接下来从你的电脑中就可以登录了你的手机了默认密码就是我们的app名字,你懂得。

-从你的笔记本登录手机 -

从你的笔记本登录手机

-

另外还支持下面高级特性:

-
    -
  • ssh 支持证书登录,借助dbconvert,可以把你的openssh证书转换过来,存到对应的目录,用 ssh -i <id_private>指定证书即可
  • -
  • sshd 支持 authorized_keys, 只需要把该文件保存到你的dropbear目录下,即可
  • -
  • scp,远程拷贝文件
  • -
-

后续计划移植更多有用的工具

-
-
-

其他

-

不想玩了记得kill掉sshd进程,之前需要指定pid文件就是方便你获得 pid

-

kill cat dropbear/db.pid

-

获得QPython App

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/genindex.html b/docs/genindex.html deleted file mode 100644 index 3b50822..0000000 --- a/docs/genindex.html +++ /dev/null @@ -1,829 +0,0 @@ - - - - - -Index — QPython 0.9 documentation - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- -
-
-
- -
-
-
-

Index

-
-A -| B -| C -| D -| E -| F -| G -| L -| M -| N -| P -| Q -| R -| S -| T -| U -| V -| W -
-

A

- - - -
-

B

- - - -
-

C

- - - -
-

D

- - - -
-

E

- - - -
-

F

- - - -
-

G

- - - -
-

L

- - - -
-

M

- - - -
-

N

- - - -
-

P

- - - -
-

Q

- - - -
-

R

- - - -
-

S

- - - -
-

T

- - - -
-

U

- - - -
-

V

- - - -
-

W

- - - -
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/index.html b/docs/index.html deleted file mode 100755 index b5caf25..0000000 --- a/docs/index.html +++ /dev/null @@ -1,198 +0,0 @@ - - - -QPython - Best Mobile Python IDE - - - - - - - - - - -
-
- - - - - -
-
- -
-
-
- - -
- - -
-
- -
-
-

Welcome to read the QPython guide!

-
- QPython is a program engine that runs Python script on your Android devices. It contains the Python interpreter, editor, QPYPI, QRCode reader and some amazing features for Android. -
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
- -
-
-
- -
-
-
-
-
    - -
  • - - FAQ -

    - What's the difference between QPython and QPython3? -

    -
  • - -
-
-
-
-
- - -
- - - - - diff --git a/docs/market/default.html b/docs/market/default.html deleted file mode 100644 index 7dbd944..0000000 --- a/docs/market/default.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/docs/market/huawei.html b/docs/market/huawei.html deleted file mode 100644 index f808c0d..0000000 --- a/docs/market/huawei.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/docs/market/qq.html b/docs/market/qq.html deleted file mode 100644 index b16f03f..0000000 --- a/docs/market/qq.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/docs/market/xiaomi.html b/docs/market/xiaomi.html deleted file mode 100644 index 4812825..0000000 --- a/docs/market/xiaomi.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/docs/objects.inv b/docs/objects.inv deleted file mode 100644 index 8124e54..0000000 Binary files a/docs/objects.inv and /dev/null differ diff --git a/docs/quick-start/index.html b/docs/quick-start/index.html deleted file mode 100644 index 08cf5eb..0000000 --- a/docs/quick-start/index.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - -Quick Start | QPyPI - - - - - - - -
- - -
-
-
- -
-

Quick Start

-
-
-

A hands-on introduction to Python for beginning programmers

-

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 -

-
-
-
-

Running with Console

-

Running QPython’s simple script with console model

-
#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
-
-
-
-
-
-

Running with Kivy

-

Running QPython’s script with GUI model ( Kivy library )

-
#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()
-
-
-
-
-

Running as Web App

-

Running Web App with QPython

-
#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)
-
-
- -
-
-
-
-

0 pepole donate.Thank you for donating, which should encourage author greatly

-

-
-
-
-
-
-
-
-
- - diff --git a/docs/search.html b/docs/search.html deleted file mode 100644 index e5fafdc..0000000 --- a/docs/search.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - -Search — QPython 0.9 documentation - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
-
- -
-
-
- -
-
-
-

Search

-
- -

-Please activate JavaScript to enable the search -functionality. -

-
-

-From here you can search these documents. Enter your search -words into the box below and click "search". Note that the search -function will automatically search for all of the words. Pages -containing fewer words won't appear in the result list. -

-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - diff --git a/docs/searchindex.js b/docs/searchindex.js deleted file mode 100644 index cb8bcb9..0000000 --- a/docs/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["contributors","document","en/faq","en/guide","en/guide_androidhelpers","en/guide_contributors","en/guide_contributors_test","en/guide_developers","en/guide_extend","en/guide_helloworld","en/guide_howtostart","en/guide_ide","en/guide_libraries","en/guide_program","features/2018-09-28-dropbear-cn","zh/contributorshowto","zh/howtostart","zhindex"],envversion:53,filenames:["contributors.rst","document.rst","en/faq.rst","en/guide.rst","en/guide_androidhelpers.rst","en/guide_contributors.rst","en/guide_contributors_test.rst","en/guide_developers.rst","en/guide_extend.rst","en/guide_helloworld.rst","en/guide_howtostart.rst","en/guide_ide.rst","en/guide_libraries.rst","en/guide_program.rst","features/2018-09-28-dropbear-cn.rst","zh/contributorshowto.rst","zh/howtostart.rst","zhindex.rst"],objects:{"":{NFCBeamMessage:[4,0,1,""],addContextMenuItem:[4,0,1,""],addOptionsMenuItem:[4,0,1,""],batteryCheckPresent:[4,0,1,""],batteryGetHealth:[4,0,1,""],batteryGetLevel:[4,0,1,""],batteryGetPlugType:[4,0,1,""],batteryGetStatus:[4,0,1,""],batteryGetTechnology:[4,0,1,""],batteryGetTemperature:[4,0,1,""],batteryGetVoltage:[4,0,1,""],batteryStartMonitoring:[4,0,1,""],batteryStopMonitoring:[4,0,1,""],bluetoothAccept:[4,0,1,""],bluetoothActiveConnections:[4,0,1,""],bluetoothConnect:[4,0,1,""],bluetoothDiscoveryCancel:[4,0,1,""],bluetoothDiscoveryStart:[4,0,1,""],bluetoothGetConnectedDeviceName:[4,0,1,""],bluetoothGetLocalAddress:[4,0,1,""],bluetoothGetLocalName:[4,0,1,""],bluetoothGetRemoteDeviceName:[4,0,1,""],bluetoothGetScanMode:[4,0,1,""],bluetoothIsDiscovering:[4,0,1,""],bluetoothMakeDiscoverable:[4,0,1,""],bluetoothRead:[4,0,1,""],bluetoothReadBinary:[4,0,1,""],bluetoothReadLine:[4,0,1,""],bluetoothReadReady:[4,0,1,""],bluetoothSetLocalName:[4,0,1,""],bluetoothStop:[4,0,1,""],bluetoothWrite:[4,0,1,""],bluetoothWriteBinary:[4,0,1,""],cameraCapturePicture:[4,0,1,""],cameraInteractiveCapturePicture:[4,0,1,""],cameraStartPreview:[4,0,1,""],cameraStopPreview:[4,0,1,""],checkAirplaneMode:[4,0,1,""],checkBluetoothState:[4,0,1,""],checkNetworkRoaming:[4,0,1,""],checkRingerSilentMode:[4,0,1,""],checkScreenOn:[4,0,1,""],checkWifiState:[4,0,1,""],contactsGet:[4,0,1,""],contactsGetAttributes:[4,0,1,""],contactsGetById:[4,0,1,""],contactsGetCount:[4,0,1,""],contactsGetIds:[4,0,1,""],dialogCreateAlert:[4,0,1,""],dialogCreateDatePicker:[4,0,1,""],dialogCreateHorizontalProgress:[4,0,1,""],dialogCreateInput:[4,0,1,""],dialogCreateNFCBeamMaster:[4,0,1,""],dialogCreateNFCBeamSlave:[4,0,1,""],dialogCreatePassword:[4,0,1,""],dialogCreateSeekBar:[4,0,1,""],dialogCreateSpinnerProgress:[4,0,1,""],dialogCreateTimePicker:[4,0,1,""],dialogDismiss:[4,0,1,""],dialogGetInput:[4,0,1,""],dialogGetPassword:[4,0,1,""],dialogGetResponse:[4,0,1,""],dialogGetSelectedItems:[4,0,1,""],dialogSetCurrentProgress:[4,0,1,""],dialogSetItems:[4,0,1,""],dialogSetMaxProgress:[4,0,1,""],dialogSetMultiChoiceItems:[4,0,1,""],dialogSetNegativeButtonText:[4,0,1,""],dialogSetNeutralButtonText:[4,0,1,""],dialogSetPositiveButtonText:[4,0,1,""],dialogSetSingleChoiceItems:[4,0,1,""],dialogShow:[4,0,1,""],environment:[4,0,1,""],eventClearBuffer:[4,0,1,""],eventGetBrodcastCategories:[4,0,1,""],eventPoll:[4,0,1,""],eventPost:[4,0,1,""],eventRegisterForBroadcast:[4,0,1,""],eventUnregisterForBroadcast:[4,0,1,""],eventWait:[4,0,1,""],eventWaitFor:[4,0,1,""],executeQPy:[4,0,1,""],forceStopPackage:[4,0,1,""],fullDismiss:[4,0,1,""],fullKeyOverride:[4,0,1,""],fullQuery:[4,0,1,""],fullQueryDetail:[4,0,1,""],fullSetList:[4,0,1,""],fullSetProperty:[4,0,1,""],fullShow:[4,0,1,""],generateDtmfTones:[4,0,1,""],geocode:[4,0,1,""],getCellLocation:[4,0,1,""],getClipboard:[4,0,1,""],getConstants:[4,0,1,""],getDeviceId:[4,0,1,""],getDeviceSoftwareVersion:[4,0,1,""],getInput:[4,0,1,""],getIntent:[4,0,1,""],getLastKnownLocation:[4,0,1,""],getLaunchableApplications:[4,0,1,""],getLine1Number:[4,0,1,""],getMaxMediaVolume:[4,0,1,""],getMaxRingerVolume:[4,0,1,""],getMediaVolume:[4,0,1,""],getNeighboringCellInfo:[4,0,1,""],getNetworkOperator:[4,0,1,""],getNetworkOperatorName:[4,0,1,""],getNetworkStatus:[4,0,1,""],getNetworkType:[4,0,1,""],getPackageVersion:[4,0,1,""],getPackageVersionCode:[4,0,1,""],getPassword:[4,0,1,""],getPhoneType:[4,0,1,""],getRingerVolume:[4,0,1,""],getRunningPackages:[4,0,1,""],getScreenBrightness:[4,0,1,""],getScreenTimeout:[4,0,1,""],getSimCountryIso:[4,0,1,""],getSimOperator:[4,0,1,""],getSimOperatorName:[4,0,1,""],getSimSerialNumber:[4,0,1,""],getSimState:[4,0,1,""],getSubscriberId:[4,0,1,""],getVibrateMode:[4,0,1,""],getVoiceMailAlphaTag:[4,0,1,""],getVoiceMailNumber:[4,0,1,""],launch:[4,0,1,""],locationProviderEnabled:[4,0,1,""],locationProviders:[4,0,1,""],log:[4,0,1,""],makeIntent:[4,0,1,""],makeToast:[4,0,1,""],mediaIsPlaying:[4,0,1,""],mediaPlay:[4,0,1,""],mediaPlayClose:[4,0,1,""],mediaPlayInfo:[4,0,1,""],mediaPlayList:[4,0,1,""],mediaPlayPause:[4,0,1,""],mediaPlaySeek:[4,0,1,""],mediaPlaySetLooping:[4,0,1,""],mediaPlayStart:[4,0,1,""],notify:[4,0,1,""],phoneCall:[4,0,1,""],phoneCallNumber:[4,0,1,""],phoneDial:[4,0,1,""],phoneDialNumber:[4,0,1,""],pick:[4,0,1,""],pickContact:[4,0,1,""],pickPhone:[4,0,1,""],prefGetAll:[4,0,1,""],prefGetValue:[4,0,1,""],prefPutValue:[4,0,1,""],queryAttributes:[4,0,1,""],queryContent:[4,0,1,""],readBatteryData:[4,0,1,""],readLocation:[4,0,1,""],readPhoneState:[4,0,1,""],readSensors:[4,0,1,""],readSignalStrengths:[4,0,1,""],receiveEvent:[4,0,1,""],recognizeSpeech:[4,0,1,""],recorderCaptureVideo:[4,0,1,""],recorderStartMicrophone:[4,0,1,""],recorderStartVideo:[4,0,1,""],recorderStop:[4,0,1,""],requiredVersion:[4,0,1,""],rpcPostEvent:[4,0,1,""],scanBarcode:[4,0,1,""],search:[4,0,1,""],sendBroadcast:[4,0,1,""],sendBroadcastIntent:[4,0,1,""],sendEmail:[4,0,1,""],sensorsGetAccuracy:[4,0,1,""],sensorsGetLight:[4,0,1,""],sensorsReadAccelerometer:[4,0,1,""],sensorsReadMagnetometer:[4,0,1,""],sensorsReadOrientation:[4,0,1,""],setClipboard:[4,0,1,""],setMediaVolume:[4,0,1,""],setResultBoolean:[4,0,1,""],setResultBooleanArray:[4,0,1,""],setResultByte:[4,0,1,""],setResultByteArray:[4,0,1,""],setResultChar:[4,0,1,""],setResultCharArray:[4,0,1,""],setResultDouble:[4,0,1,""],setResultDoubleArray:[4,0,1,""],setResultFloat:[4,0,1,""],setResultFloatArray:[4,0,1,""],setResultInteger:[4,0,1,""],setResultIntegerArray:[4,0,1,""],setResultLong:[4,0,1,""],setResultLongArray:[4,0,1,""],setResultSerializable:[4,0,1,""],setResultShort:[4,0,1,""],setResultShortArray:[4,0,1,""],setResultString:[4,0,1,""],setResultStringArray:[4,0,1,""],setRingerVolume:[4,0,1,""],setScreenBrightness:[4,0,1,""],setScreenTimeout:[4,0,1,""],smsDeleteMessage:[4,0,1,""],smsGetAttributes:[4,0,1,""],smsGetMessageById:[4,0,1,""],smsGetMessageCount:[4,0,1,""],smsGetMessageIds:[4,0,1,""],smsGetMessages:[4,0,1,""],smsMarkMessageRead:[4,0,1,""],smsSend:[4,0,1,""],startActivity:[4,0,1,""],startActivityForResult:[4,0,1,""],startActivityForResultIntent:[4,0,1,""],startActivityIntent:[4,0,1,""],startEventDispatcher:[4,0,1,""],startInteractiveVideoRecording:[4,0,1,""],startLocating:[4,0,1,""],startSensing:[4,0,1,""],startSensingThreshold:[4,0,1,""],startSensingTimed:[4,0,1,""],startTrackingPhoneState:[4,0,1,""],startTrackingSignalStrengths:[4,0,1,""],stopEventDispatcher:[4,0,1,""],stopLocating:[4,0,1,""],stopSensing:[4,0,1,""],stopTrackingPhoneState:[4,0,1,""],stopTrackingSignalStrengths:[4,0,1,""],toggleAirplaneMode:[4,0,1,""],toggleBluetoothState:[4,0,1,""],toggleRingerSilentMode:[4,0,1,""],toggleVibrateMode:[4,0,1,""],toggleWifiState:[4,0,1,""],ttsIsSpeaking:[4,0,1,""],ttsSpeak:[4,0,1,""],usbserialActiveConnections:[4,0,1,""],usbserialConnect:[4,0,1,""],usbserialDisconnect:[4,0,1,""],usbserialGetDeviceList:[4,0,1,""],usbserialGetDeviceName:[4,0,1,""],usbserialHostEnable:[4,0,1,""],usbserialRead:[4,0,1,""],usbserialReadBinary:[4,0,1,""],usbserialReadReady:[4,0,1,""],usbserialWrite:[4,0,1,""],usbserialWriteBinary:[4,0,1,""],view:[4,0,1,""],viewContacts:[4,0,1,""],viewHtml:[4,0,1,""],viewMap:[4,0,1,""],waitForEvent:[4,0,1,""],wakeLockAcquireBright:[4,0,1,""],wakeLockAcquireDim:[4,0,1,""],wakeLockAcquireFull:[4,0,1,""],wakeLockAcquirePartial:[4,0,1,""],wakeLockRelease:[4,0,1,""],webViewShow:[4,0,1,""],webcamAdjustQuality:[4,0,1,""],webcamStart:[4,0,1,""],wifiDisconnect:[4,0,1,""],wifiGetConnectionInfo:[4,0,1,""],wifiGetScanResults:[4,0,1,""],wifiLockAcquireFull:[4,0,1,""],wifiLockAcquireScanOnly:[4,0,1,""],wifiLockRelease:[4,0,1,""],wifiReassociate:[4,0,1,""],wifiReconnect:[4,0,1,""],wifiStartScan:[4,0,1,""]}},objnames:{"0":["py","function","Python function"]},objtypes:{"0":"py:function"},terms:{"160x120":4,"320x240":4,"352x288":4,"3rd":[1,2,3,4,10,13],"640x480":4,"78k0f0730":4,"800x480":4,"\u4e0d\u60f3\u73a9\u4e86\u8bb0\u5f97kill\u6389sshd\u8fdb\u7a0b":14,"\u4e16\u754c":16,"\u4e24\u90e8\u5206":15,"\u4e2d\u6587":15,"\u4e2d\u6587\u7528\u6237\u5411\u5bfc":1,"\u4e3b\u8981\u662f\u7528qpython\u6765\u8fdb\u884c\u7f16\u7a0b\u548c\u5f00\u53d1\u7684\u6307\u5357":15,"\u4e4b\u524d\u9700\u8981\u6307\u5b9apid\u6587\u4ef6\u5c31\u662f\u65b9\u4fbf\u4f60\u83b7\u5f97":14,"\u4ece\u4f60\u7684\u7b14\u8bb0\u672c\u767b\u5f55\u624b\u673a":14,"\u4f46\u662f\u6211\u6700\u559c\u6b22\u7684\u662f\u4eca\u5929\u4ecb\u7ecd\u7684\u8fd9\u4e2a\u7279\u6027":14,"\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6765\u63d0\u4ea4\u5bf9\u5e94\u56fd\u5bb6\u7684\u7ffb\u8bd1":15,"\u4f60\u597d":16,"\u4f60\u61c2\u5f97":14,"\u4f60\u8fd8\u53ef\u4ee5\u767b\u5f55\u5230\u4f60\u7684\u624b\u673a":14,"\u4f7f\u7528\u4e0a\u7684\u5e2e\u52a9":15,"\u4f7f\u7528\u8bf4\u660e":16,"\u501f\u52a9dbconvert":14,"\u5176\u4e2d\u5185\u5bb9\u5176\u4e2d\u53c8\u5206\u4e3a":15,"\u5206\u4e3a\u5728qpython":15,"\u5207\u6362\u4e3aroot\u7528\u6237":14,"\u521a\u88ab\u96c6\u6210\u5230qpython\u4e2d\u7684dropbear":14,"\u521d\u59cb\u5316\u5bf9\u5e94\u7684kei":14,"\u524d\u53f0\u542f\u52a8":14,"\u52a0\u5165qpython":17,"\u5373\u53ef":14,"\u5373\u53ef\u542f\u52a8sshd\u670d\u52a1":14,"\u53e6\u5916\u8fd8\u652f\u6301\u4e0b\u9762\u9ad8\u7ea7\u7279\u6027":14,"\u53ea\u9700\u8981\u628a\u8be5\u6587\u4ef6\u4fdd\u5b58\u5230\u4f60\u7684dropbear\u76ee\u5f55\u4e0b":14,"\u53ef\u4ee5\u628a\u4f60\u7684openssh\u8bc1\u4e66\u8f6c\u6362\u8fc7\u6765":14,"\u540e\u7eed\u8ba1\u5212\u79fb\u690d\u66f4\u591a\u6709\u7528\u7684\u5de5\u5177":14,"\u542f\u52a8sshd\u670d\u52a1":14,"\u548c\u4ee5\u5916\u7684":15,"\u56e0\u4e3a\u4e00\u4e9b\u6743\u9650\u7684\u95ee\u9898":14,"\u56e2\u961f":16,"\u5728":14,"\u5728\u5fae\u535a\u95ee\u6211\u4eec\u95ee\u9898":17,"\u5728\u60f3\u8981\u8d21\u732eqpython\u6587\u6863\u4e4b\u524d\u4ed4\u7ec6\u9605\u8bfb\u6211\u4eec\u7684\u6307\u5357":15,"\u5728\u624b\u673a\u4e0a\u5f00sshd\u670d\u52a1\u9700\u8981root\u6743\u9650":14,"\u5728\u767e\u5ea6\u8d34\u5427\u91cc\u8ba8\u8bba":17,"\u5982\u4f55\u63d0\u4ea4\u6587\u6863":[16,17],"\u5982\u4f55\u63d0\u4ea4\u7ffb\u8bd1":[16,17],"\u5982\u4f55\u8d21\u732e":1,"\u5982\u679c\u68c0\u67e5\u65e0\u95ee\u9898\u5219\u53ef\u4ee5\u63d0\u4ea4":15,"\u5b58\u5230\u5bf9\u5e94\u7684\u76ee\u5f55":14,"\u5b83\u5305\u542b\u4e86\u8bb8\u591a\u60ca\u8273\u7684\u7279\u6027":17,"\u5b8c\u6210\u4e0a\u8ff0\u6b65\u9aa4\u4e4b\u540e":14,"\u5df2\u7ecf\u53d1\u5e03":17,"\u5df2\u7ecf\u767b\u5f55\u5230\u4e86\u8fdc\u7aef\u670d\u52a1\u5668":14,"\u5e38\u89c1\u95ee\u9898":17,"\u5e76\u4e14\u6587\u6863\u4f1a\u901a\u8fc7github":15,"\u5f00\u53d1":16,"\u5feb\u901f\u4e86\u89e3":16,"\u5feb\u901f\u5f00\u59cb":[15,17],"\u60f3\u6210\u4e3a":17,"\u6211\u4eec\u52aa\u529b\u4fdd\u6301\u4e24\u79cd\u8bed\u8a00\u5bf9\u5e94\u5185\u5bb9\u7684\u51c6\u786e\u548c\u540c\u6b65":15,"\u6211\u4eec\u7528sphinx\u6765\u7ec4\u7ec7\u6587\u6863":15,"\u6253\u5f00\u6d4f\u89c8\u5668\u6253\u5f00\u672c\u5730\u6587\u4ef6\u68c0\u67e5":15,"\u62a5\u544a\u95ee\u9898":17,"\u6307\u5b9a\u8bc1\u4e66\u5373\u53ef":14,"\u6309\u7167sphinx\u89c4\u5219\u7f16\u8f91source\u4e2d\u7684\u6587\u4ef6\u5373\u53ef":15,"\u63a5\u4e0b\u6765\u4ece\u4f60\u7684\u7535\u8111\u4e2d\u5c31\u53ef\u4ee5\u767b\u5f55\u4e86\u4f60\u7684\u624b\u673a\u4e86\u9ed8\u8ba4\u5bc6\u7801\u5c31\u662f\u6211\u4eec\u7684app\u540d\u5b57":14,"\u652f\u6301":14,"\u652f\u6301\u8bc1\u4e66\u767b\u5f55":14,"\u6587\u6863\u4f53\u7cfb\u5206\u4e3a":15,"\u6587\u6863\u975e\u5e38\u91cd\u8981":15,"\u662f\u5f88\u591a\u5d4c\u5165\u5f0flinux\u7cfb\u7edf\u9996\u9009\u7684ssh\u5de5\u5177":14,"\u66f4\u591a\u94fe\u63a5":1,"\u6700\u540ecd\u5230qpython":15,"\u6765\u548c\u4e2d\u56fd\u6d3b\u8dc3\u7684qpython":17,"\u6765\u548c\u5168\u4e16\u754c\u7684":17,"\u6b22\u8fce":1,"\u6b22\u8fce\u52a0\u5165":16,"\u6df1\u5165\u6298\u817e\u7684\u6307\u5bfc":15,"\u7136\u540e\u6d4f\u89c8qpython":15,"\u7528":14,"\u7528\u6237\u4e00\u5757\u6765\u73a9\u8f6cqpython":17,"\u7528\u6237\u4e00\u8d77\u73a9\u8f6c":17,"\u7528\u6237\u5f00\u53d1\u7ec4":1,"\u7528\u6237\u5f00\u53d1\u8005\u7ec4":17,"\u7684\u6700\u65b0\u7248\u672c1":17,"\u7684\u8d21\u732e\u8005\u4e48":17,"\u7aef\u53e3":14,"\u7b2c\u4e00\u6b21\u4f7f\u7528":14,"\u7ed3\u5408qpython":14,"\u7ed9\u6211\u4eec\u53d1\u90ae\u4ef6":17,"\u7f16\u7a0b\u5411\u5bfc":16,"\u7f16\u7a0b\u6307\u5357":[15,17],"\u80fd\u8ba9\u4f60\u65b9\u4fbf\u5730\u8fdb\u884c\u7f16\u7a0b\u6765\u81ea\u52a8\u7ba1\u7406\u670d\u52a1\u5668\u6216\u4f60\u7684\u624b\u673a":14,"\u82f1\u6587":15,"\u83b7\u5f97qpython":14,"\u8bf7":17,"\u8bf7\u4ece\u5e94\u7528\u5e02\u573a\u5b89\u88c5":17,"\u8bf7\u52a0\u5165":17,"\u8d21\u732e\u8005\u6307\u5357":[15,17],"\u8d77\u6b65":1,"\u8fd1\u6765\u6084\u6084\u66f4\u65b0\u4e86\u4e0d\u5c11\u597d\u73a9\u7684\u5305":14,"\u8fd9\u4e2a\u529f\u80fd\u9002\u5408\u9ad8\u7ea7\u73a9\u5bb6":14,"\u8fdb\u5165\u5230":15,"\u8fdc\u7a0b\u62f7\u8d1d\u6587\u4ef6":14,"\u9009\u62e9shell":14,"\u957f\u6309termin":14,"\u9664\u4e86\u4ece\u624b\u673a\u4e0a\u767b\u5f55\u670d\u52a1\u5668\u5916":14,"\u9700\u8981\u4eceshell":14,"\u9879\u76ee\u7684qpython":15,"\u9ed1\u5ba2":16,"boolean":4,"byte":4,"case":[2,4,9],"class":[4,9,12,13],"default":[4,8,10,12,13],"docs\u4e2d\u5e76\u8fd0\u884cbuild":15,"docs\u76ee\u5f55\u4e2d":15,"export":8,"files\u4e0b\u521b\u5efadropbear\u76ee\u5f55":14,"final":4,"float":4,"function":[7,9,12,13],"import":[2,4,8,9,12,13],"int":[4,8],"long":[4,10],"new":[4,8,10,12],"null":[4,8],"org\u5373\u53ef\u770b\u5230\u6700\u65b0\u7684\u66f4\u65b0":15,"org\u7f51\u7ad9\u4e2d":15,"page\u529f\u80fd\u76f4\u63a5\u63a8\u5230qpython":15,"qpython\u6587\u6863\u4f53\u7cfb\u8bf4\u660e":[16,17],"qpython\u662f\u4e00\u4e2a\u652f\u6301\u591a\u8bed\u8a00\u7684\u5e94\u7528":15,"qpython\u8d21\u732e\u8005\u6307\u5357":15,"qpython\u9ed1\u5ba2\u6307\u5357":[15,17],"qq\u7ec4":17,"return":[4,8,9,13],"shell\u4e2d\u8f93\u5165ssh":14,"short":4,"ssh\u5de5\u5177":14,"static":4,"switch":10,"team\u5185\u7684":15,"terminal\u4e2d\u8fdb\u884c\u4e0b\u521d\u59cb\u5316\u64cd\u4f5c":14,"throw":4,"true":[4,8],"try":[1,8,9,13],"var":2,"void":8,"while":4,ASE:4,And:[0,1,8,9,12],But:9,For:[4,6,13],GPS:13,IDE:13,IDEs:12,IDs:4,SMS:[4,13],TTS:4,That:9,The:[4,8,10,12,13],Then:[5,9,11],There:[1,4,10],Use:[1,3,9],With:[11,13],__exit:13,__future__:12,__phello__:12,_abcol:12,_codecs_cn:12,_codecs_hk:12,_codecs_iso2022:12,_codecs_jp:12,_codecs_kr:12,_codecs_tw:12,_csv:12,_ctype:12,_ctypes_test:12,_hashlib:12,_heapq:12,_hotshot:12,_io:12,_json:12,_lsprof:12,_lwpcookiejar:12,_mozillacookiejar:12,_multibytecodec:12,_pyio:12,_sqlite3:12,_ssl:12,_strptime:12,_testcapi:12,_threading_loc:12,_weakrefset:12,abc:12,abil:[7,10],abl:[4,7],about:[0,3,4,6,9,10],abov:[2,4,10,11],abridg:4,absolut:4,acc:0,acceler:4,acceleromet:4,accept:4,acces:4,access:[4,11,13],accomplish:13,accuraci:4,acquir:4,act:8,action:[4,8,10],activ:[1,3,4,8,10],activityresultfacad:[3,12],actual:9,adapt:4,add:[4,9,10,13],addcontextmenuitem:4,addit:10,addoptionsmenuitem:4,address:4,adjust:4,advantag:13,after:[6,9,10,11],aifc:12,aim:7,airplan:4,airplanermod:12,alert:12,all:[4,9],allow:[4,7,8,10,13],almost:9,alphabet:4,alreadi:1,also:[3,4,7,10,11,13],altern:13,alwai:10,amaz:[1,13],amazon:1,andoroid:4,android5:2,android:[1,2,3,4,8,9,10,11,12,13,15],androidfacad:[3,12],androidhelp:[1,3,4,8,9],ani:[0,1,4,6,8,9],anoth:[9,10],answer:[0,10],antigrav:12,anydbm:12,anymor:4,anyth:9,anywai:9,api14:4,api:[1,3,13],apk:[4,8],app:[2,8,13,14,16],appcach:4,applic:[1,3,4,10,13],applicationmanagerfacad:[3,12],appreci:0,appstor:1,arduino:4,arg:13,argpars:12,argument:4,argv:8,ascii:4,ask:[1,4,9,10],asset:13,assit:13,associ:4,ast:12,asynchat:12,asyncor:12,atexit:12,attach:4,attachmenturi:4,attribut:4,audio:12,audiodev:12,audioop:12,author:12,authorized_kei:14,autofocu:4,automat:12,avail:[4,9,10],availblock:4,axi:4,azimuth:4,background:13,backlight:4,backspac:9,bad:13,bar:[4,9,10],barcod:12,base64:[4,12],basehttpserv:12,bastion:12,batteri:4,batterycheckpres:4,batterygethealth:4,batterygetlevel:4,batterygetplugtyp:4,batterygetstatu:4,batterygettechnolog:4,batterygettemperatur:4,batterygetvoltag:4,batterymanagerfacad:[3,12],batterystartmonitor:4,batterystopmonitor:4,bdb:12,beam:4,beautifulsoup:12,becam:[1,3,9],becom:[3,5,13],befor:10,begin:9,being:7,below:11,besid:[7,10,11,13],best:[1,3],beta:8,better:[6,7],between:[4,10],big:10,bin:2,bind:4,binhex:12,bio:4,bisect:12,bit:9,blank:9,block:4,blockcount:4,blocksiz:4,blog:[9,10],bluetooth:[4,13],bluetoothaccept:4,bluetoothactiveconnect:4,bluetoothconnect:4,bluetoothdiscoverycancel:4,bluetoothdiscoverystart:4,bluetoothfacad:[3,12],bluetoothgetconnecteddevicenam:4,bluetoothgetlocaladdress:4,bluetoothgetlocalnam:4,bluetoothgetremotedevicenam:4,bluetoothgetscanmod:4,bluetoothisdiscov:4,bluetoothmakediscover:4,bluetoothread:4,bluetoothreadbinari:4,bluetoothreadlin:4,bluetoothreadreadi:4,bluetoothsetlocalnam:4,bluetoothstop:4,bluetoothwrit:4,bluetoothwritebinari:4,board:4,bodi:4,bool:4,both:9,bottl:[12,13,16],bountysourc:1,box:[4,9],brand:10,briefli:5,bright:12,broadcast:4,brows:3,browsabl:8,browser:[3,4,10],bsddb:12,buffer:4,buffers:4,bug:[1,6],build:[0,8,13],built:[1,3,10,11,13],bundl:8,busi:8,button:[4,9,10,11,13],calendar:12,call:[8,9,12],callabck:8,camera:4,cameracapturepictur:4,camerafacad:[3,12],camerainteractivecapturepictur:4,camerastartpreview:4,camerastoppreview:4,can:[0,4,8,9,10,13],cancel:[4,9],cancl:4,cannot:4,cap:10,captur:4,card:4,cat:14,categori:[4,8],caus:13,cdc:4,cdma:4,cell:4,center:10,cgi:12,cgihttpserv:12,cgitb:12,challeng:8,chanc:10,chang:4,charact:4,charg:4,charger:4,chat:1,check:[4,9],checkairplanemod:4,checkbluetoothst:4,checknetworkroam:4,checkout:8,checkringersilentmod:4,checkscreenon:4,checkwifist:4,chines:0,choic:4,choos:[3,4,8,10,11],chosen:4,christo:0,chunk:[4,12],claim:9,classnam:4,clear:4,click:[4,6,9,10,11],clipboard:12,clone:15,close:[4,10,13],cmd:12,code:[4,8,9,10,11,12,13],codec:12,codeop:12,collabor:5,collect:[4,12],colorsi:12,column:4,com:[4,10,15],come:5,comfort:10,comma:4,command:[10,12],commit:4,common:[7,13],commonintentsfacad:[3,12],commun:[3,9],compat:9,compil:[8,10,12,13],compileal:12,complet:13,complex:13,compon:10,comput:3,comun:10,config:12,configchang:8,configpars:12,confirm:4,connect:4,connid:4,consid:[2,4,5,9],consol:[1,3,13],constant:4,consult:10,contact:[4,6,8],contactsfacad:[3,12],contactsget:4,contactsgetattribut:4,contactsgetbyid:4,contactsgetcount:4,contactsgetid:4,contain:[0,1,4,9,10,12],contan:9,content:[3,4],context:[4,8],contextlib:12,contribut:[0,3,6],contributor:1,control:[10,12],conveni:11,convient:11,cooki:12,cookielib:12,cool:6,copi:[10,12],copy_reg:12,core:[1,3],corner:10,could:[1,2,4,6,8,10,11,12,13],couldn:8,countri:4,cprofil:12,cpu:4,creat:[4,6,9,10],creation:4,creator:3,critic:10,csv:12,ctype:12,current:4,dai:4,darciss:0,dashboard:[3,8,14],data:[2,8,12,14],date:4,dbhash:12,dbkei:14,dead:4,debug:13,decim:[4,12],declar:13,def:13,defaulttext:4,defin:[4,13],definit:8,delaytim:4,delet:[4,10],deliveri:7,demand:1,demo:8,demonstr:4,depend:10,deriv:12,describ:9,descript:0,desir:4,desktop:10,destinationaddress:4,detail:[4,5],dev:4,devci:4,develop:[1,4,6,7,8,9,10,12,13],devic:[1,2,4,10,13],dfault:4,dia:12,dial:4,dialog:[9,12],dialogcreatealert:4,dialogcreatedatepick:4,dialogcreatehorizontalprogress:4,dialogcreateinput:4,dialogcreatenfcbeammast:4,dialogcreatenfcbeamslav:4,dialogcreatepassword:4,dialogcreateseekbar:4,dialogcreatespinnerprogress:4,dialogcreatetimepick:4,dialogdismiss:4,dialoggetinput:[4,8,9],dialoggetpassword:4,dialoggetrespons:4,dialoggetselecteditem:4,dialogsetcurrentprogress:4,dialogsetitem:4,dialogsetmaxprogress:4,dialogsetmultichoiceitem:4,dialogsetnegativebuttontext:4,dialogsetneutralbuttontext:4,dialogsetpositivebuttontext:4,dialogsetsinglechoiceitem:4,dialogshow:4,didn:13,differ:[4,7],difflib:12,digit:4,dim:4,dircach:12,directli:[4,10,11],directori:10,dis:12,disabl:4,discharg:4,disconnect:4,discov:4,discover:4,discoveri:4,dismiss:4,displai:[4,9,13],distribut:10,distutil:12,django:13,dmych:[9,10],doc:9,doctest:12,document:[1,3,10,12],docxmlrpcserv:12,doe:[4,9,13],doesn:[2,13],doing:6,don:[0,8,9,10,12,13],dongl:4,doubl:4,down:[6,10],download:4,draft:[9,10],drawabl:4,driver:13,droid:[4,8,9],dropbear:14,dropbear_dss_host_kei:14,dropbear_ecdsa_host_kei:14,dropbear_rsa_host_kei:14,dss:14,dtmf:4,dumbdbm:12,dummy_thread:12,durat:4,dure:4,dynload:3,each:4,easi:13,easili:[10,13],ecdsa:14,edit:[9,10,11],editor:[1,3,9,11],effici:13,els:[4,8,9],email:[0,1,5,8,12],empti:[4,9],enabl:4,encapsul:9,encod:[4,12],engin:[1,3,13],enqueu:4,ensornumb:4,enter:[9,10],enterpris:[1,3],env:2,environ:[4,8,10],equal:4,equival:4,error:[4,13],essenti:13,establish:4,estens:10,etc:[1,4,7,10,13],even:2,event:[3,4],eventclearbuff:4,eventdata:4,eventfacad:[3,12],eventgetbrodcastcategori:4,eventnam:4,eventpol:4,eventpost:4,eventregisterforbroadcast:4,eventunregisterforbroadcast:4,eventwait:4,eventwaitfor:4,ever:4,everi:9,exampl:[4,9,13],exceed:4,except:[9,13],execut:[2,4,9,10],executeqpi:4,exit:[4,13],expans:7,expect:4,experi:13,explicitli:10,explor:10,extend:[4,10],extplgplusnam:8,extra:[4,13],eyesfreefacad:[3,12],facad:[3,12],facebook:[1,2],fail:4,failur:4,fals:[0,4,9,13],familiar:9,faq:1,fast:13,featur:[1,3,4,10,11],feedback:[1,3,5],feel:10,field:[4,9],fifth:9,file:[0,3,4,10,11],filecmp:12,fileinput:12,filenam:4,filepath:[4,13],filter:8,find:[6,8,10],firmwar:4,first:[2,9,10],flag:[4,8],flask:13,flexiabl:13,fnmatch:12,fogapod:0,folder:4,folk:7,follow:[0,1,2,3,6,8,9,10,12,13],foo:12,forc:4,forcestoppackag:4,forget:10,fork:1,format:[4,9],formatt:12,forward:1,found:[4,8,10],fpformat:12,fraction:12,framework:13,free:10,french:0,frodo821:0,from:[1,2,3,4,9,10,12,13],front:13,ftdi:4,ftp:3,ftplib:12,full:[4,8],fulldismiss:4,fullkeyoverrid:4,fullqueri:4,fullquerydetail:4,fullscreen:[4,13],fullsetlist:4,fullsetproperti:4,fullshow:4,functool:12,funni:10,further:9,futur:13,future_builtin:12,gener:[4,8,10],generatedtmfton:4,genericpath:12,geo:12,geocod:4,get:[1,2,10,12,13],getcellloc:4,getclipboard:4,getconst:4,getdefault:4,getdeviceid:4,getdevicesoftwarevers:4,getextra:8,getinput:12,getint:4,getlastknownloc:4,getlaunchableappl:4,getline1numb:4,getmaxmediavolum:4,getmaxringervolum:4,getmediavolum:4,getneighboringcellinfo:4,getnetworkoper:4,getnetworkoperatornam:4,getnetworkstatu:4,getnetworktyp:4,getopt:12,getpackagevers:4,getpackageversioncod:4,getpass:12,getpassword:12,getphonetyp:4,getringervolum:4,getrunningpackag:4,getscreenbright:4,getscreentimeout:4,getsimcountryiso:4,getsimoper:4,getsimoperatornam:4,getsimserialnumb:4,getsimst:4,getstr:8,getsubscriberid:4,gettext:12,getvibratemod:4,getvoicemailalphatag:4,getvoicemailnumb:4,git:[0,15],github:[1,8,15],gitter:1,given:4,glob:12,global:13,goal:3,goe:10,going:9,good:[4,9],googl:1,gps:4,grab:4,great:[1,3,5,7],greater:[4,5],greet:9,group:[0,1,5],grp:12,gsm:4,gsm_signal_strength:4,guarante:4,gui:13,guid:[6,7],gzip:12,handl:[4,8],handler:13,handler_class:13,happen:9,happi:1,hardwar:4,has:[1,4,8,10,11],hash:4,hashlib:12,have:[1,6,8,10,13],head:13,header:13,health:4,heapq:12,hear:1,heard:4,hei:9,hello1:9,hello:[1,3,4,8,10,13],helloworld:9,help:[0,1,3,8,10,11,13],hepler:12,here:[4,8,9,10],hide:13,higher:[1,4],highlight:[10,11],hipip:10,his:[9,10],hmac:12,home:13,homepag:13,hope:5,horizont:4,host:[3,12,13,14],hotshot:12,hour:4,how:[0,1,2,3,4,8],href:13,html:[4,11],htmlentitydef:12,htmllib:12,htmlparser:12,http:[4,8,13,15],httplib:12,icon:[4,10],iconnam:4,id_priv:14,idea:[6,10],identifi:4,ids:4,ihook:12,imag:[4,8],imaplib:12,imei:4,imghdr:12,immedi:4,implement:[1,13],importerror:9,importlib:12,imputil:12,imsi:4,inbox:4,includ:[1,4,10],incom:4,incomingnumb:4,increas:4,indent:[9,10],independ:8,index:[4,10],indic:4,info:4,inform:[6,12,13],initi:4,innov:13,input:[4,9],inputtyp:4,insert:[4,13],inspect:12,instal:[8,10,13],instead:[9,10],integr:[4,10],intent:[8,12],interact:7,interest:6,interfac:[9,10,13],interpret:[1,10],intro:0,introduc:[5,10],introduct:0,invit:[0,5],is24hour:4,iso:4,issu:[1,4],item:4,its:10,japanes:0,java:4,javascript:11,jniu:13,job:13,join:[0,1,3,5,10],jpeg:4,jpegqual:4,json:[4,9,12],just:[0,2,3,9,10,11,12,13],keep:[6,13],kei:[4,9],kernel:4,kersei:0,keyboard:4,keyboardhidden:8,keycod:4,keyword:[11,12],kill:14,kind:0,kit:10,kivi:[3,13],know:[3,6,9],known:4,kuri65536:4,kyle:0,label:[4,8],lack:[1,10],languag:[4,13],languagemodel:4,laptop:[11,13],last:[4,9],later:[2,4],latitud:4,launch:[1,3,4,10],launchabl:4,launcher:8,layer:4,layout:12,lead:10,least:9,leav:[9,10],left:[9,10],length_short:8,let:[6,8,9,10,13],level:[4,10],lib:[10,12],libari:10,librari:[1,3,4,8,13],light:4,like:[1,2,4,7,8,10,11,12,13],line:[4,8,9,10,13],linecach:12,link:[2,10],linux4:12,list:[4,10],listen:4,load:[4,13],local:[1,3,4,10,11,12],localhost:13,locat:12,locationfacad:[3,12],locationprovid:4,locationprovideren:4,lock:4,log:[4,12],log_request:13,logcat:4,logic:9,logo:10,longitud:4,loop:4,lua:11,m78k0f0730:4,macpath:12,macurl2path:12,mae:0,magnet:4,mai:[1,8],mail:4,mailbox:12,mailcap:12,main:[1,3,7,10,11],mainli:10,maintain:[7,10],make:[4,5,6,9,10,13],make_serv:13,makeint:4,maketext:8,maketoast:[4,8,9],manag:12,mani:[1,4,10,13],manual:12,map:4,mark:4,markupbas:12,master:4,match:4,max:4,maximum:4,maximumprogress:4,maximunprogress:4,maxresult:4,mbundl:8,mcc:4,md5:12,mean:9,meanin:9,media:12,mediaisplai:4,mediaplai:4,mediaplayclos:4,mediaplayerfacad:[3,12],mediaplayinfo:4,mediaplaylist:4,mediaplaypaus:4,mediaplayseek:4,mediaplaysetloop:4,mediaplaystart:4,mediarecorderfacad:[3,12],meet:1,meid:4,member:[1,3],mention:2,menu:[4,10],merg:0,messag:[4,9],method:[4,13],mhlib:12,microphon:4,million:1,millisecond:4,mime:4,mimetool:12,mimetyp:[8,12],mimewrit:12,mimifi:12,mindist:4,minupdatedist:4,minut:4,miut:4,mix:[10,13],mjpeg:4,mkdir:14,mmap:12,mnc:4,mobil:4,mode:[7,12,13],model:4,modifi:10,modul:9,modulefind:12,month:4,more:[3,5,10],most:[4,9,10,11,12,13],move:[1,11],mpyapi:8,msec:4,msisdn:4,much:10,multi:13,multifil:12,multipl:4,must:4,mutex:12,myappid:8,mywsgirefserv:13,name:[4,8,9,10,13],necessari:9,need:[1,2,8,9,12,13],neg:4,neighbor:4,netrc:12,network:[1,4],networkstatu:12,newest:1,next:[0,4,9,10],nfc:[12,13],nfcbeammessag:4,nice:10,nntplib:12,non:4,none:[4,9,13],note:[10,13],noth:9,notic:10,notif:[4,9,10],notifi:12,now:[2,6,8,9,10,13],ntpath:12,nturl2path:12,number:[4,10,12],number_of_ev:4,numer:4,numpi:10,object:[4,9,10],obvious:[9,10],occur:4,off:4,offer:[6,7,9,10,13],offici:1,offset:4,oldest:4,onactivityresult:8,onc:10,one:[4,9],onli:[3,4,8,9],onlin:[1,3],onpyapi:8,onqpyexec:8,oop:9,opcod:12,open:[1,3,4,9,10,13],opengl2:13,opengl:13,opensourc:7,oper:4,option:[4,13],optpars:12,order:[4,9],ordinari:10,org:[0,2,4,5,6,8,10,14],organis:3,orient:[4,8],origin:4,os2emxpath:12,other:[2,9,10,13],otherwis:[4,9],our:9,out:[3,6,8],output:9,outsid:8,over:4,overheat:4,overrid:[4,8],own:3,packag:[4,8,10,13],packagenam:4,packagevers:12,page:[10,13],paid:7,param:8,paramet:4,part:[5,7,13],partial:4,pass:[4,13],password:4,path:[4,13],paus:4,pdb:12,pelas:13,peopl:[10,13],percentag:4,period:4,permiss:13,phe:0,phone:[4,11],phonecal:4,phonecallnumb:4,phonedi:4,phonedialnumb:4,phonefacad:[3,12],phonenumb:4,phonestat:12,pic:[10,11],pick:4,pickcontact:4,picker:4,pickl:12,pickletool:12,pickphon:4,pictur:[4,10],pid:14,pip:[1,3,10,12],pip_consol:10,pipe:12,pitch:4,pizza:4,pkg_resourc:12,pkgutil:12,pl2303:4,plai:[1,4,9],plain:[8,11],plan:13,plat:12,platform:12,pleas:[0,1,2,4,5,6,8,10],plistlib:12,plu:10,plug:4,plugin:8,plyer:12,point:[4,13],polit:9,poll:4,pop:9,popen2:12,poplib:12,port:[4,13],posit:4,posixfil:12,posixpath:12,possibl:4,post:[0,4,10],power:[3,4],pprint:12,pre:[8,10,13],prefer:4,preferencesfacad:[3,12],prefgetal:4,prefgetvalu:4,prefputvalu:4,presenc:4,present:4,press:9,preview:[4,11],previou:13,previous:4,print:[9,13],prioriti:1,probabl:4,process:[4,8],product:8,profil:12,program:[1,9,13],progress:[2,12,13],project:[0,1,3,4,6,7,8,10,11,13],prompt:[4,9],properti:[4,10],propos:8,protect:8,provid:12,pstat:12,pty:12,publish:[0,8],pull:[0,1,9],pure:[10,13],purpos:4,push:[1,3],put:[4,9,10,13],putextra:8,putstr:8,py_compil:12,pyclbr:12,pycod:8,pydoc:12,pydoc_data:12,pygam:2,python2:10,python:[1,2,3,8,9,10,11,13],qedit4web:11,qeditor:3,qpy:[1,2,3,12,13,14],qpy_run_with_shar:8,qpyapp:13,qpyhttpd:13,qpyinterfacefacad:[3,12],qpylib:8,qpypi:[3,10],qpyplu:10,qpython3:[0,1,4,8,13,17],qpython:[0,2,3,4,6,9,11,14,15,16],qpythoninit:12,qrcode:[3,10],qscript:13,qsl4a:[1,3],qualiti:4,queri:4,queryattribut:4,querycont:4,question:[0,10],queue:[4,12],quick:[1,3],quickli:[3,10],quiet:13,quiethandl:13,quopri:12,qustion:1,radio:4,random:12,rapid:13,reach:10,reaction:9,read:[9,12],readbatterydata:4,reader:3,readi:6,readloc:4,readphonest:4,readsensor:4,readsignalstrength:4,real:9,receiv:4,receiveev:4,recent:[4,10],recipi:4,recogn:4,recognizeint:4,recognizespeech:4,recommend:13,recongn:4,reconnect:4,record:4,recordaudio:4,recordercapturevideo:4,recorderstartmicrophon:4,recorderstartvideo:4,recorderstop:4,redirect:10,refer:4,regist:4,regular:10,rehot:0,releas:[1,4,13],reload:13,remot:4,remov:[4,13],renam:10,replac:9,repo:0,report:[1,3,4,5],repr:[12,13],repres:4,represent:4,request:[0,1,4,13],requestcod:8,requir:[8,12,13],requiredvers:4,resolut:4,resolutionlevel:4,resolv:4,resourc:[1,4,10,12,13],respond:9,respons:4,rest:10,result:[4,8,9,11],resultcod:[4,8],resultvalu:4,retriev:4,rexec:12,rfc822:12,ringer:12,river:[0,8],rl78:4,rlcomplet:12,roam:4,robotpars:12,role:4,roll:4,root:[2,13],rout:13,router:13,rpc:9,rpcpostev:4,rsa:14,run:[0,1,2,3,4,9,10,11,13],runpi:12,runtim:13,russian:0,said:10,same:[10,12],sampl:[2,3,4,8,13],samples:4,save:[4,9,10],scan:4,scanbarcod:4,scanner:4,sched:12,scheme:8,scp:14,screen:[9,10,12],screenorient:8,screenshot:[9,10,13],script:[1,2,3,4,7,9,10,11,13],script_exec_pi:8,script_result:4,sdcard:[4,10,13],sdk:4,search:[4,10,11],second:[4,10],see:[4,9,10,11,12],seek:4,seem:8,select:4,selectionarg:4,self:[0,4,13],send:[0,1,4,5,6,8],sendbroadcast:12,sendbroadcastint:4,sendemail:12,sensor:4,sensormanagerfacad:[3,12],sensornumb:4,sensorsgetaccuraci:4,sensorsgetlight:4,sensorsreadacceleromet:4,sensorsreadmagnetomet:4,sensorsreadorient:4,sent:4,separ:[4,9],serial:[3,12],serv:13,serve_forev:13,server:[4,13],server_clos:13,server_stat:13,serveradapt:13,servic:[1,3,4,13],session:4,set:[4,8,10,12],setact:8,setclassnam:8,setclipboard:4,setmediavolum:4,setresultboolean:4,setresultbooleanarrai:4,setresultbyt:4,setresultbytearrai:4,setresultchar:4,setresultchararrai:4,setresultdoubl:4,setresultdoublearrai:4,setresultfloat:4,setresultfloatarrai:4,setresultinteg:4,setresultintegerarrai:4,setresultlong:4,setresultlongarrai:4,setresultserializ:4,setresultshort:4,setresultshortarrai:4,setresultstr:4,setresultstringarrai:4,setringervolum:4,setscreenbright:4,setscreentimeout:4,settingsfacad:[3,12],setuptool:12,sever:[1,13],sgmllib:12,sha:12,share:[2,3,4,10,11],shell:11,shelv:12,shlex:12,shortcut:10,shoul:13,should:[3,4,9,10],show:[4,8,9,10],shown:9,shutdown:13,shutil:12,signal:4,signalstrengthfacad:[3,12],silent:12,sim:4,similar:9,simpl:[8,9],simple_serv:13,simplehttpserv:12,simplexmlrpcserv:12,simplifi:12,sinc:10,singl:10,site:[10,12],sl4a:[1,3,4,7,12],slave:4,small:9,smartphon:13,smsdeletemessag:4,smsfacad:[3,12],smsgetattribut:4,smsgetmessag:4,smsgetmessagebyid:4,smsgetmessagecount:4,smsgetmessageid:4,smsmarkmessageread:4,smssend:4,smtpd:12,smtplib:12,sndhdr:12,snippet:11,social:1,socket:[4,12],socketserv:12,softwar:4,solut:13,solv:1,some:[1,3,4,6,9,10,11,13],sometim:1,somth:10,soon:[1,5],sour:2,sourc:[4,10,13],space:9,speak:4,specif:4,specifi:4,speech:4,speechrecognitionfacad:[3,12],spinner:4,spn:4,sponsor:[1,3],sqlite3:12,sre:12,sre_compil:12,sre_const:12,sre_pars:12,sshd:14,ssl:12,stackoverflow:1,stardard:[3,13],start:[1,9,11,12,13],startact:12,startactivityforresult:[4,8],startactivityforresultint:4,startactivityint:4,starteventdispatch:4,startinteractivevideorecord:4,startloc:4,startsens:4,startsensingthreshold:4,startsensingtim:4,starttrackingphonest:4,starttrackingsignalstrength:4,stat:[4,12],state:4,statement:9,static_fil:13,statu:12,statvf:12,stderr:13,step:[1,3],still:9,stop:[12,13],stopeventdispatch:4,stoploc:4,stopsens:4,stoptrackingphonest:4,stoptrackingsignalstrength:4,store:4,str:4,stream:4,street:4,strength:4,string:[0,4,8,9,12],stringio:12,stringold:12,stringprep:12,strong:13,struct:[4,12],subject:4,subprocess:12,subscrib:4,subtyp:4,succeed:4,success:4,successfulli:4,suggest:[3,5],sunau:12,sunaudio:12,suppli:4,support:[0,2,5,6,10,11,12,13],sure:8,swipe:10,symbol:12,symtabl:12,syntax:[10,11],sys:[8,13],sysconfig:12,syslog:12,system:[10,12],tabnanni:12,tag:4,take:[4,13],takepictur:4,talk:1,tap:[9,10],tarfil:12,target:[4,13],targetpath:4,tasker:8,team:[1,3,10,13],technic:13,technolog:[3,4],tell:0,telnetlib:12,temperatur:4,tempfil:12,templat:13,termin:[2,14],termio:12,test:[1,3,6,10],testapp:13,tester:[1,3,5],text:[4,8,9,10,11,13],texttospeechfacad:[3,12],textwrap:12,than:4,thank:[0,5,9,10],thei:[1,12],them:[4,9,10,12],thi:[0,1,4,5,6,8,9,10,12,13],thing:8,think:9,though:10,thread:[12,13],three:[7,9],threshold:4,through:[1,3,8,10,12,13],time:4,timeit:12,timeout:4,titl:[4,9,13],titlebar:13,toaiff:12,toast:[0,8,9,12],toggl:4,toggleairplanemod:4,togglebluetoothst:4,toggleringersilentmod:4,togglevibratemod:4,togglewifist:4,token:12,tone:4,tonedur:4,tonegeneratorfacad:[3,12],tool:[1,3,10],toolbar:[9,10],top:[9,10],topic:0,touch:13,trace:12,traceback:12,track:4,tragi:4,translat:[0,1,3],treat:9,ttsisspeak:4,ttsspeak:4,tty:12,ttyusb0:4,tupl:4,turkish:0,twitter:1,two:[9,10],type:[4,7,10,12],typic:4,uifacad:[3,12],uix:13,unavail:4,undo:10,unicodedata:12,unind:9,uninstal:10,uniqu:4,unittest:12,unknown:4,unless:10,unplug:4,unreadonli:4,unspecifi:4,until:4,updat:[0,4],upgrad:1,upload:[10,11],upper:10,uri:4,url:[4,11,13],urllib2:12,urllib:12,urlpars:12,usag:10,usb:[3,12],usbserialactiveconnect:4,usbserialconnect:4,usbserialdisconnect:4,usbserialgetdevicelist:4,usbserialgetdevicenam:4,usbserialhosten:4,usbserialread:4,usbserialreadbinari:4,usbserialreadreadi:4,usbserialwrit:4,usbserialwritebinari:4,use:[0,4,8,9,10,13],used:[4,9,12],usedrop:10,useful:[4,9,10],user:[3,4,7,8,9,10,12,13,14],userdict:12,userlist:12,usernam:9,userstr:12,uses:4,using:[1,6,7,9,10,12],usual:[10,12],util:4,uuid:[4,12],valu:[4,9],variabl:9,variou:4,veri:[9,11,13],version:[1,4],via:4,vibrat:12,video:[8,12],videos:4,view:[8,11,12,13],viewcontact:4,viewhtml:4,viewmap:4,visibl:4,voic:4,voltag:4,volum:12,wai:[1,3,9,10,13],wait:4,waitforev:4,wake:4,wakelockacquirebright:4,wakelockacquiredim:4,wakelockacquireful:4,wakelockacquireparti:4,wakelockfacad:[3,12],wakelockreleas:4,want:[0,1,3,4,5,6,8,9,10,13],warn:12,watch:8,wave:12,weakref:12,web:[13,16],webapp:[3,13],webbrows:12,webcam:4,webcamadjustqu:4,webcamfacad:[3,12],webcamstart:4,webserv:13,webview:[12,13],webviewshow:4,welcom:3,well:[7,9],were:[4,12],what:[0,6,9,10],when:[4,8,9,10,11,13],whenev:4,where:[1,4,6],which:[0,4,5,7,8,9,10,11,12,13],whichdb:12,whish:13,whole:9,why:[3,9],widget:4,wifi:4,wifidisconnect:4,wififacad:[3,12],wifigetconnectioninfo:4,wifigetscanresult:4,wifilockacquireful:4,wifilockacquirescanonli:4,wifilockreleas:4,wifireassoci:4,wifireconnect:4,wifistartscan:4,wiki:2,willing:0,without:[10,13],wonder:9,word:0,work:[4,9],world:[1,3,4,13],worri:9,wow:9,write:[1,3,4,6,10,11],written:4,wrote:9,wsgiref:[12,13],wsgirequesthandl:13,xdrlib:12,xml:[0,12],xmllib:12,xmlrpclib:12,year:4,yes:10,yet:13,you:[0,1,2,3,4,5,6,8,9,10,11,12,13],your:[0,1,3,6,9,10,13],yourself:13,youself:5,youtub:[4,8],zipfil:12,zrh:0},titles:["Contributors","Welcome to read the QPython guide!","FAQ","Getting started","AndroidFacade","Welcome contribute","Join the tester community","Android","QPython Open API","Writing \u201cHello World\u201d","QPython: How To Start","Use the best way for developing","QPython built-in Libraries","QPython\u2019s main features","\u5982\u4f55\u5728QPython \u4f7f\u7528 SSH","QPython\u6587\u6863\u4f53\u7cfb\u8bf4\u660e","\u5feb\u901f\u5f00\u59cb","\u4e2d\u6587\u7528\u6237\u5411\u5bfc"],titleterms:{"3rd":12,"\u4e2d\u6587\u7528\u6237\u5411\u5bfc":17,"\u4f60\u7684\u670d\u52a1\u5668":14,"\u4f7f\u7528":14,"\u5176\u4ed6":14,"\u5982\u4f55\u5728qpython":14,"\u5982\u4f55\u63d0\u4ea4\u6587\u6863":15,"\u5982\u4f55\u63d0\u4ea4\u7ffb\u8bd1":15,"\u5982\u4f55\u767b\u5f55\u5230\u4f60\u7684\u624b\u673a":14,"\u5982\u4f55\u8d21\u732e":17,"\u5982\u4f55\u8fdc\u7a0b\u767b\u5f55":14,"\u5feb\u901f\u5f00\u59cb":16,"\u66f4\u591a\u94fe\u63a5":17,"\u6b22\u8fce":17,"\u7528\u6237\u5f00\u53d1\u7ec4":17,"\u7f16\u7a0b\u6307\u5357":16,"\u8d21\u732e\u8005\u6307\u5357":16,"\u8d77\u6b65":17,"new":1,"qpython\u6587\u6863\u4f53\u7cfb\u8bf4\u660e":15,"qpython\u9ed1\u5ba2\u6307\u5357":16,For:1,Use:11,activityresultfacad:4,airplanermod:4,alert:4,android:7,androidfacad:4,androidhelp:12,api:[4,7,8,12],applic:8,applicationmanagerfacad:4,audio:4,author:4,barcod:4,batterymanagerfacad:4,becam:5,becom:6,best:11,bluetoothfacad:4,bright:4,brows:7,browser:11,built:[5,12],call:4,camerafacad:4,chines:1,choos:13,clipboard:4,commonintentsfacad:4,commun:[0,1,5,6,10],comput:11,consol:[7,10],contactsfacad:4,content:8,contribut:[1,5],contributor:[0,3],control:4,core:7,dashboard:10,data:4,develop:[0,3,5,11],dia:4,dialog:4,document:5,dynload:12,editor:[7,10],enterpris:7,event:5,eventfacad:4,eyesfreefacad:4,facad:4,faq:2,featur:13,feedback:6,file:7,from:[8,11],ftp:7,geo:4,get:[3,4],getinput:4,getpassword:4,gui:1,guid:[1,3],hello:9,help:5,host:4,how:[5,10],inform:4,intent:4,join:6,kivi:7,launch:5,layout:4,let:1,librari:[7,9,10,12],local:[0,5],locat:4,locationfacad:4,main:13,manag:4,media:4,mediaplayerfacad:4,mediarecorderfacad:4,member:5,mode:4,more:9,networkstatu:4,nfc:4,notifi:4,now:1,onlin:8,open:8,organ:0,organis:5,other:1,own:8,packagevers:4,phonefacad:4,phonestat:4,pip:7,preferencesfacad:4,program:[3,5,7,10],progress:4,project:5,provid:4,python:[7,12],qeditor:11,qpy:[7,8],qpyinterfacefacad:4,qpypi:8,qpython:[1,5,7,8,10,12,13,17],qrcode:7,qsl4a:7,quick:7,read:[1,4],reader:7,report:6,requir:4,ringer:4,run:8,sampl:9,screen:4,script:8,sendbroadcast:4,sendemail:4,sensormanagerfacad:4,serial:4,servic:[7,8],settingsfacad:4,share:[5,8],should:13,signalstrengthfacad:4,silent:4,sl4a:9,smsfacad:4,some:8,speechrecognitionfacad:4,sponsor:5,ssh:14,stardard:12,start:[3,4,10],startact:4,statu:4,stop:4,suggest:6,support:1,system:4,test:5,tester:6,texttospeechfacad:4,thank:1,toast:4,tonegeneratorfacad:4,tool:7,translat:5,uifacad:4,usb:4,user:[1,5],vibrat:4,video:4,view:4,volum:4,wai:11,wakelockfacad:4,webapp:7,webcamfacad:4,webview:4,welcom:[1,5],what:1,who:1,why:13,wififacad:4,world:9,write:9,your:[8,11]}}) \ No newline at end of file diff --git a/docs/static/ajax-loader.gif b/docs/static/ajax-loader.gif deleted file mode 100644 index 61faf8c..0000000 Binary files a/docs/static/ajax-loader.gif and /dev/null differ diff --git a/docs/static/apk_down.png b/docs/static/apk_down.png deleted file mode 100644 index 9488f2f..0000000 Binary files a/docs/static/apk_down.png and /dev/null differ diff --git a/docs/static/basic.css b/docs/static/basic.css deleted file mode 100644 index 6f40830..0000000 --- a/docs/static/basic.css +++ /dev/null @@ -1,643 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; - word-wrap: break-word; - overflow-wrap : break-word; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; - margin-left: auto; - margin-right: auto; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable ul { - margin-top: 0; - margin-bottom: 0; - list-style-type: none; -} - -table.indextable > tbody > tr > td > ul { - padding-left: 0em; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- domain module index --------------------------------------------------- */ - -table.modindextable td { - padding: 2px; - border-collapse: collapse; -} - -/* -- general body styles --------------------------------------------------- */ - -div.body p, div.body dd, div.body li, div.body blockquote { - -moz-hyphens: auto; - -ms-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; -} - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink, -caption:hover > a.headerlink, -p.caption:hover > a.headerlink, -div.code-block-caption:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table caption span.caption-number { - font-style: italic; -} - -table caption span.caption-text { -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption span.caption-text { -} - -/* -- field list styles ----------------------------------------------------- */ - -table.field-list td, table.field-list th { - border: 0 !important; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.field-name { - -moz-hyphens: manual; - -ms-hyphens: manual; - -webkit-hyphens: manual; - hyphens: manual; -} - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, span.highlighted { - background-color: #fbe54e; -} - -rect.highlighted { - fill: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -div.code-block-caption span.caption-number { - padding: 0.1em 0.3em; - font-style: italic; -} - -div.code-block-caption span.caption-text { -} - -div.literal-block-wrapper { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -code.xref, a code { - background-color: transparent; - font-weight: bold; -} - -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -span.eqno a.headerlink { - position: relative; - left: 0px; - z-index: 1; -} - -div.math:hover a.headerlink { - visibility: visible; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/docs/static/comment-bright.png b/docs/static/comment-bright.png deleted file mode 100644 index 15e27ed..0000000 Binary files a/docs/static/comment-bright.png and /dev/null differ diff --git a/docs/static/comment-close.png b/docs/static/comment-close.png deleted file mode 100644 index 4d91bcf..0000000 Binary files a/docs/static/comment-close.png and /dev/null differ diff --git a/docs/static/comment.png b/docs/static/comment.png deleted file mode 100644 index dfbc0cb..0000000 Binary files a/docs/static/comment.png and /dev/null differ diff --git a/docs/static/doctools.js b/docs/static/doctools.js deleted file mode 100644 index 0c15c00..0000000 --- a/docs/static/doctools.js +++ /dev/null @@ -1,311 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s === 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node, addItems) { - if (node.nodeType === 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span; - var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.className = className; - } - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - if (isInSVG) { - var bbox = span.getBBox(); - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute('class', className); - var parentOfText = node.parentNode.parentNode; - addItems.push({ - "parent": node.parentNode, - "target": rect}); - } - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this, addItems); - }); - } - } - var addItems = []; - var result = this.each(function() { - highlight(this, addItems); - }); - for (var i = 0; i < addItems.length; ++i) { - jQuery(addItems[i].parent).before(addItems[i].target); - } - return result; -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated === 'undefined') - return string; - return (typeof translated === 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated === 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) === 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this === '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keyup(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); \ No newline at end of file diff --git a/docs/static/down-pressed.png b/docs/static/down-pressed.png deleted file mode 100644 index 5756c8c..0000000 Binary files a/docs/static/down-pressed.png and /dev/null differ diff --git a/docs/static/down.png b/docs/static/down.png deleted file mode 100644 index 1b3bdad..0000000 Binary files a/docs/static/down.png and /dev/null differ diff --git a/docs/static/file.png b/docs/static/file.png deleted file mode 100644 index a858a41..0000000 Binary files a/docs/static/file.png and /dev/null differ diff --git a/docs/static/ic_appstore@2x.png b/docs/static/ic_appstore@2x.png deleted file mode 100644 index d70ade3..0000000 Binary files a/docs/static/ic_appstore@2x.png and /dev/null differ diff --git a/docs/static/ic_appstore_2x.png b/docs/static/ic_appstore_2x.png deleted file mode 100644 index 1582c40..0000000 Binary files a/docs/static/ic_appstore_2x.png and /dev/null differ diff --git a/docs/static/ic_community@2x.png b/docs/static/ic_community@2x.png deleted file mode 100644 index 6984f28..0000000 Binary files a/docs/static/ic_community@2x.png and /dev/null differ diff --git a/docs/static/ic_facebook.png b/docs/static/ic_facebook.png deleted file mode 100644 index 027c863..0000000 Binary files a/docs/static/ic_facebook.png and /dev/null differ diff --git a/docs/static/ic_faq@2x.png b/docs/static/ic_faq@2x.png deleted file mode 100644 index 1f89df6..0000000 Binary files a/docs/static/ic_faq@2x.png and /dev/null differ diff --git a/docs/static/ic_googleplay@2x.png b/docs/static/ic_googleplay@2x.png deleted file mode 100644 index 3b46dd0..0000000 Binary files a/docs/static/ic_googleplay@2x.png and /dev/null differ diff --git a/docs/static/ic_googleplay_2x.png b/docs/static/ic_googleplay_2x.png deleted file mode 100644 index 1e62373..0000000 Binary files a/docs/static/ic_googleplay_2x.png and /dev/null differ diff --git a/docs/static/ic_googleplay_3_2x.png b/docs/static/ic_googleplay_3_2x.png deleted file mode 100644 index c5086ad..0000000 Binary files a/docs/static/ic_googleplay_3_2x.png and /dev/null differ diff --git a/docs/static/ic_new@2x.png b/docs/static/ic_new@2x.png deleted file mode 100644 index 215bb04..0000000 Binary files a/docs/static/ic_new@2x.png and /dev/null differ diff --git a/docs/static/ic_search.png b/docs/static/ic_search.png deleted file mode 100644 index 0b6623a..0000000 Binary files a/docs/static/ic_search.png and /dev/null differ diff --git a/docs/static/ic_support@2x.png b/docs/static/ic_support@2x.png deleted file mode 100644 index c06804c..0000000 Binary files a/docs/static/ic_support@2x.png and /dev/null differ diff --git a/docs/static/ic_twitter.png b/docs/static/ic_twitter.png deleted file mode 100644 index 8dcf2ee..0000000 Binary files a/docs/static/ic_twitter.png and /dev/null differ diff --git a/docs/static/img_background.png b/docs/static/img_background.png deleted file mode 100644 index f200909..0000000 Binary files a/docs/static/img_background.png and /dev/null differ diff --git a/docs/static/img_banner-1.jpg b/docs/static/img_banner-1.jpg deleted file mode 100644 index 35179f4..0000000 Binary files a/docs/static/img_banner-1.jpg and /dev/null differ diff --git a/docs/static/img_banner-1.png b/docs/static/img_banner-1.png deleted file mode 100644 index 1be1cf3..0000000 Binary files a/docs/static/img_banner-1.png and /dev/null differ diff --git a/docs/static/img_banner-1@2x.png b/docs/static/img_banner-1@2x.png deleted file mode 100644 index 0942fe7..0000000 Binary files a/docs/static/img_banner-1@2x.png and /dev/null differ diff --git a/docs/static/ios_link.png b/docs/static/ios_link.png deleted file mode 100644 index 8bd21ca..0000000 Binary files a/docs/static/ios_link.png and /dev/null differ diff --git a/docs/static/jquery-3.1.0.js b/docs/static/jquery-3.1.0.js deleted file mode 100644 index f2fc274..0000000 --- a/docs/static/jquery-3.1.0.js +++ /dev/null @@ -1,10074 +0,0 @@ -/*eslint-disable no-unused-vars*/ -/*! - * jQuery JavaScript Library v3.1.0 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2016-07-07T21:44Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - - - - function DOMEval( code, doc ) { - doc = doc || document; - - var script = doc.createElement( "script" ); - - script.text = code; - doc.head.appendChild( script ).parentNode.removeChild( script ); - } -/* global Symbol */ -// Defining this global in .eslintrc would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.1.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.0 - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-01-04 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - disabledAncestor = addCombinator( - function( elem ) { - return elem.disabled === true; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - // Known :disabled false positives: - // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset) - // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Check form elements and option elements for explicit disabling - return "label" in elem && elem.disabled === disabled || - "form" in elem && elem.disabled === disabled || - - // Check non-disabled form elements for fieldset[disabled] ancestors - "form" in elem && elem.disabled === false && ( - // Support: IE6-11+ - // Ancestry is covered for us - elem.isDisabled === disabled || - - // Otherwise, assume any non-