Найти - Пользователи
Полная версия: Нужна помощь по открытию файлов
Начало » Python для новичков » Нужна помощь по открытию файлов
1
Mynamemy
I would need your help to fix up a problem.

I was trying to run my saved python code file on my laptop through the Edit Plus IDE. I have no problem running python on my CMD (command prompt) or in Python Shell but when i save the code from edit plus to pc and then when i type the ‘py demo.py’ ( for example) in my command prompt, it gives me an errno2 message.

This is the problem i wish to resolve
Mynamemy
Thank you
py.user.next
Search for the directory where demo.py is replaced. To be sure use the “dir” command in the cmd shell. When you find it, go to this directory in the cmd shell and use
python demo.py

cd your_directory
python demo.py
Mynamemy
Можете более подробно написать.
Мой путь : C:\Users\wel\Desktop\demo.py.
Что после этого надо сделать?
Mynamemy
py.user.next
Search for the directory where demo.py is replaced. To be sure use the “dir” command in the cmd shell. When you find it, go to this directory in the cmd shell and use
Можете более подробно написать.
Мой путь : C:\Users\wel\Desktop\demo.py.
Что после этого надо сделать?
Mynamemy
py.user.next
Search for the directory where demo.py is replaced. To be sure use the “dir” command in the cmd shell. When you find it, go to this directory in the cmd shell and use
Можете более подробно написать.
Мой путь : C:\Users\wel\Desktop\demo.py.
Что после этого надо сделать?
py.user.next
Mynamemy
Можете более подробно написать.
Мой путь : C:\Users\wel\Desktop\demo.py.
Что после этого надо сделать?
На картинке ты находишься в директории C:\Users\wel, поэтому тебе надо сделать
cd Desktop
и там ты в пути оболочки увидишь, что ты уже в Desktop.
И после этого ты можешь запускать
python demo.py

Либо можно сразу запустить
python C:\Users\wel\Desktop\demo.py
Но ты всё равно будешь находиться в директории C:\Users\wel. Если скрипт что-то будет писать в файл, то файл создатся в текущей директории оболочки, а не в той же директории, где скрипт.

Поэтому изучи команды cmd. Почитай про DOS, что там было и как в 1990 году. Потому что винда от доса, как видишь, не ушла всё равно и осталось его наследие со всеми его командами и принципами.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB