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: n00b question on spacing

2013-06-21 Thread Yves S. Garret
On Fri, Jun 21, 2013 at 5:48 PM, Ray Cote rgac...@appropriatesolutions.comwrote: -- *From: *Yves S. Garret yoursurrogate...@gmail.com *To: *python-list@python.org *Sent: *Friday, June 21, 2013 5:17:28 PM *Subject: *n00b question on spacing Hi, I have

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

2013-06-14 Thread Yves S. Garret
moving it around? On Jun 14, 2013, at 10:53 AM, Yves S. Garret yoursurrogate...@gmail.com wrote: Hi Kevin, still more of the same: http://bin.cakephp.org/view/1358843680 The file _is_ there. I did check the JSON file, in this site: - http://paulisageek.com/json_validator/ I got

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

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

2013-06-13 Thread Yves S. Garret
S. Garret yoursurrogate...@gmail.comwrote: 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

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

2013-06-13 Thread Yves S. Garret
13, 2013, at 2:31 PM, Yves S. Garret yoursurrogate...@gmail.com wrote: This is the format that I've been following: http://gavinmhackeling.com/blog/2012/05/using-the-bing-search-api-in-python/ If I execute the specified query from a browser, the JSON file shows up without a problem. Now, I'd

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

2013-06-13 Thread Yves S. Garret
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 On Jun 13, 2013, at 3:50 PM, Yves S. Garret

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

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: return 'time not in

[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 stdin, line 1, in module File /usr/local/lib/python3.3/tkinter/__init__.py, line 40, in module

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

2013-03-18 Thread Yves S. Garret
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 get this to work well. Basically, whenever I try to import tkinter, this is the issue that I have: import tkinter

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 yo@gmail.com 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, didn't you? So it does not help installing Ubuntu's

[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? --

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, the first for-loop is run and then the list is assigned

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 your...@gmail.com wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run

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

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:

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 language. However, when I got to page 304 and did

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 your...@gmail.com wrote: 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

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 your...@gmail.com wrote: In the example that I have posted from the book it works just fine. Yep, I just checked the book's version again and the difference

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

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
Hello, I'm trying to brush up on my Python and would like to -- 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