473,383 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

A problem from a Vim user

When I use raw_input('Please type something.\n') in the python 2.4
command line windows, it doesn't have any problem. However, when I run
the same command in vim 7 as :py raw_input('Please type something.\n'),
there is an EOFError: EOF when reading a line. Is there a way to use
that command within vim without raising errors?

Thanks a lot.

Aug 7 '06 #1
4 1948
manuhack wrote:
When I use raw_input('Please type something.\n') in the python 2.4
command line windows, it doesn't have any problem. However, when I run
the same command in vim 7 as :py raw_input('Please type something.\n'),
there is an EOFError: EOF when reading a line. Is there a way to use
that command within vim without raising errors?

Thanks a lot.
You should read :help python-input

On my version (Vim 7.0.17), it says that input() and raw_input() are
not yet supported.

So, submit a patch to the vim folks!

-Luis
Aug 7 '06 #2

manuhack wrote:
However, when I run
the same command in vim 7 as :py raw_input('Please type something.\n'),
there is an EOFError: EOF when reading a line. Is there a way to use
that command within vim without raising errors?
I thought you might get more help here than in comp.editors ;)

Same thing happens if you put it in rawinput.py file and use :pyfile.

rd

Aug 8 '06 #3
On Mon, Aug 07, 2006 at 10:59:01AM -0700, manuhack wrote:
When I use raw_input('Please type something.\n') in the python 2.4
command line windows, it doesn't have any problem. However, when I run
the same command in vim 7 as :py raw_input('Please type something.\n'),
there is an EOFError: EOF when reading a line. Is there a way to use
that command within vim without raising errors?
You could call vim functions indirectly:
:py << EOF
import vim
vim.command('let vim_str=input("Please type something.\n")')
py_str = vim.eval('vim_str')
# now you can do something with your 'py_str'
....
EOF

HTH
Aug 27 '06 #4
On Sun, Aug 27, 2006 at 07:10:06AM -0500, Dasn wrote:
vim.command('let vim_str=input("Please type something.\n")')
py_str = vim.eval('vim_str')
py_str = vim.eval('input("Please type something.\n")')

may be better.

Aug 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: |-|erc | last post by:
Hi! Small challenge for you. The index.php uses this file and calls layout(). Take a look at www.chatty.net this file draws the chat login box on the right. I traced the CHAT button it submits...
4
by: Justin Lebar | last post by:
Sorry about the huge post, but I think this is the amount of information necessary for someone to help me with a good answer. I'm writing a statistical analysis program in ASP.net and MSSQL7 that...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
9
by: antonyliu2002 | last post by:
I want to create session objects for all web controls in a page. Right now, I am doing it in a dumb way like this (for example): Session("Session1") = ctrl1.Text Session("Session2") =...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
1
by: objectmodelol | last post by:
I just switched from MS SQL 2000/2005 to MySql. What's wrong with this stored procedure: DELIMITER $$ DROP PROCEDURE IF EXISTS `listing`.`SaveUser` $$ CREATE DEFINER=`root`@`localhost`...
4
by: =?Utf-8?B?SmFu?= | last post by:
I have a .NET 2.0 application divided in two assemblies; the exe and a dll. The application generates a plugin-dll which is then loaded in a separate AppDomain (along with a second instance of my...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
11
beacon
by: beacon | last post by:
Hi everybody, I created a database that links one table from an ODBC data source. I saved my password and UID to the data source so neither myself nor anyone else would have to login each time...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.