Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Playground question
#1
Hello,

I'm trying to teach myself Python so I bought two books so far: "Python Crash Course" and "Python Playground". I'm working through "Python Crash Course" but I also just started "Python Playground" and I've run into a problem with the latter.

I was able to get the iTunes playlist to install Matplotlib and proceed without an error by running

pip install numpy==1.19.3

at the command line. Now I'd like to know how to use argument parser code in order to enter the locations of the iTunes playlist files "maya.xml" and "rating.xml".

I've tried running it from the command line with the following:

$ python playlist.py --common test-data/maya.xml test-data/rating.xml

but it can't find the two xml files.

In the code, I think the correct line to enter the file names is:

group.add_argument('--common', nargs='*', dest='plFiles', required=False)

but when I substitute the file names for "--common" or "*", the program still can't find the files.

Can someone please tell me how to do this?
Reply


Messages In This Thread
Python Playground question - by Euler314 - Jan-03-2021, 07:38 PM
RE: Python Playground question - by Larz60+ - Jan-03-2021, 10:53 PM
RE: Python Playground question - by Euler314 - Jan-04-2021, 02:51 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020