Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to retrieve errors? #24

Open
GoogleCodeExporter opened this issue Apr 5, 2015 · 4 comments
Open

How to retrieve errors? #24

GoogleCodeExporter opened this issue Apr 5, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

This is a really interesting project, but I'm wondering how to get more out of 
it than just
interpreting some basic code.

How do I manually run code and get the standard output from the Python process?

Original issue reported on code.google.com by overv161@gmail.com on 26 Mar 2013 at 9:09

@GoogleCodeExporter
Copy link
Author

See 
http://code.google.com/p/android-python27/wiki/TutorialHowToRunPythonfromShell

Original comment by anthony....@gmail.com on 26 Mar 2013 at 9:10

@GoogleCodeExporter
Copy link
Author

Sorry, I meant how to do it from an APK. Say, I have some library written in 
Python that takes input and produces output I want to display in my app, how 
would I approach that?

Original comment by overv161@gmail.com on 26 Mar 2013 at 9:11

@GoogleCodeExporter
Copy link
Author

If possible, it would be even better if the process could be running for a 
while and accept input at any time. That's because the library takes some time 
to start up.

Original comment by overv161@gmail.com on 26 Mar 2013 at 9:13

@GoogleCodeExporter
Copy link
Author

Do you have example ?

Would smth like that fit ?

p = Popen(your_cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT)
(stdout, stderr) = p.communicate()



Original comment by anthony....@gmail.com on 26 Mar 2013 at 9:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant