Giter Site home page Giter Site logo

kuri65536 / python-for-android Goto Github PK

View Code? Open in Web Editor NEW
242.0 242.0 102.0 73.13 MB

Automatically exported from code.google.com/p/python-for-android

License: Apache License 2.0

Java 2.79% Makefile 0.29% C 2.56% Shell 0.03% Python 69.78% HTML 23.73% CSS 0.01% OpenEdge ABL 0.49% C++ 0.26% Smarty 0.01% GAP 0.05% Batchfile 0.01%

python-for-android's People

Contributors

aaaaalbert avatar froz avatar gauravssnl avatar googlecodeexporter avatar kuri65536 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-for-android's Issues

smsDeleteMessage() on read messages.

import android 

droid = android.Android()

msgs = droid.smsGetMessageIds(False,'inbox')[1]

for msg in msgs:
    droid.smsDeleteMessage(msg)

Okies now, smsGetMessageIds(False,'inbox') must return a list of ids, False as 
in Boolean unreadOnly is set to false, so this must delete all the sms that are 
read, but even with long chain of read SMS text in inbox, it's not really 
removing them all.

Original issue reported on code.google.com by [email protected] on 28 Aug 2011 at 5:37

Missing module grp

What steps will reproduce the problem?
1.Setup a terminal with Python env variables set and python in path.
1.Download Mercurial source to sdcard and extract.
2.CD to source directory and run "python ./setup.py --pure build" to build a 
pure python version of Mercurial. (Note: fails while building extensions 
because of missing Makefile in 
"/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/config".
3.Manually copy modules from build directory into a dir in $PYTHONPATH.
4.In a directory you want to version control type "hg init" (works), type "hg 
status" (works), type "hg commit" (error: no module named grp).
5.Complain about missing grp module at pythonforandroid!

What is the expected output? What do you see instead?
Expected Mercurial to ask for a commit message.

What version of the product are you using? On what operating system?
PY4A r16, Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21) on linux-armv71

Please provide any additional information below.

I'm trying to get Mercurial --pure to run on android, but when I try to commit 
it complains about a missing a module. It would be very handy for me to sync my 
repo back and forth with my phone for testing and desktop editing!
I feel like I'm very close to having this working, but I don't have an Android 
cross-compiler environment setup to build this one module. It would be great if 
someone with such a setup made a full build of Mercurial too...


Original issue reported on code.google.com by [email protected] on 16 May 2011 at 10:53

python-src is not empty in python-build directory

1. Check out a fresh copy of the repository
2. cd python-build
3. run build.sh

build.sh expects that the directory python-src will be empty, which is the 
condition for replacing it with the 2.6.2 source.  It's not, as the file 
sysconfig.h is in there, so the directory has to be removed before build.sh 
will run to completion.

This is on revision eb84776c23f9 on Ubuntu.

I'm happy to attach an hg bundle, but "hg rm python-build/python-src" should 
fix the issue.


Original issue reported on code.google.com by [email protected] on 21 May 2011 at 9:32

sys.path.insert doesn't seem to have an impact

What steps will reproduce the problem?
1. Create a folder pysrc under Scripts in SL4A
2. Create two sub-folders pysrc/uno, pysrc/dos with empty __init__.py
3. Under uno, create test.py, which has:
import sys
sys.path.insert('..')
import dos
4. Run uno.py from SL4A (touch, and press the command line icon)

What is the expected output? What do you see instead?
=>The import should work with no errors, and the script should exit. However, 
we get an ImportError: No module named dos

What version of the product are you using? On what operating system?
python_r16, with sl4a_r4

Please provide any additional information below.

Thank you for your help,

Original issue reported on code.google.com by [email protected] on 4 Nov 2011 at 5:06

_locale.so still failing in r13

What steps will reproduce the problem?
1. import datetime
1. datetime.datetime.strptime("2011-02-11T14:55:03", "%Y-%m-%dT%H:%M:%S")

What is the expected output? What do you see instead?
a datetime object, or a ValueError :)

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
locale.Error: locale query failed

What version of the product are you using? On what operating system?
Interpreter: 13, extras 12, scripts 12

Please provide any additional information below.
Full traceback:

Traceback (most recent call last):
File "/mnt/sdcard/sl4a/scripts/_locale_test.py", line 3, in <module>
t = datetime.datetime.strptime("2011-02-11T14:05:04", "%Y-%m-%dT%H:%M:%S")
File 
"/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/
lib/python2.6/_strptime.py", line 270, in <module>
File 
"/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/
lib/python2.6/_strptime.py", line 188, in __init__                         
File 
"/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/
lib/python2.6/_strptime.py", line 70, in __init__
File 
"/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/
lib/python2.6/_strptime.py", line 29, in _getlang
File 
"/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/
lib/python2.6/locale.py", line 494, in getlocale
locale.Error: locale query failed

Original issue reported on code.google.com by [email protected] on 12 Feb 2011 at 1:00

