[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Why the fuck do Python files instantly close the moment I open

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 1

File: IMG_4373.jpg (276KB, 1280x960px) Image search: [Google]
IMG_4373.jpg
276KB, 1280x960px
Why the fuck do Python files instantly close the moment I open them? Is this punishment for being stuck with Win 7?
>>
>>62278024
You are running them rather than editing them.
>>
>>62278024
>right click
>open with
Holy shit that was hard
>>
>>62278050
>implying i didn't try that
>>
Because python is shit. Learn a real language, fagtard.
>>
>>62278148
I don't even know Python, I'm just trying to load a .py that browses/decompiles .gdi files.
>>
Did you put something at the end that waits for a key press before closing?
>>
>>62278160
Did it work?
>>
>>62278148
No you're the fag, fag! Tell your mother I said hello
>>
>>62278177
Should I open up the file in IDLE and add that? It probably won't change the fact that every .py I try to execute instantly closes, but it's worth a shot.
>>
>>62278024
Let me guess, you are doubleclicking an .py file?
It will execute the program in a terminal window and then terminate the terminal after that is done.
That can be avoided eg. by asking for input at the end of the program.

You may want to pass arguments (such as the files to decompile) to the program. In that case you need to open the windows terminal and execute the appropriate command from there.

But these are the basics of the basics, you really should know that.
>>
>>62278243
I've tried doubleclicking, rightclicking and selecting "open with" both 3.x and 2.7.x, and using the command prompt to open the file location; but the result remains the same.
>>
>>62278265
Read what I wrote, it might help you.

You are EXECUTING the program, in all likelihood that will do nothing since it got no arguments so it will just terminate.

I already told you what you need to do.
You can also text dragging the file to decompile onto the executable.
>>
>>62278300
*try dragging

But you should really read the documentation of the program.
>>
>>62278300
Drag and dropping the .gdi onto the .py causes the latter to open and close like it's been doing with the other ways I tried executing it. I've used a couple of other programs that launch as consoles that required another file to be dragged into them recently, but they worked fine.

On the subject of the readme file, it's a fucking unparagraphed mess. I think Notepad is trying to read the line breaks as a group of spaces. Apparently on Windows I'm supposed to add the Python folder to the path manually.
>>
>>62278448
On the other hand, Sublime Text 2 renders the breaks and ASCII perfectly.
>>
>>62278448
Notepad is complete shit yes.
The documentation should describe how the program should be used and will probably be more helpful then anything here on /g/.
>>
>>62278024
>win+r
>cmd
>cd to file
>python file.py
Advanced level shit
Thread posts: 18
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.