From jeff.chen.urbana at gmail.com Tue Jun 2 06:11:48 2015 From: jeff.chen.urbana at gmail.com (Jeff Chen) Date: Mon, 1 Jun 2015 21:11:48 -0700 Subject: [Baypiggies] Why python 3 works on this domain but python 2 crashes Message-ID: Hi there, I am encountering a strange issue on python. I am trying to make a HTTP request to following domain and get response: *https://order.dominos.com * 1) When I use python 3, I used following code *import urllib.requesturl = "https://order.dominos.com "urllib.request.urlopen(url).read()* 2) When I use python 2, I used following code *import urllib2url="https://order.dominos.com "urllib2.urlopen(url).read()* The code for Python 3 worked well, but the code for Python 2 crashed the program. Both programs worked well on any other domains that I tried. Can anyone tell me why and how can I address this issue in Python 2? Really appreciate any of your help. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From yousuffauzan at gmail.com Tue Jun 2 06:31:21 2015 From: yousuffauzan at gmail.com (Yousuf Fauzan) Date: Tue, 02 Jun 2015 04:31:21 +0000 Subject: [Baypiggies] Why python 3 works on this domain but python 2 crashes In-Reply-To: References: Message-ID: Unable to reproduce in Python 2.7.9 *Python 2.7.9 (default, Jan 7 2015, 11:49:12) * *[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin* I tried it on one of my servers too *Python 2.7.3 (default, Feb 27 2014, 19:58:35) * *[GCC 4.6.3] on linux2* Could you be more specific about the "crash" part? Also the exact version and OS. -- Yousuf On Mon, Jun 1, 2015 at 9:12 PM Jeff Chen wrote: > Hi there, > > I am encountering a strange issue on python. > > I am trying to make a HTTP request to following domain and get response: *https://order.dominos.com > * > > 1) When I use python 3, I used following code > > > *import urllib.requesturl = "https://order.dominos.com > "urllib.request.urlopen(url).read()* > > 2) When I use python 2, I used following code > > > *import urllib2url="https://order.dominos.com > "urllib2.urlopen(url).read()* > > The code for Python 3 worked well, but the code for Python 2 crashed the > program. Both programs worked well on any other domains that I tried. > Can anyone tell me why and how can I address this issue in Python 2? > > Really appreciate any of your help. > > Thanks, > Jeff > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.chen.urbana at gmail.com Tue Jun 2 07:42:53 2015 From: jeff.chen.urbana at gmail.com (Jeff Chen) Date: Mon, 1 Jun 2015 22:42:53 -0700 Subject: [Baypiggies] Why python 3 works on this domain but python 2 crashes In-Reply-To: References: Message-ID: Hi, Yousuf I am on Windows 7 Professional, Python 2.7.8. Attached you can find the dialog when Python crashes. I run the python program from Windows command line. I also tested it on another Windows 7 Professional machine which runs Python 2.7.9. I got following error *""* Did you get the same error? Thanks, Jeff On Mon, Jun 1, 2015 at 9:31 PM, Yousuf Fauzan wrote: > Unable to reproduce in Python 2.7.9 > > *Python 2.7.9 (default, Jan 7 2015, 11:49:12) * > > *[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin* > > I tried it on one of my servers too > > *Python 2.7.3 (default, Feb 27 2014, 19:58:35) * > > *[GCC 4.6.3] on linux2* > > > Could you be more specific about the "crash" part? Also the exact version > and OS. > > -- > > Yousuf > > On Mon, Jun 1, 2015 at 9:12 PM Jeff Chen > wrote: > >> Hi there, >> >> I am encountering a strange issue on python. >> >> I am trying to make a HTTP request to following domain and get response: *https://order.dominos.com >> * >> >> 1) When I use python 3, I used following code >> >> >> *import urllib.requesturl = "https://order.dominos.com >> "urllib.request.urlopen(url).read()* >> >> 2) When I use python 2, I used following code >> >> >> *import urllib2url="https://order.dominos.com >> "urllib2.urlopen(url).read()* >> >> The code for Python 3 worked well, but the code for Python 2 crashed the >> program. Both programs worked well on any other domains that I tried. >> Can anyone tell me why and how can I address this issue in Python 2? >> >> Really appreciate any of your help. >> >> Thanks, >> Jeff >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> https://mail.python.org/mailman/listinfo/baypiggies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: crash-urllib2.png Type: image/png Size: 7009 bytes Desc: not available URL: From jeff.chen.urbana at gmail.com Tue Jun 2 07:45:19 2015 From: jeff.chen.urbana at gmail.com (Jeff Chen) Date: Mon, 1 Jun 2015 22:45:19 -0700 Subject: [Baypiggies] Why python 3 works on this domain but python 2 crashes In-Reply-To: <55069.24.7.60.89.1433223446.squirrel@martin-wwwss5.ssl.supercp.com> References: <55069.24.7.60.89.1433223446.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: Martin, I got the crash on Python 2.7.8 with Windows 7 Professional. I got following error on Python 2.7.9 with Windows 7 Professional *[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)* On Mon, Jun 1, 2015 at 10:37 PM, Martin Falatic wrote: > Works fine in Windows as well (tested using Idle in 2.7.9 and 3.4.3). > - Marty > > > On Mon, June 1, 2015 21:31, Yousuf Fauzan wrote: > > Unable to reproduce in Python 2.7.9 > > > > > > *Python 2.7.9 (default, Jan 7 2015, 11:49:12) * > > > > > > *[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin* > > > > > > I tried it on one of my servers too > > > > > > *Python 2.7.3 (default, Feb 27 2014, 19:58:35) * > > > > > > *[GCC 4.6.3] on linux2* > > > > > > > > Could you be more specific about the "crash" part? Also the exact version > > and OS. > > > > -- > > > > > > Yousuf > > > > > > On Mon, Jun 1, 2015 at 9:12 PM Jeff Chen > > wrote: > > > > > >> Hi there, > >> > >> > >> I am encountering a strange issue on python. > >> > >> > >> I am trying to make a HTTP request to following domain and get > >> response: *https://order.dominos.com > >> * > >> > >> > >> 1) When I use python 3, I used following code > >> > >> > >> > >> *import urllib.requesturl = "https://order.dominos.com > >> "urllib.request.urlopen(url).read()* > >> > >> > >> 2) When I use python 2, I used following code > >> > >> > >> > >> *import urllib2url="https://order.dominos.com > >> "urllib2.urlopen(url).read()* > >> > >> > >> The code for Python 3 worked well, but the code for Python 2 crashed > >> the program. Both programs worked well on any other domains that I > >> tried. Can anyone tell me why and how can I address this issue in Python > >> 2? > >> > >> > >> Really appreciate any of your help. > >> > >> > >> Thanks, > >> Jeff > >> > >> > >> _______________________________________________ > >> Baypiggies mailing list > >> Baypiggies at python.org > >> To change your subscription options or unsubscribe: > >> https://mail.python.org/mailman/listinfo/baypiggies > >> > > _______________________________________________ > > Baypiggies mailing list > > Baypiggies at python.org > > To change your subscription options or unsubscribe: > > https://mail.python.org/mailman/listinfo/baypiggies > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at falatic.com Tue Jun 2 07:37:26 2015 From: martin at falatic.com (Martin Falatic) Date: Mon, 1 Jun 2015 22:37:26 -0700 (PDT) Subject: [Baypiggies] Why python 3 works on this domain but python 2 crashes In-Reply-To: References: Message-ID: <55069.24.7.60.89.1433223446.squirrel@martin-wwwss5.ssl.supercp.com> Works fine in Windows as well (tested using Idle in 2.7.9 and 3.4.3). - Marty On Mon, June 1, 2015 21:31, Yousuf Fauzan wrote: > Unable to reproduce in Python 2.7.9 > > > *Python 2.7.9 (default, Jan 7 2015, 11:49:12) * > > > *[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin* > > > I tried it on one of my servers too > > > *Python 2.7.3 (default, Feb 27 2014, 19:58:35) * > > > *[GCC 4.6.3] on linux2* > > > > Could you be more specific about the "crash" part? Also the exact version > and OS. > > -- > > > Yousuf > > > On Mon, Jun 1, 2015 at 9:12 PM Jeff Chen > wrote: > > >> Hi there, >> >> >> I am encountering a strange issue on python. >> >> >> I am trying to make a HTTP request to following domain and get >> response: *https://order.dominos.com >> * >> >> >> 1) When I use python 3, I used following code >> >> >> >> *import urllib.requesturl = "https://order.dominos.com >> "urllib.request.urlopen(url).read()* >> >> >> 2) When I use python 2, I used following code >> >> >> >> *import urllib2url="https://order.dominos.com >> "urllib2.urlopen(url).read()* >> >> >> The code for Python 3 worked well, but the code for Python 2 crashed >> the program. Both programs worked well on any other domains that I >> tried. Can anyone tell me why and how can I address this issue in Python >> 2? >> >> >> Really appreciate any of your help. >> >> >> Thanks, >> Jeff >> >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> https://mail.python.org/mailman/listinfo/baypiggies >> > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies From martin at falatic.com Tue Jun 2 09:01:35 2015 From: martin at falatic.com (Martin Falatic) Date: Tue, 2 Jun 2015 00:01:35 -0700 (PDT) Subject: [Baypiggies] Why python 3 works on this domain but python 2 crashes In-Reply-To: References: <55069.24.7.60.89.1433223446.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: <57632.24.7.60.89.1433228495.squirrel@martin-wwwss5.ssl.supercp.com> I'm not sure why it's working for me. I did find other references to it: http://www.gossamer-threads.com/lists/python/python/1182275 http://stackoverflow.com/questions/27835619/ssl-certificate-verify-failed-error http://stackoverflow.com/questions/27804710/python-urllib2-ssl-error/27826829#27826829 One possibility is that it may be related to root certs installed on your computer. Is Windows fully updated? The following may be of use: http://stackoverflow.com/a/27847883/760905 - Marty On Mon, June 1, 2015 22:45, Jeff Chen wrote: > Martin, > > > I got the crash on Python 2.7.8 with Windows 7 Professional. > > > I got following error on Python 2.7.9 with Windows 7 Professional > > > *[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)* > > > > > On Mon, Jun 1, 2015 at 10:37 PM, Martin Falatic > wrote: > > >> Works fine in Windows as well (tested using Idle in 2.7.9 and 3.4.3). >> - Marty >> >> >> >> On Mon, June 1, 2015 21:31, Yousuf Fauzan wrote: >> >>> Unable to reproduce in Python 2.7.9 >>> >>> >>> >>> *Python 2.7.9 (default, Jan 7 2015, 11:49:12) * >>> >>> >>> >>> *[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin* >>> >>> >>> >>> I tried it on one of my servers too >>> >>> >>> >>> *Python 2.7.3 (default, Feb 27 2014, 19:58:35) * >>> >>> >>> >>> *[GCC 4.6.3] on linux2* >>> >>> >>> >>> >>> Could you be more specific about the "crash" part? Also the exact >>> version and OS. >>> >>> -- >>> >>> >>> >>> Yousuf >>> >>> >>> >>> On Mon, Jun 1, 2015 at 9:12 PM Jeff Chen >>> wrote: >>> >>> >>> >>>> Hi there, >>>> >>>> >>>> >>>> I am encountering a strange issue on python. >>>> >>>> >>>> >>>> I am trying to make a HTTP request to following domain and get >>>> response: *https://order.dominos.com >>>> * >>>> >>>> >>>> >>>> 1) When I use python 3, I used following code >>>> >>>> >>>> >>>> >>>> *import urllib.requesturl = "https://order.dominos.com >>>> "urllib.request.urlopen(url).read()* >>>> >>>> >>>> >>>> 2) When I use python 2, I used following code >>>> >>>> >>>> >>>> >>>> *import urllib2url="https://order.dominos.com >>>> "urllib2.urlopen(url).read()* >>>> >>>> >>>> >>>> The code for Python 3 worked well, but the code for Python 2 >>>> crashed the program. Both programs worked well on any other domains >>>> that I tried. Can anyone tell me why and how can I address this >>>> issue in Python 2? >>>> >>>> >>>> >>>> Really appreciate any of your help. >>>> >>>> >>>> >>>> Thanks, >>>> Jeff >>>> >>>> >>>> >>>> _______________________________________________ >>>> Baypiggies mailing list >>>> Baypiggies at python.org >>>> To change your subscription options or unsubscribe: >>>> https://mail.python.org/mailman/listinfo/baypiggies >>>> >>>> >>> _______________________________________________ >>> Baypiggies mailing list >>> Baypiggies at python.org >>> To change your subscription options or unsubscribe: >>> https://mail.python.org/mailman/listinfo/baypiggies >>> >> >> >> > From peggyli.224 at gmail.com Thu Jun 4 22:08:46 2015 From: peggyli.224 at gmail.com (Peggy Li) Date: Thu, 4 Jun 2015 13:08:46 -0700 Subject: [Baypiggies] Next Meetup on June 24 Message-ID: Everyone, I am excited to announce our next Bay Area Python Interest Group meetup. Please join us on Thursday, June 24 for Brett Slatkin's presentation on how to be more effective with classes in Python. *Abstract:* Defining a natural hierarchy of classes in Python can be challenging. Features like multiple inheritance, metaclasses, and classmethods can make such hierarchies significantly more powerful. However, these language features are complex and easy to use incorrectly. This talk will cover the best way to put the capabilities of classes to work so you can write Python programs more effectively. *About the Speaker:* Brett Slatkin is the author of *Effective Python* (Addison-Wesley 2015). He's the engineering lead and co-founder of Google Consumer Surveys. He formerly worked on Google App Engine, the PubSubHubbub protocol, and managing Google's server fleet. Please RSVP at: http://www.meetup.com/BayPIGgies/events/222968582/. We do plan to record this talk. Best, Peggy -------------- next part -------------- An HTML attachment was scrubbed... URL: From peggyli.224 at gmail.com Thu Jun 4 22:17:47 2015 From: peggyli.224 at gmail.com (Peggy Li) Date: Thu, 4 Jun 2015 13:17:47 -0700 Subject: [Baypiggies] Correction: Next Meetup is on Thursday, June 25 Message-ID: Apologies for the incorrect date listed in the previous email. The meetup is on *Thursday, June 25 *(not the 24th). The date is correct on the event page. Thanks, Peggy -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin.dslcomputer at gmail.com Fri Jun 12 16:07:06 2015 From: admin.dslcomputer at gmail.com (admin.dslcomputer at gmail.com) Date: Fri, 12 Jun 2015 14:07:06 +0000 Subject: [Baypiggies] =?utf-8?q?Installation?= Message-ID: <557ae9d1.8530370a.8e7a.ffffc6be@mx.google.com> Hi everyone, My Python compiler produced the following syntax error: Python 3.3.0+ (win8app, Dec 27 2012, 21:34:06) [MSC v.1700 32 bit (Unknown)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> >>> x = 2 >>> print x >>> Traceback (most recent call last): File "codeop.py", line 168, in __call__ File "codeop.py", line 99, in _maybe_compile File "codeop.py", line 87, in _maybe_compile File "codeop.py", line 133, in __call__ File "", line 1 print x ^ SyntaxError: invalid syntax Is there a problem with the installation of the compiler? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdbaddog at gmail.com Fri Jun 12 17:27:29 2015 From: bdbaddog at gmail.com (William Deegan) Date: Fri, 12 Jun 2015 09:27:29 -0600 Subject: [Baypiggies] Installation In-Reply-To: <557ae9d1.8530370a.8e7a.ffffc6be@mx.google.com> References: <557ae9d1.8530370a.8e7a.ffffc6be@mx.google.com> Message-ID: No. You're using python 3.0. Print now takes the following form: print("Be careful not to fall off!") -Bill On Fri, Jun 12, 2015 at 8:07 AM, wrote: > > Hi everyone, > > My Python compiler produced the following syntax error: > > Python 3.3.0+ (win8app, Dec 27 2012, 21:34:06) [MSC v.1700 32 bit (Unknown)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> >>> x = 2 > >>> print x > >>> > Traceback (most recent call last): > File "codeop.py", line 168, in __call__ > File "codeop.py", line 99, in _maybe_compile > File "codeop.py", line 87, in _maybe_compile > File "codeop.py", line 133, in __call__ > File "", line 1 > print x > ^ > SyntaxError: invalid syntax > > > Is there a problem with the installation of the compiler? > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: From chityala at gmail.com Sat Jun 13 07:21:46 2015 From: chityala at gmail.com (Ravi) Date: Fri, 12 Jun 2015 22:21:46 -0700 Subject: [Baypiggies] Python course at UCSC Extension Message-ID: Hello All, I will be teaching the evening course, "Python for programmers" at the UCSC extension in San Jose every Friday from 6:30 - 9:30 pm starting from Jun 19, 2015 until Aug 28, 2015. The course will cover the most important aspects of Python and will be very hands-on with in-class activities and homeworks. I will also provide IPython notebook that will contain many examples. To register for the course,visit http://course.ucsc-extension.edu/modules/shop/index.html?action=section&OfferingID=1531625&SectionID=5276903. UCSC Extension Silicon Valley is accredited by various bodies through the University of California, Santa Cruz. Hence, many employers will reimburse the cost of the course. Join now to become a Pythonista and program in one of the fastest growing language. You can email me at chityala at gmail.com if you have any questions. Thanks, Ravi -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenobi at gmail.com Thu Jun 18 19:25:32 2015 From: kenobi at gmail.com (Rick Kwan) Date: Thu, 18 Jun 2015 10:25:32 -0700 Subject: [Baypiggies] Mezzanine, anyone? Message-ID: Hi folks, I'm wondering if we have well-experienced Mezzanine admins around here. I've done some Django (back around 1.4), and need to move a site that is originally in WordPress with custom theme to something else. (I recently had to fight web defacement wars.) To my surprise, our hosting provider provides Phusion Passenger, with the ability to support Ruby or Python/Django, although there is no official tech support for these. I was able to bring up rudimentary Django 1.8 in virtualenv just to confirm it. Left to my own devices, I'd spend a lot of time figuring out the innards of Mezzanine and how to tailor it, but I and this project are a bit pressed for time (and it's a volunteer project). So I'm reaching out this time for other people's wisdom. I suspect this should be an off-list discussion as I get into deeper specifics. Anyone want to steer me in the right direction? I'm also open to other Python-based solutions; I suspect someone would want a requirements statement if they wanted to take me up on that. And if you like Silicon Valley space technology, that's effectively the subject matter of the site. --Rick Kwan -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholsonjf at gmail.com Thu Jun 18 23:00:33 2015 From: nicholsonjf at gmail.com (James Nicholson) Date: Thu, 18 Jun 2015 14:00:33 -0700 Subject: [Baypiggies] Mezzanine, anyone? In-Reply-To: References: Message-ID: Hey Rick, I'm working on a project now using Django-CMS v3.0.13 with Django v1.7. I'm running it on Amazon Linux using AWS/Elastic Beanstalk for hosting/deployment with Apache and Postgres. It's not necessarily a simple setup, but it's a powerful and extensible CMS with a significant online community and good documentation. Another python-powered option for you to check out! -James James Nicholson nicholsonjf.com On Thu, Jun 18, 2015 at 10:25 AM, Rick Kwan wrote: > Hi folks, > > I'm wondering if we have well-experienced Mezzanine admins around here. > I've done some Django (back around 1.4), and need to move a site that is > originally in WordPress with custom theme to something else. (I recently > had to fight web defacement wars.) > > To my surprise, our hosting provider provides Phusion Passenger, with the > ability to support Ruby or Python/Django, although there is no official > tech support for these. I was able to bring up rudimentary Django 1.8 in > virtualenv just to confirm it. > > Left to my own devices, I'd spend a lot of time figuring out the innards > of Mezzanine and how to tailor it, but I and this project are a bit pressed > for time (and it's a volunteer project). So I'm reaching out this time for > other people's wisdom. > > I suspect this should be an off-list discussion as I get into deeper > specifics. Anyone want to steer me in the right direction? I'm also open > to other Python-based solutions; I suspect someone would want a > requirements statement if they wanted to take me up on that. > > And if you like Silicon Valley space technology, that's effectively the > subject matter of the site. > > --Rick Kwan > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin.dslcomputer at gmail.com Fri Jun 19 17:32:43 2015 From: admin.dslcomputer at gmail.com (admin.dslcomputer at gmail.com) Date: Fri, 19 Jun 2015 15:32:43 +0000 Subject: [Baypiggies] =?utf-8?q?Nesting_Images_with_Text_Data?= Message-ID: <55843655.0365420a.4102.fffffd71@mx.google.com> Hi everyone: I'm searching for sample python code that nests GPS data coordination from Google's Maps API with meta data cached on a MySql server via XML? Hal Sent from Surface -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin.dslcomputer at gmail.com Thu Jun 18 06:49:06 2015 From: admin.dslcomputer at gmail.com (admin.dslcomputer at gmail.com) Date: Thu, 18 Jun 2015 04:49:06 +0000 Subject: [Baypiggies] =?utf-8?q?Hotspot_Locator?= Message-ID: <55824e78.44ad440a.0baa.20a8@mx.google.com> Hi everyone: There is interest in our group in the development of Python code to locate WiFi hotspots. My question: Is there a Python solution in the location of WiFi hotspots? Hal Sent from Surface -------------- next part -------------- An HTML attachment was scrubbed... URL: From peggyli.224 at gmail.com Wed Jun 24 19:15:46 2015 From: peggyli.224 at gmail.com (Peggy Li) Date: Wed, 24 Jun 2015 10:15:46 -0700 Subject: [Baypiggies] [Important] BayPiggies 6/25 Meetup Canceled Message-ID: Everyone, Unfortunately, there was a sudden unexpected death in Brett's family and he has to cancel his presentation tomorrow, Thursday 6/25. We will be canceling this event (How to Be More Effective with Classes) and sincerely apologize for any inconvenience this may cause you. Our condolences and thoughts are with Brett, and we hope to invite him for a rescheduled talk later this year. Thank you for your understanding, and please stay tuned for our next meetup. Best, Peggy -------------- next part -------------- An HTML attachment was scrubbed... URL: