Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Team

I am struggling to use this sign in linux? I have this file sudo nano hello.py but now there this logic that uses @sign. I cant seem to use Ctrl+...???

What I have tried:

sudo nano hello.py
from flask import Flask
app = Flask(__name__)

@app.route('/')// struggling this line to use it cant seem to copy, please assist
def hello_world():
    return 'Hello, World!'
Posted
Updated 11-Aug-20 4:08am
Comments
Richard MacCutchan 11-Aug-20 8:52am    
Your question is not clear. Do you get a compiler error, program crash, what?
gcogco10 11-Aug-20 9:26am    
no but i want to use it inside the file ...@app.route, i can only type app.route. any ideas?
Richard MacCutchan 11-Aug-20 10:59am    
Sorry that is not an explanation. What do you mean by, "i can only type app.route."? What prevents you from typing anything else?
gcogco10 11-Aug-20 11:01am    
I have been answered by Garth here below on that, i figure it out before i was not sure how to get pass that.

1 solution

your question seems to be more hardware related than python + flask .. you need to get your keyboard sorted out if you cannot type the '@', as for nano, it's not a special command that I know of - its just 'shift' '2' .. not CTRL+ anything .. I guess if you're in a different 'locale' it could be somewhere else on the keyboard

I just cut and pasted your example code into a nano session on a Mac, I've never even used nano on it before, no issues
 
Share this answer
 
Comments
gcogco10 11-Aug-20 11:22am    
Hi Garth is the same with this sign # 'shift' '3'?
Garth J Lancaster 11-Aug-20 23:19pm    
Well, if it were me, I would be looking at the locale & keyboard/language settings - eg English/US .. I don't know what Linux comes as standard on a Raspberry Pi3, but I would suggest looking at the 'man' pages and/or net for keyboard issues for your Linux variant

is the inability to access shift 1 ... etc a problem just in nano, or does it fail in the ssh/terminal window as well ? obviously if it works in ssh/terminal, it's a nano problem, if it doesn't work in ssh/terminal, it's a general issue ..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900