This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

argparse for cygwin python

I have a python script and when I try to run it I get an error for no such module, "ImportError: No module named argparse".

The only package I have installed is numpy, but I don't see argparse mentioned in any of the other packages. I have run this script on this computer before, but I don't remember if I have re-installed cygwin since then. I thought that argparse was in the python standard library, so I don't know if the issues is a dependency or something else.

Here are the first few lines of the script,

#! /usr/bin/python2.6

import argparse
from time import time

#USAGE: python --filename [filename] --columns [0,1,2,...]

parser = argparse.ArgumentParser(description='..............')
parser.add_argument('--filename', dest='filename', help='input file name')
parser.add_argument('--columns', dest='col', help='columns to be neglected')
args = parser.parse_args()
col = [int(i) for i in args.col.split(',')]

Any suggestions?


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]