Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to open Python?
#5
(Jun-07-2021, 12:25 AM)Larz60+ Wrote: Correct me if I'm wrong, but I think that what you're looking for a place where you can run your code, so:
  • you need to save your script to a file with a .py suffix
  • open a command (terminal) window
  • run command python 3 myfile.py (replace 'myfile' with saved file prefix)

you can run code line by line (interpretively) by typing python3 at command line, then entering code one line at a time.
google python IDE to get a list.

The choice of which one is best is personal, but two very popular choices are VSCode and PyCharm

I like VSCode, and there is a tutorial here that will get you started.

there is a built in one (very basic) named IDLE see: IDLE

Thanks @Larz60+

I have read your comment thoroughly & return my understanding or misunderstanding in square brackets [ ].

(1) you need to save your script to a file with a .py suffix [Yes all the files created have .py suffix]
(2) open a command (terminal) window [I dont know precisely what you mean - Win10 has a command box at far left of the Task Bar which is what I use so I dont "open" anything. Am I misunderstanding something?]
(3) run command python 3 myfile.py (replace 'myfile' with saved file prefix) - [This is what I was inserting python /pythonprojects/texteditor.py so I added 3 python 3 /pythonprojects/texteditor.py but it made no difference.]
(4) you can run code line by line (interpretively) by typing python3 at command line, then entering code one line at a time. [I dont understand that. Is that referring to the Python DOS prompt window headed with the following?]
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
(5) The choice of which one is best is personal, but two very popular choices are VSCode and PyCharm [I already have VSCode and PyCharm but prefer to use UltraEdit32 which Im more familiar with. When I start to use more sophisticated coding, I guess PyCharm would be my better choice.]
(6) there is a built in one (very basic) named IDLE see: IDLE [Where do I see: IDLE?]

Im tending to think that the lack of a window opening, or the one that does open momentarily then closes, is caused by a Windows malfunction or misuse, rather than the Python code that Im entering.

All Im wanting at this stage is to get a "window to open". Once I achieve that, I can then add to it, to make things work.

My experience in programming is in PHP using CodeIgniter which I find is limited & Im wanting to integrate it with Python of which Im led to believe is more flexible. But Im finding Python extremely alien with little or no explanation.

Would it be a good idea to first learn C then move to C++ before learning Python?

Can you reply in terms that a Win10/PHP developer understands?
Reply


Messages In This Thread
How to open Python? - by bensan - Jun-05-2021, 02:36 PM
RE: How to open Python? - by Axel_Erfurt - Jun-05-2021, 04:04 PM
RE: How to open Python? - by bensan - Jun-06-2021, 09:18 PM
RE: How to open Python? - by Larz60+ - Jun-07-2021, 12:25 AM
RE: How to open Python? - by bensan - Jun-09-2021, 04:06 PM
RE: How to open Python? - by Gribouillis - Jun-09-2021, 04:23 PM
RE: How to open Python? - by Larz60+ - Jun-09-2021, 09:29 PM
RE: How to open Python? - by perfringo - Jun-10-2021, 08:20 PM
RE: How to open Python? - by bensan - Jun-17-2021, 04:36 PM
RE: How to open Python? - by perfringo - Jun-18-2021, 09:55 AM
RE: How to open Python? - by bensan - Jun-18-2021, 07:08 PM
RE: How to open Python? - by bensan - Jun-17-2021, 08:47 PM
RE: How to open Python? - by Larz60+ - Jun-18-2021, 08:14 PM
RE: How to open Python? - by bensan - Jun-18-2021, 09:32 PM
RE: How to open Python? - by snippsat - Jun-18-2021, 09:29 PM
RE: How to open Python? - by bensan - Jun-23-2021, 01:22 PM
RE: How to open Python? - by snippsat - Jun-23-2021, 02:23 PM
RE: How to open Python? - by bensan - Jun-23-2021, 07:34 PM
RE: How to open Python? - by jefsummers - Jun-23-2021, 05:01 PM
RE: How to open Python? - by snippsat - Jun-23-2021, 05:29 PM
RE: How to open Python? - by snippsat - Jun-23-2021, 07:50 PM
RE: How to open Python? - by bensan - Jun-23-2021, 08:33 PM
RE: How to open Python? - by snippsat - Jun-23-2021, 09:11 PM
RE: How to open Python? - by bensan - Jun-24-2021, 08:25 AM
RE: How to open Python? - by jefsummers - Jun-24-2021, 01:59 AM
RE: How to open Python? - by bensan - Jun-24-2021, 08:32 AM
RE: How to open Python? - by Larz60+ - Jun-24-2021, 10:11 AM
RE: How to open Python? - by snippsat - Jun-24-2021, 10:53 AM
RE: How to open Python? - by bensan - Jun-25-2021, 01:55 PM
RE: How to open Python? - by jefsummers - Jun-24-2021, 06:24 PM
RE: How to open Python? - by buran - Jun-24-2021, 08:58 PM
RE: How to open Python? - by Yoriz - Jun-24-2021, 10:04 PM
RE: How to open Python? - by bensan - Jun-25-2021, 01:15 PM
RE: How to open Python? - by deanhystad - Jun-25-2021, 01:30 PM
RE: How to open Python? - by bensan - Jun-25-2021, 03:07 PM
RE: How to open Python? - by Yoriz - Jun-25-2021, 03:20 PM
RE: How to open Python? - by bensan - Jun-25-2021, 03:50 PM
RE: How to open Python? - by Gribouillis - Jun-25-2021, 02:53 PM
RE: How to open Python? - by Yoriz - Jun-25-2021, 04:09 PM
RE: How to open Python? - by bensan - Jun-25-2021, 04:56 PM
RE: How to open Python? - by Yoriz - Jun-25-2021, 05:12 PM
RE: How to open Python? - by bensan - Jun-26-2021, 04:46 PM
RE: How to open Python? - by Yoriz - Jun-26-2021, 05:12 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020