Re: [Matplotlib-users] cbook.report_memory IOError

2013-07-17 Thread Eric Firing
On 2013/07/16 5:50 PM, K.-Michael Aye wrote:
 Hi!

 I have just run an old code that I believe was working before on OSX.
 I am trying this with matplotlib 1.2.1 on an OSX EPD running Python 2.7.3

It works for me with OSX  Mountain Lion and mpl 1.2.1 compiled from 
source.  I don't think this is fundamentally a problem with 
cbook.report_memory.

Eric



 In [1]: from matplotlib.pylab import *

 In [2]: import matplotlib.cbook as cbook

 In [3]: data = ones((1500,1500,3))

 In [4]: imshow(data)
 Out[4]: matplotlib.image.AxesImage at 0x109d343d0

 In [5]: ax = gca()

 In [6]: print cbook.report_memory()
 ---
 IOError   Traceback (most recent call last)
 ipython-input-6-88a73a5ab996 in module()
  1 print cbook.report_memory()

 /Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py
 in report_memory(i)
 1210 elif sys.platform.startswith('darwin'):
 1211 a2 = Popen('ps -p %d -o rss,vsz' % pid, shell=True,
 - 1212stdout=PIPE).stdout.readlines()
 1213 mem = int(a2[1].split()[0])
 1214 elif sys.platform.startswith('win'):

 IOError: [Errno 4] Interrupted system call

 First I thought, maybe this doesn't run in IPython for a reason, but
 trying it as a script also fails:

 (general_dev+)[maye@lunatic ~/Dropbox/src/pymars]$ python imshow_test.py
 Traceback (most recent call last):
File imshow_test.py, line 7, in module
  print cbook.report_memory()
File
 /Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py,
 line 1212, in report_memory
  stdout=PIPE).stdout.readlines()
 IOError: [Errno 4] Interrupted system call


 Is this cbook recipe maybe broken?

 Best,
 Michael




 --
 See everything from the browser to the database with AppDynamics
 Get end-to-end visibility with application monitoring from AppDynamics
 Isolate bottlenecks and diagnose root cause in seconds.
 Start your free trial of AppDynamics Pro today!
 http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] cbook.report_memory IOError

2013-07-16 Thread K . -Michael Aye
Hi!

I have just run an old code that I believe was working before on OSX.
I am trying this with matplotlib 1.2.1 on an OSX EPD running Python 2.7.3


In [1]: from matplotlib.pylab import *

In [2]: import matplotlib.cbook as cbook

In [3]: data = ones((1500,1500,3))

In [4]: imshow(data)
Out[4]: matplotlib.image.AxesImage at 0x109d343d0

In [5]: ax = gca()

In [6]: print cbook.report_memory()
---
IOError   Traceback (most recent call last)
ipython-input-6-88a73a5ab996 in module()
 1 print cbook.report_memory()

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py
 
in report_memory(i)
   1210 elif sys.platform.startswith('darwin'):
   1211 a2 = Popen('ps -p %d -o rss,vsz' % pid, shell=True,
- 1212stdout=PIPE).stdout.readlines()
   1213 mem = int(a2[1].split()[0])
   1214 elif sys.platform.startswith('win'):

IOError: [Errno 4] Interrupted system call

First I thought, maybe this doesn't run in IPython for a reason, but 
trying it as a script also fails:

(general_dev+)[maye@lunatic ~/Dropbox/src/pymars]$ python imshow_test.py
Traceback (most recent call last):
  File imshow_test.py, line 7, in module
print cbook.report_memory()
  File 
/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/matplotlib/cbook.py,
 
line 1212, in report_memory
stdout=PIPE).stdout.readlines()
IOError: [Errno 4] Interrupted system call


Is this cbook recipe maybe broken?

Best,
Michael




--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users