Attachments:

toggleVibrateMode() Broke Vibration on Phone and Doesn't Work

What steps will reproduce the problem?
1. I was trying droid.toggleVibrateMode(enabled, ringer) in the Python 
interpreter to get the hang of it before using it in a script.
2. I tried pretty every combination of True, False, and nothing for each 
argument.
3. I was also trying droid.toggleRingerSilentMode() at the same time, so that 
may or may not be relevant. I also tried all of the possible argument 
combinations for it.

What is the expected output? What do you see instead?
I expected vibrate mode to be turned on or off. Instead, nothing seemed to 
happen, but now when I get texts or other notifications, my phone doesn't 
vibrate. It is still capable of vibrating, because droid.vibrate() works.


What version of the product are you using? On what operating system?
I'm using SL4A r4 with Py4A r16 on Android 2.2 Froyo. My phone is a Samsung 
Vibrant (SGH-T959) with Samsung's OEM build UVKB5.

Please provide any additional information below.
The Android Dev reference for the method used in Py4A, 
AudioManager.setVibrateSetting(), says "This method should only be used by 
applications that replace the platform-wide management of audio settings or the 
main telephony application." Since Py4A and SL4A don't replace any part of the 
Android system, I'm wondering if this is what caused the problem on my phone.

Py4A source link (the method is in line 127):
http://www.google.com/codesearch#Jc73qKqsrJY/android/Common/src/com/googlecode/a
ndroid_scripting/facade/SettingsFacade.java&q=togglevibratemode%20package:http:/
/python-for-android%5C.googlecode%5C.com&l=127

Android Developer's Reference link:
http://developer.android.com/reference/android/media/AudioManager.html#setVibrat
eSetting(int, int)

Original issue reported on code.google.com by [email protected] on 9 Dec 2011 at 4:51

import ssl error

I'm using PythonForAndroid_r4. 

When I importing the module ssl,I get the error message below:

Python 2.6.2 (r262:71600, Feb 14 2011, 10:32:30)     
[GCC 4.4.3] on linux-armv6l                          
Type "help", "copyright", "credits" or "license" for more information.          
                          >>> import ssl                                       
Traceback (most recent call last):                     
File "<stdin>", line 1, in <module>                  
File 
"/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/
lib/python2.6/ssl.py", line 60, in <module>                             
ImportError: No module named _ssl                    

Original issue reported on code.google.com by [email protected] on 20 Feb 2011 at 6:25

HTTP error 401 unauthorized python twitter

The below code does not work :

import android, twitter

msg = "Test twittt from droid"
droid = android.Android()
api = twitter.Api("username", "password")
api.PostUpdate(msg)
droid.makeToast(msg)


Needs oauth on 
http://android-scripting.googlecode.com/hg/python-build/python-libs/python-twitt
er/doc/twitter.html

Original issue reported on code.google.com by [email protected] on 28 Aug 2011 at 5:36

No ttyame() attribute in os module

What steps will reproduce the problem?
1. launch interactive python shell
2. import os
3. dir(os)

What is the expected output? What do you see instead?
I expected a ttyname attribute, but there's none

What version of the product are you using? On what operating system?
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21) 
[GCC 4.4.3] on linux-armv7l

On Android

Please provide any additional information below.

It is referenced in the twisted sample via unix.py

Original issue reported on code.google.com by [email protected] on 2 May 2012 at 5:56

Standalone APK package can‘t run background

Hi my friend:
   I compiled my python script to the APK file.I installed it and it worked well.But when I press "home" back to the background,and restart the program,the program force close.
   Is there any code can make the script running background.
   I'm sorry for my poor English.

Best Regards

Original issue reported on code.google.com by [email protected] on 7 Jul 2011 at 2:12

sl4a.r4(PythonForAndroid-r7b1) abnormal termination at android 2.2.1

What steps will reproduce the problem?
1.setup the sl4a.r4 and py4a.r7b1
2.run helloworld.py
3.abnormal termination in sl4a 

What is the expected output? What do you see instead?
abnormal termination in sl4a

What version of the product are you using? On what operating system?
sl4a.r4 and py4a.r7b1
os: android 2.2.1
Please provide any additional information below.
the logcat in attachment

Original issue reported on code.google.com by [email protected] on 31 Oct 2011 at 2:01

Attachments:

Install Failed on HTC Desire HD

What steps will reproduce the problem?
1. Install SL4A
2. Install
3. PythonForAndroid_r(5 or 6).
4. Try to install.

What is the expected output? What do you see instead?
The files are downloading. But after that I get an "Installation Failed" and 
SL4A don't see Python.

What version of the product are you using? On what operating system?
HTC Desire HD. Android 2.2

Please provide any additional information below.
Attached adb output after few tries

Original issue reported on code.google.com by [email protected] on 29 Mar 2011 at 6:08

Attachments:

cameraCapturePicture --> java.lang.NullPointerException

