Python3 compatibility issues

I noticed that line 461 of subprocess.py is called only in MS Windows. This line is included in subprocess.Popen.list2cmdline() and this method is called by subprocess.Popen._execute_child(). _execute_child() is defined only in MS Windows (definition of this method is included in if _mswindows sentence). Therefore, the problem of bytes-like object is Windows specific. I confirmed that Python3.6.3+Ubuntu16.04LTS doesn’t show this problem. I think that command line should not be converted to bytes in Windows.

I found another problem. After applying above fix, still I can’t run firstrun Wizard. In Windows10, child process is crashed immediately after started. In Ubuntu16.04LTS, firstrun process seems to be started. In both setup, this problem disappears by removing lines 117-118 of psychopy/core.py.

def shellCall(shellCmd, stdin='', stderr=False, env=None, encoding='utf-8'):
    """
    (snip)
    """
    if env is None:    # line 117
        env = dict()   # line 118

What is the purpose of these lines? Is there any environment where replacing None with dict()? is necessary?

EDIT:
Sorry, there is one more problem. In Japanese Windows10, encoding of Popen() must be 'cp932' or its variant even if using Python 3.6. To make matters worse, sys.getfilesystemencoding() and sys.getdefaultencoding() return 'utf-8' in Python 3.6 in Japanese Windows. We have to find appropriate encoding without using these functions (locale.getpreferredencoding() seems to be suitable for this purpose).