Revision: 7063 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7063&view=rev Author: ryanmay Date: 2009-04-24 16:53:44 +0000 (Fri, 24 Apr 2009)
Log Message: ----------- Use subprocess.Popen instead of os.popen4 to retrieve dvipng version. os.popen* are deprecated in Python 2.6. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/texmanager.py Modified: trunk/matplotlib/lib/matplotlib/texmanager.py =================================================================== --- trunk/matplotlib/lib/matplotlib/texmanager.py 2009-04-24 15:23:57 UTC (rev 7062) +++ trunk/matplotlib/lib/matplotlib/texmanager.py 2009-04-24 16:53:44 UTC (rev 7063) @@ -34,6 +34,7 @@ """ import copy, glob, os, shutil, sys, warnings +from subprocess import Popen, PIPE, STDOUT try: from hashlib import md5 @@ -54,7 +55,9 @@ else: cmd_split = ';' def dvipng_hack_alpha(): - stdin, stdout = os.popen4('dvipng -version') + p = Popen('dvipng -version', shell=True, stdin=PIPE, stdout=PIPE, + stderr=STDOUT, close_fds=True) + stdin, stdout = p.stdin, p.stdout for line in stdout: if line.startswith('dvipng '): version = line.split()[-1] @@ -601,4 +604,3 @@ dvi.close() # A total height (including the descent) needs to be returned. return page.width, page.height+page.descent, page.descent - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins