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]

Re: argparse for cygwin python


Thanks for the information, but that didn't fix the issue.

There is now a file argparse.py located in,

cygwin\lib\python2.6\site-packages\stgit

but I am still getting the error. Do I need to restart or something, or do I need to do something else to let python know where the package is?

LMH



marco atzeri wrote:
On 1/17/2012 7:04 PM, LMH wrote:
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 dif.py --filename [filename] --columns [0,1,2,...]
#COLUMNS START FROM INDEX 0

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?


LMH

use the package search http://cygwin.com/packages/

the outcome
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=argparse

suggests that it is a module of stgit

Regards
Marco

--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple



-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


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