Giter Site home page Giter Site logo

pymsgbox's People

Contributors

asweigart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymsgbox's Issues

Cannot install PyMsgBox

When I try to install it, I get RecursionError.
End of output:
RecursionError: maximum recursion depth exceeded
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyMsgBox
Failed to build PyMsgBox
ERROR: Could not build wheels for PyMsgBox, which is required to install pyproject.toml-based projects

Fatal crash using pymsgbox.confirm or pyautogui.confirm

Using either:

import pyautogui
pyautogui.confirm()

or

import pymsgbox
pymsgbox.confirm()

runs once, second time always crashes.

Tcl_AsyncDelete: async handler deleted by the wrong thread
Fatal Python error: Aborted

Current thread 0x00007fa8fdc2f640 (most recent call first):
  File "/usr/lib/python3.9/site-packages/pymsgbox/__init__.py", line 252 in __put_buttons_in_buttonframe
  File "/usr/lib/python3.9/site-packages/pymsgbox/__init__.py", line 226 in _buttonbox
  File "/usr/lib/python3.9/site-packages/pymsgbox/__init__.py", line 130 in _confirmTkinter
  File "<string>", line 3 in <module>
  File "/usr/lib/python3.9/site-packages/autokey/service.py", line 485 in execute
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007fa92096f640 (most recent call first):
  File "/usr/lib/python3.9/site-packages/pyinotify.py", line 1194 in check_events
  File "/usr/lib/python3.9/site-packages/autokey/monitor.py", line 125 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007fa922200640 (most recent call first):
  File "/usr/lib/python3.9/threading.py", line 312 in wait
  File "/usr/lib/python3.9/queue.py", line 171 in get
  File "/usr/lib/python3.9/site-packages/autokey/iomediator/_iomediator.py", line 103 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007fa922a01640 (most recent call first):
  File "/usr/lib/python3.9/site-packages/Xlib/protocol/display.py", line 561 in send_and_recv
  File "/usr/lib/python3.9/site-packages/Xlib/protocol/rq.py", line 1381 in reply
  File "/usr/lib/python3.9/site-packages/Xlib/protocol/rq.py", line 1369 in __init__
  File "/usr/lib/python3.9/site-packages/Xlib/ext/record.py", line 220 in __init__
  File "/usr/lib/python3.9/site-packages/Xlib/ext/record.py", line 239 in enable_context
  File "/usr/lib/python3.9/site-packages/autokey/interface.py", line 1206 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007fa923242640 (most recent call first):
  File "/usr/lib/python3.9/site-packages/autokey/interface.py", line 906 in __flushEvents
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007fa923a43640 (most recent call first):
  File "/usr/lib/python3.9/threading.py", line 312 in wait
  File "/usr/lib/python3.9/queue.py", line 171 in get
  File "/usr/lib/python3.9/site-packages/autokey/interface.py", line 235 in __eventLoop
  File "/usr/lib/python3.9/threading.py", line 892 in run
  File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap

Thread 0x00007fa92daca740 (most recent call first):
  File "/usr/lib/python3.9/site-packages/gi/overrides/Gtk.py", line 1649 in main
  File "/usr/lib/python3.9/site-packages/autokey/gtkapp.py", line 273 in main
  File "/usr/lib/python3.9/site-packages/autokey/gtkui/__main__.py", line 9 in main
  File "/usr/bin/autokey-gtk", line 33 in <module>
Aborted (core dumped)

Also trying to use any of the options in either one also raises an error.

pip install PyMsgBox error

Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting PyMsgBox
Using cached https://mirrors.aliyun.com/pypi/packages/7d/ff/4c6f31a4f08979f12a663f2aeb6c8b765d3bd592e66eaaac445f547bb875/PyMsgBox-1.0.9.tar.gz (18 kB)
ERROR: Error expected str, bytes or os.PathLike object, not NoneType while executing command 'e:\code\fh_projects\venv\scripts\python.exe' 'e:\code\fh_projects\venv\lib\site-packages\pip' install --ignore-installed --no-user --pre
fix 'C:\Users\Administrator\AppData\Local\Temp\pip-build-env-s4gdldp2\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host https --trusted-host '' --tru
sted-host trusted-host --trusted-host '此参数是为了避免麻烦,否则使用的时候可能会提示不受信任' -- 'setuptools>=40.8.0' wheel
Installing build dependencies ... error
ERROR: Exception:
Traceback (most recent call last):
File "e:\code\fh_projects\venv\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'pymsgbox'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\cli\base_command.py", line 189, in _main
status = self.run(options, args)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\cli\req_command.py", line 178, in wrapper
return func(self, options, args)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\commands\install.py", line 316, in run
requirement_set = resolver.resolve(
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 121, in resolve
self._result = resolver.resolve(
File "e:\code\fh_projects\venv\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 453, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "e:\code\fh_projects\venv\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 318, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "e:\code\fh_projects\venv\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _merge_into_criterion
crit = Criterion.from_requirement(self._p, requirement, parent)
File "e:\code\fh_projects\venv\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 82, in from_requirement
if not cands:
File "e:\code\fh_projects\venv\lib\site-packages\pip_vendor\resolvelib\structs.py", line 124, in bool
return bool(self._sequence)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in bool
return any(self)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 38, in _iter_built
candidate = func()
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 167, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 300, in init
super().init(
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 144, in init
self.dist = self._prepare()
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 226, in _prepare
dist = self._prepare_distribution()
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 311, in _prepare_distribution
return self._factory.preparer.prepare_linked_requirement(
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\operations\prepare.py", line 457, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\operations\prepare.py", line 500, in _prepare_linked_requirement
dist = _get_prepared_distribution(
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\operations\prepare.py", line 66, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\distributions\sdist.py", line 39, in prepare_distribution_metadata
self._setup_isolation(finder)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\distributions\sdist.py", line 67, in _setup_isolation
self.req.build_env.install_requirements(
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\build_env.py", line 206, in install_requirements
call_subprocess(args, spinner=spinner)
File "e:\code\fh_projects\venv\lib\site-packages\pip_internal\utils\subprocess.py", line 181, in call_subprocess
proc = subprocess.Popen(
File "D:\Dev\python\Python39\lib\subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\Dev\python\Python39\lib\subprocess.py", line 1356, in _execute_child
args = list2cmdline(args)
File "D:\Dev\python\Python39\lib\subprocess.py", line 561, in list2cmdline
for arg in map(os.fsdecode, seq):
File "D:\Dev\python\Python39\lib\os.py", line 822, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType

Configure Location of message box?

It would be nice to be able to have the message box at a particular place on the screen. In my case, I want it in the upper left corner.

Right / left arrow keys don't work

If you do

pymsgbox.prompt('What did you do today?')

and then write some text, and then do Right arrow or Left arrow, the the focus moves to the buttons (OK, Cancel), instead of allowing the cursor (caret) to move in the textbox.

How to make that arrow keys let the user move inside the textbox?

License mismatch

Hello,
it seems that your repo have an issue with the license. You are clearly using the 3-Clause BSD License text (LICENSE.txt) and even GitHub recognise it as it, but in setup.py you are stating usage of GPL-3.0.

documentation not correct?

the documentation says defaultValue, but it is just default.

from pymsgbox import alert, confirm, prompt, password

alert(text='', title='', button='OK')
a = confirm(text='', title='', buttons=['OK', 'Cancel'])
print(a)
a = prompt(text='', title='', default='')
print(a)
a = password(text='', title='', default='', mask='*')
print(a)

'Tkinter is required for pymsgbox'

I am using python 3+ and get the following exception:

File "/usr/local/lib/python3.5/dist-packages/pymsgbox/__init__.py", line 105, in confirm                                                                                                    
    assert TKINTER_IMPORT_SUCCEEDED, 'Tkinter is required for pymsgbox'                                                                                                                       
AssertionError: Tkinter is required for pymsgbox

when I try to use a native pymsgbox confirm dialog on debian with vs code:

import pymsgbox.native as pymsgbox 
resp = pymsgbox.confirm(text='Do you want to overwrite the current projects?',
  title='Overwrite projects?', buttons=['Yes', 'Cancel'])

I thought Tkinter is built in python 3+?
Can anyone help me please?

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.