I'm getting an error/crash when trying to use Python on my virtual server running Win 2008 Server.

Python installed without incident, and IDLE opens and the interactive widnow works fine. But when I try to open a new window and run it it crshes when trying to save.

Example:

I Select 'New Window' from the Python Idle File menu. Type in my simple test code: print(foobar test)

Then when I select Run from the top menu and try to save it in the pop up save box It it crashes, showing me an error message that 'python.exe has stopped working'. Then all IDLE windows go away and nothing is saved.

How about running the code by double click or from CMD window?

It's just that I've gotten so used to writing within the IDLE environment I'd like to be able to run from where I edit.

I've done some more experimenting. It appears things are crashing when the 'Run Module' tries to save the file. It presents me with what looks like the standard Windows explorer 'Save as' window to select a destination and name the file. If I save to Documents or a subdirectory, the crash happens, if I save to the Python32 directory all works as expected. IN my local PC version, I can save anywhere I want. Don't understand why Python in Win Srvr 2008 limits me to save only to the Pyhton32 directory. I've added C:\Python32\python.exe to my PATH.

Here's the details from the pythonw.exe error window:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: pythonw.exe
  Application Version:  0.0.0.0
  Application Timestamp:    4f8512b6
  Fault Module Name:    StackHash_c0cd
  Fault Module Version: 6.1.7601.17725
  Fault Module Timestamp:   4ec4aa8e
  Exception Code:   c0000374
  Exception Offset: 00000000000c40f2
  OS Version:   6.1.7601.2.1.0.272.7
  Locale ID:    1033
  Additional Information 1: c0cd
  Additional Information 2: c0cd77b1604132f060c407509433b7a3
  Additional Information 3: de6e
  Additional Information 4: de6e0c4419adecb96dad5126c42a8745

Not sure why its using pythonw.exe is throwing the error message since I put python.exe in the path

You put the directory, not file to path. Pythonw is running IDLE as it has no CMD window. Where is run module comming should it not be Run (F5)?

Thanks pyTony Changing the path to just the C:\Python instead of adding the .exe file also, seems to have solved the problem.

and yes, when I said 'Run Module' I meant Run > Run Module from the top menu (same as F5)

Thanks again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.