I'm creating a wxPython application that the client can run to make
sure the installation stack is functioning properly. I want to include
the unit test processing in this application but I've run into some
difficulties. An additional wrinkle I threw in was that I am using
py2exe so they don't also need to install wxPython, we'll see if that
will actually work or not.

It seems like the most appropriate thing to do is to use
subprocess.Popen() to trigger "manage.py test --noinput". The problem
I am trying to solve is that this runs for a while and I want to
display the stdio output into a text box on the window.

I had this working using django.core.management.call_command but
creating the exe broke the pathing within Django and even some Python
libraries (thus dumping py2exe could be what I need to do).

The problem with switching to Popen is that it expects a file type
object with a fileno() method. The file class cannot be extended in
the stdio instance because you can't write back to the __class__
property. I guess what I need to know is how do I mimic stdout? Stdout
doesn't output to a file, but it still uses the file object. It seems
like I want to open a file object onto a Nul output. Can this be
done?

Thanks
Josh

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to