top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Screenshot Taking program in Python for Mac OS X.

+1 vote
404 views

I want to write my own Screenshot Taking program in Python for Mac OS X.

Example : Whenever Command + Shift + 3 is pressed ==> whatever is there on the screen, should be grabbed / captured, and should be stored on my local with my own desired path, and name should automatically given as SnapshotX.. as in Snapshot1, Snapshot2, etc...

The same goes with Command + Shift + 4 ==> the only difference is that, it allows you to select a particular area to be captured / grabbed.

Command + Shift + 5 ==> This one is a little bit tricky which I am looking for. This shortcut doesn't exist. I want to create one of my own, where it would grab the entire webpage's screenshot which I am currently working on, and store the name as the webpage's link.

posted Oct 19, 2013 by Seema Siddique

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

3 Answers

+1 vote

Sounds like a difficult thing to write from scratch. Can you find something off-the-shelf that takes a snapshot of your current window, and then maybe add some interaction with the web browser? Otherwise, you're poking around with screenshotting directly, which is very much a solved problem.

Also, please read this https://wiki.python.org/moin/GoogleGroupsPython

answer Oct 19, 2013 by Sonu Jindal
+1 vote

I'm not sure how much what you want to do differs from what OS X already provides out of the box but perhaps this reference can give you some ideas:

http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X

answer Oct 19, 2013 by Sanketi Garg
+1 vote

Command-Shift-3 takes a screenshot of the whole screen and saves it as a file on the desktop.

Command-Control-Shift-3: takes a screenshot of the whole screen and saves it to the clipboard.

For other options (such as taking a screenshot of a window or a specific region on the screen), see
http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X

I wonder what this has to do with Python though.

answer Oct 22, 2013 by Meenal Mishra
Similar Questions
+1 vote

I've been developing with python for a while on Ubuntu but will soon be transitioning to full-time python development. I have the option of using a Mac or Ubuntu environment and I'd like to hear any thoughts on the pros and cons of each. Specifically, how's the support for numpy and scipy? How are the IDEs?

Since I generally like working with a Mac, I'd like to hear if there are any significant downsides to python dev on OsX.

+1 vote

I am trying to see the entries in my DNS resolver cache in my Macbook. But I am not aware what is the command to do the same.

+3 votes

Is there a particular reason or is it that it's just not bothered being built that often that new versions of Git is released?

How can I build new versions of Git myself?

0 votes

This is my first time using pyinstaller. My goal is to build an .app in Mac. The app is basically a GUI written in PySide, and I have about 7 different Python scripts + 1 .png file. The main file calls 4 of the files, and the 4 files will call the rest of the 2 files repeatedly. The .png file is nothing but the window logo. Could someone help me with some diagnosis? I do not know what went wrong. I searched a lot of documentations online, i.e., change spec, add import, ... etc. but my app still doesn't run.FYI, Pyinstaller could generate an app for me, but there are two issues:
1. Icon is not changed for the app.
2. App crashes when opened.

My Python version is 2.7.5 and I am using PyInstaller-2.0. Here is my code for packaging:

python pyinstaller.py --onefile --windowed --name=MyApplication -i ~/Documents/AASource/icon.ico ~/Documents/AASource/Scripts/main_file.pyHere is the spec file:

$ -*- mode: python -*- a = Analysis(['/Users/boxuancui/Documents/AASource/Scripts/main_file.py'], pathex=['/Users/boxuancui/Documents/pyinstaller-2.0'], hiddenimports=[], hookspath=None) pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name=os.path.join('dist', 'MyApplication'), debug=False, strip=None, upx=True, console=False , icon='/Users/boxuancui/Documents/AASource/icon.ico') app = BUNDLE(exe, name=os.path.join('dist', 'MyApplication.app'))Here is part of the crash message:

Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000054d8

Thanks in advance! Any help will be appreciated!

+1 vote

For example gcd(3, -7) returns -1, which means that a co-prime test that would work in many other languages 'if gcd(x, y) == 1' will fail in Python for negative y.

And, of course, since -|x| is less than |x|, returning -|x| rather than |x| is not returning the greatest common divisor of x and y when y is negative.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...