Python Forum
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can' t open my py file
#1
Hello everyone. I just set up python 3.3 and i opened a new file to writi in it but at first i tried to save it before write anything. I noticed that i can' t open with python after saving it.
Reply
#2
Python will open the file, but won't do anything because it wasn't instructed to do so!
Reply
#3
We need more detail here. What exactly do you mean by "opened a new file?" Did you open the Python command line interpreter? Did you open the Idle IDE that comes with python? Did you open a text file and write Python code there? And what exactly do you mean by "open with python?"

Knowing what your operating system is would also be useful. Needful even.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#4
OK. I opened Idle IDE that comes with python i pressed at file -> save my file as and i saved my .py file at my desktop. I closed the Idle and i tried to open the file at my desktop but it doesn' t open. It does nothing.
Reply
#5
(Sep-23-2017, 07:12 PM)zafraj1 Wrote: I just set up python 3.3
You should not be using 3.3,look at  Python 3.6 and pip installation under Windows and part-2.
zafraj1 Wrote:I closed the Idle and i tried to open the file at my desktop but it doesn' t open. It does nothing.
It will just open and close without you seeing it.
you can put in input('Press enter to exit') at end of script.

I never do that,run it from command line python myscript.py or use editor of choice to run scripts.
zafraj1 Wrote:OK. I opened Idle IDE that comes with python
IDLE is and embarrassment for Python,use Thonny it's how IDLE should have been done.  

PyCharm Free Community or VS Code(my clear favorite) is good editors to look into.
Reply
#6
I dont really agree with Pycharm or VS Code being the wisest to choose from to start. I personally think you should start with just a terminal/cmd prompt only.... but i sure as hell agree to the fact that IDLE is an embarrassment for python. Anything else is better. There are a rediculous number of IDE's to choose from, some crap, some good.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  looking up docs for open file methods Skaperen 3 2,393 Nov-10-2019, 01:08 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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