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

python cvs interface?

Hi everyone, this should be a quick question. I'm writing some scripts
to take some file and move them into a CVS repository, but it's pretty
slow, because it uses system calls to execute the CVS commands. Has
anyone ever made a python to CVS interface library that I could use?
I've been trying to google around for something, but predictably I get
a zillion sourceforge repository hits, and it isn't really helping. So
anyway, if anyone knows of a useful module, I'd love to hear about it.
Thanks!

----- Corey

Jul 18 '05 #1
6 2086
Corey,
WinCvs can use python for macros, you might want to look at their code:

http://cvs.sourceforge.net/viewcvs.p...honLib/cvsgui/

You may also want to look at viewcvs, which is written in Python.

-jjr

Jul 18 '05 #2
Thanks, that looks promising, I'll take a look!

Jul 18 '05 #3
Ah, unfortunately it looks like this program uses something called
gcvs, a gtk cvs interface written in C++, for interfacing to low level
cvs routines. So it probably won't work for me. Oh well. Anyone else
have any suggestions?

Jul 18 '05 #4
>From what it sounds like in your program, you're making an os.system()
function call and waiting for the results, correct? Have you tried
using the plethora of parallel system tools so that you don't have to
wait for a command to finish? Using a function that will launch your
command in a new thread/process may speed up your program considerably.

Simply launch a task, return control to the user, and refresh after it
returns successfully.

Jul 18 '05 #5
Unless your CVS repository is local, the overhead associated with
calling CVS through system calls isn't going to be a bottleneck, and
even then it shouldn't be too bad. Using one of the varieties of
os.popen instead of os.system will make it easier to avoid disk I/O
when communicating with the cvs process.

It will be a hassle to parse CVS' copious output, though. I've wished
for a Python CVS module before, too. Good luck =)

IMHO, the best way to write a Python CVS module would actually be to
call it from the command line; writing a Python C Extension for this
purpose would introduce a negligible performance increase at the cost
of all sorts of other hassles, like expecting users to have the CVS
headers/libraries and a C compiler and possibly something like SWIG or
Boost Python as well.

Jul 18 '05 #6
Well, the problem is that there are a lot of files to deal with, and
I'm already running in parallel, but it still takes a while. Also, cvs
uses some sort of locking scheme to stop parallel updates, so it's hard
to parallelize effectively.

Jul 18 '05 #7

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

Similar topics

3
by: Mikko Ohtamaa | last post by:
Hi, I am quite new to Python, PythonCom and COM generally. As a former Java programmer, I have found Python's flexible ability to access native Win32, especially COM, very comfortable. However,...
0
by: Phillip J. Eby | last post by:
PEP: 333 Title: Python Web Server Gateway Interface v1.0 Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/08/27 17:30:09 $ Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To:...
75
by: Xah Lee | last post by:
http://python.org/doc/2.4.1/lib/module-re.html http://python.org/doc/2.4.1/lib/node114.html --------- QUOTE The module defines several functions, constants, and an exception. Some of the...
8
by: Joakim Persson | last post by:
Hello all. I am involved in a project where we have a desire to improve our software testing tools, and I'm in charge of looking for solutions regarding the logging of our software (originating...
47
by: Kenneth McDonald | last post by:
Is there any emerging consensus on the "best" UI for toolkit. Tk never quite made it but from what I can see, both qt and wxWin are both doing fairly well in general. I'm already aware of the...
112
by: mystilleef | last post by:
Hello, What is the Pythonic way of implementing getters and setters. I've heard people say the use of accessors is not Pythonic. But why? And what is the alternative? I refrain from using them...
31
by: stéphane bard | last post by:
hello, my boss ask me to prefer windev to python. I have to argue - python work on multiple platform (linux, mac, windows) A good point but it didn't interest him. Because we want to choose a...
7
by: p_shakil | last post by:
Hi, I would like to know the interface concept in Python.How the Interface is defined and implemented in Python?. How to access the interface fromn Client? Thanks PSB
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: 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...
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.