What steps will reproduce the problem?
1. call cameraCapturePicture('/path/to/filename‘)

What is the expected output? What do you see instead?
Script should snap a photo, instead I get java.lang.NullPointerException

What version of the product are you using? On what operating system?
SL4A r4, Py4a r5, Andoird 2.3.7 (GingerVillain 3.3)

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 Nov 2011 at 9:18

Function os.path.isfile raises exception

The Python documentation does not specify an exception thrown by this method, 
and if a path is non-existant or not readable then false should be returned.

Currently this method is generating OSError on Android.

Original issue reported on code.google.com by [email protected] on 5 Oct 2011 at 6:47

download python-extras-r14.zip failed

What steps will reproduce the problem?
1.install and run python-for-android(r4/r5/r6)
2.click "Install" button
3.Installation failed while downloading python-extras-r14.zip

What version of the product are you using? On what operating system?
r4/r5/r6 on android 2.1

Please provide any additional information below.
Why does r4/r5/r6 download python-extras-r14.zip? I can't find r14 url in this 
site.


Original issue reported on code.google.com by [email protected] on 20 May 2011 at 8:39

Crypto Module

Can someone build a module for crypto module?

http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.5.tar.gz


Original issue reported on code.google.com by [email protected] on 13 Feb 2012 at 3:38

Unable to open Python shell

What steps will reproduce the problem?
1.I open the python interpreter with sl4a
2.It just shows a blank screen
3.There is no shell!

What is the expected output? What do you see instead?
There should be a shell to type in

What version of the product are you using? On what operating system?
Python 2.6.2 on sl4a.  Running on Droid Bionic.

Please provide any additional information below.


Original issue reported on code.google.com by eazyigz on 3 Oct 2011 at 3:01

seeing a java.lang.NullPointerException for several methods

What steps will reproduce the problem?
1. If I run my script which is the following 

import android
droid=android.Android()
print droid.sensorsReadAccelerometer()


What is the expected output? What do you see instead?
Expected to see a list of floats

I see this instead:
java.lang.NullPointerException
Result(id=1, result=None, error=u'java.lang.NullPointerException')



What version of the product are you using? On what operating system?
Running sl4a version 4
Python for Android version 5
Android 2.2.1


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 13 Jul 2011 at 6:15

Current release is compiled without Bluetooth support

What steps will reproduce the problem?
1. >>> import socket
2. >>> socket.AF_BLUETOOTH
3. Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'AF_BLUETOOTH'

What is the expected output? What do you see instead?

Expected:
>>> import socket                                                               


>>> socket.AF_BLUETOOTH                                                         


31

What version of the product are you using? On what operating system?
APK downloaded from 
http://code.google.com/p/python-for-android/downloads/detail?name=PythonForAndro
id-r7b1.apk&can=2&q=

also happens with plain r16

Please provide any additional information below.

This is bad as you can't create a bluetooth socket.


Original issue reported on code.google.com by [email protected] on 14 Jan 2012 at 3:23

sys.getfilesystemencoding() returns None

What steps will reproduce the problem?
1. Open Python shell on an android device.
2. Enter 'import sys; print sys.filesystemencoding()'

What is the expected output? What do you see instead?

A string "UTF-8" or "mbcs" expected, but sees None.
This causes unicode exception on many os module functions accessing the file 
system with filename/path containing non ascii char.

What version of the product are you using? On what operating system?

Tested Android (2.2, 2.3, 3.1). Used PythonForAndroid_r5.apk

Please provide any additional information below.

See linked ASE issue: 
http://code.google.com/p/android-scripting/issues/detail?id=575


Original issue reported on code.google.com by [email protected] on 28 Nov 2011 at 10:26

importing uuid module causes segmentation fault

What steps will reproduce the problem?
1. Install Python for Android version 5
2. In adb shell set env vars and start python interpreter
3. import uuid

What is the expected output? 
uuid module imported successfully and available for use in interpreter

What do you see instead?
Segmentation fault - signal 11 (SIGSEGV)   

What version of the product are you using? On what operating system?
Motorola Droid, OS v2.2.2

Please provide any additional information below.

Interpreter install used these .zip archives:

python_r16.zip
python_extras_r13.zip
python_scripts_r13.zip

Output from adb shell:

$ export PYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python
$ export PYTHONPATH=/sdcard/com.googlecode.pythonforandroid/extras/python
$ export PATH=$PYTHONHOME/bin:$PATH
$ export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/com.googlecode.pythonforandroid/file
s/python/lib:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2
.6/lib-dynload 
$ python
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)
[GCC 4.4.3] on linux-armv7l
Type "help", "copyright", "credits" or "license" for more information.
>>> import uuid
[1] + Stopped (signal)        python
[1]   Segmentation fault      python
$

Output from adb logcat:

