Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102492 > unrolled thread
| Started by | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| First post | 2016-02-04 13:18 +0000 |
| Last post | 2016-02-04 13:18 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: .py file won't open in windows 7 Tim Golden <mail@timgolden.me.uk> - 2016-02-04 13:18 +0000
| From | Tim Golden <mail@timgolden.me.uk> |
|---|---|
| Date | 2016-02-04 13:18 +0000 |
| Subject | Re: .py file won't open in windows 7 |
| Message-ID | <mailman.60.1454591911.30993.python-list@python.org> |
On 04/02/2016 13:09, Tim Golden wrote: > On 04/02/2016 12:52, Yossifoff Yossif wrote: >> Hallow, >> I try to open a .py file (attached), but what I get is a windows DOS window opening and closing in a couple of seconds. Ran repair of the program, nothing happened. >> I cannot see error messages and don't know where to look for ones. >> Would appreciate your piece of advice. > > Attachments won't make it through to the list, Yossif. But your code is > basically something like this: > > """ > import sys > > def main(): > # calculate stuff > print(stuff) > > if __name__ == '__main__': > sys.exit(main()) > """ > > In that case, the program starts (in a console window), runs, prints the > result, and then closes. You've got a few simple ways of seeing the output: ... or run within a development environment. Python itself ships with IDLE: https://docs.python.org/3/library/idle.html but there are plenty of others: https://wiki.python.org/moin/IntegratedDevelopmentEnvironments TJG
Back to top | Article view | comp.lang.python
csiph-web