# pydialog
Python bindings for [osdialog](https://github.com/AndrewBelt/osdialog). Supports MacOS (Cocoa), Windows (WinAPI), Linux (GTK2+3 or Zenity). Available on [pypi](https://pypi.org/project/py-osdialog/0.1.1/).
```
python3 -m pip install py-osdialog
```
## API
Message Box:
```python
# pydialog.alert(message, &optional level, button_types)
if pydialog.alert("Yes or no?", pydialog.WARNING, pydialog.YES_NO):
print("YES!")
else:
print("No")
```
Input Prompt:
```python
# pydialog.prompt(message, &optional default_text, level)
```
Open File Dialog:
```python
# pydialog.open_file(start_path, &optional default_text, filter)
```
Open Directory Dialog:
```python
# pydialog.open_dir(start_path, &optional default_text, filter)
```
Save File Dialog:
```python
# pydialog.save_file(start_path, &optional default_text, filter)
```
Color Picker Dialog:
```python
# pydialog.color_picker(initial_r, initial_g, initial_b, initial_a)
```
Prompt Levels:
```python
pydialog.INFO
pydialog.WARNING
pydialog.CRITICAL
```
Prompt Buttons:
```python
pydialog.OK
pydialog.OK_CANCEL
pydialog.YES_NO
```
## LICENSE
```
The MIT License (MIT)
Copyright (c) 2024 George Watson
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
Raw data
{
"_id": null,
"home_page": "https://github.com/takeiteasy/pydialog",
"name": "py-osdialog",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "George Watson",
"author_email": "George Watson <gigolo@hotmail.co.uk>",
"download_url": "https://files.pythonhosted.org/packages/8a/4a/1c821cb5804c173661bd7404113304c641b3212fca8c258de139f328152f/py_osdialog-0.1.1.tar.gz",
"platform": null,
"description": "# pydialog\n\nPython bindings for [osdialog](https://github.com/AndrewBelt/osdialog). Supports MacOS (Cocoa), Windows (WinAPI), Linux (GTK2+3 or Zenity). Available on [pypi](https://pypi.org/project/py-osdialog/0.1.1/).\n\n```\npython3 -m pip install py-osdialog\n```\n\n## API\n\nMessage Box:\n```python\n# pydialog.alert(message, &optional level, button_types)\n\nif pydialog.alert(\"Yes or no?\", pydialog.WARNING, pydialog.YES_NO):\n print(\"YES!\")\nelse:\n print(\"No\")\n```\n\nInput Prompt:\n```python\n# pydialog.prompt(message, &optional default_text, level)\n```\n\nOpen File Dialog:\n```python\n# pydialog.open_file(start_path, &optional default_text, filter)\n```\n\nOpen Directory Dialog:\n```python\n# pydialog.open_dir(start_path, &optional default_text, filter)\n```\n\nSave File Dialog:\n```python\n# pydialog.save_file(start_path, &optional default_text, filter)\n```\n\nColor Picker Dialog:\n```python\n# pydialog.color_picker(initial_r, initial_g, initial_b, initial_a)\n```\n\nPrompt Levels:\n```python\npydialog.INFO\npydialog.WARNING\npydialog.CRITICAL\n```\n\nPrompt Buttons:\n```python\npydialog.OK\npydialog.OK_CANCEL\npydialog.YES_NO\n```\n\n## LICENSE\n```\nThe MIT License (MIT)\n\nCopyright (c) 2024 George Watson\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software,\nand to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Python bindings for osdialog (https://www.github.com/AndrewBelt/osdialog)",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/takeiteasy/pydialog",
"Issues": "https://github.com/takeiteasy/pydialog/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2d0be18b97e3ea3d4137b28d3e4c9a1826c4afa658f7458f167bbc50148988bc",
"md5": "4ea57e36697503fbbf21dfc2dcd5c437",
"sha256": "92121f7fdef8a76fe01e91b936d674368027ebe74d84b08c1dc0e41306186984"
},
"downloads": -1,
"filename": "py_osdialog-0.1.1-cp312-cp312-macosx_14_0_arm64.whl",
"has_sig": false,
"md5_digest": "4ea57e36697503fbbf21dfc2dcd5c437",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.8",
"size": 10313,
"upload_time": "2024-08-18T10:56:17",
"upload_time_iso_8601": "2024-08-18T10:56:17.242634Z",
"url": "https://files.pythonhosted.org/packages/2d/0b/e18b97e3ea3d4137b28d3e4c9a1826c4afa658f7458f167bbc50148988bc/py_osdialog-0.1.1-cp312-cp312-macosx_14_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8a4a1c821cb5804c173661bd7404113304c641b3212fca8c258de139f328152f",
"md5": "e157890ef7199116989bec4558a9988a",
"sha256": "acc7543ac00d3f1991772a1f8862f19551cc705fa87848684d1b064f8570513c"
},
"downloads": -1,
"filename": "py_osdialog-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "e157890ef7199116989bec4558a9988a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6639,
"upload_time": "2024-08-18T10:56:18",
"upload_time_iso_8601": "2024-08-18T10:56:18.566997Z",
"url": "https://files.pythonhosted.org/packages/8a/4a/1c821cb5804c173661bd7404113304c641b3212fca8c258de139f328152f/py_osdialog-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-18 10:56:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "takeiteasy",
"github_project": "pydialog",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "py-osdialog"
}