diff --git a/README.md b/README.md index b25db53..87079dc 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,14 @@ *Npyscreen is a python widget library and application framework for programming terminal or console applications. It is built on top of ncurses, which is part of the standard library.* -Documentation -============= +# Information -Online documentation can be found at: +I just copied the repo from [npcole/npyscreen](https://github.com/npcole/npyscreen) to tweak the framework just a tiny bit. -http://npyscreen.readthedocs.org/ -Downloads -========= +# Additions -The library can be downloaded from: +## TitleDateCombo can now have an individual date format: -https://pypi.python.org/pypi/npyscreen/ - -Official Repository -=================== - -Please note that the official source code repository is at: - -https://bitbucket.org/npcole/npyscreen - -There is a github repository at: - -https://github.com/npcole/npyscreen - -for users that prefer github. If possible, though, please file bug reports at the bitbucket repository. - -The original source code archive was at: - -https://code.google.com/p/npyscreen/ - -This archive will continue to be updated for as long as code.google.com accepts updates. - - - -Strengths -========= - -This framework should be powerful enough to create everything from quick, simple programs to complex, multi-screen applications. It is designed to make doing the simple tasks very quick and to take much of the pain out of writing larger applications. - -There is a very wide variety of default widgets - everything from simple text fields to more complex tree and grid views. - -The framework is easy to extend. That said, if you have a requirement for a widget that is not currently included you can try emailing me and I'll see whether I have time to help - no promises! - -Support -======= -Please use the Issue Tracker on this page to report bugs and other problems, or to make feature requests. - -There is a mailing list at https://groups.google.com/forum/?fromgroups#!forum/npyscreen/ if you need help getting your application to run. - ----- - -Non-English Text -================ - -From version 2.0pre47 onwards all text widgets should now support utf-8 text display and entry on utf-8 capable terminals. This fixes a long-standing limitation with the library, and makes it suitable for use in projects targeting non-English-speaking users. - -As of version 2.0pre48, the library aims to be robust in dealing with unicode across all widgets. There are still a few places in the system where support for utf-8/unicode needs further work. Please file bug reports if you encounter them. - -The 2.0pre48 release should be considered an alpha-release for version 2. - -Python 3 support -================ - -From version 2.0pre31 onwards this library should work on python 3, though some of the internals have been rewritten. The public api is unchanged, and the new code continues to work on python 2. I am currently still using python 2 for development. All future versions will target both python 2 and 3, unless a feature unique to python 3 becomes vital. - -Similar Projects -================ - -You might also like to look at http://excess.org/urwid/ - -Compared to npyscreen, urwid is more like a traditional, event-driven gui library, and targets other display devices as well as curses. +```python +Form.add(npyscreen.TitleDateCombo, name="Date:", dateFmt='%Y-%m-%d') +``` \ No newline at end of file diff --git a/npyscreen/__init__.pyc b/npyscreen/__init__.pyc new file mode 100644 index 0000000..df77f42 Binary files /dev/null and b/npyscreen/__init__.pyc differ diff --git a/npyscreen/__pycache__/__init__.cpython-34.pyc b/npyscreen/__pycache__/__init__.cpython-34.pyc new file mode 100644 index 0000000..5a655ed Binary files /dev/null and b/npyscreen/__pycache__/__init__.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/apNPSApplication.cpython-34.pyc b/npyscreen/__pycache__/apNPSApplication.cpython-34.pyc new file mode 100644 index 0000000..e994f09 Binary files /dev/null and b/npyscreen/__pycache__/apNPSApplication.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/apNPSApplicationEvents.cpython-34.pyc b/npyscreen/__pycache__/apNPSApplicationEvents.cpython-34.pyc new file mode 100644 index 0000000..29efa1a Binary files /dev/null and b/npyscreen/__pycache__/apNPSApplicationEvents.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/apNPSApplicationManaged.cpython-34.pyc b/npyscreen/__pycache__/apNPSApplicationManaged.cpython-34.pyc new file mode 100644 index 0000000..cc17711 Binary files /dev/null and b/npyscreen/__pycache__/apNPSApplicationManaged.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/apOptions.cpython-34.pyc b/npyscreen/__pycache__/apOptions.cpython-34.pyc new file mode 100644 index 0000000..8b2638b Binary files /dev/null and b/npyscreen/__pycache__/apOptions.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/eveventhandler.cpython-34.pyc b/npyscreen/__pycache__/eveventhandler.cpython-34.pyc new file mode 100644 index 0000000..546cb58 Binary files /dev/null and b/npyscreen/__pycache__/eveventhandler.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmActionForm.cpython-34.pyc b/npyscreen/__pycache__/fmActionForm.cpython-34.pyc new file mode 100644 index 0000000..2f7dee4 Binary files /dev/null and b/npyscreen/__pycache__/fmActionForm.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmActionFormV2.cpython-34.pyc b/npyscreen/__pycache__/fmActionFormV2.cpython-34.pyc new file mode 100644 index 0000000..2f7c781 Binary files /dev/null and b/npyscreen/__pycache__/fmActionFormV2.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmFileSelector.cpython-34.pyc b/npyscreen/__pycache__/fmFileSelector.cpython-34.pyc new file mode 100644 index 0000000..b424672 Binary files /dev/null and b/npyscreen/__pycache__/fmFileSelector.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmForm.cpython-34.pyc b/npyscreen/__pycache__/fmForm.cpython-34.pyc new file mode 100644 index 0000000..5a948c9 Binary files /dev/null and b/npyscreen/__pycache__/fmForm.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmFormMultiPage.cpython-34.pyc b/npyscreen/__pycache__/fmFormMultiPage.cpython-34.pyc new file mode 100644 index 0000000..9ca46c0 Binary files /dev/null and b/npyscreen/__pycache__/fmFormMultiPage.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmFormMutt.cpython-34.pyc b/npyscreen/__pycache__/fmFormMutt.cpython-34.pyc new file mode 100644 index 0000000..596dbde Binary files /dev/null and b/npyscreen/__pycache__/fmFormMutt.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmFormMuttActive.cpython-34.pyc b/npyscreen/__pycache__/fmFormMuttActive.cpython-34.pyc new file mode 100644 index 0000000..f6a0757 Binary files /dev/null and b/npyscreen/__pycache__/fmFormMuttActive.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmFormWithMenus.cpython-34.pyc b/npyscreen/__pycache__/fmFormWithMenus.cpython-34.pyc new file mode 100644 index 0000000..f4844d2 Binary files /dev/null and b/npyscreen/__pycache__/fmFormWithMenus.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fmPopup.cpython-34.pyc b/npyscreen/__pycache__/fmPopup.cpython-34.pyc new file mode 100644 index 0000000..d433a0e Binary files /dev/null and b/npyscreen/__pycache__/fmPopup.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/fm_form_edit_loop.cpython-34.pyc b/npyscreen/__pycache__/fm_form_edit_loop.cpython-34.pyc new file mode 100644 index 0000000..f61131e Binary files /dev/null and b/npyscreen/__pycache__/fm_form_edit_loop.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/globals.cpython-34.pyc b/npyscreen/__pycache__/globals.cpython-34.pyc new file mode 100644 index 0000000..1204fdc Binary files /dev/null and b/npyscreen/__pycache__/globals.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/muMenu.cpython-34.pyc b/npyscreen/__pycache__/muMenu.cpython-34.pyc new file mode 100644 index 0000000..0636955 Binary files /dev/null and b/npyscreen/__pycache__/muMenu.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/muNewMenu.cpython-34.pyc b/npyscreen/__pycache__/muNewMenu.cpython-34.pyc new file mode 100644 index 0000000..b713147 Binary files /dev/null and b/npyscreen/__pycache__/muNewMenu.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npysGlobalOptions.cpython-34.pyc b/npyscreen/__pycache__/npysGlobalOptions.cpython-34.pyc new file mode 100644 index 0000000..e25a1cc Binary files /dev/null and b/npyscreen/__pycache__/npysGlobalOptions.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npysNPSFilteredData.cpython-34.pyc b/npyscreen/__pycache__/npysNPSFilteredData.cpython-34.pyc new file mode 100644 index 0000000..ed231d5 Binary files /dev/null and b/npyscreen/__pycache__/npysNPSFilteredData.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npysThemeManagers.cpython-34.pyc b/npyscreen/__pycache__/npysThemeManagers.cpython-34.pyc new file mode 100644 index 0000000..476113f Binary files /dev/null and b/npyscreen/__pycache__/npysThemeManagers.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npysThemes.cpython-34.pyc b/npyscreen/__pycache__/npysThemes.cpython-34.pyc new file mode 100644 index 0000000..d83233d Binary files /dev/null and b/npyscreen/__pycache__/npysThemes.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npysTree.cpython-34.pyc b/npyscreen/__pycache__/npysTree.cpython-34.pyc new file mode 100644 index 0000000..5f4ae1e Binary files /dev/null and b/npyscreen/__pycache__/npysTree.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npyspmfuncs.cpython-34.pyc b/npyscreen/__pycache__/npyspmfuncs.cpython-34.pyc new file mode 100644 index 0000000..f37d662 Binary files /dev/null and b/npyscreen/__pycache__/npyspmfuncs.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/npyssafewrapper.cpython-34.pyc b/npyscreen/__pycache__/npyssafewrapper.cpython-34.pyc new file mode 100644 index 0000000..255819b Binary files /dev/null and b/npyscreen/__pycache__/npyssafewrapper.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/proto_fm_screen_area.cpython-34.pyc b/npyscreen/__pycache__/proto_fm_screen_area.cpython-34.pyc new file mode 100644 index 0000000..05e594c Binary files /dev/null and b/npyscreen/__pycache__/proto_fm_screen_area.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/stdfmemail.cpython-34.pyc b/npyscreen/__pycache__/stdfmemail.cpython-34.pyc new file mode 100644 index 0000000..9498f1a Binary files /dev/null and b/npyscreen/__pycache__/stdfmemail.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/utilNotify.cpython-34.pyc b/npyscreen/__pycache__/utilNotify.cpython-34.pyc new file mode 100644 index 0000000..dceb35a Binary files /dev/null and b/npyscreen/__pycache__/utilNotify.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/util_viewhelp.cpython-34.pyc b/npyscreen/__pycache__/util_viewhelp.cpython-34.pyc new file mode 100644 index 0000000..3b7a01b Binary files /dev/null and b/npyscreen/__pycache__/util_viewhelp.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgFormControlCheckbox.cpython-34.pyc b/npyscreen/__pycache__/wgFormControlCheckbox.cpython-34.pyc new file mode 100644 index 0000000..cab33be Binary files /dev/null and b/npyscreen/__pycache__/wgFormControlCheckbox.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgNMenuDisplay.cpython-34.pyc b/npyscreen/__pycache__/wgNMenuDisplay.cpython-34.pyc new file mode 100644 index 0000000..c749943 Binary files /dev/null and b/npyscreen/__pycache__/wgNMenuDisplay.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgannotatetextbox.cpython-34.pyc b/npyscreen/__pycache__/wgannotatetextbox.cpython-34.pyc new file mode 100644 index 0000000..84ddb0f Binary files /dev/null and b/npyscreen/__pycache__/wgannotatetextbox.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgautocomplete.cpython-34.pyc b/npyscreen/__pycache__/wgautocomplete.cpython-34.pyc new file mode 100644 index 0000000..8262953 Binary files /dev/null and b/npyscreen/__pycache__/wgautocomplete.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgboxwidget.cpython-34.pyc b/npyscreen/__pycache__/wgboxwidget.cpython-34.pyc new file mode 100644 index 0000000..20a29ca Binary files /dev/null and b/npyscreen/__pycache__/wgboxwidget.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgbutton.cpython-34.pyc b/npyscreen/__pycache__/wgbutton.cpython-34.pyc new file mode 100644 index 0000000..ebd572d Binary files /dev/null and b/npyscreen/__pycache__/wgbutton.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgcheckbox.cpython-34.pyc b/npyscreen/__pycache__/wgcheckbox.cpython-34.pyc new file mode 100644 index 0000000..1ac4780 Binary files /dev/null and b/npyscreen/__pycache__/wgcheckbox.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgcombobox.cpython-34.pyc b/npyscreen/__pycache__/wgcombobox.cpython-34.pyc new file mode 100644 index 0000000..7611c48 Binary files /dev/null and b/npyscreen/__pycache__/wgcombobox.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgdatecombo.cpython-34.pyc b/npyscreen/__pycache__/wgdatecombo.cpython-34.pyc new file mode 100644 index 0000000..a531e8c Binary files /dev/null and b/npyscreen/__pycache__/wgdatecombo.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgeditmultiline.cpython-34.pyc b/npyscreen/__pycache__/wgeditmultiline.cpython-34.pyc new file mode 100644 index 0000000..493b762 Binary files /dev/null and b/npyscreen/__pycache__/wgeditmultiline.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgfilenamecombo.cpython-34.pyc b/npyscreen/__pycache__/wgfilenamecombo.cpython-34.pyc new file mode 100644 index 0000000..056f77f Binary files /dev/null and b/npyscreen/__pycache__/wgfilenamecombo.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wggrid.cpython-34.pyc b/npyscreen/__pycache__/wggrid.cpython-34.pyc new file mode 100644 index 0000000..d988d63 Binary files /dev/null and b/npyscreen/__pycache__/wggrid.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wggridcoltitles.cpython-34.pyc b/npyscreen/__pycache__/wggridcoltitles.cpython-34.pyc new file mode 100644 index 0000000..d38dd2c Binary files /dev/null and b/npyscreen/__pycache__/wggridcoltitles.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgmonthbox.cpython-34.pyc b/npyscreen/__pycache__/wgmonthbox.cpython-34.pyc new file mode 100644 index 0000000..e4ae515 Binary files /dev/null and b/npyscreen/__pycache__/wgmonthbox.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgmultiline.cpython-34.pyc b/npyscreen/__pycache__/wgmultiline.cpython-34.pyc new file mode 100644 index 0000000..0f53d47 Binary files /dev/null and b/npyscreen/__pycache__/wgmultiline.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgmultilineeditable.cpython-34.pyc b/npyscreen/__pycache__/wgmultilineeditable.cpython-34.pyc new file mode 100644 index 0000000..f63fd45 Binary files /dev/null and b/npyscreen/__pycache__/wgmultilineeditable.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgmultilinetree.cpython-34.pyc b/npyscreen/__pycache__/wgmultilinetree.cpython-34.pyc new file mode 100644 index 0000000..5dabde0 Binary files /dev/null and b/npyscreen/__pycache__/wgmultilinetree.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgmultilinetreeselectable.cpython-34.pyc b/npyscreen/__pycache__/wgmultilinetreeselectable.cpython-34.pyc new file mode 100644 index 0000000..68dbb33 Binary files /dev/null and b/npyscreen/__pycache__/wgmultilinetreeselectable.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgmultiselect.cpython-34.pyc b/npyscreen/__pycache__/wgmultiselect.cpython-34.pyc new file mode 100644 index 0000000..3c33a7e Binary files /dev/null and b/npyscreen/__pycache__/wgmultiselect.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgpassword.cpython-34.pyc b/npyscreen/__pycache__/wgpassword.cpython-34.pyc new file mode 100644 index 0000000..2ad6734 Binary files /dev/null and b/npyscreen/__pycache__/wgpassword.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgselectone.cpython-34.pyc b/npyscreen/__pycache__/wgselectone.cpython-34.pyc new file mode 100644 index 0000000..b46c25a Binary files /dev/null and b/npyscreen/__pycache__/wgselectone.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgslider.cpython-34.pyc b/npyscreen/__pycache__/wgslider.cpython-34.pyc new file mode 100644 index 0000000..940de1d Binary files /dev/null and b/npyscreen/__pycache__/wgslider.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgtextbox.cpython-34.pyc b/npyscreen/__pycache__/wgtextbox.cpython-34.pyc new file mode 100644 index 0000000..f43b1cd Binary files /dev/null and b/npyscreen/__pycache__/wgtextbox.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgtextboxunicode.cpython-34.pyc b/npyscreen/__pycache__/wgtextboxunicode.cpython-34.pyc new file mode 100644 index 0000000..43f9b77 Binary files /dev/null and b/npyscreen/__pycache__/wgtextboxunicode.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgtexttokens.cpython-34.pyc b/npyscreen/__pycache__/wgtexttokens.cpython-34.pyc new file mode 100644 index 0000000..6eb89c5 Binary files /dev/null and b/npyscreen/__pycache__/wgtexttokens.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgtitlefield.cpython-34.pyc b/npyscreen/__pycache__/wgtitlefield.cpython-34.pyc new file mode 100644 index 0000000..9862f7d Binary files /dev/null and b/npyscreen/__pycache__/wgtitlefield.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgwidget.cpython-34.pyc b/npyscreen/__pycache__/wgwidget.cpython-34.pyc new file mode 100644 index 0000000..bb86038 Binary files /dev/null and b/npyscreen/__pycache__/wgwidget.cpython-34.pyc differ diff --git a/npyscreen/__pycache__/wgwidget_proto.cpython-34.pyc b/npyscreen/__pycache__/wgwidget_proto.cpython-34.pyc new file mode 100644 index 0000000..d8a5e62 Binary files /dev/null and b/npyscreen/__pycache__/wgwidget_proto.cpython-34.pyc differ diff --git a/npyscreen/apNPSApplication.pyc b/npyscreen/apNPSApplication.pyc new file mode 100644 index 0000000..a19ea7c Binary files /dev/null and b/npyscreen/apNPSApplication.pyc differ diff --git a/npyscreen/apNPSApplicationEvents.pyc b/npyscreen/apNPSApplicationEvents.pyc new file mode 100644 index 0000000..f5ae4e3 Binary files /dev/null and b/npyscreen/apNPSApplicationEvents.pyc differ diff --git a/npyscreen/apNPSApplicationManaged.pyc b/npyscreen/apNPSApplicationManaged.pyc new file mode 100644 index 0000000..2d64c2b Binary files /dev/null and b/npyscreen/apNPSApplicationManaged.pyc differ diff --git a/npyscreen/apOptions.pyc b/npyscreen/apOptions.pyc new file mode 100644 index 0000000..86ed8d8 Binary files /dev/null and b/npyscreen/apOptions.pyc differ diff --git a/npyscreen/compatibility_code/__init__.pyc b/npyscreen/compatibility_code/__init__.pyc new file mode 100644 index 0000000..21be216 Binary files /dev/null and b/npyscreen/compatibility_code/__init__.pyc differ diff --git a/npyscreen/compatibility_code/__pycache__/__init__.cpython-34.pyc b/npyscreen/compatibility_code/__pycache__/__init__.cpython-34.pyc new file mode 100644 index 0000000..139caf9 Binary files /dev/null and b/npyscreen/compatibility_code/__pycache__/__init__.cpython-34.pyc differ diff --git a/npyscreen/compatibility_code/__pycache__/npysNPSTree.cpython-34.pyc b/npyscreen/compatibility_code/__pycache__/npysNPSTree.cpython-34.pyc new file mode 100644 index 0000000..bb95541 Binary files /dev/null and b/npyscreen/compatibility_code/__pycache__/npysNPSTree.cpython-34.pyc differ diff --git a/npyscreen/compatibility_code/__pycache__/oldtreeclasses.cpython-34.pyc b/npyscreen/compatibility_code/__pycache__/oldtreeclasses.cpython-34.pyc new file mode 100644 index 0000000..0bde419 Binary files /dev/null and b/npyscreen/compatibility_code/__pycache__/oldtreeclasses.cpython-34.pyc differ diff --git a/npyscreen/compatibility_code/npysNPSTree.pyc b/npyscreen/compatibility_code/npysNPSTree.pyc new file mode 100644 index 0000000..5fa046e Binary files /dev/null and b/npyscreen/compatibility_code/npysNPSTree.pyc differ diff --git a/npyscreen/compatibility_code/oldtreeclasses.pyc b/npyscreen/compatibility_code/oldtreeclasses.pyc new file mode 100644 index 0000000..b6c0748 Binary files /dev/null and b/npyscreen/compatibility_code/oldtreeclasses.pyc differ diff --git a/npyscreen/eveventhandler.pyc b/npyscreen/eveventhandler.pyc new file mode 100644 index 0000000..ee26193 Binary files /dev/null and b/npyscreen/eveventhandler.pyc differ diff --git a/npyscreen/fmActionForm.pyc b/npyscreen/fmActionForm.pyc new file mode 100644 index 0000000..d5cc30b Binary files /dev/null and b/npyscreen/fmActionForm.pyc differ diff --git a/npyscreen/fmActionFormV2.pyc b/npyscreen/fmActionFormV2.pyc new file mode 100644 index 0000000..605db8a Binary files /dev/null and b/npyscreen/fmActionFormV2.pyc differ diff --git a/npyscreen/fmFileSelector.pyc b/npyscreen/fmFileSelector.pyc new file mode 100644 index 0000000..9b42b02 Binary files /dev/null and b/npyscreen/fmFileSelector.pyc differ diff --git a/npyscreen/fmForm.pyc b/npyscreen/fmForm.pyc new file mode 100644 index 0000000..c7f6d74 Binary files /dev/null and b/npyscreen/fmForm.pyc differ diff --git a/npyscreen/fmFormMultiPage.py b/npyscreen/fmFormMultiPage.py index 095f4d5..44d0d52 100644 --- a/npyscreen/fmFormMultiPage.py +++ b/npyscreen/fmFormMultiPage.py @@ -5,40 +5,41 @@ from . import wgNMenuDisplay -class FormMultiPage(fmForm.FormBaseNew): +class FormBaseMultiPage(fmForm.FormBaseNew): page_info_pre_pages_display = '[ ' page_info_post_pages_display = ' ]' page_info_pages_name = 'Page' page_info_out_of = 'of' + edit_return_value = None def __init__(self, display_pages=True, pages_label_color='NORMAL', *args, **keywords): self.display_pages = display_pages self.pages_label_color = pages_label_color - super(FormMultiPage, self).__init__(*args, **keywords) + super(FormBaseMultiPage, self).__init__(*args, **keywords) self.switch_page(0) - + def draw_form(self, *args, **keywords): - super(FormMultiPage, self).draw_form(*args, **keywords) + super(FormBaseMultiPage, self).draw_form(*args, **keywords) self.display_page_number() - + def _resize(self, *args): if not self.ALLOW_RESIZE: return False if hasattr(self, 'parentApp'): self.parentApp.resize() - + self._create_screen() self.resize() for page in self._pages__: for w in page: w._resize() self.DISPLAY() - - + + def display_page_number(self): if not self.display_pages: return False - + if len(self._pages__) > 1: display_text = "%s%s %s %s %s%s" % ( self.page_info_pre_pages_display, @@ -51,45 +52,45 @@ def display_page_number(self): # for python2 if isinstance(display_text, bytes): display_text = display_text.decode('utf-8', 'replace') - + maxy,maxx = self.curses_pad.getmaxyx() - + if (maxx-5) <= len(display_text): # then give up. return False - + self.add_line( maxy - 1, maxx - len(display_text) - 2, display_text, - self.make_attributes_list(display_text, - curses.A_NORMAL | self.theme_manager.findPair(self, + self.make_attributes_list(display_text, + curses.A_NORMAL | self.theme_manager.findPair(self, self.pages_label_color)), maxx - len(display_text) - 2, ) - - + + def add_widget_intelligent(self, *args, **keywords): try: return self.add_widget(*args, **keywords) except NotEnoughSpaceForWidget: self.add_page() return self.add_widget(*args, **keywords) - - + + def _clear_all_widgets(self,): - super(FormMultiPage, self)._clear_all_widgets() + super(FormBaseMultiPage, self)._clear_all_widgets() self._pages__ = [ [],] self._active_page = 0 self.switch_page(self._active_page, display=False) - + def switch_page(self, page, display=True): self._widgets__ = self._pages__[page] self._active_page = page self.editw = 0 if display: self.display(clear=True) - + def add_page(self): self._pages__.append([]) page_number = len(self._pages__)-1 @@ -97,7 +98,7 @@ def add_page(self): self.nextrelx = self.DEFAULT_X_OFFSET self.switch_page(page_number, display=False) return page_number - + def find_next_editable(self, *args): if not self.editw == len(self._widgets__): value_changed = False @@ -106,7 +107,7 @@ def find_next_editable(self, *args): else: r = list(range(self.editw+1, len(self._widgets__))) + list(range(0, self.editw)) for n in r: - if self._widgets__[n].editable and not self._widgets__[n].hidden: + if self._widgets__[n].editable and not self._widgets__[n].hidden: self.editw = n value_changed = True break @@ -114,40 +115,96 @@ def find_next_editable(self, *args): if self._active_page < len(self._pages__)-1: self.switch_page(self._active_page + 1) self.display() - - + + def find_previous_editable(self, *args): if self.editw == 0: if self._active_page > 0: self.switch_page(self._active_page-1) - - if not self.editw == 0: + + if not self.editw == 0: # remember that xrange does not return the 'last' value, # so go to -1, not 0! (fence post error in reverse) for n in range(self.editw-1, -1, -1 ): - if self._widgets__[n].editable and not self._widgets__[n].hidden: + if self._widgets__[n].editable and not self._widgets__[n].hidden: self.editw = n break - - -class FormMultiPageAction(FormMultiPage): + + +class FormMultiPage(FormBaseMultiPage): + """A MultiPage Form with just an OK button.""" + + OK_BUTTON_TEXT = "OK" + + def on_ok(self): + pass + + def pre_edit_loop(self): + self._page_for_buttons = len(self._pages__)-1 + self.switch_page(self._page_for_buttons) + + # Add ok buttons. Will remove later + tmp_rely, tmp_relx = self.nextrely, self.nextrelx + + my, mx = self.curses_pad.getmaxyx() + ok_button_text = self.OK_BUTTON_TEXT + my -= self.__class__.OK_BUTTON_BR_OFFSET[0] + mx -= len(ok_button_text)+self.__class__.OK_BUTTON_BR_OFFSET[1] + self.ok_button = self.add_widget(self.__class__.OKBUTTON_TYPE, name=ok_button_text, rely=my, relx=mx, use_max_space=True) + self._ok_button_postion = len(self._widgets__)-1 + # End add buttons + self.nextrely, self.nextrelx = tmp_rely, tmp_relx + self.switch_page(0) + + def _during_edit_loop(self): + if self.ok_button.value: + self.editing = False + + if self.ok_button.value: + self.ok_button.value = False + self.edit_return_value = self.on_ok() + + def resize(self): + super(FormMultiPage, self).resize() + self.move_ok_button() + + def move_ok_button(self): + if hasattr(self, 'ok_button'): + my, mx = self.curses_pad.getmaxyx() + my -= self.__class__.OK_BUTTON_BR_OFFSET[0] + mx -= len(self.__class__.OK_BUTTON_TEXT)+self.__class__.OK_BUTTON_BR_OFFSET[1] + self.ok_button.relx = mx + self.ok_button.rely = my + + def post_edit_loop(self): + self.switch_page(self._page_for_buttons) + self.ok_button.destroy() + del self._widgets__[self._ok_button_postion] + del self.ok_button + self.display() + self.editing = False + + return self.edit_return_value + + +class FormMultiPageAction(FormBaseMultiPage): CANCEL_BUTTON_BR_OFFSET = (2, 12) OK_BUTTON_TEXT = "OK" CANCEL_BUTTON_TEXT = "Cancel" - + def on_ok(self): pass - + def on_cancel(self): pass - + def pre_edit_loop(self): self._page_for_buttons = len(self._pages__)-1 self.switch_page(self._page_for_buttons) - + # Add ok and cancel buttons. Will remove later tmp_rely, tmp_relx = self.nextrely, self.nextrelx - + c_button_text = self.CANCEL_BUTTON_TEXT cmy, cmx = self.curses_pad.getmaxyx() cmy -= self.__class__.CANCEL_BUTTON_BR_OFFSET[0] @@ -155,7 +212,7 @@ def pre_edit_loop(self): self.c_button = self.add_widget(self.__class__.OKBUTTON_TYPE, name=c_button_text, rely=cmy, relx=cmx, use_max_space=True) self._c_button_postion = len(self._widgets__)-1 self.c_button.update() - + my, mx = self.curses_pad.getmaxyx() ok_button_text = self.OK_BUTTON_TEXT my -= self.__class__.OK_BUTTON_BR_OFFSET[0] @@ -165,22 +222,22 @@ def pre_edit_loop(self): # End add buttons self.nextrely, self.nextrelx = tmp_rely, tmp_relx self.switch_page(0) - + def _during_edit_loop(self): if self.ok_button.value or self.c_button.value: self.editing = False - + if self.ok_button.value: self.ok_button.value = False self.edit_return_value = self.on_ok() elif self.c_button.value: self.c_button.value = False self.edit_return_value = self.on_cancel() - + def resize(self): super(FormMultiPageAction, self).resize() self.move_ok_button() - + def move_ok_button(self): if hasattr(self, 'ok_button'): my, mx = self.curses_pad.getmaxyx() @@ -195,8 +252,8 @@ def move_ok_button(self): cmx -= len(c_button_text)+self.__class__.CANCEL_BUTTON_BR_OFFSET[1] self.c_button.rely = cmy self.c_button.relx = cmx - - + + def post_edit_loop(self): self.switch_page(self._page_for_buttons) self.ok_button.destroy() @@ -208,16 +265,46 @@ def post_edit_loop(self): #self.nextrely, self.nextrelx = tmp_rely, tmp_relx self.display() self.editing = False - + return self.edit_return_value -class FormMultiPageWithMenus(fmForm.FormBaseNew): +class FormMultiPageWithMenus(FormMultiPage, wgNMenuDisplay.HasMenus): def __init__(self, *args, **keywords): super(FormMultiPageWithMenus, self).__init__(*args, **keywords) self.initialize_menus() + def display_menu_advert_at(self): + return self.lines-1, 1 + + def draw_form(self): + super(FormMultiPageWithMenus, self).draw_form() + menu_advert = " " + self.__class__.MENU_KEY + ": Menu " + if isinstance(menu_advert, bytes): + menu_advert = menu_advert.decode('utf-8', 'replace') + y, x = self.display_menu_advert_at() + self.add_line(y, x, + menu_advert, + self.make_attributes_list(menu_advert, curses.A_NORMAL), + self.columns - x - 1 + ) + class FormMultiPageActionWithMenus(FormMultiPageAction, wgNMenuDisplay.HasMenus): def __init__(self, *args, **keywords): super(FormMultiPageActionWithMenus, self).__init__(*args, **keywords) self.initialize_menus() + + def display_menu_advert_at(self): + return self.lines-1, 1 + + def draw_form(self): + super(FormMultiPageActionWithMenus, self).draw_form() + menu_advert = " " + self.__class__.MENU_KEY + ": Menu " + if isinstance(menu_advert, bytes): + menu_advert = menu_advert.decode('utf-8', 'replace') + y, x = self.display_menu_advert_at() + self.add_line(y, x, + menu_advert, + self.make_attributes_list(menu_advert, curses.A_NORMAL), + self.columns - x - 1 + ) diff --git a/npyscreen/fmFormMultiPage.pyc b/npyscreen/fmFormMultiPage.pyc new file mode 100644 index 0000000..f30bc34 Binary files /dev/null and b/npyscreen/fmFormMultiPage.pyc differ diff --git a/npyscreen/fmFormMutt.pyc b/npyscreen/fmFormMutt.pyc new file mode 100644 index 0000000..66285b3 Binary files /dev/null and b/npyscreen/fmFormMutt.pyc differ diff --git a/npyscreen/fmFormMuttActive.pyc b/npyscreen/fmFormMuttActive.pyc new file mode 100644 index 0000000..10ee0dc Binary files /dev/null and b/npyscreen/fmFormMuttActive.pyc differ diff --git a/npyscreen/fmFormWithMenus.pyc b/npyscreen/fmFormWithMenus.pyc new file mode 100644 index 0000000..48a07dd Binary files /dev/null and b/npyscreen/fmFormWithMenus.pyc differ diff --git a/npyscreen/fmPopup.pyc b/npyscreen/fmPopup.pyc new file mode 100644 index 0000000..5d467b2 Binary files /dev/null and b/npyscreen/fmPopup.pyc differ diff --git a/npyscreen/fm_form_edit_loop.pyc b/npyscreen/fm_form_edit_loop.pyc new file mode 100644 index 0000000..e05fd3f Binary files /dev/null and b/npyscreen/fm_form_edit_loop.pyc differ diff --git a/npyscreen/globals.pyc b/npyscreen/globals.pyc new file mode 100644 index 0000000..dd12b62 Binary files /dev/null and b/npyscreen/globals.pyc differ diff --git a/npyscreen/muMenu.pyc b/npyscreen/muMenu.pyc new file mode 100644 index 0000000..089d0ba Binary files /dev/null and b/npyscreen/muMenu.pyc differ diff --git a/npyscreen/muNewMenu.pyc b/npyscreen/muNewMenu.pyc new file mode 100644 index 0000000..0ed2d75 Binary files /dev/null and b/npyscreen/muNewMenu.pyc differ diff --git a/npyscreen/npysGlobalOptions.pyc b/npyscreen/npysGlobalOptions.pyc new file mode 100644 index 0000000..691b399 Binary files /dev/null and b/npyscreen/npysGlobalOptions.pyc differ diff --git a/npyscreen/npysNPSFilteredData.pyc b/npyscreen/npysNPSFilteredData.pyc new file mode 100644 index 0000000..ee243f3 Binary files /dev/null and b/npyscreen/npysNPSFilteredData.pyc differ diff --git a/npyscreen/npysThemeManagers.pyc b/npyscreen/npysThemeManagers.pyc new file mode 100644 index 0000000..57d4b66 Binary files /dev/null and b/npyscreen/npysThemeManagers.pyc differ diff --git a/npyscreen/npysThemes.pyc b/npyscreen/npysThemes.pyc new file mode 100644 index 0000000..3134a55 Binary files /dev/null and b/npyscreen/npysThemes.pyc differ diff --git a/npyscreen/npysTree.pyc b/npyscreen/npysTree.pyc new file mode 100644 index 0000000..c4edb84 Binary files /dev/null and b/npyscreen/npysTree.pyc differ diff --git a/npyscreen/npyspmfuncs.pyc b/npyscreen/npyspmfuncs.pyc new file mode 100644 index 0000000..a9ae568 Binary files /dev/null and b/npyscreen/npyspmfuncs.pyc differ diff --git a/npyscreen/npyssafewrapper.pyc b/npyscreen/npyssafewrapper.pyc new file mode 100644 index 0000000..45b7a98 Binary files /dev/null and b/npyscreen/npyssafewrapper.pyc differ diff --git a/npyscreen/proto_fm_screen_area.pyc b/npyscreen/proto_fm_screen_area.pyc new file mode 100644 index 0000000..d15375e Binary files /dev/null and b/npyscreen/proto_fm_screen_area.pyc differ diff --git a/npyscreen/stdfmemail.pyc b/npyscreen/stdfmemail.pyc new file mode 100644 index 0000000..4e0126f Binary files /dev/null and b/npyscreen/stdfmemail.pyc differ diff --git a/npyscreen/utilNotify.pyc b/npyscreen/utilNotify.pyc new file mode 100644 index 0000000..5d78f33 Binary files /dev/null and b/npyscreen/utilNotify.pyc differ diff --git a/npyscreen/util_viewhelp.pyc b/npyscreen/util_viewhelp.pyc new file mode 100644 index 0000000..51b4a2a Binary files /dev/null and b/npyscreen/util_viewhelp.pyc differ diff --git a/npyscreen/wgFormControlCheckbox.pyc b/npyscreen/wgFormControlCheckbox.pyc new file mode 100644 index 0000000..f760868 Binary files /dev/null and b/npyscreen/wgFormControlCheckbox.pyc differ diff --git a/npyscreen/wgNMenuDisplay.pyc b/npyscreen/wgNMenuDisplay.pyc new file mode 100644 index 0000000..bb896ec Binary files /dev/null and b/npyscreen/wgNMenuDisplay.pyc differ diff --git a/npyscreen/wgannotatetextbox.pyc b/npyscreen/wgannotatetextbox.pyc new file mode 100644 index 0000000..063934a Binary files /dev/null and b/npyscreen/wgannotatetextbox.pyc differ diff --git a/npyscreen/wgautocomplete.pyc b/npyscreen/wgautocomplete.pyc new file mode 100644 index 0000000..d22c9b7 Binary files /dev/null and b/npyscreen/wgautocomplete.pyc differ diff --git a/npyscreen/wgboxwidget.pyc b/npyscreen/wgboxwidget.pyc new file mode 100644 index 0000000..ea5b9e6 Binary files /dev/null and b/npyscreen/wgboxwidget.pyc differ diff --git a/npyscreen/wgbutton.pyc b/npyscreen/wgbutton.pyc new file mode 100644 index 0000000..dcd817f Binary files /dev/null and b/npyscreen/wgbutton.pyc differ diff --git a/npyscreen/wgcheckbox.pyc b/npyscreen/wgcheckbox.pyc new file mode 100644 index 0000000..e7f04f7 Binary files /dev/null and b/npyscreen/wgcheckbox.pyc differ diff --git a/npyscreen/wgcombobox.pyc b/npyscreen/wgcombobox.pyc new file mode 100644 index 0000000..3b1a857 Binary files /dev/null and b/npyscreen/wgcombobox.pyc differ diff --git a/npyscreen/wgdatecombo.py b/npyscreen/wgdatecombo.py index 5a85f97..0b15272 100755 --- a/npyscreen/wgdatecombo.py +++ b/npyscreen/wgdatecombo.py @@ -9,11 +9,12 @@ class DateCombo(textbox.Textfield, monthbox.DateEntryBase): - def __init__(self, screen, allowPastDate=True, allowTodaysDate=True, allowClear=True, **keywords): + def __init__(self, screen, allowPastDate=True, allowTodaysDate=True, allowClear=True, dateFmt='%d %B, %Y', **keywords): super(DateCombo, self).__init__(screen, **keywords) self.allow_date_in_past = allowPastDate self.allow_todays_date = allowTodaysDate self.allow_clear = allowClear + self.dateFmt = dateFmt def update(self, **keywords): keywords.update({'cursor': False}) @@ -28,7 +29,7 @@ def display_value(self, vl): try: # in python 2.4 this will raise ValueError if date is before 1900 #return self.value.strftime("%a, %d %B, %Y") - return self.value.strftime("%d %B, %Y") + return self.value.strftime(self.dateFmt) except ValueError: return self.value.isoformat() except AttributeError: diff --git a/npyscreen/wgdatecombo.pyc b/npyscreen/wgdatecombo.pyc new file mode 100644 index 0000000..94002c4 Binary files /dev/null and b/npyscreen/wgdatecombo.pyc differ diff --git a/npyscreen/wgeditmultiline.pyc b/npyscreen/wgeditmultiline.pyc new file mode 100644 index 0000000..7691f8e Binary files /dev/null and b/npyscreen/wgeditmultiline.pyc differ diff --git a/npyscreen/wgfilenamecombo.pyc b/npyscreen/wgfilenamecombo.pyc new file mode 100644 index 0000000..ead4c94 Binary files /dev/null and b/npyscreen/wgfilenamecombo.pyc differ diff --git a/npyscreen/wggrid.pyc b/npyscreen/wggrid.pyc new file mode 100644 index 0000000..41bec0e Binary files /dev/null and b/npyscreen/wggrid.pyc differ diff --git a/npyscreen/wggridcoltitles.pyc b/npyscreen/wggridcoltitles.pyc new file mode 100644 index 0000000..6a9b06c Binary files /dev/null and b/npyscreen/wggridcoltitles.pyc differ diff --git a/npyscreen/wgmonthbox.pyc b/npyscreen/wgmonthbox.pyc new file mode 100644 index 0000000..234c572 Binary files /dev/null and b/npyscreen/wgmonthbox.pyc differ diff --git a/npyscreen/wgmultiline.py b/npyscreen/wgmultiline.py index cd5990c..116417e 100755 --- a/npyscreen/wgmultiline.py +++ b/npyscreen/wgmultiline.py @@ -259,12 +259,15 @@ def update(self, clear=True): # This will prevent the program crashing if the user has changed values, and the cursor # is now on the bottom line. - if (self._my_widgets[self.cursor_line-self.start_display_at].task in (MORE_LABEL, "PRINTLINELASTOFSCREEN")): - if self.slow_scroll: - self.start_display_at += 1 - else: - self.start_display_at = self.cursor_line - self.update(clear=clear) + try: + if (self._my_widgets[self.cursor_line-self.start_display_at].task in (MORE_LABEL, "PRINTLINELASTOFSCREEN")): + if self.slow_scroll: + self.start_display_at += 1 + else: + self.start_display_at = self.cursor_line + self.update(clear=clear) + except Exception: + pass def _before_print_lines(self): # Provide a function for the Tree classes to override. diff --git a/npyscreen/wgmultiline.pyc b/npyscreen/wgmultiline.pyc new file mode 100644 index 0000000..4fc02d0 Binary files /dev/null and b/npyscreen/wgmultiline.pyc differ diff --git a/npyscreen/wgmultilineeditable.pyc b/npyscreen/wgmultilineeditable.pyc new file mode 100644 index 0000000..c0a3692 Binary files /dev/null and b/npyscreen/wgmultilineeditable.pyc differ diff --git a/npyscreen/wgmultilinetree.pyc b/npyscreen/wgmultilinetree.pyc new file mode 100644 index 0000000..2afa143 Binary files /dev/null and b/npyscreen/wgmultilinetree.pyc differ diff --git a/npyscreen/wgmultilinetreeselectable.pyc b/npyscreen/wgmultilinetreeselectable.pyc new file mode 100644 index 0000000..864ea5a Binary files /dev/null and b/npyscreen/wgmultilinetreeselectable.pyc differ diff --git a/npyscreen/wgmultiselect.pyc b/npyscreen/wgmultiselect.pyc new file mode 100644 index 0000000..8ab8d11 Binary files /dev/null and b/npyscreen/wgmultiselect.pyc differ diff --git a/npyscreen/wgpassword.pyc b/npyscreen/wgpassword.pyc new file mode 100644 index 0000000..a75b075 Binary files /dev/null and b/npyscreen/wgpassword.pyc differ diff --git a/npyscreen/wgselectone.pyc b/npyscreen/wgselectone.pyc new file mode 100644 index 0000000..07ab24a Binary files /dev/null and b/npyscreen/wgselectone.pyc differ diff --git a/npyscreen/wgslider.pyc b/npyscreen/wgslider.pyc new file mode 100644 index 0000000..0904e4c Binary files /dev/null and b/npyscreen/wgslider.pyc differ diff --git a/npyscreen/wgtextbox.pyc b/npyscreen/wgtextbox.pyc new file mode 100644 index 0000000..16141df Binary files /dev/null and b/npyscreen/wgtextbox.pyc differ diff --git a/npyscreen/wgtextboxunicode.pyc b/npyscreen/wgtextboxunicode.pyc new file mode 100644 index 0000000..0353e74 Binary files /dev/null and b/npyscreen/wgtextboxunicode.pyc differ diff --git a/npyscreen/wgtexttokens.pyc b/npyscreen/wgtexttokens.pyc new file mode 100644 index 0000000..87ef9a1 Binary files /dev/null and b/npyscreen/wgtexttokens.pyc differ diff --git a/npyscreen/wgtitlefield.pyc b/npyscreen/wgtitlefield.pyc new file mode 100644 index 0000000..ab730de Binary files /dev/null and b/npyscreen/wgtitlefield.pyc differ diff --git a/npyscreen/wgwidget.pyc b/npyscreen/wgwidget.pyc new file mode 100644 index 0000000..09156ad Binary files /dev/null and b/npyscreen/wgwidget.pyc differ diff --git a/npyscreen/wgwidget_proto.pyc b/npyscreen/wgwidget_proto.pyc new file mode 100644 index 0000000..75b58fd Binary files /dev/null and b/npyscreen/wgwidget_proto.pyc differ