I/DEBUG   ( 1010): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
***
I/DEBUG   ( 1010): Build fingerprint: 
'verizon/voles/sholes/sholes:2.2.2/FRG83G/91102:user/release-keys'
I/DEBUG   ( 1010): pid: 3167, tid: 3167  >>> python <<<
I/DEBUG   ( 1010): signal 11 (SIGSEGV), fault addr 00000000
I/DEBUG   ( 1010):  r0 00000000  r1 0000002f  r2 b0014df8  r3 00000000
I/DEBUG   ( 1010):  r4 b000c448  r5 b000c448  r6 00000000  r7 00000000
I/DEBUG   ( 1010):  r8 8010960d  r9 0000a048  10 800d0264  fp ffffffff
I/DEBUG   ( 1010):  ip 80110210  sp be80d098  lr b0002527  pc b00061c4  cpsr 
40000030
I/DEBUG   ( 1010):  d0  6472656767756265  d1  0000e6800000e574
I/DEBUG   ( 1010):  d2  0000ef8c0000e776  d3  0000e7640000e661
I/DEBUG   ( 1010):  d4  0000e9a00000e680  d5  0000e9a00000e680
I/DEBUG   ( 1010):  d6  0000ea300000e680  d7  0000ea6c0000e680
I/DEBUG   ( 1010):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 1010):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 1010):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 1010):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 1010):  d16 3fdb160ab370cb80  d17 4022000000000000
I/DEBUG   ( 1010):  d18 0000000000000000  d19 8000000000000000
I/DEBUG   ( 1010):  d20 4000000000000000  d21 3f11566aaf25de2c
I/DEBUG   ( 1010):  d22 bebbbd41c5d26bf1  d23 0000000000000000
I/DEBUG   ( 1010):  d24 3e66376972bea4d0  d25 c04a800000000000
I/DEBUG   ( 1010):  d26 3ff0000000000000  d27 8000000000000000
I/DEBUG   ( 1010):  d28 c000000000000000  d29 0000000000000000
I/DEBUG   ( 1010):  d30 0000000000000000  d31 0000000000000000
I/DEBUG   ( 1010):  scr 60000010
I/DEBUG   ( 1010): 
I/DEBUG   ( 1010):          #00  pc b00061c4  /system/bin/linker
I/DEBUG   ( 1010):          #01  lr b0002527  /system/bin/linker
I/DEBUG   ( 1010): 
I/DEBUG   ( 1010): code around pc:
I/DEBUG   ( 1010): b00061a4 c003f811 d0024564 0004ebcc b114e004 
I/DEBUG   ( 1010): b00061b4 429a3301 2000d1f3 bf00bd10 20004603 
I/DEBUG   ( 1010): b00061c4 428a781a 4618bf08 4770b902 e7f73301 
I/DEBUG   ( 1010): b00061d4 68004603 b1a0b570 46624684 f8122500 
I/DEBUG   ( 1010): b00061e4 5d4e4b01 d10742a6 4622b90c 2100e002 
I/DEBUG   ( 1010): 
I/DEBUG   ( 1010): code around lr:
I/DEBUG   ( 1010): b0002504 ffffcfbb 00006828 ffffd361 0000003c 
I/DEBUG   ( 1010): b0002514 4d2db5f0 b087a300 18ed212f f0034606 
I/DEBUG   ( 1010): b0002524 4637fe4d 1c47b100 582c4828 46214638 
I/DEBUG   ( 1010): b0002534 fd82f003 28004684 f8d4d137 f01660a8 
I/DEBUG   ( 1010): b0002544 d0180f02 f2404822 4b2244a4 94001828 
I/DEBUG   ( 1010): 
I/DEBUG   ( 1010): stack:
I/DEBUG   ( 1010):     be80d058  800dd1f8  
I/DEBUG   ( 1010):     be80d05c  0006ee48  
I/DEBUG   ( 1010):     be80d060  0006ee48  
I/DEBUG   ( 1010):     be80d064  400c0b70  
I/DEBUG   ( 1010):     be80d068  00000000  
I/DEBUG   ( 1010):     be80d06c  800d0264  
I/DEBUG   ( 1010):     be80d070  400c0b70  
I/DEBUG   ( 1010):     be80d074  400781a0  
I/DEBUG   ( 1010):     be80d078  e62c78ef  
I/DEBUG   ( 1010):     be80d07c  800714f1  
/data/data/com.googlecode.pythonforandroid/files/python/lib/libpython2.6.so
I/DEBUG   ( 1010):     be80d080  392dc3e1  
I/DEBUG   ( 1010):     be80d084  0006ee48  
I/DEBUG   ( 1010):     be80d088  0006ee48  
I/DEBUG   ( 1010):     be80d08c  800d0264  
I/DEBUG   ( 1010):     be80d090  df002777  
I/DEBUG   ( 1010):     be80d094  e3a070ad  
I/DEBUG   ( 1010): #00 be80d098  00000000  
I/DEBUG   ( 1010):     be80d09c  8010960d  
/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynloa
d/_ctypes.so
I/DEBUG   ( 1010):     be80d0a0  b0014df8  
I/DEBUG   ( 1010):     be80d0a4  b0004a94  /system/bin/linker
I/DEBUG   ( 1010):     be80d0a8  b000c448  
I/DEBUG   ( 1010):     be80d0ac  00000000  
I/DEBUG   ( 1010):     be80d0b0  400c26c0  
I/DEBUG   ( 1010):     be80d0b4  b000c448  
I/DEBUG   ( 1010):     be80d0b8  00000000  
I/DEBUG   ( 1010):     be80d0bc  400c26c0  
I/DEBUG   ( 1010):     be80d0c0  00000000  
I/DEBUG   ( 1010):     be80d0c4  b00033bf  /system/bin/linker
I/DEBUG   ( 1010):     be80d0c8  801100d8  
I/DEBUG   ( 1010):     be80d0cc  4007ca08  
I/DEBUG   ( 1010):     be80d0d0  400c26c0  
I/DEBUG   ( 1010):     be80d0d4  8010963d  
/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynloa
d/_ctypes.so
I/DEBUG   ( 1010):     be80d0d8  00000000  
I/DEBUG   ( 1010):     be80d0dc  00000000  
I/BootReceiver( 1104): Copying /data/tombstones/tombstone_02 to DropBox 
(SYSTEM_TOMBSTONE)

