delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.8 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE |
X-Spam-Check-By: | sourceware.org |
X-Yahoo-SMTP: | ycweUreswBCK.d0cygTP5tXwHncbOU7YVeVfIxOQoyRMI2IuIKLmUqE- |
Message-ID: | <4F15B83E.8040408@molconn.com> |
Date: | Tue, 17 Jan 2012 13:04:46 -0500 |
From: | LMH <lmh_users-groups AT molconn DOT com> |
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: | argparse for cygwin python |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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 -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |