import subprocess
import sys

DETACHED_PROCESS = 8


class Daemon(object):
    """Daemonize the helper application, putting it in a forked background
    process.

    """
    def __init__(self, controller):
        raise NotImplementedError
        #args = [sys.executable]
        #args.extend(sys.argv)
        #self.pid = subprocess.Popen(args,
        #                            creationflags=DETACHED_PROCESS,
        #                            shell=True).pid

import platform
import subprocess
import sys

DETACHED_PROCESS = 8


def operating_system():
    """Return a string identifying the operating system the application
    is running on.

    :rtype: str

    """
    return '%s %s (%s)' % (platform.system(),
                           platform.release(),
                           platform.version())


class Daemon(object):
    """Daemonize the helper application, putting it in a forked background
    process.

    """
    def __init__(self, controller):
        raise NotImplementedError
        #args = [sys.executable]
        #args.extend(sys.argv)
        #self.pid = subprocess.Popen(args,
        #                            creationflags=DETACHED_PROCESS,
        #                            shell=True).pid

Implement the operating_system() method for Windows
Implement the operating_system() method for Windows

+ import platform
  import subprocess
  import sys
  
  DETACHED_PROCESS = 8
+ 
+ 
+ def operating_system():
+     """Return a string identifying the operating system the application
+     is running on.
+ 
+     :rtype: str
+ 
+     """
+     return '%s %s (%s)' % (platform.system(),
+                            platform.release(),
+                            platform.version())
  
  
  class Daemon(object):
      """Daemonize the helper application, putting it in a forked background
      process.
  
      """
      def __init__(self, controller):
          raise NotImplementedError
          #args = [sys.executable]
          #args.extend(sys.argv)
          #self.pid = subprocess.Popen(args,
          #                            creationflags=DETACHED_PROCESS,
          #                            shell=True).pid
  
Implement the operating_system() method for Windows
## Code Before:
import subprocess
import sys

DETACHED_PROCESS = 8


class Daemon(object):
    """Daemonize the helper application, putting it in a forked background
    process.

    """
    def __init__(self, controller):
        raise NotImplementedError
        #args = [sys.executable]
        #args.extend(sys.argv)
        #self.pid = subprocess.Popen(args,
        #                            creationflags=DETACHED_PROCESS,
        #                            shell=True).pid

## Instruction:
Implement the operating_system() method for Windows
## Code After:
import platform
import subprocess
import sys

DETACHED_PROCESS = 8


def operating_system():
    """Return a string identifying the operating system the application
    is running on.

    :rtype: str

    """
    return '%s %s (%s)' % (platform.system(),
                           platform.release(),
                           platform.version())


class Daemon(object):
    """Daemonize the helper application, putting it in a forked background
    process.

    """
    def __init__(self, controller):
        raise NotImplementedError
        #args = [sys.executable]
        #args.extend(sys.argv)
        #self.pid = subprocess.Popen(args,
        #                            creationflags=DETACHED_PROCESS,
        #                            shell=True).pid
