473,387 Members | 1,925 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,387 software developers and data experts.

Opening an editor for interactive use

Hi all,

(I am sure there is a recipe somewhere, but I can't find it.) How does
one open an editor while in the middle of an interactive program, let
the user do some editing and closing, and then capture the text that
was edited? I am reminded of subversion or CVS when they open an
$EDITOR session for the check-in log entry.

I tried os.popen, but it fired off vim in the background--not useful.
Then I tried os.system, but that only returns the return code (126 in
my case) after you close the editor. Perhaps I need to write to a file
and read it--shouldn't there be a cleaner way?

Thanks
W

Jun 16 '06 #1
1 1002
"Webb" wrote:
(I am sure there is a recipe somewhere, but I can't find it.) How does
one open an editor while in the middle of an interactive program, let
the user do some editing and closing, and then capture the text that
was edited? I am reminded of subversion or CVS when they open an
$EDITOR session for the check-in log entry.

I tried os.popen, but it fired off vim in the background--not useful.
Then I tried os.system, but that only returns the return code (126 in
my case) after you close the editor. Perhaps I need to write to a file
and read it


that's exactly how it's done in subversion and cvs, of course.

</F>

Jun 16 '06 #2

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

Similar topics

36
by: ChinStrap | last post by:
When not using the interactive prompt, what are you using? I keep hearing everyone say Emacs, but I can't understand it at all. I keep trying to learn and understand why so many seem to like it...
0
by: Hsun-Cheng Hu ?J?V?? | last post by:
Dear all, I had written a Web CSS Editor (Javascript based). It is easy and free. You may download a copy and build it with your programs. Here is its descriptiong: Web CSS Editor is a...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
8
by: Steve Mills | last post by:
I opened an mdb file with a text editor, deleted random chunks of data from it and then saved it. Now it won't open. Fortunately, it wasn't one of mine - it was from the accounts department, but...
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
8
by: chaossliver | last post by:
I'm a brand new scripter, and as such, I have very poor experience in coding. I have been looking around at some open source codes written in pure C and was wondering if anyone knew of a program...
2
by: Bruce Johnson | last post by:
Two issues. Using IE 6 (all patches) over XP Pro (all patches) along with mse7.exe (Microsoft script editor) from Office 2003. I can get HTML pages etc into the editor with no problems. I want to...
0
by: David_Parkes | last post by:
A global leader in the digital media space based in the Dallas/Fort Worth Metroplex – is currently re-architecting its core product line and is doing so on the back of Microsoft .NET 3.0/3.5 and...
19
by: Eric S. Johansson | last post by:
Almar Klein wrote: there's nothing like self interest to drive one's initiative. :-) 14 years with speech recognition and counting. I'm so looking to my 15th anniversary of being injured next...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.