Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create examples/ root dir - simplify and unify examples to work on all platforms #207

Closed
cztomczak opened this issue Feb 11, 2016 · 3 comments
Labels
Milestone

Comments

@cztomczak
Copy link
Owner

cztomczak commented Feb 11, 2016

Old examples

Currently examples are spread across multiple directories like "windows/binaries_32bit/" (and 64bit/), "linux/binaries_32bit" (and 64bit/), "mac/binaries_64bit". There are also three wx.chromectrl examples in "wx-subpackage/examples/".

All these examples should go to a single "examples/" directory in repo root directory with subdirectories named after each third party library:

  • wxPython/
  • PyQt/
  • PySide/
  • PyGTK/
  • PyWin32/
  • Kivy/
  • Panda3D/

New examples

  • hello_world.py - most basic example in a few lines of code that doesn't depend on 3rd party GUI framework
  • tutorial.py - along with Tutorial.md yet to be created

Examples for python packagers

This directory should also include examples of integrating python packagers:

  • py2exe/
  • pyinstaller/
  • cx_Freeze/
  • py2app/

Other examples

Other examples would include breakpad crash reporting and chromedriver tool for automated testing:

  • breakpad/
  • ChromeDriver/

wxPython/ directory

Each examples directory should contain a "README.md" stating what example exactly does and which platforms it supports. The goal is for every example to run on all platforms, but this will take time. Example contents of the "wxPython/" examples directory:

  • README.md
  • simple.py - a simple example that loads google.com
  • advanced.py - current advanced example wxpython.py
  • advanced.html
  • advanced_handlers.py - client handlers from the advanced.py example should go to a separate file, try to seperate ClientHandler class into multiple classes (DisplayHandler, KeyboardHandler, etc)
  • advanced_jsbindings.py - the JavascriptExternal class with bindings
  • webresponse.py - reading and modifying web response wxpython-response.py
  • chromectrl1.py - wx.chromectrl sample1.py
  • chromectrl2.py - .. sample2.py
  • chromectrl3.py - .. sample3.py

See also

Helper functions

Make helper functions (GetApplicationPath and ExceptHook) part of the cefpython package and import them using import * from cefpython.helpers. In GetApplicationPath get rid of this line elif "__file__" in globals(): and only detect directory using getcwd() and "frozen".

@cztomczak cztomczak added this to the Chrome 47 milestone Feb 11, 2016
@cztomczak cztomczak changed the title Create examples/ directory in repo's root directory Create examples/ root dir - simplify and unify examples to work on all platforms Jun 30, 2016
cztomczak added a commit that referenced this issue Sep 17, 2016
Add hello_world.py example (#207).

Update to Cython 0.24.1 (#110).

Test with Python 3.4.5 (#121) on Ubuntu 14.04 by running
the hello_world.py example. No other examples were run,
so there still may be bugs.

Expose new funcs in the cefpython module: CreateBrowser, ExceptHook,
GetAppPath.

Add --fast flag to compile.py for faster build time of the cefpython
module. Don't use it for building official binary distrib.
@cztomczak
Copy link
Owner Author

Added hello_world.py example in commit 6f0d9b3.

@cztomczak
Copy link
Owner Author

Added qt.py example (#234).
Added tkinter_.py example (#255).
Added gtk3.py example (#253).
Added gtk2.py example (#261).
To do: Refactory kivy_.py example and move it to examples/ (#285).

@cztomczak cztomczak modified the milestones: v53, Chrome 50+ Feb 24, 2017
@cztomczak
Copy link
Owner Author

With the new v56 release for Mac this task is finally complete. Examples from the examples/ directory do run on all platforms.

@cztomczak cztomczak modified the milestones: v56, v53 Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant