Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pythonista itself - how was it developed?
-
Just discovered this, and am blown away! I had no idea Apple would allow such a beast.
How was this developed? How did you get the entire Python interpreter and libraries to run under Swift/Objective C and on the Apple ARM? How did you implement the graphics (for plotting, etc.)? How did you implement the integration of the libraries like gui?
Thanks for a tremendous accomplishment! I can’t wait for the updates - especially adding smooth integration with the iPad Pro 12.9 inch/2018 with a soft keyboard (which currently has some issues in landscape mode).
-
the python interpreter runs in C, so anywhere you can run C you can run python
-
Well-written C code is easy to compile for different architectures, so the fact that iOS devices use ARM instead of x86 processors isn't a huge problem. CPython supports some ARM platforms natively (mainly Linux), so all of the processor-specific problems have been solved already. iOS is also Unix-based and relatively similar to macOS, so even though CPython doesn't support it natively, the differences aren't huge. There are also projects like https://github.com/pybee/Python-Apple-support, which is basically a set of patches to get CPython working properly on iOS/watchOS/tvOS. (I believe this isn't exactly what Pythonista uses - @omz probably has his own custom version of CPython.)
Interacting between C and Objective-C is also very easy, since Objective-C is more or less an extension of C. This works both ways - you can easily call C code from an Objective-C method, but you can also write regular C functions in Objective-C code, which can use Objective-C features in their implementation, but can also be called from regular C code.
Many of Pythonista's custom modules (like
ui
,scene
,console
, etc.) are implemented using CPython's C API and extension interface, which allows writing Python modules in C. So in principle it's not too difficult to expose iOS Objective-C APIs to Python - you only need to write an extension module in C with some Python-exposed functions that call the appropriate Objective-C APIs. Things get more difficult of course when you also want to provide a nice Pythonic API on the Python side - that requires defining Python classes in C code and converting between Objective-C, C and Python data types where appropriate.Another way to interact between Python and C is using the
ctypes
module, which is part of the standard library, and lets you use (almost) any C API from Python at runtime, without having to compile custom C code. This can also be used to interact with Objective-C APIs, because Objective-C's runtime support library provides a pure C interface to most parts of the Objective-C language. Based on this, @omz wrote Pythonista'sobjc_util
library, which lets you interact with Objective-C APIs and objects from Python. Some of Pythonista's modules (likeeditor
) are implemented in pure Python usingobjc_util
instead of using CPython's extension API. (There is also a non-Pythonista-specific library called Rubicon, which has similar goals and features as Pythonista'sobjc_util
.) -
Thanks, that was really informative.
-
The Selenium IDE (Integrated Development Environment) is an open source record-and-playback tool for generating Selenium scripts, which is integrated with the Firefox web browser as an extension. It is a renovated web-based UI test automation tool that extracts any kind of locator from the web page. The locators can be either attribute-based or structure-based and include ID, name, link, XPath, CBS, and DOM. The IDE has the entire Selenium Core, which allows the users to record, playback, edit, and debug tests manually in a browser. The user actions in the web page can be recorded and exported in any of the most popular languages, such as Java, C++, Ruby, and Python.
Selenium Builder is an alternative open source tool for the Selenium IDE to record and playback web applications. It is an extension of the Firefox web browser, which is similar to the Selenium IDE, but, it has some unique features that the Selenium IDE doesn’t support. Selenium Builder is a standard tool from Sauce labs that runs tests on Sauce Cloud from the Selenium Bader interface itself.
Selenium IDE’s record and playback abilities
Selenium IDE functions
Selenium IDE Data Driven tests
Selenium IDE JavaScript functions
Selenium Builder record and playback
Selenium Builder Data Driven tests
Selenium Builder on cloud
Selenium is a suite of tools to automate web app testing across many platforms. Selenium…runs in many browsers and operating systems. Can be controlled by many programming languages and testing frameworks.
Create by developers at ThoughtWorks
Released publically as an Open Source project on OpenQA
Selenium is a test tool for web applications.
Selenium tests run directly in a browser.
Runs on Windows, Linux, and Macintosh.
Runs in Internet Explorer, Mozilla and Firefox.
Enables Browser Compatibility Testing.
Enables System Functional Testing.