Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Comment on RunPythonFromShell in python-for-android
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  19 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
python-for-andr...@googlecode.com  
View profile  
 More options Jun 4 2012, 7:57 pm
From: python-for-andr...@googlecode.com
Date: Mon, 04 Jun 2012 23:57:44 +0000
Local: Mon, Jun 4 2012 7:57 pm
Subject: Comment on RunPythonFromShell in python-for-android
Comment by Darten.b...@gmail.com:

And why not compile that “Android-standard“ into the interpreter???

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jun 5 2012, 12:35 pm
From: python-for-andr...@googlecode.com
Date: Tue, 05 Jun 2012 16:35:07 +0000
Local: Tues, Jun 5 2012 12:35 pm
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by gene.res...@gmail.com:

In case it's of interest, I have used these environment settings  
successfully to run Python from a Java subprocess started and connected to  
standard streams with ProcessBuilder. Write me for code if you need it.

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jun 27 2012, 3:27 pm
From: python-for-andr...@googlecode.com
Date: Wed, 27 Jun 2012 19:27:19 +0000
Local: Wed, Jun 27 2012 3:27 pm
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by cyril.ho...@gmail.com:

For some reason that won't work for me, e.g. /mnt/storage does not exist  
(but /mnt/sdcard is OK), /bin/sh won't work, ...

I run on a rooted device with some recompiled kernel, and busybox installed  
in case it matters. I use the following script:
{{{
~ # cat /system/bin/py
#! /system/bin/sh
PW=`pwd`
export EXTERNAL_STORAGE=/mnt/sdcard
export LANG=en
export  
PYTHONPATH=/mnt/sdcard/com.googlecode.pythonforandroid/extras/python:/data/ data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload :/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6
export TEMP=/mnt/storage/com.googlecode.pythonforandroid/extras/python/tmp
export PYTHON_EGG_CACHE=$TEMP
export PYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python
export  
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/com.googlecode.pythonforandroid /files/python/lib:/data/data/com.googlecode.pythonforandroid/files/python/l ib/python2.6/lib-dynload:/mnt/sdcard/com.googlecode.pythonforandroid/extras /python
cd $PW
/data/data/com.googlecode.pythonforandroid/files/python/bin/python "$@"

}}}

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Sep 6 2012, 12:00 am
From: python-for-andr...@googlecode.com
Date: Thu, 06 Sep 2012 04:00:30 +0000
Local: Thurs, Sep 6 2012 12:00 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by cryogeni...@gmail.com:

it does work, however I get an error when running scripts with android.py  
module. I tried to connect terminal through dropbear but another error came  
up. Someting about JASON not being able to decode something. Any solutions?  
Btw python and everything was intalled on sdcard

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Sep 6 2012, 12:05 am
From: python-for-andr...@googlecode.com
Date: Thu, 06 Sep 2012 04:05:24 +0000
Local: Thurs, Sep 6 2012 12:05 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by cryogeni...@gmail.com:

Python does work, however I get an error when running scripts with  
android.py module. I tried to connect terminal through dropbear but another  
error came up. Someting about JASON not being able to decode something. Any  
solutions? Btw python and everything was intalled on sdcard

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:34 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:34:11 +0000
Local: Fri, Jan 4 2013 1:34 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012
step 1:"#! /bin/sh" replace "#! /system/bin/sh"
step 2::"storage: replace "sdcard"
step 3:save named python
(cmd:./adb root)
./adb push python /system/bin
./adb shell
root@android:/ #python
################################################
dlopen libpython2.6.so
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.

#########################################
python does work, but i also get an error:
dlopen libpython2.6.so
what happen??

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:37 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:37:02 +0000
Local: Fri, Jan 4 2013 1:37 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012.
step 1:"#! /bin/sh" replace "#! /system/bin/sh".
step 2::"storage: replace "sdcard".
step 3:save named python.
(cmd:./adb root).
./adb push python /system/bin.
./adb shell.
root@android:/ #python
################################################
dlopen libpython2.6.so
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.

#########################################
python does work, but i also get an error:
dlopen libpython2.6.so
what happen??

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:38 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:38:12 +0000
Local: Fri, Jan 4 2013 1:38 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