Original issue reported on code.google.com by [email protected] on 14 Apr 2011 at 3:12

Python and ASUS Eee Pad Transformer: keyboard problem

What steps will reproduce the problem?

Run r5 python console on ASUS  Eee Pad Transformer. Try to enter '(' or ')' 
character via dock stantion keyboard. You will get strange escape sequences 
instead of normal characters. Same with other keys (tab, for example).

OS: Android 3.2

Original issue reported on code.google.com by [email protected] on 22 Sep 2011 at 1:51

"site-packages" seems not to be working

What steps will reproduce the problem?
1. Copy a python module to 
"/sdcard/com.googlecode.pythonforandroid/extras/python/site-packages/" 
2. Importing the module within a script.

What is the expected output? What do you see instead?
This results in an ImportError (no module named ...).

What version of the product are you using? On what operating system?
Interpreter: 16, extras: 14, scripts: 13. Android 2.3.3 (CM 7.0.3)


Original issue reported on code.google.com by [email protected] on 2 Jun 2011 at 10:04

Acer Iconia A500 Zope package will not import

What steps will reproduce the problem?
1.  Browse Modules
2.  Select Zope
3.  Import

What is the expected output? What do you see instead?
Errorjava.io.FileNotFoundException:/data/data/com.googlecode.pythonforandroid/fi
les/egg-info/zope-r1.zip/files.txt

What version of the product are you using? On what operating system?
3

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 22 Jun 2011 at 10:08

IPv6 disabled

What device(s) are you experiencing the problem on?
HTC Desire HD

What firmware version are you running on the device?
Android 2.2

What steps will reproduce the problem?
1. Create the following Python script:
import socket
print socket.has_ipv6
s = socket.socket(socket.AF_INET6, socket. SOCK_DGRAM)
s.bind(("::1", 9000))
s.recv(1024)

What is the expected output?
True
[Wait for incoming connection]

What do you see instead?
False
Exception: socket.error: getsockaddrarg: bad family

What version of the product are you using? On what operating system?
SL4A r3 + Python 2.6.2

Please provide any additional information below.
Python seems to be compiled without --enable-ipv6. Please enable it in the 
build.

Thanks

Original issue reported on code.google.com by [email protected] on 20 Mar 2011 at 4:09

Kivy / Python-for-android : Build.py fails to build an android package apk

I try for many days to build a simple android package using kivy and python for 
android. Unfortunately, I've spent many hours trying to solve all the issues 
but I still cannot do it. I hope you guys help me out because you are my last 
hope before throwing my laptop off the window...

I have succeeded to build the distribution directory using only the kivy 
module.So the output folder /dist/default has all the necessary files (I hope) 
in order to build my apk. The command that I use to build the apk, according to 
the example in the docs is the following:

*sudo ./build.py --dir ~/mount_point/kivy --name "Myapp" --package 
org.mytest.myapp --version 1.0 installd*

What I get is:

An error occured while calling ~/android-sdk-linux/tools/android update Your 
PATH must include android tools.

I have already inserted in the bashrc the appropriate exports. So if i run the 
following:

~/android-sdk-linux/tools/android update

I get:

Error: Missing object name for verb 'update'. [Continues with usage details...]

I tried to remove from build.py the try except statement around the 
subprocess.call(...) and I ran gain the command. I got this :

Traceback (most recent call last):
  File "./build.py", line 345, in <module>
    make_package(args)
  File "./build.py", line 252, in make_package
    subprocess.call([ANDROID, 'update', 'project', '-p', '.', '-t', android_api])
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I really don't know what else to do.
My OS is Ubuntu 11.10.
Thanks!

