Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.
diff --git a/Lib/popen2.py b/Lib/popen2.py
index 8b1af76..14fe12f 100644
--- a/Lib/popen2.py
+++ b/Lib/popen2.py
@@ -8,6 +8,7 @@
 
 import os
 import sys
+import types
 
 __all__ = ["popen2", "popen3", "popen4"]
 
@@ -56,7 +57,7 @@
         _active.append(self)
 
     def _run_child(self, cmd):
-        if type(cmd) == type(''):
+        if isinstance(cmd, types.StringTypes):
             cmd = ['/bin/sh', '-c', cmd]
         for i in range(3, MAXFD):
             try: