How to link python program to Corona?

I am building a simple mobile app by Corona and now I want to use this app to send some data to a program which is written in python. 

I don’t have any python experiences. any idea?

Can the python program be converted to LUA? (Corona)

Is the Python code running on a web server somewhere?

No, it is running on my local PC.  Basically, I am using my Corona mobile app to capture images and then send to the python program for processing, and after that python program sends the result back to the Corona app.  I have no idea how to implement this…  

Much appreciated for any advice

Do you expect more people than yourself to use this app? The reason I ask, is while it’s possible to set your local PC to communicate with your app, your local PC isn’t going to be accessible to someone not on your local network (as long as you wan’t your PC to be secure!).

Your mobile app will need to transfer the file to the computer and eventually make that file available for download. Look at the network.* API calls to see examples on how to request files from a webserver and upload files. Though I should point out, uploading is more tricky because there many different ways to upload it and all is 100% dependent on how the server does it (in your case the server could be your local PC).

What type of processing are you wanting your python scripts to do? It might be possible to find some plugins, or use native extensions to provide that processing as part of the actual app rather than server processing it.

Rob

Hi Rob. 

First of all, thank you so much for your informative instructions.

Yeah, I expect my corona app to be available to the public. 

The reason why I am using python is that I wanted that python program to capture human faces of photos that sent from Corona app. (Or, maybe not that necessary as my app users could use their mobile camera rather than an actual camera to take photos?) I have no idea if Corona has plugins to do this job…

Okay, leave this for a while.

The most important task I have to implement is that I need my corona app to be an interface that sends images to Matlab and after some form of processing done by Matlab, the result turns back to the app. (In this case, if I don’t use my local computer to be servers, what can be the server?  Matlab? Or some sort of web server that connects my app with Matlab?) 

I am very struggling because being a programmer beginner, I don’t have many ideas. I knew Java might be better for my expectation, but I still picked up Corona because I learned basic mobile development by Corona. 

Thank you so much for telling me any idea or advice. 

I don’t know much about matlab. How would you see using a mobile device to talk to matlab? I could see if you had some data collection device and you needed to transfer that data. Depending on the hardware, Corona might not be the best choice for that. But if Matlab has support for web based API’s what you can reach with network.request() then it can work for you.

Rob

Can the python program be converted to LUA? (Corona)

Is the Python code running on a web server somewhere?

No, it is running on my local PC.  Basically, I am using my Corona mobile app to capture images and then send to the python program for processing, and after that python program sends the result back to the Corona app.  I have no idea how to implement this…  

Much appreciated for any advice

Do you expect more people than yourself to use this app? The reason I ask, is while it’s possible to set your local PC to communicate with your app, your local PC isn’t going to be accessible to someone not on your local network (as long as you wan’t your PC to be secure!).

Your mobile app will need to transfer the file to the computer and eventually make that file available for download. Look at the network.* API calls to see examples on how to request files from a webserver and upload files. Though I should point out, uploading is more tricky because there many different ways to upload it and all is 100% dependent on how the server does it (in your case the server could be your local PC).

What type of processing are you wanting your python scripts to do? It might be possible to find some plugins, or use native extensions to provide that processing as part of the actual app rather than server processing it.

Rob

Hi Rob. 

First of all, thank you so much for your informative instructions.

Yeah, I expect my corona app to be available to the public. 

The reason why I am using python is that I wanted that python program to capture human faces of photos that sent from Corona app. (Or, maybe not that necessary as my app users could use their mobile camera rather than an actual camera to take photos?) I have no idea if Corona has plugins to do this job…

Okay, leave this for a while.

The most important task I have to implement is that I need my corona app to be an interface that sends images to Matlab and after some form of processing done by Matlab, the result turns back to the app. (In this case, if I don’t use my local computer to be servers, what can be the server?  Matlab? Or some sort of web server that connects my app with Matlab?) 

I am very struggling because being a programmer beginner, I don’t have many ideas. I knew Java might be better for my expectation, but I still picked up Corona because I learned basic mobile development by Corona. 

Thank you so much for telling me any idea or advice. 

I don’t know much about matlab. How would you see using a mobile device to talk to matlab? I could see if you had some data collection device and you needed to transfer that data. Depending on the hardware, Corona might not be the best choice for that. But if Matlab has support for web based API’s what you can reach with network.request() then it can work for you.

Rob