Re: [Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread eryksun
On Sun, Dec 8, 2013 at 8:49 PM, Mark Lawrence wrote: > > https://pypi.python.org/pypi/Pillow/ is a fork of PIL. I've never used it > myself but here's hoping!!! ImageGrab has built-in support for Microsoft Windows only: https://github.com/python-imaging/Pillow/blob/2.2.1/PIL/ImageGrab.py#L29 ht

Re: [Tutor] No module named '_tkinter'

2013-12-08 Thread Reuben
Can you try importing the module '_tkinter' On 09-Dec-2013 6:43 AM, "pierre dagenais" wrote: > Hi, > I'm running Ubuntu 10.04 and I've installed python 3.3.3 from the > tarball at http://python.org/ftp/python/3.3.3/Python-3.3.3.tar.xz > > Here is the error I get when trying to run tkinter. > > pi

Re: [Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread Mark Lawrence
On 09/12/2013 01:10, Benjamin Fishbein wrote: Here's what printed out: Traceback (most recent call last): File "", line 1, in from PIL import ImageGrab File "/Library/Python/2.7/site-packages/PIL/ImageGrab.py", line 34, in import _grabscreen ImportError: No module named _grabs

Re: [Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread Srinivas Nyayapati
>From what I've seen online, this isn't available for mac...of course everything about this module is several years old, and it hasn't been updated with a new version in a few years, so I think there must be something better than it. > You could give Pillow a try. It is a fork of the PIL library

Re: [Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread Joel Goldstick
On Sun, Dec 8, 2013 at 8:10 PM, Benjamin Fishbein wrote: > Have you imported PIL ? Show a small coding example here with the > traceback. Cut and paste the traceback, don't paraphrase it. > > > Here's what printed out: > > Traceback (most recent call last): > File "", line 1, in > from PIL

[Tutor] No module named '_tkinter'

2013-12-08 Thread pierre dagenais
Hi, I'm running Ubuntu 10.04 and I've installed python 3.3.3 from the tarball at http://python.org/ftp/python/3.3.3/Python-3.3.3.tar.xz Here is the error I get when trying to run tkinter. pierre@Sprint:~$ python3.3 Python 3.3.3 (default, Dec 2 2013, 11:10:53) [GCC 4.6.3] on linux Type "help", "c

Re: [Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread Benjamin Fishbein
> Have you imported PIL ? Show a small coding example here with the traceback. > Cut and paste the traceback, don't paraphrase it. Here's what printed out: Traceback (most recent call last): File "", line 1, in from PIL import ImageGrab File "/Library/Python/2.7/site-packages/PIL/Image

Re: [Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread Joel Goldstick
On Sun, Dec 8, 2013 at 7:14 PM, Benjamin Fishbein wrote: > Hello. > I'm writing a program to draw pictures. I'm using Python 2.7.3 on Mac OSx. > I'm trying to find a good way to save the canvas as a jpg (or other pic > formats). The advice I've found on stackoverflow is ImageGrab from PIL, but > a

[Tutor] saving Tkinter canvas as jpg

2013-12-08 Thread Benjamin Fishbein
Hello. I'm writing a program to draw pictures. I'm using Python 2.7.3 on Mac OSx. I'm trying to find a good way to save the canvas as a jpg (or other pic formats). The advice I've found on stackoverflow is ImageGrab from PIL, but apparently that doesn't work for macs. I get the "no module named

Re: [Tutor] Suggestion required on python as scripting language

2013-12-08 Thread Amit Saha
Hello, On Sun, Dec 8, 2013 at 4:59 PM, Shankar Donepudi wrote: > Hi All, > > I am working as test engineer in Networking in storage domain. We have > decided to automate our testing and have chosen python for the same. We have > basic knowledge on python so can anyone suggest good tutorials for w

Re: [Tutor] Suggestion required on python as scripting language

2013-12-08 Thread bob gailer
On 12/8/2013 1:59 AM, Shankar Donepudi wrote: Hi All, I am working as test engineer in Networking in storage domain. We have decided to automate our testing and have chosen python for the same. We have basic knowledge on python so can anyone suggest good tutorials for writing automation scrip

Re: [Tutor] Unit testing in Python (3.3.0) for beginners

2013-12-08 Thread Alan Gauld
On 08/12/13 10:22, Rafael Knuth wrote: My understanding of unit testing is that I have to embed my code into a test and then I have to define conditions under which my code is supposed to fail and pass. Is that assumption correct? That's correct for any kind of unit testing, not just using the

Re: [Tutor] Unit testing in Python (3.3.0) for beginners

2013-12-08 Thread Steven D'Aprano
On Sun, Dec 08, 2013 at 11:22:37AM +0100, Rafael Knuth wrote: > Hey there, > > I struggle to understand what unit testing specifically means in > practice and how to actually write unit tests for my code (my gut is > telling me that it's a fairly important concept to understand). In practice, uni

Re: [Tutor] Unit testing in Python (3.3.0) for beginners

2013-12-08 Thread Mark Lawrence
On 08/12/2013 10:22, Rafael Knuth wrote: Hey there, I struggle to understand what unit testing specifically means in practice and how to actually write unit tests for my code (my gut is telling me that it's a fairly important concept to understand). Over the last few days I learned how to write

Re: [Tutor] Alternatives to append() for "growing" a list

2013-12-08 Thread spir
On 12/08/2013 07:14 AM, Amit Saha wrote: >If all of the bitN are strings: > bit1 + bit2 + bit3 + bit4 + bit5 >actually constructs: > bit1+bit2 > bit1+bit2+bit3 > bit1+bit2+bit3+bit4 > bit1+bit2+bit3+bit4+bit5 >A number of unneeded string object, and a very

Re: [Tutor] Suggestion required on python as scripting language

2013-12-08 Thread spir
On 12/08/2013 07:59 AM, Shankar Donepudi wrote: Hi All, I am working as test engineer in Networking in storage domain. We have decided to automate our testing and have chosen python for the same. We have basic knowledge on python so can anyone suggest good tutorials for writing automation script

Re: [Tutor] Unit testing in Python (3.3.0) for beginners

2013-12-08 Thread spir
On 12/08/2013 11:22 AM, Rafael Knuth wrote: Hey there, I struggle to understand what unit testing specifically means in practice and how to actually write unit tests for my code (my gut is telling me that it's a fairly important concept to understand). [...] Hello Rafael, This post is quite l

Re: [Tutor] Unit testing in Python (3.3.0) for beginners

2013-12-08 Thread Amit Saha
On Sun, Dec 8, 2013 at 8:22 PM, Rafael Knuth wrote: > Hey there, > > I struggle to understand what unit testing specifically means in > practice and how to actually write unit tests for my code (my gut is > telling me that it's a fairly important concept to understand). Your gut feeling is right.

[Tutor] Unit testing in Python (3.3.0) for beginners

2013-12-08 Thread Rafael Knuth
Hey there, I struggle to understand what unit testing specifically means in practice and how to actually write unit tests for my code (my gut is telling me that it's a fairly important concept to understand). Over the last few days I learned how to write and work with classes, I learned quite a l

[Tutor] Suggestion required on python as scripting language

2013-12-08 Thread Shankar Donepudi
Hi All, I am working as test engineer in Networking in storage domain. We have decided to automate our testing and have chosen python for the same. We have basic knowledge on python so can anyone suggest good tutorials for writing automation scripts using python. Thanks in advance, Shanky ___

Re: [Tutor] Alternatives to append() for "growing" a list

2013-12-08 Thread Steven D'Aprano
On Sun, Dec 08, 2013 at 04:10:45PM +1000, Amit Saha wrote: > It didn't have to do with strings. It was a basic example of using > append() which is to start with an empty list and and then build it > incrementally: > > >>> l = [ ] > >>> l.append(1) > # append more If this is literally what the c