Question: (Closed) path to a directory as argparse argument
0
gravatar for ahmedakhokhar
2.6 years ago by
ahmedakhokhar110
Belgium
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 • 1.6k views
ADD COMMENTlink written 2.6 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.

Cheers!

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

Help
Access

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