Thanks, Hartmut. There are some errors in the solution you posted that
you'll be able to discover using your current platform before it's
necessary to test on Windows.

Some comments:
there is no multiprocessing.forking.Popen class
choose either the name "_Popen" or "MyOpen"
in the call to super(), the name "_Popen" apparently can't be
referenced, perhaps because it is a nested class

I made these modifications, but the result is:
PS C:\users\b\p\tst\d\src> python .\test_multiprocess_22.py
pyb
Traceback (most recent call last):
  File ".\test_multiprocess_22.py", line 36, in <module>
    SendeventProcess(resultQueue)
  File ".\test_multiprocess_22.py", line 24, in __init__
    self.start()
  File "C:\Python27\lib\multiprocessing\process.py", line 104, in
start
    self._popen = Popen(self)
  File ".\test_multiprocess_22.py", line 10, in __init__
    super(_Popen, self).__init__(*args, **kw)
  File "C:\Python27\lib\subprocess.py", line 672, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 841, in _execute_child
    args = list2cmdline(args)
  File "C:\Python27\lib\subprocess.py", line 573, in list2cmdline
    for arg in seq:
TypeError: 'SendeventProcess' object is not iterable
PS C:\users\b\p\tst\d\src>

Here's the current version:
import multiprocessing
import os
import subprocess


class _Popen(subprocess.Popen):
    def __init__(self, *args, **kw):
        os.putenv('_MEIPASS2', '--dummy--')
        try:
            super(_Popen, self).__init__(*args, **kw)
        finally:
            os.unsetenv('_MEIPASS2')

# this is *completly* untested
class Process(multiprocessing.Process):
    _Popen = _Popen


class SendeventProcess(Process):
    def __init__(self, resultQueue):
        self.resultQueue = resultQueue

        multiprocessing.Process.__init__(self)
        self.start()

    def run(self):
        print 'SendeventProcess'
        self.resultQueue.put((1, 2))
        print 'SendeventProcess'


if __name__ == '__main__':
    multiprocessing.freeze_support()
    print 'pyb'
    resultQueue = multiprocessing.Queue()
    SendeventProcess(resultQueue)
    print 'pyb'


On Oct 7, 5:09 pm, Hartmut Goebel <[email protected]> wrote:
> Am 07.10.2011 18:12, schrieb Brian:
>
> > I tried compiling the bootloader with the version of waf in r1609, and
> > got this:
>
> While this may show another issue about compiling r1609, there should be
> a solution which does not require recompiling the loader.
>
> Please check my today's comment onhttp://www.pyinstaller.org/ticket/182
> and the attachment. (I can not test it myself, since I have no Windows
> machine at hand).
>
> --
> Schönen Gruß - Regards
> Hartmut Goebel
> Dipl.-Informatiker (univ.), CISSP, CSSLP
>
> Goebel Consult
> Spezialist für IT-Sicherheit in komplexen 
> Umgebungenhttp://www.goebel-consult.de
>
> Monatliche Kolumne:http://www.cissp-gefluester.de/
> Goebel Consult ist Mitglied beihttp://www.7-it.de

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to