Re: [Tutor] Hi all: How do I save a file in a designated folder?

2017-05-02 Thread eryk sun
On Tue, May 2, 2017 at 6:09 PM, Michael C wrote: > screenshot.save("\test\missed.png") You probably know that "\t" represents a tab in a string literal, but there's something about working with a path that causes people to overlook this. Windows won't overlook it.

Re: [Tutor] Hi all: How do I save a file in a designated folder?

2017-05-02 Thread Cameron Simpson
On 03May2017 00:01, Alan Gauld wrote: On 02/05/17 19:09, Michael C wrote: 1. How to name the file with time stamp. e.g. 05012017.png and so forth. And so forth? I assume you mean MMDD.png format? You should read about the strftime function in the time (and

Re: [Tutor] Hi all: How do I save a file in a designated folder?

2017-05-02 Thread Alan Gauld via Tutor
On 02/05/17 19:09, Michael C wrote: > from PIL import Image > from PIL import ImageGrab > > screenshot = ImageGrab.grab() > screenshot.show() > screenshot.save("\test\missed.png") > > This is my current code, using Python Image Library! You should probably investigate Pillow, I believe

Re: [Tutor] Using Python to access .txt files stored behind a firewall as .exe files

2017-05-02 Thread Alan Gauld via Tutor
On 02/05/17 19:06, Ian Monat wrote: > I could give them reasons why .exe files won't work for me but they don't > really care if I take the data files on their site or not. But do they care about their reputation? The biggest issue here is not the technical one but the security one, they could

[Tutor] Hi all: How do I save a file in a designated folder?

2017-05-02 Thread Michael C
from PIL import Image from PIL import ImageGrab # takes the screenshot screenshot = ImageGrab.grab() # display the screenshot screenshot.show() # save the screenshot screenshot.save("\test\missed.png") This is my current code, using Python Image Library! What I would like to get help with is:

Re: [Tutor] Using Python to access .txt files stored behind a firewall as .exe files

2017-05-02 Thread Ian Monat
Hi Steven, Thanks for your commentary, made me laugh, I wish switching distributors were that easy. I could give them reasons why .exe files won't work for me but they don't really care if I take the data files on their site or not. So I guess to answer your question, we need them more. That

Re: [Tutor] Using Python to access .txt files stored behind a firewall as .exe files

2017-05-02 Thread Steven D'Aprano
On Mon, May 01, 2017 at 10:20:42AM -0700, Ian Monat wrote: [...] > Then you have you run the .exe which produces a zipped file, and inside the > zipped file, is the .txt, which what I really want. There's no way the > distributor will change anything about how they store files on their > website

Re: [Tutor] Press ESC to exit()

2017-05-02 Thread Alan Gauld via Tutor
On 02/05/17 04:03, Michael C wrote: > holy cow I did warn you it was non trivial :-) Basically Eryksun has done what your scripting tool is doing in the background. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my

Re: [Tutor] Pycharm Edu Lesson 3, Task 7

2017-05-02 Thread Alan Gauld via Tutor
On 02/05/17 01:42, David Wolfe wrote: > I'm working through Pycharm Edu, and I'm stuck on the following: > > phrase = """ > It is a really long string > triple-quoted strings are used > to define multi-line strings > """ > first_half = phrase[:len(phrase)//2] > print(first_half) > > > The

Re: [Tutor] [ctypes-users] Press ESC to exit()

2017-05-02 Thread Michael C
holy cow On Mon, May 1, 2017 at 8:02 PM eryk sun wrote: > On Mon, May 1, 2017 at 6:28 PM, Michael C > wrote: > > Hi all, I found out that one way to press ESC to kill the script was to > use > > my previous > > script language, AutoHotKey and

Re: [Tutor] Using Python to access .txt files stored behind a firewall as .exe files

2017-05-02 Thread Mats Wichmann
On 05/01/2017 06:12 PM, Ian Monat wrote: > Thank you for the reply Mats. > > I agree the fact that files are wrapped in an .exe is ridiculous. We're > talking about a $15B company that is doing this by the way, not a ma and pa > shop. Anyways... > > If I understand you correctly, you're saying

[Tutor] Pycharm Edu Lesson 3, Task 7

2017-05-02 Thread David Wolfe
Good Evening; I'm working through Pycharm Edu, and I'm stuck on the following: phrase = """ It is a really long string triple-quoted strings are used to define multi-line strings """ first_half = phrase[:len(phrase)//2] print(first_half) The instructions are: The len() function is used to

Re: [Tutor] [ctypes-users] Press ESC to exit()

2017-05-02 Thread eryk sun
On Tue, May 2, 2017 at 3:03 AM, Michael C wrote: > holy cow The code for a global keyboard hook is a bit complex - mostly because I had to use ctypes (properly instead of an unreliable hack). Normally an application has one or more windows and a message loop, in