Newby question on running Python on a Windows XP Pro machine

Posted on 2006-05-02
Last Modified: 2008-03-03
Okay…first off forgive me for my ignorance before I ask this question as I’m brand new to Python. I’m attempting to run a program called cvs2svn on a windows XP Pro box. The instructions call for installing Python, which I did, and then running a MAKE INSTALL on the downloaded file. Well, I realize that being a Windows machine I’m not going to use MAKE INSTALL, maybe that’s where I’ve gone wrong. Instead, I used the “python install” option, which ran without error. Well, the compile ran and inside the scripts directory exists the name of a file that I think I now need: cvs2svn. However, it does not appear with a file extension, especially not an executable file extension, as I thought it should.  There does exist a new file that has the same time stamp as when I ran the initial “python install” option. The extension to this file is a .pyc file…..I have no idea how to run this file.

Any help would be greatly appreciated……


Question by:Barton_Day
    LVL 15

    Expert Comment

    I suspect cvs2svn is a script written for UNIX.  Does it look like a text file?  If it's short enough, can you post its contents?
    LVL 14

    Accepted Solution

    Python files don't need to have a .py extension, so if it's a Python file you can just run it using:

    c:\path\to\python c:\path\to\cvs2svn

    It probably is a Python script (because cvs2svn is written in Python) but efn is right - if you post the file (or the first few tens of lines if it's big) and that will tell us what kind of file it is.

    Author Comment

    Well the c:\path\to\python c:\path\to\cvs2svn syntax worked like a charm...and I really dont know why cause I could have sworn I tried that yesterday....but nonetheless it is working now. However, after the cvs2svn file executes, at the very end I get an error when the program tries to envoke Sort -T. I've downloaded then win32 based programs that *nix machines use, i.e. env, sort, etc. and my PATH is set to C:\usr\local\ dont know why Sort -T fails to run. But, that is beyond the scope of this particular forum.....however....if anyone has a quick suggestion here is the error I recieve after cvs2svn runs the first part of its code:

    Checking for blocked exclusions...
    Checking for forced tags with commits...
    Checking for tag/branch mismatches...
    Re-synchronizing CVS revision timestamps...
    ----- pass 3 -----
    Sorting CVS revisions...
    Input file specified two times.

    Command failed: "sort -T . .\cvs2svn-data.c-revs > .\cvs2svn-data.s-revs"


    Thansk again for all of your help....


    LVL 14

    Expert Comment

    What happens if you type "sort" at the Command Prompt - does it actually find your sort program?  ("sort --help" or "sort --version" might be useful as well.)

    Does the input file "cvs2svn-data.c-revs" exist?

    "Input file specified two times." sounds like an error - maybe Google can help?

    Author Comment

    Got this running as well.....ran the python program directly out of my GNU sort.exe directory.....



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Plenty of writing has gone on the web trying to compare Python with other competitive programming languages and vice versa. However, not much has been put into a wholistic perspective. This article should help you decide whether to adopt Python as a…
    The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
    Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
    Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now