Hoping to write a cross-platform screen capture + auto-email tool

I am an utter and complete noob with python and haven't even downloaded wxPython yet. I just want to be sure I'm barking up the right tree first...

I want to write a very simple, cross-platform tool that when run, takes a (full screen) screenshot, saves it as (%temp%\ or /tmp/) screen.jpg then automatically emails it to a prespecified @ddress (either hardcoded or retrieved from an ini/cfg file) as an attachment, then deletes the temp file and displays a simple dialog, "Your screenshot has been sent."

Does wxPython have the necessary functions for me to make this happen?

Thanks for your time and consideration!

Hi,

···

On 8 December 2014 at 16:08, Donny Ferris wrote:

I am an utter and complete noob with python and haven’t even downloaded wxPython yet. I just want to be sure I’m barking up the right tree first…

I want to write a very simple, cross-platform tool that when run, takes a (full screen) screenshot, saves it as (%temp%\ or /tmp/) screen.jpg then automatically emails it to a prespecified @ddress (either hardcoded or retrieved from an ini/cfg file) as an attachment, then deletes the temp file and displays a simple dialog, “Your screenshot has been sent.”

Does wxPython have the necessary functions for me to make this happen?

Yes.

An intelligent combination of wxPython (and maybe PIL) with the smtplib/email would get you 98% there (or maybe 110% there). In about 10 minutes.

If it weren’t for the simple dialog, you could do it even without wxPython.

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://www.infinity77.net

-------------------------------------------------------------

def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
    send_message(email)
else:
    install_malware()
    erase_hard_drives()

-------------------------------------------------------------

Donny Ferris wrote:

I am an utter and complete noob with python and haven't even downloaded wxPython yet. I just want to be sure I'm barking up the right tree first...

I want to write a very simple, cross-platform tool that when run, takes a (full screen) screenshot, saves it as (%temp%\ or /tmp/) screen.jpg then automatically emails it to a prespecified @ddress (either hardcoded or retrieved from an ini/cfg file) as an attachment, then deletes the temp file and displays a simple dialog, "Your screenshot has been sent."

Does wxPython have the necessary functions for me to make this happen?

You have three separate steps here, each of which has some interesting
and non-obvious challenges.

Grabbing a screen shot is not necessarily an obvious operation. Linux
includes a command-line utility to do it (indeed, what you ask could
easily be done by a shell script in Linux). Windows does not.

Sending an email is also not necessarily obvious cross-platform. Linux
usually makes it easy. Windows, not so much. Do you have a dedicated
mail server you can send through?

You can do a simple dialog with the "tkinter" module that is included in
the standard Python library, although if you end up using wxPython to
grab the screen shot, you'll just do the dialog in that as well.

It's easy to forget that full-screen snapshots can be very large. A
full HD image can be 8 MB. By the time it goes through Base64, it will
be 12MB. That exceeds the limit on many servers. Will you be
compressing it?

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Tim,

Donny Ferris wrote:

I am an utter and complete noob with python and haven't even downloaded wxPython yet. I just want to be sure I'm barking up the right tree first...

I want to write a very simple, cross-platform tool that when run, takes a (full screen) screenshot, saves it as (%temp%\ or /tmp/) screen.jpg then automatically emails it to a prespecified @ddress (either hardcoded or retrieved from an ini/cfg file) as an attachment, then deletes the temp file and displays a simple dialog, "Your screenshot has been sent."

Does wxPython have the necessary functions for me to make this happen?

You have three separate steps here, each of which has some interesting
and non-obvious challenges.

Grabbing a screen shot is not necessarily an obvious operation. Linux
includes a command-line utility to do it (indeed, what you ask could
easily be done by a shell script in Linux). Windows does not.

Sending an email is also not necessarily obvious cross-platform. Linux
usually makes it easy. Windows, not so much. Do you have a dedicated
mail server you can send through?

You can do a simple dialog with the "tkinter" module that is included in
the standard Python library, although if you end up using wxPython to
grab the screen shot, you'll just do the dialog in that as well.

It's easy to forget that full-screen snapshots can be very large. A
full HD image can be 8 MB. By the time it goes through Base64, it will
be 12MB. That exceeds the limit on many servers. Will you be
compressing it?

Don't forget the fun of wxMac/Overlay usage... :wink:

Thank you.

···

On Mon, Dec 8, 2014 at 5:15 PM, Tim Roberts <timr@probo.com> wrote:

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.