Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
:
testing
>
smem
> _service:tar_git:SFOS.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:SFOS.patch of Package smem
--- a/smem +++ b/smem @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # smem - a tool for meaningful memory reporting # @@ -8,7 +8,7 @@ # the GNU General Public License version 2 or later, incorporated # herein by reference. -import re, os, sys, pwd, optparse, errno, tarfile +import re, os, sys, pwd, optparse, errno, tarfile, time warned = False @@ -614,7 +614,10 @@ pylab.pie(values, explode = explode, labels=labels, autopct="%.2f%%", shadow=True) pylab.title('%s by %s' % (options.pie, sort)) - pylab.show() + outfile = os.path.expanduser('~') + "/Pictures/" + "smem_pie_" + options.pie + "_" + str(int(time.time())) + sys.stdout.write("saving image to" + outfile + ".png\n") + pylab.savefig( outfile ) + #pylab.show() def showbar(l, columns, sort): try: @@ -654,7 +657,10 @@ pylab.gca().set_xticks(ind + .5) pylab.gca().set_xticklabels([x[1][-1] for x in l], rotation=45) pylab.legend([p[0] for p in pl], key) - pylab.show() + outfile = os.path.expanduser('~') + "/Pictures/" + "smem_bar_" + str(int(time.time())) + sys.stdout.write("saving image to" + outfile + ".png\n") + pylab.savefig( outfile ) + #pylab.show() parser = optparse.OptionParser("%prog [options]")