通过 SL4A python 脚本将数据传递到网站
请帮忙! 我需要使用 s4la python 将一些文本数据发布到电子邮件地址或网站表单,我该怎么做(不打开电子邮件客户端)?
需要明确的是:这将是一个“网上商店工具”,可以从二维码中读取信息并将其发送到网上商店。只需读取代码并读取“订购金额”并发送即可。
为什么是Python?因为那是我唯一可以使用的。 :)
Help please!
I need to post some text data to an e-mail adress or web site form using s4la python how can i do that(without opening e-mail client)?
Just to be clear: This will be a "webshop tool" that reads info from a qr code and sent it to the webshop. Just read a code and read an "ordered amount" and send them.
why python? Becouse thats the only one i can use. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要将数据发送到网站,请查看文件weather.py
当您安装 python 时,将提供此文件作为示例。
http://code.google.com /p/android-scripting/source/browse/python/ase/scripts/weather.py
它使用模块 urllib2
文件的有趣部分:
To send your data to a website, look at the file weather.py
This file is provided as example when you install python.
http://code.google.com/p/android-scripting/source/browse/python/ase/scripts/weather.py
it uses the module urllib2
interesting part of the file:
如果您想连接到 Google 等 SMTP 服务器,可以使用 smtplib。
发送使用:
You can use smtplib if you want to connect to an SMTP server like Google.
To send use: