prompt-toolkit / ptpython

A better Python REPL
BSD 3-Clause "New" or "Revised" License
5.23k stars 281 forks source link

does not work on windows #34

Open bialix opened 9 years ago

bialix commented 9 years ago

installed with pip as recommended on your page. Trying to run:

D:>ptpython In [1]:

[F4] Emacs 1/1 [F6] Paste mode (off) [F2] Sidebar - CPython 3.3.5 T raceback (most recent call last): File "C:\Python\3.3-64\Scripts\ptpython-script.py", line 9, in load_entry_point('ptpython==0.5', 'console_scripts', 'ptpython')() File "C:\Python\3.3-64\lib\site-packages\ptpython\entry_points\run_ptpython.py", line 62, in run no_colors=no_colors, startup_paths=startup_paths) File "C:\Python\3.3-64\lib\site-packages\ptpython\repl.py", line 208, in embed repl.start_repl(startup_paths=startup_paths) File "C:\Python\3.3-64\lib\site-packages\ptpython\repl.py", line 51, in start_repl on_exit=AbortAction.RAISE_EXCEPTION) File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\interface.py", line 290, in read_input next(g) File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\interface.py", line 344, in _read_input self._redraw() File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\interface.py", line 230, in _redraw self.renderer.render(self, self.layout, self.style) File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\renderer.py", line 324, in render style=style, grayed=(cli.is_aborting or cli.is_exiting), File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\renderer.py", line 164, in output_screen_diff current_pos = move_cursor(screen.cursor_position) File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\renderer.py", line 50, in move_cursor output.cursor_up(current_y - new.y) File "C:\Python\3.3-64\lib\site-packages\prompt_toolkit\terminal\win32_output.py", line 166, in cursor_up sr = self._screen_buffer_info().dwCursorPosition AttributeError: 'NoneType' object has no attribute 'dwCursorPosition'

D:>pip list docopt (0.6.2) ipython (3.1.0) jedi (0.8.1) pip (6.1.1) prompt-toolkit (0.31) ptpython (0.5) Pygments (2.0.2) PyMySQL (0.6.1) pyreadline (2.0) redis (2.9.1) setuptools (14.3) six (1.9.0) SQLAlchemy (0.9.3) tornado (3.3.dev1) wcwidth (0.1.4) wheel (0.22.0)

bialix commented 9 years ago

Trying to run ptipython - it seems to start ok, but it does not want to react on Enter.

D:>ptipython Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:35:05) [MSC v.1600 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information.

IPython 3.1.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.

In [1]: import sys In [1]: help

[F4] Emacs 1/1 [F6] Paste mode (off) [F2] Sidebar - CPython 3.3.5

jonathanslenders commented 9 years ago

It's the same bug as this: https://github.com/jonathanslenders/python-prompt-toolkit/issues/86 I'm not sure what's happening (I didn't had the time yet to dive into this bug.)

sametmax commented 9 years ago

+1 (windows 7 64 with Python 2 or 3). It also completly crashes if I enter a non ascii char but I don't know if it's windows specific.

jonathanslenders commented 9 years ago

@bialix @sametmax : Does this still happen with the latest version? If so, can you please tell me the Windows version + Python version (also 64 or 32bit Python?).

lebe-dev commented 8 years ago

Windows 10 x64 Python 2.7.10 x86