All Projects → sciter-sdk → Pysciter

sciter-sdk / Pysciter

Licence: mit
Python bindings for Sciter

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pysciter

Sshfs Win Manager
A GUI for SSHFS-Win (https://github.com/billziss-gh/sshfs-win)
Stars: ✭ 239 (-8.43%)
Mutual labels:  gui
Mogollar
A MongoDB UI built with Electron
Stars: ✭ 251 (-3.83%)
Mutual labels:  gui
Asammdf
Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
Stars: ✭ 255 (-2.3%)
Mutual labels:  gui
Remi
Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Stars: ✭ 2,943 (+1027.59%)
Mutual labels:  gui
Darklaf
Darklaf - A themeable swing Look and Feel based on Darcula-Laf
Stars: ✭ 249 (-4.6%)
Mutual labels:  gui
P5 Manager
A p5js template builder & sketches manager. Built for p5js enthusiasts.
Stars: ✭ 251 (-3.83%)
Mutual labels:  gui
Fltk Rs
Rust bindings for the FLTK GUI library.
Stars: ✭ 241 (-7.66%)
Mutual labels:  gui
Termkit
Terminal Kit - Console UI toolkit for Swift applications
Stars: ✭ 256 (-1.92%)
Mutual labels:  gui
Cassowary Rs
A Rust implementation of the Cassowary constraint solving algorithm
Stars: ✭ 247 (-5.36%)
Mutual labels:  gui
Play With Algorithm Visualization
Codes of my MOOC Course <Play with Algorithm Visualization>. Updated contents and more demos or practices are also included. 我在慕课网上的课程《看得见的算法》Java示例代码。课程的更多更新内容及辅助练习也将逐步添加进这个代码仓。
Stars: ✭ 255 (-2.3%)
Mutual labels:  gui
Lagrange
A Beautiful Gemini Client
Stars: ✭ 238 (-8.81%)
Mutual labels:  gui
X11docker
Run GUI applications and desktops in docker and podman containers. Focus on security.
Stars: ✭ 3,797 (+1354.79%)
Mutual labels:  gui
Boltdbweb
A web based GUI for BoltDB files
Stars: ✭ 251 (-3.83%)
Mutual labels:  gui
Java Javafx Swing Projects Desktop Application Gui Software
All projects are based on ☕ Java(Swing.All projects are database(MySql) connected📂 and compatible to run is🖥️ Desktop(with .exe)🖱️.All projects have a Graphical User Interface(GUI)👨🏻‍💻 that user can communicate and understand the application easily).
Stars: ✭ 245 (-6.13%)
Mutual labels:  gui
Cura
3D printer / slicing GUI built on top of the Uranium framework
Stars: ✭ 3,401 (+1203.07%)
Mutual labels:  gui
Mojs Player
GUI player to control your animations
Stars: ✭ 243 (-6.9%)
Mutual labels:  gui
Pywinauto
Windows GUI Automation with Python (based on text properties)
Stars: ✭ 3,175 (+1116.48%)
Mutual labels:  gui
15 Minute Apps
15 minute (small) desktop apps built with PyQt
Stars: ✭ 3,086 (+1082.38%)
Mutual labels:  gui
Litedbviewer
LiteDB Viewer is a simple tool that let you open a LiteDB database file and shows its contents; think of it as a GUI for LiteDBShell
Stars: ✭ 258 (-1.15%)
Mutual labels:  gui
Yew
Yew is a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly.
Stars: ✭ 18,243 (+6889.66%)
Mutual labels:  gui

Python bindings for Sciter

Build status Build Status PyPI License Join the forums at https://sciter.com/forums

Check this page for other language bindings (Delphi / D / Go / .NET / Python / Rust).


Introduction

Sciter is an embeddable multiplatform HTML/CSS/script engine with GPU accelerated rendering designed to render modern desktop application UI. It's a compact, single dll/dylib/so file (4-8 mb) engine without any additional dependencies.

Screenshots

Check the screenshot gallery of the desktop UI examples.

Description

Physically Sciter is a mono library which contains:

  • HTML and CSS rendering engine based on the H-SMILE core used in HTMLayout,
  • JavaScript alike Scripting engine – core of TIScript which by itself is based on c-smile engine,
  • Persistent Database (a.k.a. JSON DB) based on excellent DB products of Konstantin Knizhnik.
  • Graphics module that uses native graphics primitives provided by supported platforms: Direct2D on Windows 7 and above, GDI+ on Windows XP, CoreGraphics on MacOS, Cairo on Linux/GTK. Yet there is an option to use built-in Skia/OpenGL backend on each platform.
  • Network communication module, it relies on platform HTTP client primitives and/or Libcurl.

Internally it contains the following modules:

  • CSS – CSS parser and the collection of parsed CSS rules, etc.
  • HTML DOM – HTML parser and DOM tree implementation.
  • layout managers – collection of various layout managers – text layout, default block layout, flex layouts. Support of positioned floating elements is also here. This module does the layout calculations heavy lifting. This module is also responsible for the rendering of layouts.
  • input behaviors – a collection of built-in behaviors – code behind "active" DOM elements: <input>, <select>, <textarea>, etc.
  • script module – source-to-bytecode compiler and virtual machine (VM) with compacting garbage collector (GC). This module also contains runtime implementation of standard classes and objects: Array, Object, Function and others.
  • script DOM – runtime classes that expose DOM and DOM view (a.k.a. window) to the script.
  • graphics abstraction layer – abstract graphics implementation that isolates the modules mentioned above from the particular platform details:
    • Direct2D/DirectWrite graphics backend (Windows);
    • GDI+ graphics backend (Windows);
    • CoreGraphics backend (Mac OS X);
    • Cairo backend (GTK on all Linux platforms);
    • Skia/OpenGL backend (all platforms)
  • core primitives – set of common primitives: string, arrays, hash maps and so on.

Sciter supports all standard elements defined in HTML5 specification with some additions. CSS is extended to better support the Desktop UI development, e.g. flow and flex units, vertical and horizontal alignment, OS theming.

Sciter SDK comes with a demo "browser" with a builtin DOM inspector, script debugger and documentation viewer:

Sciter tools

Check https://sciter.com website and its documentation resources for engine principles, architecture and more.

Getting started:

  1. Download the Sciter SDK and extract it somewhere.
  2. Add the corresponding target platform binaries to PATH (bin, bin.osx or bin.gtk) and install Sciter shared library to your LIBRARY_PATH.
  3. Install pysciter: python3 setup.py install or pip install pysciter.
  4. Run the minimal pysciter sample: python3 examples/minimal.py. Also you can run script from zip archive directly: python3 ./archive.zip :)

Brief look:

Minimal sciter app is extremely small:

import sciter

if __name__ == '__main__':
    frame = sciter.Window(ismain=True, uni_theme=True)
    frame.load_file("minimal.htm")
    frame.expand()
    frame.run_app()

It looks similar to this:

Minimal pysciter sample

Interoperability

In respect of tiscript functions calling:

answer = self.call_function('script_function', "hello, python!", "and", ["other", 3, "arguments"])

Calling python from script can be implemented as following:

def GetNativeApi(): # called from sciter.EventHandler.on_script_call
  def on_add(a, b):
      return a + b

  def on_sub(a, b):
      raise Exception("sub(%d,%d) raised exception" % (a, b))

  api = { 'add': on_add,  # plain function
          'sub': on_sub,  # raise exception at script
          'mul': lambda a,b: a * b }   # lambdas supported too
  return api

So, we can access our api now:

// `view` represents window where script is runnung.
// `stdout` stream is a standard output stream (shell or debugger console, for example)

var api = view.GetNativeApi();

// returned `api` object looks like {add: function(a,b) { return a + b; }};
stdout.println("2 + 3 = " + api.add(2, 3));

Check pysciter/examples folder for more complex usage.

What is supported right now:

  • [x] sciter::window which brings together window creation, host and event handlers.
  • [x] sciter::host extensible implementation with transparent script calls from python code.
  • [x] sciter::event_handler with basic event handling (attached, document_complete, on_script_call), additional handlers will come.
  • [x] sciter::dom for HTML DOM access and manipulation methods.
  • [x] sciter::value pythonic wrapper with sciter::script_error and sciter::native_function support.
  • [ ] sciter::behavior_factory - global factory for native behaviors.
  • [ ] sciter::graphics - platform independent graphics native interface (can be used in native behaviors).
  • [ ] sciter::request - resource request object, used for custom resource downloading and handling.
  • [ ] sciter::video - custom video rendering.
  • [ ] sciter::archive - Sciter's compressed archive produced by sdk/bin/packfolder.
  • [ ] sciter::msg - backend-independent input event processing.
  • [ ] sciter::om - Sciter Object Model, extending Sciter by native code.
  • [ ] NSE - native Sciter extensions.

Platforms:

  • [x] Windows
  • [x] OSX
  • [x] Linux
  • [x] Raspberry Pi

Python 3.x.

License

Bindings library licensed under MIT license. Sciter Engine has the own license terms and end used license agreement for SDK usage.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].