Hi, i’m on the ‘Command Line Python Scripting’ mission and i was asked in the Instructions to create new file called
utils.py and modify another one called
script.py and then run python
i’m tried to use nano to modify
script.py file but nothing appears , I thought that the problem was in the mission that I am on so i tried to use nano in another DQ shell mission but the same problem
Welcome back! Quite likely
nano is not installed in DQ’s shell. You can use
echo and the redirection operator
> to accomplish this instead.
nano seemed to work fine for me.
thank you for your replay actually it opens with me but when i try to modify file the code appears at the top, and I cannot modify it
@EslamSayed: I don’t quite get what you mean… It would be helpful if you could include the steps you took.
which set of codes are you referring to?
Following this steps should work:
nano editor opens. Copy & paste the code below:
print("Hello from another file!")
script.py seems to already been populated for you.
So just run
python script.py and you should get the output below.
Well, when I try to modify the code in the file , the code appears at the top of the screen, as it appears in the screen shot, and the cursor appears below it, when am trying to modifying the code, it does not respond with me and the cursor does not move as well
And sometimes the code appears as a screenshot below and I cannot modify also
Hi @EslamSayed : now I see where you are stuck. Seems like
nano is in read only mode in this case. Simply press
Ctrl-O to remove the old code and then you may start editing.
@EslamSayed did my reply help you?
In the first, I would like to thank you very much for your response and following up.
Secondly, when i tried to use ctrl + O, a message appeared that interfered with the text at the bottom of the screen, and then the shell stopped responding
I tried to record the screen and I hope that helps solve the problem