Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers
Accepted Solution

WebWorks and Python

Hi,

 

I have a web site that I want to convert to a BB10 app. My web backend uses C# to spawn a process and execute a Python script. I was hoping I can do something similar with WebWorks.

 

I found this link that talks about BB10 and Python: https://github.com/blackberry/Python but I don't know what to make o f it.

 

If possible, sample code would be much appreciated!

 

Thanks,

George

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: WebWorks and Python

Hi George,

 

Where is your Python script running - on the server, or on the client (in your app)?  If on the server, then you are good to go with consuming it from your app.  As long as the script generates valid HTML, JavaScript or CSS content.

 

However if you wish to run a python script on the device, I'm not aware of how that is possible from a WebWorks application. 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Re: WebWorks and Python

Hi,

 

It would run from my app (on the device). Is this a WebWorks limitation? Is it possible using native Cascades?

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: WebWorks and Python

No, not WebWorks specifically.

 

https://developer.blackberry.com/native/documentation/bb10/qt_platform_choice.html

 

An app written using language binding

If you are porting an app that uses either Qt Quick or Qt widgets with third-party language binding (Python, Java, Ruby, Perl, and so on) you will be required to rewrite these parts of your code. If this is the case, it's recommended that you rewrite your application using Cascades. As a best practice, write your UI code using QML, and your business logic using C++ for portability.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 20
Registered: ‎06-21-2013
My Device: Z10 STL100-3
My Carrier: Personal

Re: WebWorks and Python

Well actually you could package your python script with tart and invoke it.

 

~namida de as.hita ga mienai~