Re: n00b question on spacing

2013-06-21 Thread Yves S. Garret
On Fri, Jun 21, 2013 at 5:48 PM, Ray Cote wrote: > > -- > > *From: *"Yves S. Garret" > *To: *python-list@python.org > *Sent: *Friday, June 21, 2013 5:17:28 PM > *Subject: *n00b question on spacing > > > Hi, I have a question abo

n00b question on spacing

2013-06-21 Thread Yves S. Garret
Hi, I have a question about breaking up really long lines of code in Python. I have the following line of code: log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'], settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider) Given the fact that it goes off very far to the

Re: Having a hard time to 'get' bing api search results

2013-06-14 Thread Yves S. Garret
; so maybe it got messed up moving it around? > > > > > > On Jun 14, 2013, at 10:53 AM, "Yves S. Garret" > wrote: > > Hi Kevin, still more of the same: > http://bin.cakephp.org/view/1358843680 > > The file _is_ there. I did check the JSON file,

Re: Having a hard time to 'get' bing api search results

2013-06-13 Thread Yves S. Garret
r welcome. > > > To be honest I am not 100% on the differences between. > > I could be off, but I recall urllib2 was a more refined version of urllib. > > Yet it seems like urllib works better for me, when I need to do a simple > call like this. > > > -Kevin > >

Re: Having a hard time to 'get' bing api search results

2013-06-13 Thread Yves S. Garret
, 401, 'The authorization type you provided is not > supported. Only Basic and OAuth are supported', > > > > > > On Jun 13, 2013, at 2:31 PM, Yves S. Garret > wrote: > > This is the format that I've been following: > > http://gavinmhackeling.com/blog/2012/0

Re: Having a hard time to 'get' bing api search results

2013-06-13 Thread Yves S. Garret
7 PM, Yves S. Garret wrote: > Hello all, > > This is my dilemma, I'm trying to get the generated JSON file using the > bing api > search. > > This is the code that I'm executing from inside the shell: > http://bin.cakephp.org/view/460660617 > > Th

Having a hard time to 'get' bing api search results

2013-06-13 Thread Yves S. Garret
Hello all, This is my dilemma, I'm trying to get the generated JSON file using the bing api search. This is the code that I'm executing from inside the shell: http://bin.cakephp.org/view/460660617 The port doesn't matter to me. Thoughts? -- http://mail.python.org/mailman/listinfo/python-list

Why won't Python 2/3 compile when I have valgrind installed?

2013-05-24 Thread Yves S. Garret
This isn't a huge issue, but I'm wondering. I'm running Mac OS X, I tried to configure with --with-valgrind and this is the error that I got: configure: error: Valgrind support requested but headers not available Now, I have valgrind installed, so it should work, yes? If someone has any extra in

Re: [Python 3.3.0] Getting tkinter to work on Python 3

2013-03-18 Thread Yves S. Garret
On Monday, March 18, 2013 2:39:57 PM UTC-4, Lele Gaifax wrote: > "Yves S. Garret" writes: > > > I have. This is what I did and the result that I'm seeing. > > > > $ sudo apt-get install python3-tk > > You installed a "custom" python 3.3

Re: [Python 3.3.0] Getting tkinter to work on Python 3

2013-03-18 Thread Yves S. Garret
PM, Ritchie Flick wrote: > Seems tkinter is missing in standard installation in ubuntu. Try: > sudo apt-get install python3-tk > > > On Mon, Mar 18, 2013 at 6:17 PM, Yves S. Garret < > yoursurrogate...@gmail.com> wrote: > >> Hi. I'm having a problem trying to

[Python 3.3.0] Getting tkinter to work on Python 3

2013-03-18 Thread Yves S. Garret
Hi. I'm having a problem trying to get this to work well. Basically, whenever I try to import tkinter, this is the issue that I have: >>> import tkinter Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.3/tkinter/__init__.py", line 40, in import _tkint

Re: What are some other way to rewrite this if block?

