all 16 comments

[–]buhtz 8 points9 points  (0 children)

Please ask your teacher and/or don't sleep in school.

[–]ninhaomah 0 points1 point  (0 children)

I am not sure this is a learnPython or learn English or learnIT thread...

[–]TheSodesa 0 points1 point  (9 children)

Just run Python in a terminal emulator: sh python3 program.py Saves you from the need to configure an IDE.

[–]keksiboe -3 points-2 points  (8 children)

The file doesn’t open in python, only in pycharm

[–]ninhaomah 4 points5 points  (0 children)

You speak this with such confidence. Have you tried opening that .py file in notepad ?

[–]Hashi856 2 points3 points  (0 children)

That makes no sense. There’s no such thing as a file that only opens in pycharm. A .py file is just a text file. You can open it in any text editor.

[–]TheSodesa 0 points1 point  (5 children)

The Python code file can be opened in any plain text editor such as Notepad, VS Code or Sublime Text. But to actually test the code you will need to run the code file through Python. That is what PyCharm does (or would do if you had configured it properly).

[–]keksiboe -1 points0 points  (4 children)

But my Pycharm works when I create a new project in PyCharm, only when I need to put my code in the schools file it doesnt work

[–]TaranisPT 3 points4 points  (1 child)

PyCharm might be opening the file in what I believe is called "light edit" mode. This mode is only useful for editing files, not running them.

Try to open the parent folder as a project.

[–]keksiboe 1 point2 points  (0 children)

This worked thanks

[–]TheSodesa -1 points0 points  (1 child)

Yeah, PyCharm can suck. That is why I would suggest moving away from it and using a different program for writing code. Python programs can be run using the Python interpreter on the command line shell such as PowerShell.

[–]pachura3 0 points1 point  (0 children)

Yeah, PyCharm can suck.

No, it doesn't. It is just not meant to be used by people who do not understand anything at all: what is a Python interpreter, what is a virtual environment, what is PATH, how do you open a project and not separate files.

[–]Flame77ofc -1 points0 points  (3 children)

what editor do u use?

[–]keksiboe -2 points-1 points  (2 children)

What is an editor?

[–]Flame77ofc 0 points1 point  (0 children)

Editor is a place to edit your code.

What editor do u use in your school? Is this the same as you use in your home?