#๐Ÿ”’ So when I want to run a Python file, it closes automatically, not even typing () helps

46 messages ยท Page 1 of 1 (latest)

patent kite
#

So when I want to run a Python file, it closes automatically, not even typing () helps

fossil wraithBOT
#

@patent kite

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

vivid willow
#

Command or double clicking or by clicking a Play button?

weak lintel
#

can you share the code? and how you are running it

patent kite
weak lintel
#

double clicks makes a temp terminal which closes the secound program ends leading you to not be able to see the output

#

open powershell

patent kite
#

ok

weak lintel
#

go to this dir in powershell

#

and type python filename.py

#

in this case python macro.py

patent kite
#

its says cant open file

floral latch
wintry gate
#

thats wierd

#

coppy the path to the file

#

not just the file name

patent kite
#

how

wintry gate
#

ofc the terminal dont know where to find it

#

you can just copy the file and paste it

#

or drag to the terminal

#

you should tell where to find the file

#

@patent kite

$ python /to/the/file.py
patent kite
#

it's still won't work it gets closed automatic

#

did everything

wintry gate
#

show the code

patent kite
wintry gate
#

uhhh you are not running the script...

weak lintel
#

can you show the code

wintry gate
#

@patent kite

weak lintel
#

go to your python file click on properties and copy its path

#

then do python {path}\macro.py

#

paste path instead of {path}

vivid willow
#

type py first, then give it a space, then drag and drop the macro.py file to the terminal

wintry gate
#

oh yeah its windows you can just type py....

#

#โ“๏ฝœhow-to-get-help

patent kite
#

You don't know how grateful I am, thank you guys again, it's working now.

wintry gate
#

on the end

wintry gate
patent kite
#

!close

fossil wraithBOT
#
Python help channel closed with !close

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.