[FRPythoneers] Python under MSWindows

Sean Reifschneider jafo at tummy.com
Fri Jun 1 17:26:11 MDT 2001

On Fri, Jun 01, 2001 at 05:19:05PM -0600, Clementson, Bill wrote:
>Yes, you can do "os.system('notepad.exe')" on Legacy Windows platforms.

So, something like:

   tmpFile = None
   if windows:
      tmpFile = os.path.join('C:\\temp\\tmpfile.%s' % os.getpid())
      sys.stdout = open(tmpFile, 'w')

   [do stuff, print results]

   if windows and tmpFile:
      os.system('notepad.exe %s' % tmpFile)

 It often shows a fine command of a language to say nothing.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python

More information about the FRPythoneers mailing list