Original issue reported on code.google.com by [email protected] on 20 Apr 2012 at 4:40

SSH module ?

Hello Hackers,
Anybody interested in packing http://www.lag.net/paramiko/ to SL4A (py)  ?

--
Thank you,
h3manth.com

Original issue reported on code.google.com by [email protected] on 8 Sep 2011 at 3:37

cameraCapturePicture error - no picture saved

What steps will reproduce the problem?
1.call cameraCapturePicture('filename‘)

What is the expected output? What do you see instead?
Script should snap a photo, instead I get java.lang.NullPointerException
the first time the phone take a photo but don't save and stop
the second time i have a java.lang.NullPointerException


What version of the product are you using? On what operating system?
sl4a_r4.apk , Android 2.2

Please provide any additional information below.
Phone Huawei Ideos


Original issue reported on code.google.com by [email protected] on 23 Dec 2011 at 7:57

Python 3

Python 3.2.1 to be exact. What is required to make it possible on Android?

Original issue reported on code.google.com by [email protected] on 31 Mar 2011 at 11:59

Error at importing module.

I download third-party modules and put them to path /sdcard/sl4a
When I try import them from console importing finish successfully, but when I 
try import them from script through 
import <module_name>
The error "No module named <module_name> has appiared. Why?
My system is Android 2.2 froyo, version if sl4a is r5, py4a has latest version.
P.S. Sorry for my poor English

Original issue reported on code.google.com by [email protected] on 9 Feb 2012 at 2:25

Android class definition "helper" files to support SL4A development on PCs

Originally posted as Enhancement request 617 on the SL4A group & was pointed to 
here by rjmatthews62...

Essentially, with FullScreenUI in R5 enabling complex app development in SL4A, 
it is very helpful to use IDEs in PCs/Laptops to write scripts, layouts etc.

To simplify this, I wondered if could we have a "helper" file (similar in 
concept to header files from C) that we can "import" when writing scripts in 
IDEs like PyScripter or PyDev + Eclipse & be able to use code completion, 
tooltips etc. This file can define the "Android" class and its member functions 
with API refs contained in DocString. 

I therefore wrote the attached "helper" file based on SL4A API refs.. it's just 
a barebones Android class with function defs + API ref in each function's 
docstring + "pass" as the only statement in each function's body :-) but it 
does simplify coding in an IDE.

rjmatthews62's comments were - "This is a very nice idea, but as it currently 
stands, android.py is the standard naming script that defines the Android class 
that handles the rpc link to the sl4a facades. I want to keep the standard 
android.py short and sweet... 
But this could be renamed anndroiddev.py or similar, and be a class derived 
from the standard Android class. I like the idea of the Helper classes, but 
maintaining them will be up to the various language maintainers" - and 
suggested that I post this here.

I DID try to take a look at the current android.py - but it's a bit over my 
head :-) so sharing the thought here for your consideration...

PS - sorry if this appears as "Issue" on the board - i'm not able to figure out 
how to mark this as "Enhancement Request"

Original issue reported on code.google.com by [email protected] on 1 Apr 2012 at 6:28

Attachments:

Force close with click on Uninstall Module in Python for Android

What steps will reproduce the problem?
1.Install Python3ForAndroid_r6.apk
2.Go to application
3.Click on Uninstall Module

What is the expected output? What do you see instead?
Give a Toast that there is not any Module

What version of the product are you using? On what operating system?
Python3ForAndroid_r6.apk on Android 2.3.3

Please provide any additional information below.
When i click on Uninstall Module, There is happen a FORCE CLOSE.

Original issue reported on code.google.com by [email protected] on 13 May 2012 at 8:54

Attachments:

Missing almost everything on Samsung Galaxy Note

What steps will reproduce the problem?
1.Install the APK. 
2.Install scripts from inside the application. 
3.Nothing further can be done. 

What is the expected output? What do you see instead?
I expect to be able to reach the menu to install python interprter, 
And to otherwise run python scripts. 

What version of the product are you using? On what operating system?


Please provide any additional information below.

Android 2.3.6

Original issue reported on code.google.com by carmageddon on 12 Feb 2012 at 5:54

Attachments:

HTC Desire+ cyanogen (android 2.3) errors

this script:

import android 
droid = android.Android(('10.0.0.100', 36868))
print droid.batteryGetLevel()


generate :
Result(id=0, result=None, error=None)

the same with all the sensors and battery funtions, camera funtion crash....

Original issue reported on code.google.com by [email protected] on 26 May 2011 at 1:40

sdcard prmessime denide

What steps will reproduce the problem?
1.install sl4a seccfull
2.install python for android not found intrpreater,extracts,example
3.sdcard aceses denide

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
samsung galagsy 2 ,android 2.3.3

Please provide any additional information below.

how to istall python for android and sl4a manually?

Original issue reported on code.google.com by [email protected] on 16 Oct 2011 at 12:59

