Conversation
|
So this occurs because python is being set up and run via the C script? If that's the case, I'm not sure if we should patch the behaviour out, since it's the normal behaviour of the python interpreter. That said, it seems fine to do so if it's causing problems - is there somewhere in particular where this comes up and should be fixed? I also wonder if python's internal behaviour is the same in newer versions? |
|
The reason that raise Exception is because python-for-android implement python interpreter as JNI(Java Native Interface), not a standard alone executable file. I think platform.platform() should return a string on any platform, not raising an Exception. We can use: but I don't think this is a good idea. We can return "Android" and more detail like android version and manufacturer in feature. |
|
Right, my concern is that this is not (apparently) a bug in python-for-android, but in the python interpreter itself. I'm not sure philosophically if we should fix these things with hacky patches, rather than working around them and contributing upstream if necessary. |
|
This error will occur on embedded python interpreter like p4a. |
|
I'm going to close this without merging because I still don't think it's the right choice to patch python's natural behaviour when it's not essential. Please do raise it again if you feel strongly about it, I'm happy to discuss it, but when I brought it up on irc people seemed to agree with me. |
python-for-android executable is not a file so can't be opened.
platform.platform() will fail because get the system arch by parse the executable.