GithubHelp home page GithubHelp logo

deditor's Introduction

deditor

Python property exposing and editing utility

Disrupting the industry

Traditionally, configuration files had to be saved somewhere on the hard drive and if you wanted to change a value, you'd have to manually open the text file, and make sure your program re-read the configuration file every time.

With deditor, you simply expose the variables you want as configuration variables and a graphical user interface is generated to let you intuitively tweak values and use them in your program without having to leave Python.

How it works

  1. You write your Python code as you normally would.
  2. Add DPROPERTY() above the variables you want exposed.
    • Optionally you can add specifiers, like its range: DPROPERTY(range=[0, 10])
  3. Run make_html.py to generate an HTML file for editing the values.

Example

Here is an example of DPROPERTYs in action:

from DEditor import DPROPERTY

# This will get exposed to the editor.
DPROPERTY()
attr1 = 0

# This will not be exposed.
attr2 = 0

Interface options

There are two available interface options: Tkinter or HTML.

  • Tkinter - included in Python's standard library and can be used to dynamically get the edited values back into your Python script using the included get_values() function.
  • HTML - works outside of Python only requiring a web browser to display. The values must be saved in a middle-ground before your Python script can use them again.

Features

These are the features currently supported or coming soon.

  • Class variables
  • Nested class variables
  • Default value expressions
  • Renaming variables
  • UI clamping and validation (Tkinter)
  • UI clamping and validation (HTML)
  • Tooltips
  • Lists of values

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.