pls help
BeerNutts
i tried like what u say before
but i want to know
i should see :
Copying from test.txt to new_file.txt
The input file is 21 bytes long
Does the output file exist? False
Ready, hit RETURN to continue, CTRL-C to abort.
Alright, all done.
when i try to write anything in Ex1.txt i see : error not defined
i try to write anything but as string i put " "
and i see that !! :'( :
like the pic nothing happened
Ty all for helping me
Ok so in the code that you posted you are now trying to set three variables from only two:
script, from_file, to_file = argv[0], argv[1]
is not correct. You had it correct with your original post.
You need to call the script like:
python BoB.txt from.txt to.txt
(Side note, your python files should end in .py and not .txt!).
Notice there there are not one, but two arguments there. argv[1] contains the first argument you passed ("from.txt"), and argv[2] contains the second ("to.txt").
The course I listed is both free an interactive. If you are having these sorts of problems then perhaps the course I mentioned will help you and then you can go back to learning python the hard way after that.
I also recommend a better Python IDE like I mentioned. The one I listed has code completion but more importantly PEP syntax checking to help you find errors/unused variables in your programs and a built in debugger.
[attachment=23208:yourcode_in_pycharm.jpg]