{{{
for Comment by cyril.ho...@gmail.com, Jun 27, 2012
step 1:"#! /bin/sh" replace "#! /system/bin/sh"
step 2::"storage: replace "sdcard"
step 3:save named python
(cmd:./adb root)
./adb push python /system/bin
./adb shell
root@android:/ #python
################################################
dlopen libpython2.6.so
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.

#########################################
python does work, but i also get an error:
dlopen libpython2.6.so
what happen??

}}}

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:41 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:41:12 +0000
Local: Fri, Jan 4 2013 1:41 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012\\
step 1:"#! /bin/sh" replace "#! /system/bin/sh"\\
step 2::"storage: replace "sdcard"\\
step 3:save named python\\
(cmd:./adb root)\\
./adb push python /system/bin\\
./adb shell\\
root@android:/ #python\\
################################################\\
dlopen libpython2.6.so\\
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.\\

>>> \\

#########################################\\
python does work, but I also get an error:\\
dlopen libpython2.6.so\\
what happen??\\

}}}\\

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:42 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:42:14 +0000
Local: Fri, Jan 4 2013 1:42 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012\\
step 1:"#! /bin/sh" replace "#! /system/bin/sh"\\
step 2::"storage: replace "sdcard"\\
step 3:save named python\\
(cmd:./adb root)\\
./adb push python /system/bin\\
./adb shell\\
root@android:/ #python\\
################################################\\
dlopen libpython2.6.so\\
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.\\

>>> \\

#########################################\\
python does work, but I also get an error:\\
dlopen libpython2.6.so\\
what happen??\\

}}}\\

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:43 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:43:14 +0000
Local: Fri, Jan 4 2013 1:43 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012\\ step 1:"#! /bin/sh"  
replace "#! /system/bin/sh"\\
step 2::"storage: replace "sdcard"\\
step 3:save named python\\
(cmd:./adb root)\\
./adb push python /system/bin\\
./adb shell\\
root@android:/ #python\\
################################################\\
dlopen libpython2.6.so\\
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.\\

>>> \\

#########################################\\
python does work, but I also get an error:\\
dlopen libpython2.6.so\\
what happen??\\

}}}\\

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:44 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:44:14 +0000
Local: Fri, Jan 4 2013 1:44 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012 \\ step 1:"#! /bin/sh"  
replace "#! /system/bin/sh"\\
step 2::"storage: replace "sdcard"\\
step 3:save named python\\
(cmd:./adb root)\\
./adb push python /system/bin\\
./adb shell\\
root@android:/ #python\\ ########################################\\
dlopen libpython2.6.so\\
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.\\

>>> \\

#########################################\\
python does work, but I also get an error:\\
dlopen libpython2.6.so\\
what happen??\\

}}}\\

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:46 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:46:58 +0000
Local: Fri, Jan 4 2013 1:46 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

<html>
for Comment by cyril.ho...@gmail.com, Jun 27, 2012<br>
step 1:"#! /bin/sh" replace "#! /system/bin/sh"<br>
step 2::"storage: replace "sdcard"<br>
step 3:save named python<br>
(cmd:./adb root)<br>
./adb push python /system/bin<br>
./adb shell<br>
root@android:/ #python<br>
##########################################<br>
dlopen libpython2.6.so<br>
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)<br>
[GCC 4.4.3] on linux-armv7l<br>
Type "help", "copyright", "credits" or "license" for more information.

>>> <br>

##########################################<br>
python does work, but I also get an error:<br>
dlopen libpython2.6.so<br>
what happen??<br>
</html>

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:47 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:47:59 +0000
Local: Fri, Jan 4 2013 1:47 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

<wiki:comment>
for Comment by cyril.ho...@gmail.com, Jun 27, 2012<br>
step 1:"#! /bin/sh" replace "#! /system/bin/sh"<br>
step 2::"storage: replace "sdcard"<br>
step 3:save named python<br>
(cmd:./adb root)<br>
./adb push python /system/bin<br>
./adb shell<br>
root@android:/ #python<br>
##########################################<br>
dlopen libpython2.6.so<br>
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)<br>
[GCC 4.4.3] on linux-armv7l<br>
Type "help", "copyright", "credits" or "license" for more information.

>>> <br>

