-
Star
(136)
You must be signed in to star a gist -
Fork
(32)
You must be signed in to fork a gist
-
-
Save zaemiel/4fbd8b5125fda7a140be to your computer and use it in GitHub Desktop.
| 1. Go to Sublime Text to: Tools -> Build System -> New Build System | |
| and put the next lines: | |
| { | |
| "cmd": ["python3", "-i", "-u", "$file"], | |
| "file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
| "selector": "source.python" | |
| } | |
| Then save it with a meaningful name like: python3.sublime-build | |
| 2. Go to Tools -> Build system -> and check python3 | |
| test it with: | |
| import sys | |
| print(sys.version) | |
| Press: Ctrl + b | |
Hi, I get this message: [Errno 2] No such file or directory
Any idea how to fix this?
Try this code:
{ "shell_cmd": "gnome-terminal --working-directory=$file_path -- bash -c 'python3 -u \"$file\" && read -n 1 -s -r'", "working_dir": "$file_path", "selector": "source.python", "env": {"PYTHONIOENCODING": "utf-8"} }
i cant give input
thank you its work to me! but i change code a little bit. if you guys still have a problem like the code not build, you can try this code
{
"cmd": ["C:\Python\Python397\python.exe", "-u", "$file"],
"file_regex": "^[ ]File "(...?)", line ([0-9]*)",
"selector": "source.python"
}
i hope this will help you guys :)
Bonjour, je souhaite me former à python.Je n'y connais rien en codage.
j'ai suivi scrupuleusement ces instructions, en faisant un copier coller du code:
- Allez dans Sublime Text to: Outils -> Système de construction -> Nouveau système de construction
et mettre les lignes suivantes:
{
"cmd": ["python3", "-i", "-u", "$file"],
"file_regex": "^[ ]Fichier "(...?) ", ligne ([0-9]*)",
"sélecteur": "source.python"
}
Ensuite, sauvegardez-le avec un nom significatif comme: python3.sublime-build
- Allez dans Outils -> Construire le système -> et vérifier python3
tester avec:
Import sys
print(sys.version)
Presse: Ctrl + b
le message de sortie est le suivant:
init_() got an unexpected keyword argument 'sélecteur'
[cmd: ['python3', '-i', '-u', '']]
[dir: C:\Users\lockn\OneDrive\Documents\travail_python]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\HP\HP One Agent;C:\Program Files\dotnet;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\lockn\AppData\Local\Programs\Python\Python315\Scripts;C:\Users\lockn\AppData\Local\Programs\Python\Python315;C:\Users\lockn\AppData\Local\Programs\Python\Launcher;C:\Users\lockn\AppData\Local\Microsoft\WindowsApps;C:\Users\lockn\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\lockn.dotnet\tools]
[Finished]
Python est bien installé: version python 3.15.103.0
sublime texte: dernière version: 4 si je ne dis pas de bêtise
windows 11
merci pour votre aide

Thanks a lot