From scott.scites at railcar88.com Thu Jun 2 13:18:48 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Thu, 2 Jun 2011 07:18:48 -0400 Subject: [CentralOH] CentralOH Digest, Vol 50, Issue 1 In-Reply-To: <001d01cc205e$19507660$4bf16320$@com> References: <001d01cc205e$19507660$4bf16320$@com> Message-ID: David, Please see this url for details: http://pythondojoe.appspot.com/ Feel free to join me at Cup O Joe's:) Scott On Wed, Jun 1, 2011 at 9:16 AM, David Chew wrote: > Just starting on this book, where is this held in case I have questions? > > -----Original Message----- > From: centraloh-bounces+david=wwcols.com at python.org > [mailto:centraloh-bounces+david=wwcols.com at python.org] On Behalf Of > centraloh-request at python.org > Sent: Wednesday, June 01, 2011 6:00 AM > To: centraloh at python.org > Subject: CentralOH Digest, Vol 50, Issue 1 > > Send CentralOH mailing list submissions to > centraloh at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/centraloh > or, via email, send a message with subject or body 'help' to > centraloh-request at python.org > > You can reach the person managing the list at > centraloh-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of CentralOH digest..." > > > Today's Topics: > > 1. Python DoJoe Hacker Session Notes - 05-31-11 (Scott Scites) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 31 May 2011 07:22:11 -0400 > From: Scott Scites > To: centraloh > Subject: [CentralOH] Python DoJoe Hacker Session Notes - 05-31-11 > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > I completed the following Learn Python the Hard Way > exercises 14 (Prompting And Passing), 15 (Reading Files) and 16 > (Reading And Writing Files). > > Next week we'll aim to get the following exercises completed: > 17 More Files > 18 Names, Variables, Code, Functions > 19 Functions And Variables > > Happy Hacking! > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > < > http://mail.python.org/mailman/private/centraloh/attachments/20110531/c6e63 > afa/attachment-0001.html> > > ------------------------------ > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > > End of CentralOH Digest, Vol 50, Issue 1 > **************************************** > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Fri Jun 3 06:01:42 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 3 Jun 2011 00:01:42 -0400 Subject: [CentralOH] VIM / omnicompletion Message-ID: <03104EE9-1DB7-4514-AAC7-35093C076524@microenh.com> Could someone tell me (or point me to a web page) how to set up vim's omnicompletion to work with Python. I'm a relative newbie with vim. I downloaded pythoncomplete.vim to my ~/.vim/ftplugin directory but when I do c-x, c-o while editing a .py file I get the message "omnifunc not set". I've also tried putting this file in the ~/.vim/autoload directory. I added the line set ofu=syntaxcomplete#Complete to my .vimrc file and now when I do c-x, c-o, I get a "Pattern not found" when it's obvious to me that the pattern should be found (i.e. the function was defined two lines above where I'm entering its name) From eric at intellovations.com Fri Jun 3 18:09:26 2011 From: eric at intellovations.com (Eric Floehr) Date: Fri, 3 Jun 2011 12:09:26 -0400 Subject: [CentralOH] Don't forget to submit your PyOhio talk, panel, or tutorial proposal Message-ID: All, The deadline to submit PyOhio talk, panel, and tutorial proposals is TODAY. We've given you a couple of ways you can submit your talks. You can send an email to cfp at pyohio.org with your proposal, as always, --OR-- we have moved the PyOhio website to the PyCon code-base (but better) so you can submit a talk just like you did for PyCon. Just go here: http://pyohio.org/proposal/submit/ (you'll need to register and create a speaker profile first). We are looking forward to your proposal, and with your help, will make this PyOhio the best ever! Have a great weekend, Eric P.S. Just between you and me (shhhh...) we know this was a short week with Memorial Day and all. If you need the weekend to finish your proposal, that's ok. Just get it in before Monday morning, ok? P.P.S. Let me know if you run into any odd issues... this code will likely be used for future conferences like DjangoCon and PyCon, but we are one of the first :-). You can also register to attend as well http://pyohio.org/register/ (we'll make a big announcement next week... consider this a *soft* launch). -------------- next part -------------- An HTML attachment was scrubbed... URL: From pythondevdang at lazytwinacres.net Fri Jun 3 21:51:46 2011 From: pythondevdang at lazytwinacres.net (Daniel 'Dang' Griffith) Date: Fri, 3 Jun 2011 15:51:46 -0400 Subject: [CentralOH] PyCharm Message-ID: Do any of y'all use the PyCharm IDE? I've used Notepad++ for quite a while, and am moderately happy with it, but find myself wishing it had a little more "awareness" of Python. I know there is a Python plugin for Eclipse, but I've always found the Eclipse UI intimidating. I haven't looked seriously at Komodo, only because of the price (it might be worth $300, but for that much, I want something less language-specific, like SlickEdit or UltraEdit). PyCharm is only $100 for an individual-developer license, and I think that's pretty reasonable for what it seems to do. I haven't downloaded the demo; I might do that this weekend. But I'd rather hear feedback from any of you who have tried it, whether you liked it or not. And if you did, what feature(s) did you particularly like or dislike? Thanks, --dang p.s. I still am in mourning for the loss of Premia/Borland/Inprise/Embarcadero's CodeWright. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Fri Jun 3 22:03:19 2011 From: eric at intellovations.com (Eric Floehr) Date: Fri, 3 Jun 2011 16:03:19 -0400 Subject: [CentralOH] PyCharm In-Reply-To: References: Message-ID: I've been a fan of WingIDE for many years. WingIDE 101 is free, WingIDE personal is $45, and WingIDE Pro (what I use) is $95 for hobbiest or student use. https://wingware.com/ -Eric On Fri, Jun 3, 2011 at 3:51 PM, Daniel 'Dang' Griffith < pythondevdang at lazytwinacres.net> wrote: > Do any of y'all use the PyCharm IDE? I've used Notepad++ for quite a while, > and am moderately happy with it, but find myself wishing it had a little > more "awareness" of Python. I know there is a Python plugin for Eclipse, but > I've always found the Eclipse UI intimidating. I haven't looked seriously at > Komodo, only because of the price (it might be worth $300, but for that > much, I want something less language-specific, like SlickEdit or UltraEdit). > > PyCharm is only $100 for an individual-developer license, and I think > that's pretty reasonable for what it seems to do. I haven't downloaded the > demo; I might do that this weekend. > > But I'd rather hear feedback from any of you who have tried it, whether you > liked it or not. And if you did, what feature(s) did you particularly like > or dislike? > > Thanks, > --dang > p.s. > I still am in mourning for the loss of Premia/Borland/Inprise/Embarcadero's > CodeWright. > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Fri Jun 3 23:15:32 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 3 Jun 2011 17:15:32 -0400 Subject: [CentralOH] PyCharm In-Reply-To: References: Message-ID: <63F88498-09F0-42F8-8176-D2A08F4EE7E3@microenh.com> On Jun 3, 2011, at 3:51 PM, Daniel 'Dang' Griffith wrote: > Do any of y'all use the PyCharm IDE? I've used Notepad++ for quite a while, and am moderately happy with it, but find myself wishing it had a little more "awareness" of Python. I know there is a Python plugin for Eclipse, but I've always found the Eclipse UI intimidating. I haven't looked seriously at Komodo, only because of the price (it might be worth $300, but for that much, I want something less language-specific, like SlickEdit or UltraEdit). Thanks for the heads up on a new IDE. For years, I've used Eclipse with PyDev and think I've gotten pretty good with it. I don't know if it's the time I spent with it or the small percentage of its features that I use, but I don't find it that intimidating and I'm able to get my work done relatively easily. That being said, some of the COhPy folks are using vi (or vim) with various plugins and I'm starting to explore that. Mark From mark at microenh.com Sun Jun 5 03:54:18 2011 From: mark at microenh.com (Mark Erbaugh) Date: Sat, 4 Jun 2011 21:54:18 -0400 Subject: [CentralOH] Idle on Mac OSX 10.6 (Snow Leopard) Message-ID: When I'm experimenting with Python on Windows and Linux, I find the Idle IDE very useful. It's easy to quickly try things interactively. In fact, before moving on to more "advanced" development environments, I felt I was quite productive using Idle. On the Mac it is a different story. One thing, the version of Idle that is pre-installed is flaky. It would crash most times that I used it. This really suprised me. Up to that time, the 'official' Python software had been very robust. Also, that experience didn't jibe well with my perception of the Mac as a very stable platform. Recently, I found this post http://www.python.org/download/mac/tcltk/ that explains the problems and offers work-arounds. In a nutshell, the problem turns out to be incompatibilities with Python and the version of Tcl/Tk. I upgraded to Python 2.7 which seems to solve the stability issues. The other problem on the Mac was the default directory when Idle was launched. On Windows and Linux, if you use a context (right-click) menu to launch Idle with a file, the default directory (os.getcwd()) will be the directory containing the file which is usually what I want. On the Mac, the default directory seems to be my Documents (/Users/mark/Documents) directory, which makes navigating around files in the same directory as the initial file difficult. I did a little investigating and it looked like the behavior was due to the way AppleEvents are used in the launch process. The first workaround I found was that I opened a terminal window in the directory with my Python file and launched Idle from the command line, the default directory is properly set. While this works, having the terminal window around is ugly. The terminal window is dead while Idle is running. The Python 2.7 that I installed comes with a Build Applet applet. These applets are designed to have files or directories (folders) dropped on them. I decided to write an applet that when a Python file is dropped on it, would open Idle with that file with the default directory set to the directory containing the file. If a folder is dropped on the applet, Idle is opened without a file, and with the default directory set to that folder. While I was at it, I added some code from the activate_this.py script to set up a virtualenv. Here's what I came up with: > """ > Use the Python "Build Applet" Applet to conver this script to an applet. > > Drag a .py file to the applet to launch Idle and open the file with > the current directory set to the directory containing the file. > > Drag a folder to the applet to launch Idle with the current directory > set to that folder. Note: ignore the error. > > Note: the Console shows a Python error: "Tried to setup shared memory more > than once." - seems benign. > """ > > import sys > import os > > d = sys.argv[1] > > if not os.path.isdir(d): > d = os.path.dirname(d) > > base = None > p1 = d > while True: > p2 = os.path.join(p1, 'bin', 'activate') > if os.path.exists(p2): > base = p1 > break > if p1 == '/': > break > p1 = os.path.dirname(p1) > > if base: > # activate virtualenv > if sys.platform == 'win32': > site_packages = os.path.join(base, 'Lib', 'site-packages') > else: > site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages') > prev_sys_path = list(sys.path) > import site > site.addsitedir(site_packages) > sys.real_prefix = sys.prefix > sys.prefix = base > # Move the added items to the front of the path: > new_sys_path = [] > for item in list(sys.path): > if item not in prev_sys_path: > new_sys_path.append(item) > sys.path.remove(item) > sys.path[:0] = new_sys_path > > > os.chdir(d) > # os.execl("/usr/local/bin/idle2.7", "") > > # launch idle > from idlelib import idle > There are currently a couple of minor problems as noted in the docstring: Python writes a message to stderr (visible in the Mac's Console app), "Tried to set up shared memory more than once." and when you drop a folder on the applet, while it works as desired, there is a popup message "xxx is a directory". Both of these appear to be benign. The scheme used to determing the virtualenv to activate is based on the way I set up my workspaces. I set up one workspace (top level directory) for each virtualenv. Inside that directory, I create a directory for each project using that virtualenv. Thus, the virtualenv's bin, include and lib directories are sibling directories to the project's top level directory. To check for a virtualenv, I back up the directory path of the file os.path.dirname looking for a level at which I find a sibling bin directory that contains the activate file. If I find one, that's the virtualenv I activate. If I reach the top of the file system without finding one, I don't setup a virtualenv. Comments are welcome. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Mon Jun 6 21:25:38 2011 From: eric at intellovations.com (Eric Floehr) Date: Mon, 6 Jun 2011 15:25:38 -0400 Subject: [CentralOH] PyOhio talks Message-ID: All, I was both saddened and excited when I looked at the talks proposed for PyOhio this year. ?I was excited, because there are names I don't recognize and some excellent topics being proposed. ?That means PyOhio's reach is growing, and there will definitely be some great talks. I was saddened because I didn't see very many proposals from Central Ohio folks at all. I know there is a lot of great Python developers here, a lot of talent, and a lot of interesting ideas based on our COhPy talks and discussions. Don't forget, when you submit the abstract, you have two months to polish the talk. ?And anyone is welcome to talk at our meetings to bounce ideas, practice parts of talks, etc. We'll leave the door open for a few more days to submit a talk: http://pyohio.org/proposal/submit/ It would be really great to see a few more Central Ohio Python hackers at the podium! Best Regards, Eric From cbc at unc.edu Tue Jun 7 07:30:59 2011 From: cbc at unc.edu (Chris Calloway) Date: Tue, 07 Jun 2011 01:30:59 -0400 Subject: [CentralOH] Seattle PyCamp 2011 Message-ID: <4DEDB793.5070903@unc.edu> University of Washington Marketing and the Seattle Plone Gathering host the inaugural Seattle PyCamp 2011 at The Paul G. Allen Center for Computer Science & Engineering on Monday, August 29 through Friday, September 2, 2011. Register today at http://trizpug.org/boot-camp/seapy11/ For beginners, this ultra-low-cost Python Boot Camp makes you productive so you can get your work done quickly. PyCamp emphasizes the features which make Python a simpler and more efficient language. Following along with example Python PushUps? speeds your learning process. Become a self-sufficient Python developer in just five days at PyCamp! PyCamp is conducted on the campus of the University of Washington in a state of the art high technology classroom. -- Sincerely, Chris Calloway http://nccoos.org/Members/cbc office: 3313 Venable Hall phone: (919) 599-3530 mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599 From jep200404 at columbus.rr.com Tue Jun 7 17:29:10 2011 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 7 Jun 2011 11:29:10 -0400 Subject: [CentralOH] Austin Message-ID: <20110607112910.2ef12f7e.jep200404@columbus.rr.com> This is about what was mentioned at the last meeting. Wikipedia corroborates that Austin and Columbus are similar in populatin (both cities themselves metropolitan area). http://en.wikipedia.org/wiki/Austin,_Texas http://en.wikipedia.org/wiki/Columbus,_Ohio Austin is bigger than just Dell http://www.edn.com/article/518150-Samsung_hiring_in_Austin.php http://www.edn.com/article/517608-Samsung_to_hire_300_engineers_technicians_in_Austin.php From eric at intellovations.com Tue Jun 7 23:54:30 2011 From: eric at intellovations.com (Eric Floehr) Date: Tue, 7 Jun 2011 17:54:30 -0400 Subject: [CentralOH] Open Science App Competition (Possible hackathon subject) In-Reply-To: References: Message-ID: Forwarding from PGH Python group a post by Joshua Adelman: ---------- Forwarded message ---------- I just saw this on the Public Library of Science (PLoS) blog: http://blogs.plos.org/plos/2011/06/build-an-app-that-makes-science-more-open/ and thought it might make an interesting subject for a PghPy coding event. Both APIs have examples in python: https://github.com/Mendeley/mendeley-oapi-example http://api.plos.org/search-examples/plos_search.py There are cash prizes involved which might incentivize the effort From eric at intellovations.com Wed Jun 8 00:49:25 2011 From: eric at intellovations.com (Eric Floehr) Date: Tue, 7 Jun 2011 18:49:25 -0400 Subject: [CentralOH] PyOhio 2011 Registration now open Message-ID: All, PyOhio 2011 registration is now officially open! PyOhio is a two-day conference on July 30 and 31, 2011 at the Ohio Union at the Ohio State University (same place as last year). We have some great sponsors this year, some great giveaways planned (official announcements soon), and from the looks of the talk, tutorial, and panel submissions, some awesome talks this year. We will even have T-Shirts this year! As always, the conference is free, and we will provide coffee, tea, pop, and snacks. We might need to ask for T--Shirt money, but it will be at-cost, and optional. But I think a T-Shirt will be an awesome souvenir for a great weekend! Please register at http://www.pyohio.org and then click "Register". I look forward to seeing you at PyOhio this year!! Best Regards, Eric From scott.scites at railcar88.com Wed Jun 8 06:44:50 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Wed, 8 Jun 2011 00:44:50 -0400 Subject: [CentralOH] Python DoJoe - Hacker Session Notes - 06-07-11 Message-ID: I was surprised and glad to see Mark Erbaugh this morning at the DoJoe. Instead of working on Learn Python the Hard Way exercises, Mark and I tried to get Idle to work on his mac laptop. We then installed NERDTree and BufExplorer into his Vim setup. We ran out of time while gitting PyDiction setup. Next week we may pair on personal projects using test driven development. We'll see;) Happy Hacking! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Thu Jun 9 16:21:23 2011 From: eric at intellovations.com (Eric Floehr) Date: Thu, 9 Jun 2011 10:21:23 -0400 Subject: [CentralOH] COhPy meeting June 27 Message-ID: What: Writing Games and Image Steganography in Python When: Monday, June 27, 2011 6:30 PM Where: TechColumbus 1275 Kinnear Rd Columbus, OH 43212 Full meetup details and RSVP: http://meetu.ps/1VqMN We have a double header for this meeting of the Central Ohio Python Users Group... Pete Carswell will walk through his proposed PyOhio tutorial on writing games in Python, using Panda3D and other tools, and Miles Gronan will talk about image steganography: what is it, why would someone want to use it, how could it be implemented in python. Afterwards we'll find a place that doesn't close at 8pm (thanks, Panera :-() for food, drink, and Python. Don't forget to register for PyOhio if you haven't already! RSVP here: http://meetu.ps/1VqMN See you there! Eric From mark at microenh.com Fri Jun 10 14:37:58 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 10 Jun 2011 08:37:58 -0400 Subject: [CentralOH] virtualenv best practices for version control Message-ID: <247D321D-E3B8-484E-BF4B-461946BFCBCA@microenh.com> If I have several non-related Python projects that use the same virtualenv setup should I create a separate virtualenv for each? The obvious advantage is that if I need to update the virtualenv for just one of the projects, that change wouldn't affect the other projects. One disadvantage is setting up multiple identical virtualenvs. Is it possible to duplicate a virtualenv without rebuilding from scratch? It looks like a several of the scripts in the bin directory have the top level directory hardcoded. What's the best way to keep track of the virtualenv setup when using version control on a project? Ideally, I'd like to be able to check out the project and not have to worry about recreating the virtualenv. I suppose if there were only one project in a virtualenv, I could check the entire virtualenv into version control, but this still has the problem that it needs to be checked out into the same top level directory. If you do re-create a virtualenv when you work on an old project, should you be concerned about not being able to find the same version of a library online? Do you include the library installers in version control, just in case? Thanks, Mark From ransom1982 at gmail.com Fri Jun 10 19:04:52 2011 From: ransom1982 at gmail.com (Matthew Talbert) Date: Fri, 10 Jun 2011 13:04:52 -0400 Subject: [CentralOH] virtualenv best practices for version control In-Reply-To: <247D321D-E3B8-484E-BF4B-461946BFCBCA@microenh.com> References: <247D321D-E3B8-484E-BF4B-461946BFCBCA@microenh.com> Message-ID: On Fri, Jun 10, 2011 at 8:37 AM, Mark Erbaugh wrote: > If I have several non-related Python projects that use the same virtualenv setup should I create a separate virtualenv for each? ?The obvious advantage is that if I need to update the virtualenv for just one of the projects, that change wouldn't affect the other projects. One disadvantage is setting up multiple identical virtualenvs. > > Is it possible to duplicate a virtualenv without rebuilding from scratch? ?It looks like a several of the scripts in the bin directory have the top level directory hardcoded. > > What's the best way to keep track of the virtualenv setup when using version control on a project? ?Ideally, I'd like to be able to check out the project and not have to worry about recreating the virtualenv. I suppose if there were only one project in a virtualenv, I could check the entire virtualenv into version control, but this still has the problem that it needs to be checked out into the same top level directory. > > If you do re-create a virtualenv when you work on an old project, should you be concerned about not being able to find the same version of a library online? ?Do you include the library installers in version control, just in case? We use Fabric to automate setting up a virtualenv. This is particularly helpful when working on the same project with multiple developers. You can add a file "requirements.txt" or something similar that is used to install certain libraries (and even specific versions). Here's a relevant portion of our fabfile.py: def create_virtualenv(): local('virtualenv venv') And a requirements.txt can look something like this: django==1.2.5 django-tagging -e git+git://github.com/django-mptt/django-mptt.git#egg=django-mptt feincms==1.2.2 -e svn+http://django-photologue.googlecode.com/svn/trunk/#egg=django-photologue south django-tastypie I believe that requirements.txt is the default filename used by virtualenv when it creates a new virtualenv, so if you don't want to mess with Fabric, just adding this requirements.txt to your repo should be sufficient, then you can just create the virtualenv with "virtualenv [name]". Matthew From mark at microenh.com Fri Jun 10 20:10:23 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 10 Jun 2011 14:10:23 -0400 Subject: [CentralOH] virtualenv best practices for version control In-Reply-To: References: <247D321D-E3B8-484E-BF4B-461946BFCBCA@microenh.com> Message-ID: <837FEFC5-EC88-420B-B890-6CBB4F8F5FF9@microenh.com> On Jun 10, 2011, at 1:04 PM, Matthew Talbert wrote: > I believe that requirements.txt is the default filename used by > virtualenv when it creates a new virtualenv, so if you don't want to > mess with Fabric, just adding this requirements.txt to your repo > should be sufficient, then you can just create the virtualenv with > "virtualenv [name]". Matthew, Thanks. Where do you place requirements.txt? I tried creating a folder for the new virtualenv and putting requirements.txt in that folder and then virtualenv [folder]. It created the virtualenv in that folder, but didn't load in the libraries from requirements.txt. What I did find that worked was once the virtualenv was created and activated to do pip install -r requirements.txt. That loaded the libraries. Mark From mark at microenh.com Fri Jun 10 20:20:49 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 10 Jun 2011 14:20:49 -0400 Subject: [CentralOH] =?iso-8859-1?q?Expert_Python_Programming_by_Ziad=E9?= Message-ID: <22230C19-EEFD-41DC-AC03-266EC4DC8BAF@microenh.com> Has anyone worked through the development of package templates as described in Chapter 5? Some of the details are sketchy (to me, anyways). He lists some of the files and then lists a directory structure. Some of the files listed aren't detailed, so I made my best guess at their contents. He then says to run python setup.py develop to install the template. I do that, and the command completes, just like in the book with the message "Finished processing dependencies for pbp.skels==0.1.0". If I do a pip freeze, pbp.skels==0.1.0 is listed. However, when I do paster create --list-templates, only the two original templates (basic_package and paste_deploy) are listed, the pbp-package that I suposedly added is not listed. The text mentions that the templates can be installed with easy_install pbp.skels. That works and installs pbp.skels==0.2.4 and paster create --list-templates shows the added templates (note: this was installed into a different virtualenv). The book is dangling some tantalizing Python carrots that I'd like to use, but seems to come up a bit short on getting me up to speed on understanding or using them. Mark From mark at microenh.com Fri Jun 10 22:11:17 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 10 Jun 2011 16:11:17 -0400 Subject: [CentralOH] =?iso-8859-1?q?Expert_Python_Programming_by_Ziad=E9?= In-Reply-To: <22230C19-EEFD-41DC-AC03-266EC4DC8BAF@microenh.com> References: <22230C19-EEFD-41DC-AC03-266EC4DC8BAF@microenh.com> Message-ID: On Jun 10, 2011, at 2:20 PM, Mark Erbaugh wrote: > Has anyone worked through the development of package templates as described in Chapter 5? Some of the details are sketchy (to me, anyways). He lists some of the files and then lists a directory structure. Some of the files listed aren't detailed, so I made my best guess at their contents. > > He then says to run python setup.py develop to install the template. I do that, and the command completes, just like in the book with the message "Finished processing dependencies for pbp.skels==0.1.0". If I do a pip freeze, pbp.skels==0.1.0 is listed. > > However, when I do paster create --list-templates, only the two original templates (basic_package and paste_deploy) are listed, the pbp-package that I suposedly added is not listed. > > The text mentions that the templates can be installed with easy_install pbp.skels. That works and installs pbp.skels==0.2.4 and paster create --list-templates shows the added templates (note: this was installed into a different virtualenv). > > The book is dangling some tantalizing Python carrots that I'd like to use, but seems to come up a bit short on getting me up to speed on understanding or using them. Found my problem. A typo in one of the setup.py files -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Sat Jun 11 02:59:53 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 10 Jun 2011 20:59:53 -0400 Subject: [CentralOH] Expert Python Programming Chapter 6 Message-ID: <2826C980-97DA-4177-8FFF-6DE2BA0EA9BF@microenh.com> Has anyone been able to get the Atomisator packages set up and running nosetests as per the book? I've tried with Python2.5, 2.6 and 2.7 on the Mac and Python 2.6 on Ubuntu Linux. I've tried using the template creating package (pbp.skels) described in the book (0.1.0) as well as a newer one (0.2.40) downloaded from the web (easy_install pbp.skels) I can create the atomisator.parser package following the instructions but can't get nosetest to run the doctest in the README.txt file. Here's the output of pip freeze showing the libraries and versions installed in the virtualenv: Cheetah==2.4.4 Markdown==2.0.3 Paste==1.7.5.1 PasteDeploy==1.5.0 PasteScript==1.7.3 atomisator.parser==0.1.0 nose==1.0.0 pbp.skels==0.2.4 wsgiref==0.1.2 zope.exceptions==3.6.1 zope.interface==3.6.3 zope.testing==3.10.2 When doing python setup.py develop to install the atomisator.parser package, I notice a warning that test_requires (mentioned in setup.py) is an uknown distribution option. Mark From mark at microenh.com Sat Jun 11 13:18:53 2011 From: mark at microenh.com (Mark Erbaugh) Date: Sat, 11 Jun 2011 07:18:53 -0400 Subject: [CentralOH] Expert Python Programming Chapter 6 In-Reply-To: <2826C980-97DA-4177-8FFF-6DE2BA0EA9BF@microenh.com> References: <2826C980-97DA-4177-8FFF-6DE2BA0EA9BF@microenh.com> Message-ID: <6F8F3864-85E1-4765-B506-8F39A893F0CA@microenh.com> On Jun 10, 2011, at 8:59 PM, Mark Erbaugh wrote: > Has anyone been able to get the Atomisator packages set up and running nosetests as per the book? I've tried with Python2.5, 2.6 and 2.7 on the Mac and Python 2.6 on Ubuntu Linux. I've tried using the template creating package (pbp.skels) described in the book (0.1.0) as well as a newer one (0.2.40) downloaded from the web (easy_install pbp.skels) > > I can create the atomisator.parser package following the instructions but can't get nosetest to run the doctest in the README.txt file. > > Here's the output of pip freeze showing the libraries and versions installed in the virtualenv: > > Cheetah==2.4.4 > Markdown==2.0.3 > Paste==1.7.5.1 > PasteDeploy==1.5.0 > PasteScript==1.7.3 > atomisator.parser==0.1.0 > nose==1.0.0 > pbp.skels==0.2.4 > wsgiref==0.1.2 > zope.exceptions==3.6.1 > zope.interface==3.6.3 > zope.testing==3.10.2 > > When doing python setup.py develop to install the atomisator.parser package, I notice a warning that test_requires (mentioned in setup.py) is an uknown distribution option. > Well, I've figured part of this out. In the book, the command to run the nosetests is: nosetests --doctest-extendion=.txt But I found that to get it to run the doctest, I had to include --with-doctest on the command line as well. There are also a couple of discrepancies in the test runner output that I get versus what's in the book: 1) The doctest given has several lines, all of which will fail initially. In the book, the test runner output only reports the first failure. On my machine, all the failures are reported. I tried using the nosetest -x option that stops after the error or failure, but that doesn't seem to change my output. 2) The doctest uses the ellipsis (...) to match some ignored output. When I run the test, the output isn't ignored and the test runner reports a failure to match the output. I've not worked with doctests before, but it looks like the doctest.ELLIPSIS option needs to be specified. When using nose as a test runner, where does one specify doctest options? Could some of the discrepancies I've seen be related to me using a newer version of nose (the book was published in 2009)? Thanks, Mark From mark at microenh.com Sat Jun 11 13:35:24 2011 From: mark at microenh.com (Mark Erbaugh) Date: Sat, 11 Jun 2011 07:35:24 -0400 Subject: [CentralOH] Namespace package structure Message-ID: <658FD455-4D30-4127-87F6-9EAFB3B94115@microenh.com> Yet another question from "Expert Python Programming" One of the things discussed in the book is namespace packages. The book gives a link to setuptools documentation at http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages that includes the following statement: > You must NOT include any other code and data in a namespace package's __init__.py. Even though it may appear to work during development, or when projects are installed as .egg files, it will not work when the projects are installed using "system" packaging tools -- in such cases the __init__.py files will not be installed, let alone executed. > Yet, in the book, the author shows adding code to the __init__.py file at the deepest level of the package. The namespace package created is atomisator.parser and the __init__.py file in question is atomisator/parser/__init__.py. I have a couple of questions about this. Is it good practice to add code to the __init__.py file? This is done because the api is used like: from atomisator.parser import parse. My tendency would have been to have a separate module, (i.e. parse.py) and then use from atomisator.parser.parse import parse. Do the lowest level __init__.py file need the "magic" startup code to create a namespace package? From the setuptools documentation: > These __init__.py files must contain the line: > > __import__('pkg_resources').declare_namespace(__name__) > You must include the declare_namespace() line in the __init__.py of every project that has contents for the namespace package in question, in order to ensure that the namespace will be declared regardless of which project's copy of __init__.py is loaded first. If the first loaded __init__.py doesn't declare it, it will never be declared, because no other copies will ever be loaded!) > Thanks Mark, -------------- next part -------------- An HTML attachment was scrubbed... URL: From ransom1982 at gmail.com Sat Jun 11 01:30:26 2011 From: ransom1982 at gmail.com (Matthew Talbert) Date: Fri, 10 Jun 2011 19:30:26 -0400 Subject: [CentralOH] virtualenv best practices for version control In-Reply-To: <837FEFC5-EC88-420B-B890-6CBB4F8F5FF9@microenh.com> References: <247D321D-E3B8-484E-BF4B-461946BFCBCA@microenh.com> <837FEFC5-EC88-420B-B890-6CBB4F8F5FF9@microenh.com> Message-ID: > Thanks. ?Where do you place requirements.txt? ?I tried creating a folder for the new virtualenv and putting requirements.txt in that folder and then virtualenv [folder]. It created the virtualenv in that folder, but didn't load in the libraries from requirements.txt. ?What I did find that worked was once the virtualenv was created and activated to do pip install -r requirements.txt. That loaded the libraries. That's correct. After looking more closely what we do, we essentially do the same thing. I was a bit unfamiliar with our own process.... Matthew From mark at microenh.com Tue Jun 14 02:55:22 2011 From: mark at microenh.com (Mark Erbaugh) Date: Mon, 13 Jun 2011 20:55:22 -0400 Subject: [CentralOH] easy_install find_links Message-ID: I'm still working on the procedures for setting up a repeatable development environment. I'm trying to combine the instructions in Chapter 4 of "Foundations of Agile Python Development" by Jeff Younker with virtualenv, which he doesn't discuss. I've created a setup.py file that properly downloads and installs needed library files (in my case, reportlab 2.5 and webpy 0.3), but I'm running into a problem getting setup to look for local copies of these files. I've downloaded the appropriate files to a directory named thirdparty at the same level as setup.py and setup.cfg. I've added find_links=thirdparty to the [easy_install] section of setup.cfg, but when I run python setup.py develop, it still looks to pypi and reads the installers from the web. At least that's what I think is going on - in the output I see: > Reading http://pypi.python.org/simple/web.py/ > Reading http://webpy.org/ But if I install the packages manually with easy_install --find_links thirdparty 'reportlab==2.5' it happily installs from my local directory. FWIW, I'm also installing a library that only exists locally and for that one, I see no evidence of looking for it online (in fact, if it weren't available locally the search would fail) and it does get successfully installed. Any ideas? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Tue Jun 14 03:19:55 2011 From: mark at microenh.com (Mark Erbaugh) Date: Mon, 13 Jun 2011 21:19:55 -0400 Subject: [CentralOH] easy_install find_links In-Reply-To: References: Message-ID: <704469AA-3D84-4F50-846C-63F31835C4B8@microenh.com> On Jun 13, 2011, at 8:55 PM, Mark Erbaugh wrote: > I'm still working on the procedures for setting up a repeatable development environment. > > I'm trying to combine the instructions in Chapter 4 of "Foundations of Agile Python Development" by Jeff Younker with virtualenv, which he doesn't discuss. > > I've created a setup.py file that properly downloads and installs needed library files (in my case, reportlab 2.5 and webpy 0.3), but I'm running into a problem getting setup to look for local copies of these files. > > I've downloaded the appropriate files to a directory named thirdparty at the same level as setup.py and setup.cfg. I've added find_links=thirdparty to the [easy_install] section of setup.cfg, but when I run python setup.py develop, it still looks to pypi and reads the installers from the web. At least that's what I think is going on - in the output I see: > >> Reading http://pypi.python.org/simple/web.py/ >> Reading http://webpy.org/ > > > But if I install the packages manually with easy_install --find_links thirdparty 'reportlab==2.5' it happily installs from my local directory. > > FWIW, I'm also installing a library that only exists locally and for that one, I see no evidence of looking for it online (in fact, if it weren't available locally the search would fail) and it does get successfully installed. Okay, I've done some more testing. It doesn't look like easy_install is actually downloading* the reportlab and web.py packages so it is using the local copies. But the question is why is it even bothering to look elsewhere when a suitable package is found locally? Here's the appropriate lines from setup.py > install_requires = [ > 'reportlab==2.5', > 'web.py==0.3', > 'pdfrw==0.1', > ], And here's a directory listing of thirdparty: > -rw-r--r-- 1 mark admin 12691 Jun 13 19:44 pdfrw-0.1.tar.gz > -rw-r--r-- 1 mark admin 1917306 Jun 13 19:04 reportlab-2.5.tar.gz > -rw-r--r-- 1 mark admin 88043 Dec 9 2008 web.py-0.3.tar.gz pdfrw is a locally created package that isn't on the web AFAIK and I get no message about looking at pypi for it. * If I remove the package from the thirdparty directory, in addition to the two Reading ... lines above, I get a line that says Downloading ... If the package is there, I don't get the Downloading ... line. Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Tue Jun 14 22:46:19 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 14 Jun 2011 16:46:19 -0400 Subject: [CentralOH] Travel Times Message-ID: Is anyone using Python tools to calculate travel times between addresses in an application. If so, which one(s)? In particular, is anyone doing anything with Open Street Maps? Thanks, Mark From jep200404 at columbus.rr.com Tue Jun 14 23:01:54 2011 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 14 Jun 2011 17:01:54 -0400 Subject: [CentralOH] Open Street Maps: Steve Roggenkamp's Presentation on Open Source Graphical Information Systems In-Reply-To: References: Message-ID: <20110614170154.17b25c87.jep200404@columbus.rr.com> On Tue, 14 Jun 2011 16:46:19 -0400, Mark Erbaugh wrote: > Is anyone using Python tools to calculate travel times between > addresses in an application. If so, which one(s)? > In particular, is anyone doing anything with Open Street Maps? Steve Roggenkamp gave a presentation on Open Source Graphical Information Systems which included Open Street Maps at the April COLUG meeting. http://www.colug.net/notes/20110427/colug-gis-20110427.pdf From mark at microenh.com Wed Jun 15 05:07:48 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 14 Jun 2011 23:07:48 -0400 Subject: [CentralOH] Open Street Maps: Steve Roggenkamp's Presentation on Open Source Graphical Information Systems In-Reply-To: <20110614170154.17b25c87.jep200404@columbus.rr.com> References: <20110614170154.17b25c87.jep200404@columbus.rr.com> Message-ID: <75EB21E1-ADD4-4D5E-9B57-E819F3DF2EDB@microenh.com> On Jun 14, 2011, at 5:01 PM, jep200404 at columbus.rr.com wrote: > On Tue, 14 Jun 2011 16:46:19 -0400, Mark Erbaugh wrote: > >> Is anyone using Python tools to calculate travel times between >> addresses in an application. If so, which one(s)? >> In particular, is anyone doing anything with Open Street Maps? > > Steve Roggenkamp gave a presentation on Open Source Graphical > Information Systems which included Open Street Maps > at the April COLUG meeting. > > http://www.colug.net/notes/20110427/colug-gis-20110427.pdf > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh Thanks. From mark at microenh.com Thu Jun 16 15:32:22 2011 From: mark at microenh.com (Mark Erbaugh) Date: Thu, 16 Jun 2011 09:32:22 -0400 Subject: [CentralOH] Namespace packages with Nose test runner Message-ID: <96D455FB-0836-4A7E-B406-CC2A9E27AC6A@microenh.com> I'm having trouble getting nosetests to find my unittests, or finding the namespace'd package code to be tested. I'm working from code adapted from "Expert Python Programming" by Ziade. This is the atomisator project. The initial namespace package is atomisator.parser. This is on a Mac. Here's the relevant directory structure: project +-packages (directory) +-atomisator.parser (directory) +-atomisator (directory) +-__init__.py (namespace version) +-setup.py +-setup.cfg +-parser (directory) +-__init__.py +-test (directory) +-test.py The __init__.py file in the atomisator directory contains the "magic" code for namespace packages: # See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) If I run nosetests fro the parent (project) directory, it doesn't find the tests in the atomisator.parser/atomisator/parser/test folder. I think this is because __init__.py files are missing from the packages and packages/atomisator.parser directories. If I place __init__.py files there, the tests fail with an ImportError: "No module named atomisator". I've tried both empty __init__.py files as well as ones with the "magic" code above. I can get the nosetests to run if I launch nosetests with -w packages/atomisator.parser (-w sets the source directory), but only if there are no __init__.py files in packages and packages/atomisator.parser. If I launch a python interpretor in the project directory, it can successfully import the atomisator.parser package. The atomisator.parser package was installed using python setup.py develop (which puts a symlink in the local site-packages directory). The easiest thing that I have found that works is to cd to the packages/atomisator.parser directory (or further into atomisator or atomisator/parser) and run nosetests from there. I'm obviously trying lots of things here (virtualenv, namespace packages, nosetests, setuptools) and I'm not clear on all the ramifications of all, but I do have something that I can work with. I know others have mentioned virtualenvwrapper and fabric. Is it time to add another package to the mix? Thoughts, suggestions? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdenzin.lists at eyedarts.net Fri Jun 17 02:59:43 2011 From: jdenzin.lists at eyedarts.net (Jason Denzin) Date: Thu, 16 Jun 2011 20:59:43 -0400 Subject: [CentralOH] Potential Web Development Work Message-ID: This might interest some of you: Attention Columbus web developers! COHHIO (Coalition on Homelessness and Housing in Ohio) needs a website re-design! Cohhio.org is currently an overgrown (500+ pages) html/css website. Here?s what we?re looking for: ? Migration of current content over to a relatively common CMS and the ability to manage it ourselves. ? Ability for employees to upload content with approval from one content overseer ? A clean organized feel to the information we want to share. ? Our current ability to take donations online ? Our current calendar ? Social networking feeds ? Web stats ? Remain hosted by wiredtree.com Please include references. Please email Douglas Argue at douglasargue at cohhio dot org for more information about submitting a quote for this work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.scites at railcar88.com Tue Jun 28 01:33:20 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Mon, 27 Jun 2011 19:33:20 -0400 Subject: [CentralOH] Python DoJoe Update Message-ID: The last two weeks at the Python DoJoe Mark Erbaugh and I have been pair programming. More specifically, we've been writing unit tests for our individual projects. FYI: Tomorrow morning I will not be at the Python DoJoe. I'll see you next week. Happy hacking! Scott Scites -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Tue Jun 28 03:32:16 2011 From: mark at microenh.com (Mark Erbaugh) Date: Mon, 27 Jun 2011 21:32:16 -0400 Subject: [CentralOH] Python DoJoe Update In-Reply-To: References: Message-ID: <93795FEE-8D5A-4CBD-899F-673FE49295A4@microenh.com> On Jun 27, 2011, at 7:33 PM, Scott Scites wrote: > The last two weeks at the Python DoJoe Mark Erbaugh and I have been pair programming. More specifically, we've been writing unit tests for our individual projects. > > FYI: Tomorrow morning I will not be at the Python DoJoe. > > I'll see you next week. Happy hacking! > Since Scott isn't there and recently it's just been the two of us, unless I hear from someone else planning on being there, I'll skip tomorrow as well. Mark Erbaugh From brian.curtin at gmail.com Wed Jun 29 05:12:04 2011 From: brian.curtin at gmail.com (Brian Curtin) Date: Tue, 28 Jun 2011 22:12:04 -0500 Subject: [CentralOH] Python User Group International Survey Message-ID: The PSF is happy to launch today an international survey of Python user group organizers to help it better serve the large and ever-expanding international Python user community. The survey contains questions on user group organization, events, demographics, and growth. There are some questions with numerical answers, and while your best guess is fine, you may find it helpful to gather some statistics on your user group membership before starting the survey (example statistics include the number of active members and the size and topics for recent user group events). We expect this survey to take around 30 minutes to complete. We appreciate your time and honesty in answering these questions. The PSF blog post announcing the survey: http://pyfound.blogspot.com/2011/06/tell-us-about-your-user-group.html The survey was written by Jessica McKellar (http://jesstess.com), organizer for the Boston Python Meetup (http://meetup.bostonpython.com), and Jesse Noller (http://jessenoller.com/), PSF board member and PyCon chair with input and feedback from survey specialists and others. https://www.surveymonkey.com/s/BWLG8SZ The survey was pretested with a handful of user group organizers, and their answers were phenomenal. Organizers have tons to say about these topics, and we hope to get a lot of great, actionable data for strengthening the relationship between the PSF and Python user groups out of this effort. Outreach, education, diversity and community building are critical for Python as a community, and the Foundation - this data should greatly assist in our targeting our resources and furthering the mission of the Foundation in all ways. Thank you The Python Software Foundation Jessica McKellar Jesse Noller -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Wed Jun 29 18:35:12 2011 From: eric at intellovations.com (Eric Floehr) Date: Wed, 29 Jun 2011 12:35:12 -0400 Subject: [CentralOH] Bejeweled clone in Python with source Message-ID: All, I ran across this today, and since games have been on my mind since Pete's intro to game programming in Python talk on Monday, I thought I'd share. It's a Bejeweled clone written in Python and using PyGame, with source: http://inventwithpython.com/blog/2011/06/24/new-game-source-code-gemgem-a-bejeweled-clone/ He wrote it specifically to be easy to read and understand the source. He's the guy that did http://inventwithpython.com/ I bought a hard copy of the book to support his cause. It's also a great website for Python and games. Best Regards, Eric From eric at intellovations.com Wed Jun 29 16:41:10 2011 From: eric at intellovations.com (Eric Floehr) Date: Wed, 29 Jun 2011 10:41:10 -0400 Subject: [CentralOH] PyOhio Deadlines and Schedule Message-ID: All, If you haven't registered for PyOhio 2011, please do soon at http://pyohio.org/register/ ! We'll need your t-shirt order preferences before ***July 7***. Also, by registering, we can more accurately predict how much coffee, drinks, and snacks to order. If you have any doubts about the conference, we've just posted the draft schedule. There are a lot of great talks planned! Check it out here: http://pyohio.org/schedule/ If anyone is staying at a hotel, we have negotiated rates at two of the best nearby hotels. However, you'll have to make your reservation SOON: There's no official PyOhio hotel, nor any that PyOhio is bound to by a binding contract, so stay wherever you please without guilt. We have arranged discounts for these two. See http://pyohio.org/Venue/ The Blackwell, an on-campus luxury hotel, is offering a limited number of rooms at $109 (plus tax and valet parking). Ask for the PyOhio room rate (or enter "PyOhio" in the discount code online). The Blackwell is approximately 1 mile's walk from the Ohio Union. Reserve by July 7 to get this rate! The Holiday Inn Express & Suites OSU at 3045 Olentangy River Rd., is offering a rate of $119.99. Ask for the "PYOHIO" block. You must reserve by July 5 to get the special rate. http://www.stayholidayosu.com Any questions? Please don't hesitate to ask me! Best Regards, Eric Floehr PyOhio 2011