Forums

Can't load files in bash. Total newbie.

Hey, so I'm just teaching my self the basics right now.

Anyway I'm trying to complete an exercise on argv.

My problem is I can't get bash to load my uploaded dropbox file. (Seeing as typing ex14.py username into python does not work).

What I typed into bash is: python ex14.py username

Bash returned an error about not being able to find the file. Which I checked an is uploaded to my files here on pythonanywhere.

Is there a work around for this, or did I do something wrong? Thanks for any information you provide.

When you launch bash, you're usually in your home directory. (Go ahead, type

pwd

at the prompt and see what it says.)

So, you either have to point bash to where your file is, or you'll have to navigate to the folder.

To do the first, you'll change your code to

python Dropbox/ex14.py username

That tells bash where your .py file is.

To do the second, you'll first run the cd command to change directory. So you'd type

cd Dropbox
python ex14.py username

Did that work for you?

Thanks mattspence -- you took the words right out of my mouth :-)

First off thanks, it worked. Secondly I feel really stupid.

All part of the learning process, I guess, but still I should have known better.

Ps. Love the website. Now I can learn while on my phone.

Don't feel stupid. It's a learning process. You'll be a bash&python-master soon.

+1 to that!