2013-03-18 Thread Yves S. Garret
On Monday, March 18, 2013 9:56:16 AM UTC-4, Santosh Kumar wrote: > This simple script is about a public transport, here is the code: > > > > def report_status(should_be_on, came_on): > > if should_be_on < 0.0 or should_be_on > 24.0 or came_on < 0.0 or > > came_on > 24.0: > > retur

Re: [Python 2.7.3] What's the difference between these two uses of "for"?

2013-03-17 Thread Yves S. Garret
I don't get why it's posting what I said twice... -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python 2.7.3] What's the difference between these two uses of "for"?

2013-03-17 Thread Yves S. Garret
On Sunday, March 17, 2013 9:28:56 PM UTC-4, Roy Smith wrote: > In article <485a3093...@googlegroups.com>, > > "Yves S. Garret" wrote: > > > > > N00b question. But here is the code: > > > > > > http://bin.cakephp.org/view/7092018

Re: [Python 2.7.3] What's the difference between these two uses of "for"?

2013-03-17 Thread Yves S. Garret
On Sunday, March 17, 2013 9:18:12 PM UTC-4, Gary Herron wrote: > On 03/17/2013 05:58 PM, Yves S. Garret wrote: > > > N00b question. But here is the code: > > > > > > http://bin.cakephp.org/view/709201806 > > > > > > In the first example

[Python 2.7.3] What's the difference between these two uses of "for"?

2013-03-17 Thread Yves S. Garret
N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky variable. But, what happens in the second example? Does the loop after "in" get run only once or multiple number of times? -

Having a hard time installing pygame on Win7.

2013-03-16 Thread Yves S. Garret
Hi all, got a small problem. As I'm going through "Python Programming for the Absolute Beginner", I got to chapter 11 and as I'm working through it, I can't seem to get pygame/livewires installed... I don't even know how to go about installing it (the book is skimpy on details). I'm using Pyt

Re: What am I doing wrong in this simple tkinter example?

2013-03-16 Thread Yves S. Garret
On Saturday, March 16, 2013 11:23:07 AM UTC-4, Chris Angelico wrote: > On Sun, Mar 17, 2013 at 2:16 AM, Yves S. Garret > > wrote: > > > In the example that I have posted from the book it works just fine. > > > > Yep, I just checked the book's version aga

Re: What am I doing wrong in this simple tkinter example?

2013-03-16 Thread Yves S. Garret
On Saturday, March 16, 2013 11:08:24 AM UTC-4, Chris Angelico wrote: > On Sun, Mar 17, 2013 at 1:53 AM, Yves S. Garret > > wrote: > > > Hi all, I'm well into "Python Programming for the Absolute Beginner" in > > order to > > > become more acqua

Re: What am I doing wrong in this simple tkinter example?

2013-03-16 Thread Yves S. Garret
On Saturday, March 16, 2013 11:10:07 AM UTC-4, Mitya Sirenef wrote: > On 03/16/2013 10:53 AM, Yves S. Garret wrote: > > > Hi all, I'm well into "Python Programming for the Absolute Beginner" in > > order to > > > become more acquainted with the langu

What am I doing wrong in this simple tkinter example?

2013-03-16 Thread Yves S. Garret
Hi all, I'm well into "Python Programming for the Absolute Beginner" in order to become more acquainted with the language. However, when I got to page 304 and did my first example: http://bin.cakephp.org/view/1107093008 And this is the error that I'm getting: http://bin.cakephp.org/view/3997

Unable to compile Python 2.7.3 in Cygwin

2012-09-11 Thread Yves S. Garret
Hi, I'm trying to compile Python in Cygwin, with little luck. I've posted the ugliness in this link. Thoughts? http://bin.cakephp.org/view/176472400 -- http://mail.python.org/mailman/listinfo/python-list

Good web-development Python book

2012-03-23 Thread Yves S. Garret
Oooops! Sent my previous e-mail too soon! Didn't mean to. Another try. Hello, I'm trying to brush up on my Python and would like to learn how to make web-apps. I was hoping to get a good book on learning how to make web-applications using Python (as opposed to something like PHP) without a

Good web-development Python book

2012-03-23 Thread Yves S. Garret
Hello, I'm trying to brush up on my Python and would like to -- http://mail.python.org/mailman/listinfo/python-list