Python Interpreter opens in a quarter of the screen on Galaxy nexus

What steps will reproduce the problem?
1. Install Python through SL4A.
2. Open the "Python for Android" application, either through the app menu or 
through SL4A.

What is the expected output? What do you see instead?

The application opens in the bottom-left corner of the screen. If I try to tap 
on the buttons it crashes.

What version of the product are you using? On what operating system?

Stock firmware on a Bell Galaxy Nexus.

Please provide any additional information below.

Screenshot attached.

N.B. I have the same problem with the Perl and Lua interpreters, so maybe this 
is a problem with SL4A? I'm not sure.

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 1:20

Attachments:

libpython2.6.so not found

What steps will reproduce the problem?
1. Install Py4A.
2. Install the interpreter.
3. Launch the interactive interpreter from the SL4A list.

What is the expected output? What do you see instead?

Expected: interpreter console prompt
Actual: "Python started" notification, followed immediately by "Python exited" 
notification.
  logcat shows return code 255.

What version of the product are you using? On what operating system?
r4 or r5, on Android 1.5

Please provide any additional information below.

Copying libpython2.6.so to /system/lib resolves the issue.
Possible reason: LD_LIBRARY_PATH only contains /system/lib.

On Py4A version r1, the interpreter works fine without copying libpython2.6.so 
to /system/lib, but the same issue occurs when attempting to install a Python/C 
module like pybluez; there, "import bluetooth" fails with a link error saying 
that libpython2.6.so cannot be found.  I haven't tested whether copying 
libpython2.6.so to /system/lib fixes this problem with r1, since doing it with 
r4 solved both problems for me.

Original issue reported on code.google.com by [email protected] on 10 Mar 2011 at 1:27

droid.readLocation() returns empty result on Galaxy S

What steps will reproduce the problem?
1. Open python interpreter on Samsung Galaxy S
2. call android.readLocation() having run android.startLocating()
3. Obverse empty result

What is the expected output? What do you see instead?
Expected output is the result type with both cell-triangulated location and GPS 
location. Instead an empty result is returned without either

What version of the product are you using? On what operating system?
Samsung Galaxy S with Android 2.2 installed. Python for android version version 
5 and SL4A version 5x.

Original issue reported on code.google.com by [email protected] on 17 Apr 2011 at 12:40

Round function not working properly

What steps will reproduce the problem?

 size = 8.74 * 1024 * 1024
r = round(size / 1024 / 1024, 2)
print(round(size / 1024 / 1024, 2), 

r = round(size / 1024 / 1024, 3)
print(round(size / 1024 / 1024, 3), r)

r = round(size / 1024 / 1024, 4)
print(round(size / 1024 / 1024, 4), r)

r = round(size / 1024 / 1024, 1)
print(round(size / 1024 / 1024, 1), r) 

What is the expected output? What do you see instead?
 8.74 8.74

8.74 8.74

8.74 8.74

8.7 8.7 


8.7400000000000002 8.7400000000000002 

8.7400000000000002 8.7400000000000002 

8.6999999999999993 8.6999999999999993 

What version of the product are you using? On what operating system?


Py3k4a r6, sl4a r5, android 2.3.6

Please provide any additional information below.

Using a Samsung Galaxy Note.

This is really weird, and I can live with it for now but it really messes 
things up.


Original issue reported on code.google.com by [email protected] on 8 May 2012 at 8:36

Cannot use sockets

What device(s) are you experiencing the problem on? Cruz reader 

What firmware version are you running on the device? 2.1

What steps will reproduce the problem?
1.Write a script using Python on sl4a that connects to your computer
2.Write a Python script that has binds a socket
3.Run the programs and the android tablet times out without connecting.

What is the expected output? What do you see instead?
Expected output is a connection and a test message from the sockets. Instead a 
got a connection timed out error.


What version of the product are you using? On what operating system?
SL4A on Android 2.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 May 2012 at 9:36

adding readline module

Can you also compile readline module in python ?

Original issue reported on code.google.com by israel.fruchter on 11 Mar 2011 at 3:09

Cannot move the app to SD card

With the modules installed the app takes up ~80 MiB on my device which is too 
much considering only 350 MiB is the capacity of the phone memory.

If possible please make the app moveable to SD card.

Thanks.

Original issue reported on code.google.com by [email protected] on 12 Apr 2012 at 6:51

sys.path is hardcoded to python2.1 paths. this interferes with importing some modules like struct or ctypes from command line

What steps will reproduce the problem?

$ export PYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python
$ export PYTHONPATH=/sdcard/com.googlecode.pythonforandroid/extras/python
$ export PATH=$PYTHONHOME/bin:$PATH
$ export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/sdcard/lib:/data/data/com.googlecode.pythonfor
android/files/python/lib:/data/data/com.googlecode.pythonforandroid/files/python
/lib/python2.6/lib-dynload

$ python
Python 2.6.2 (r262:71600, Feb 14 2011, 10:32:30) 
[GCC 4.4.3] on linux-armv7l
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/sdcard/com.googlecode.pythonforandroid/extras/python', 
'/data/data/com.googlecode.pythonforandroid/files/python/lib/python21.zip', 
'/usr/local/lib/python2.1', '/usr/local/lib/python2.1/lib-dynload', 
'/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.1/lib-dynlo
ad']

>>> import struct
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/struct.py", line 1, in <module>
ImportError: No module named _struct

# After manually fixing sys.path, I can import the struct module without 
problem:

>>> sys.path=['', '/sdcard/sl4a/scripts', 
'/sdcard/com.googlecode.pythonforandroid/extras/python', 
'/data/data/com.googlecode.pythonforandroid/files/python/lib', 
'/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynlo
ad']
>>> import struct
>>> 



What is the expected output? What do you see instead?

I expected to see sys.path to reflect what I specified in the "export" 
statements.  Instead, I see some some references to python2.1 in sys.path.  I 
tracked down that the python2.1 references are hard coded in libpython2.6.so:

$ strings 
/data/data/com.googlecode.pythonforandroid/files/python/lib/libpython2.6.so | 
grep python2.1
/usr/local/lib/python2.1:/usr/local/lib/python2.1/lib-dynload
lib/python2.1


What version of the product are you using? On what operating system?

I'm running the latest Py4A on a rooted HTC EVO with Android 2.2.

Please provide any additional information below.

Thanks very much for working on Py4A!!

Original issue reported on code.google.com by [email protected] on 18 Feb 2011 at 4:57

Application stopped unexpectedly when uninstalling module or clicking file browser option

What steps will reproduce the problem?
1.Click on File Browser from the options Menu
2.Click on the Unimstall Module button
3.

What is the expected output? What do you see instead?
Application stops unexpextedly. 

What version of the product are you using? On what operating system?
pyhton for android r7b1
on Nexus S , android 2.3.4 , build number GRJ22

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 Jul 2011 at 7:36

Broken distutils

What steps will reproduce the problem?

1. standard setup.py script (for ex. in /data/data/xxx/files)
2. run setup.py install


What is the expected output? What do you see instead?

error: invalid Python installation: unable to open 
/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/config/Mak
efile (No such file or directory)


What version of the product are you using? On what operating system?

python_r16, python_extras_r13, Android 2.2


Please provide any additional information below.

distutils on posix platform presuppose that Makefile and pyconfig.h are 
available: see distutils/sysconfig.py.
Besides, os.name returns posix whereas Android is not really posix.

Original issue reported on code.google.com by [email protected] on 3 Sep 2011 at 2:41

  • Merged into: #17

ctypes module can't import third party libraries

What steps will reproduce the problem?

>>> from ctypes import cdll
<PyDLL 'libpython2.6.so', handle b000cac4 at 400863f0>
>>> libc = cdll.LoadLibrary('libc.so')
>>> libc = cdll.LoadLibrary('/sdcard/lib/libc.so')
>>> libsdl = cdll.LoadLibrary('/sdcard/lib/libSDL.so')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/ctypes/__init__.py", line 431, in LoadLibrary
  File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/ctypes/__init__.py", line 353, in __init__
OSError: Cannot load library: load_segments[907]: 16582 failed to map segment 
from 'libSDL.so' @ 0x80400000 (0x00070da8). p_vaddr=0x00000000 
p_offset=0x00000000
>>> 


$ ls -l /sdcard/lib
----rwxr-x system   sdcard_rw   478824 2011-01-31 16:25 libSDL.so
----rwxr-x system   sdcard_rw   278276 2011-02-15 20:10 libc.so

# md5sum /system/lib/libc.so /sdcard/lib/libc.so
07724f989fdb0134370eedc1ad9929cc  /system/lib/libc.so
07724f989fdb0134370eedc1ad9929cc  /sdcard/lib/libc.so


What is the expected output? What do you see instead?

So ctypes successfully imports libc.so implicitly from /system/lib, and also 
loads an identical copy in /sdcard/lib.  However, loading a third party library 
does not work.  libSDL.so is the latest libSDL port to Android, from a working 
demo app.  Other third party libraries extracted from .apk files also fail to 
load under ctypes.


What version of the product are you using? On what operating system?

I'm running Android 2.2 on a rooted HTC EVO.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Feb 2011 at 5:11

Python Console does not show results

What steps will reproduce the problem?
1. Running any python script on the particular device (m701 tablet) no text is 
output to the console display but example scripts appear to run.  This does not 
occur on other device, output data is printed to console without problems.

What is the expected output? What do you see instead?
Output is not shown in console.

What version of the product are you using? On what operating system?
Using:
sl4a_r4.apk
PythonForAndroid_r4.apk
python_r16.zip
python_scripts_r13.zip
python_extras_r14.zip
On android 2.3.3

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 28 Sep 2011 at 11:15

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.