Skip to content

By using PyHTML,you can create responsive HTML outputs for Python with program self created windows that are generated by wxPython.It works like Selenium and could render any CSS/JS library like Bootstrap,JQuery,...

Notifications You must be signed in to change notification settings

PouriaDiesel/PyHTML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyHTML

NaabNuts

Build Status

By using PyHTML,you can create responsive HTML outputs for Python with program self created windows that are generated by wxPython.It works like Selenium and could render any CSS/JS library like Bootstrap,JQuery,...

Installation

Use the package manager pip to install PyHTMLrequirments from freezed reqiurement file:

pip install -r /path/to/requirements.txt

Now you only need to import functions.py to your project.

Example

Add your HTML code to templates folder for example index.html.As you see,we have some parameters like {{title}},{{text}} that passed from python to HTML.
You can pass any DJango Tags/Parameters/Blocks to your design.After adding templates,you could render your HTML from any Python/Django program in a wxPython windows by using:

from functions import *

if __name__ == '__main__':
    django_init()
    render_a_html('index.html', 'RenderedIndex.html', {"title": "HelloWorld!", "text": "Hello World!"})

before using render_a_html,you need to call django_init() from functions.py.You can customize your own project settings by edditing this function.
This function is needed to call before using wxPython. First argument of render_a_html is your raw HTML template and second is rendered output name and third is context of variables that will pass from Python to HTML.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

NaabNuts

About

By using PyHTML,you can create responsive HTML outputs for Python with program self created windows that are generated by wxPython.It works like Selenium and could render any CSS/JS library like Bootstrap,JQuery,...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published