Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe6ad5c

Browse files
committed
Support raw_input
1 parent796a5a8 commitbe6ad5c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

‎Changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Changelog
1111
* Fixed run-time error when output non-ascii in multibyte locale;
1212
* Move initialization into ftplugin as it is python specific;
1313
* Pyrex (Cython) files support;
14+
* Support `raw_input` in run python code;
1415

1516
## 2012-09-07 0.6.10
1617
--------------------

‎autoload/pymode/run.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ fun! pymode#run#Run(line1, line2) "{{{
1515
callpymode#WideMessage("Code running.")
1616
try
1717
callsetqflist([])
18-
pyexecfile(vim.eval('expand("%s:p")'))
18+
pyexecfile(vim.eval('expand("%s:p")'), {'raw_input': lambdas:
19+
vim.eval('input("{0}")'.format(s)),'input':vim.eval('input("{0}")'.format(s))})
1920
py out, err= sys.stdout.getvalue().strip(), sys.stderr.getvalue()
2021
py sys.stdout, sys.stderr= stdout_, stderr_
2122

‎pylibs/pymode/lint.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
from .queueimportadd_task
77

88

9-
locale.setlocale(locale.LC_CTYPE,"C")
9+
try:
10+
locale.setlocale(locale.LC_CTYPE,"C")
11+
exceptAttributeError:
12+
pass
1013

1114

1215
defcheck_file():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp