X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: ycweUreswBCK.d0cygTP5tXwHncbOU7YVeVfIxOQoyRMI2IuIKLmUqE- Message-ID: <4F15BE45.5050408@molconn.com> Date: Tue, 17 Jan 2012 13:30:29 -0500 From: LMH User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: argparse for cygwin python References: <4F15B83E DOT 8040408 AT molconn DOT com> <4F15B986 DOT 2070604 AT gmail DOT com> In-Reply-To: <4F15B986.2070604@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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