Question: (Closed) path to a directory as argparse argument
gravatar for ahmedakhokhar
4.3 years ago by
ahmedakhokhar110 wrote:

Problem: I want a write a directory's path as user's input in an add.argument of ArgumentParser().

So far: I have written this

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('path', option = os.chdir(input("paste here path to biog.txt file:")), help= 'paste path to biog.txt file')

Any idea's, what would be the ideal solution of this problem ?

python argparse • 2.7k views
ADD COMMENTlink written 4.3 years ago by ahmedakhokhar110

Hello ahmedakhokhar!

We believe that this post does not fit the main topic of this site.

This is not a bioinformatics question. Please ask stackoverflow.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.


ADD REPLYlink written 4.3 years ago by _r_am30k
Please log in to add an answer.
The thread is closed. No new answers may be added.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1048 users visited in the last hour