Nano command doesn't work in shell

Hi, i’m on the ‘Command Line Python Scripting’ mission and i was asked in the Instructions to create new file called and modify another one called and then run python

i’m tried to use nano to modify 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

Hi @EslamSayed:

Welcome back! Quite likely nano is not installed in DQ’s shell. You can use echo and the redirection operator > to accomplish this instead.

Edit: 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:

def print_message():
    print("Hello from another file!") seems to already been populated for you.

So just run python 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