Re: screenshot not possible
[QUOTE=_Askin_;419847]
...
def screenshot():
img = graphics.screenshot()
size = 480, 320
image = img.resize(size)
img.save(SCREENSHOT_FILE)
return file(SCREENSHOT_FILE).read()
...
BUT the second throws the following error on the phone:
Progr.geschl.:
HttpdMain
KERN-EXEC 3
any ideas why I get this error?[/QUOTE]
This is caused by the Python environment, when running in the context of the web-server, being slightly different than the Python environment when running in the context of a UI application. Specifically (if you are versed in the S60 C++ API), when running under the web-server, there is no CCoeEnv instance.
The implementation of some component in that screenshot code above assumes that there is a CCoeEnv instance and since there is not, it leads to a crash, which is visible as that KERN-EXEC 3.
At one point I experimented with creating a CCoeEnv instance inside the web-server, but it caused other problems, so I abandoned that approach.
Br,
Johan
Re: screenshot not possible
thx for your answer!
is there any effort to fix this or to make this feature possible in MWS? Or do I have other options to provide screenshots in MWS environment?
best regards
Askin
Re: screenshot not possible
[QUOTE=_Askin_;421208]
is there any effort to fix this or to make this feature possible in MWS?
[/quote]
As far as I know, nobody is looking into this at the moment.
Byt PyS60 is fully open sourced, so just grab the code, make the fix, submit a patch, and I'm sure it will be accepted :)
[quote]
Or do I have other options to provide screenshots in MWS environment?
[/quote]
You could make a native Apache module. In that case you have access to the complete S60 API and can do anything.
If that's not an option, then you could make a separate Python application that takes the screenshot and with which your request handler communicates.
Br,
Johan
Re: screenshot not possible
[QUOTE=_Askin_;421208]thx for your answer!
is there any effort to fix this or to make this feature possible in MWS? Or do I have other options to provide screenshots in MWS environment?
best regards
Askin[/QUOTE]
Seems like this is more of a feature request for Python?