There’s always trusty old Qt.

# From within Mayaimport osfrom PySide.QtGui import QPixmap, QApplication

app = QApplication.instance()
screenshot = QPixmap.grabWindow(app.desktop().winId())
screenshot.save(os.path.expanduser("~/screenshot.jpg"), "jpg")

It can do regions too.
​

On 6 October 2016 at 10:00, Arjun Thekkummadathil <3dar...@gmail.com> wrote:

> Hi
>    Anyone knows any existing library or quick method to do a screenshot
> using python. I should be able to select a region to be screen grabbed. Am
> looking for an option on windows.
>
> thanks
>
> Arjun
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAJrOGy9tEcVdFsyQsn8OvRAiC6bXs
> 854nDjFCdS_C2qGb-140A%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAJrOGy9tEcVdFsyQsn8OvRAiC6bXs854nDjFCdS_C2qGb-140A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Marcus Ottosson*
konstrukt...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAEpePwGgqpnyhzuTYk8pQup-E%3DdF4JZrEMP0K0tPHJ3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to