##########################################<br>
python does work, but I also get an error:<br>
dlopen libpython2.6.so<br>
what happen??<br>
</wiki:comment>

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:49 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:49:29 +0000
Local: Fri, Jan 4 2013 1:49 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

<wiki:comment>

for Comment by cyril.ho...@gmail.com, Jun 27, 2012<br>

step 1:"#! /bin/sh" replace "#! /system/bin/sh"<br>

step 2::"storage: replace "sdcard"<br>

step 3:save named python<br>

(cmd:./adb root)<br>

./adb push python /system/bin<br>

./adb shell<br>
root@android:/ #python<br>
##########################################<br>
dlopen libpython2.6.so<br>
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)<br>
[GCC 4.4.3] on linux-armv7l<br>
Type "help", "copyright", "credits" or "license" for more information.

>>> <br>

##########################################<br>
python does work, but I also get an error:<br>
dlopen libpython2.6.so<br>
what happen??<br>
</wiki:comment>

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 4, 1:50 am
From: python-for-andr...@googlecode.com
Date: Fri, 04 Jan 2013 06:50:29 +0000
Local: Fri, Jan 4 2013 1:50 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by fihtest...@gmail.com:

for Comment by cyril.ho...@gmail.com, Jun 27, 2012

step 1:"#! /bin/sh" replace "#! /system/bin/sh"

step 2::"storage: replace "sdcard"

step 3:save named python

(cmd:./adb root)

./adb push python /system/bin

./adb shell

root@android:/ #python

##########################################

dlopen libpython2.6.so

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.

##########################################

python does work, but I also get an error:

dlopen libpython2.6.so

what happen??

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Jan 5, 6:02 pm
From: python-for-andr...@googlecode.com
Date: Sat, 05 Jan 2013 23:02:14 +0000
Local: Sat, Jan 5 2013 6:02 pm
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by ydir...@free.fr:

On a (typical ?) setup where /mnt/sdcard is a VFAT partition, not only the  
/mnt/storage path has to be adjusted (in 2 places - sigh), the mount  
permissions are so that $TEMP is not writable by everyone, and eg. help()  
fails because of that.

Possible solution (but will be problematic if scripts don't cleanup their  
tempfiles):
{{{
# mkdir /data/tmp
# mount -t tmpfs tmpfs /data/tmp
# chmod 1777 /data/tmp

}}}

and then in the script:
{{{
export TEMP=/data/tmp

}}}

But as such this is a hack: requires root acces, and the mount an chmod  
have to be redone after each reboot.  Not sure we even if we want to tell  
android to do that on each boot (or how to do that in a clean way).

For more information:
http://code.google.com/p/python-for-android/wiki/RunPythonFromShell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Apr 24, 4:47 am
From: python-for-andr...@googlecode.com
Date: Wed, 24 Apr 2013 08:47:24 +0000
Local: Wed, Apr 24 2013 4:47 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
Comment by meilland...@gmail.com:

i change for python3
{{{
#! /bin/sh

export EXTERNAL_STORAGE=/mnt/sdcard
PYTHONPATH=/mnt/sdcard/com.googlecode.python3forandroid/extras/python3
PYTHONPATH=${PYTHONPATH}:/data/data/com.googlecode.python3forandroid/files/ python3/lib/python3.2/lib-dynload
export PYTHONPATH
export TEMP=/mnt/storage/com.googlecode.pythonforandroid/extras/python/tmp
export PYTHON_EGG_CACHE=$TEMP
export PYTHONHOME=/data/data/com.googlecode.python3forandroid/files/python3
export  
LD_LIBRARY_PATH=/data/data/com.googlecode.python3forandroid/files/python3/l ib
/data/data/com.googlecode.python3forandroid/files/python3/bin/python3 "$@"

}}}

For more information:
https://code.google.com/p/python-for-android/wiki/RunPythonFromShell

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
python-for-andr...@googlecode.com  
View profile  
 More options Apr 24, 10:45 am
From: python-for-andr...@googlecode.com
Date: Wed, 24 Apr 2013 14:45:10 +0000
Local: Wed, Apr 24 2013 10:45 am
Subject: Re: Comment on RunPythonFromShell in python-for-android
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »