内容:
tutorials/maindir/
??? dir1
? ??? file11.py
? ??? file12.py
? ??? __init__.py
? ??? __pycache__
? ??? file11.cpython-36.pyc
? ??? __init__.cpython-36.pyc
??? dir2
? ??? file21.py
? ??? file22.py
? ??? __init__.py
??? file1.py
??? file2.py
??? __init__.py
??? __pycache__
??? file1.cpython-36.pyc
??? __init__.cpython-36.pyc
Run Code Online (Sandbox Code Playgroud)
现在我有一个代码给我下面没有得到的输出。
代码::
print("--main--", dir())
from tutorials.maindir import *
print("--main--", dir())
Run Code Online (Sandbox Code Playgroud)
输出::
--main-- ['__annotations__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
tutorials
tutorials.maindir
tutorials.maindir.dir1
--main-- ['__annotations__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'dir1', …Run Code Online (Sandbox Code Playgroud) 假设生成了一个 FCM 令牌abcd并将其分配给用户,user 1假设现在该令牌不再与user 1他卸载应用程序相关联。将来可以将此令牌abcd分配给其他用户吗?
编辑1:
我知道这是unique一次。但是,如果令牌没有被任何人使用,abcd其他用户是否会再次使用该令牌,因为它仍然是唯一的,就像user 1使用不同的令牌一样?
编辑2:
我指的令牌是device regestration token.
我想编写一个脚本,在其中需要从不同的计算机获取文件的内容192.168.0.2而不输入密码,因此我使用sshpass以下命令:
sshpass -p "password" ssh -o StrictHostKeyChecking=no user@192.168.0.2 " ls /root/path/of/file"
Run Code Online (Sandbox Code Playgroud)
输出 :
ls: cannot access '/root/path/of/file': Permission denied
Run Code Online (Sandbox Code Playgroud)
我明白了,因为我没有以root用户身份登录。所以我尝试了:
sshpass -p "password" ssh -o StrictHostKeyChecking=no user@192.168.0.2 "sudo ls /root/path/of/file"
Run Code Online (Sandbox Code Playgroud)
输出 :
sudo: no tty present and no askpass program specified
Run Code Online (Sandbox Code Playgroud)
我应该怎么办?