From issac.kelly at gmail.com Mon May 2 21:58:03 2011 From: issac.kelly at gmail.com (Issac Kelly) Date: Mon, 2 May 2011 15:58:03 -0400 Subject: [CentralOH] (no subject) Message-ID: I'm writing because we're[1] looking for a summer intern. We're not currently 'approved' for credit, because I don't know how that process works, but I'd be happy to speak with any advisor to make sure that happens. We reached out to the Open Source Club @ OSU, and now I'm asking CohPy if there are any of you out there looking for an internship, or know a student who is. This will include a very small salary[4], totally non-commensurate with what you're worth, but we'll try to make that up by making you worth more by the end of the summer and giving you glowing references from non-respected technologists like us. ###Who you are: * A student, or someone with a lot of free time (not a full time job) * You know Python, or are willing to put some time into learning it before you start. (we'd be happy to help) * You know some stuff about the interwebs. * Self directed learner ###### Bonuses * You know Git * You know Django * You have written good documentation ###What we do: * We have some software for making websites (not open source), and some software[3] for maintaining websites. * We're a very small agency, and we compete by automating the hell out of stuff, and getting our processes to be very solid. * As an example, we have software for making websites for realestate brokers or agents. It connects to regional property information. The architecture of the system is cool, and we can run dozens of sites off the same code base. * We play NFL Blitz 2001 for the N64. We have a company helicopter, but it's very, very small. ###What you would do: * Pick another niche (we'll help), our first big one is Real Estate, we have some other ideas too. * Determine the needs of that group (we'll help) * Work with us to come up with a spec for how we can get to a finished product by the end of the summer (we'll help) * Do it, lead the project, under our supervision, and with our help. * If you hate this project, but like the idea of a summer internship with us, we're flexible, we have some ideas, and if you have an idea for how you can help, pitch it This will require learning some of our software, learning Django and Git, and working with us to make sure you're getting it all right. We'll setup a desk at our office for you, and find you a computer if you need one. If you're interested. Send me a note (issac at kellycreativetech.com) and include: * Some notes about you, what you want out of this, and how we contact you * Some code, doesn't _have_ to be Python, your github name is fine * A resume, if you must We'll try to start interviews soon, as I know it's a bit late to start figuring out summer plans. If you want to chat, I'm in #servee on freenode anytime I'm online, or email us, that's fine. [1] http://www.kellycreativetech.com - We're Kelly Creative Tech. 2 Developers, and one Designer, Located just south of campus[2]. If you can't tell from the rest of this, we are very young, very frank and like to have fun at work. We're also serious about this stuff. We legitimately enjoy the hell out of what we do, and have been doing it Full Time for over 3 years (since I dropped out of the ECE program at OSU) [2] http://osm.org/go/ZWD70bASG-- [3] http://github.com/servee/ [4] What we're expecting is about $1000/mo for the summer. I know it's not a lot. I'm sorry. If you have to have another PT job to make up for that, It's cool. If you really want to work with us, but that's not enough money, say so, and say what you need. We'll think about it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.scites at railcar88.com Thu May 5 05:05:41 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Wed, 4 May 2011 23:05:41 -0400 Subject: [CentralOH] Python DoJoe - Hacker Session Notes - 05-03-11 Message-ID: Jason Denzin and I pair programmed Learn Python the Hard Way, exercises 6 (Strings & Text) and 7 (More Printing). The remote code editor we used was collabedit and it worked out well enough that we'll use it again next week. Next week we'll aim to get the following exercises completed: 8 Printing, Printing 9 Printing, Printing, Printing 10 What Was That? Join us next week at Cup O' Joe German Village or on freenode.net with the #cohpy handle. We'll post the collabedit link at #cohpy so you can join the pairing. We took turns typing out the exercises line by line, ran the script and then after each exercise discussed what we learned. Happy Hacking! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Thu May 5 15:19:47 2011 From: mark at microenh.com (Mark Erbaugh) Date: Thu, 5 May 2011 09:19:47 -0400 Subject: [CentralOH] Python DoJoe - Hacker Session Notes - 05-03-11 In-Reply-To: References: Message-ID: <1507389B-02E6-473F-AB4D-4EA870D73183@microenh.com> On May 4, 2011, at 11:05 PM, Scott Scites wrote: > Jason Denzin and I pair programmed Learn Python the Hard Way, > exercises 6 (Strings & Text) and 7 (More Printing). The remote code > editor we used was collabedit and it worked > out well enough that we'll use it again next week. I've never pair programmed, but I'd like to try it, or at least watch. Unfortunately the DoJoe's time doesn't work for me. Is this something we could at least demo at a COhPy meeting? Mark From scott.scites at railcar88.com Sat May 7 03:31:51 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Fri, 6 May 2011 21:31:51 -0400 Subject: [CentralOH] CentralOH Digest, Vol 49, Issue 3 In-Reply-To: References: Message-ID: On Fri, May 6, 2011 at 6:00 AM, wrote: > 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. Re: Python DoJoe - Hacker Session Notes - 05-03-11 (Mark Erbaugh) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 5 May 2011 09:19:47 -0400 > From: Mark Erbaugh > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > Subject: Re: [CentralOH] Python DoJoe - Hacker Session Notes - > 05-03-11 > Message-ID: <1507389B-02E6-473F-AB4D-4EA870D73183 at microenh.com> > Content-Type: text/plain; charset=us-ascii > > > On May 4, 2011, at 11:05 PM, Scott Scites wrote: > > > Jason Denzin and I pair programmed Learn Python the Hard Way, > > exercises 6 (Strings & Text) and 7 (More Printing). The remote code > > editor we used was collabedit and it worked > > out well enough that we'll use it again next week. > > I've never pair programmed, but I'd like to try it, or at least watch. > Unfortunately the DoJoe's time doesn't work for me. Is this something we > could at least demo at a COhPy meeting? > It's really just two programmer's sitting down together. One types on the keyboard while the other acts as a second set of eyes. After a set period of time, the roles switch. When I've done this in the past we switched roles every 20 to 30 minutes. Each line so far in our Learn Python the Hard Way exercises are discreet units of code. During the first session Jason I took turns typing each line in the shared editor. While he types I watch for errors and think about what he is typing. He does the same while I'm typing. After each exercise (or while coding) we share things we learned or didn't understand so we can learn from each other. Paired programming is more about communicating/sharing ideas and accountability. It can tend to be more intense than coding solo because you are often times more engaged. > > Mark > > > > ------------------------------ > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > > End of CentralOH Digest, Vol 49, Issue 3 > **************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Mon May 9 17:54:59 2011 From: mark at microenh.com (Mark Erbaugh) Date: Mon, 9 May 2011 11:54:59 -0400 Subject: [CentralOH] Detect last iteration of iterator Message-ID: Given a for loop that iterates through an iterable (for i in x:), is there a way to detect when the code is in the last iteration, so that it can do something slightly different? For a contrived example, assume I want to duplicate the string join method to insert a string between, but not following, items in a list. The only way I can think if is to split the iteration into: for i in x[:-1] Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From issac.kelly at gmail.com Mon May 9 17:57:02 2011 From: issac.kelly at gmail.com (Issac Kelly) Date: Mon, 9 May 2011 11:57:02 -0400 Subject: [CentralOH] Detect last iteration of iterator In-Reply-To: References: Message-ID: You could use an enumerator, but I think your way here is cleaner. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonebird at gmail.com Mon May 9 18:01:18 2011 From: jonebird at gmail.com (Jon Miller) Date: Mon, 9 May 2011 12:01:18 -0400 Subject: [CentralOH] Detect last iteration of iterator In-Reply-To: References: Message-ID: Yeah, I like your first method better too, but a 'finally' clause popped into my head, so I thought I'd share it... In [1]: try: ...: for i in range(10): ...: print i ...: except (Exception, e): ...: pass ...: finally: ...: print 'Last call for alcohol %d' % i ...: ...: 0 1 2 3 4 5 6 7 8 9 Last call for alcohol 9 -- Jon Miller On Mon, May 9, 2011 at 11:57 AM, Issac Kelly wrote: > You could use an enumerator, but I think your way here is cleaner. > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > From matt at tplus1.com Mon May 9 19:16:01 2011 From: matt at tplus1.com (W. Matthew Wilson) Date: Mon, 9 May 2011 13:16:01 -0400 Subject: [CentralOH] Detect last iteration of iterator In-Reply-To: References: Message-ID: I stumbled across this looper class a long time ago: https://bitbucket.org/ianb/tempita/src/f4a22b3ed511/tempita/_looper.py It has what you're looking for, plus lots of other cute things. At some point, I might take this code, and some more bells and whistles, and then make it into its own package. Matt On Mon, May 9, 2011 at 12:01 PM, Jon Miller wrote: > Yeah, I like your first method better too, but a 'finally' clause > popped into my head, so I thought I'd share it... > In [1]: try: > ? ...: ? ? for i in range(10): > ? ...: ? ? ? ? print i > ? ...: except (Exception, e): > ? ...: ? ? pass > ? ...: finally: > ? ...: ? ? print 'Last call for alcohol %d' % i > ? ...: > ? ...: > 0 > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > Last call for alcohol 9 > > -- Jon Miller > > On Mon, May 9, 2011 at 11:57 AM, Issac Kelly wrote: >> You could use an enumerator, but I think your way here is cleaner. >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> http://mail.python.org/mailman/listinfo/centraloh >> >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > -- W. Matthew Wilson matt at tplus1.com http://tplus1.com From mark at microenh.com Mon May 9 20:08:23 2011 From: mark at microenh.com (Mark Erbaugh) Date: Mon, 9 May 2011 14:08:23 -0400 Subject: [CentralOH] Detect last iteration of iterator In-Reply-To: References: Message-ID: On May 9, 2011, at 12:01 PM, Jon Miller wrote: > Yeah, I like your first method better too, but a 'finally' clause > popped into my head, so I thought I'd share it... > In [1]: try: > ...: for i in range(10): > ...: print i > ...: except (Exception, e): > ...: pass > ...: finally: > ...: print 'Last call for alcohol %d' % i > ...: How is this any different than just: for i in range(10): print i print 'Last call..." Mark From Dawn at porticohr.com Mon May 9 21:02:36 2011 From: Dawn at porticohr.com (Dawn Vale) Date: Mon, 9 May 2011 14:02:36 -0500 Subject: [CentralOH] Django Developers Needed Message-ID: <35F40966557A7649B71A316225FE15D9295ADB@PHR-SERVER.porticohr.local> I am a recruiter in Des Moines, IA working with a client that is in need of Django Developers. My client, an Iowa?based company that offers the first and only end?to?end solution for external financial reporting. The company develops and markets a fully?integrated, cloud?based solution dedicated to meeting SEC reporting requirements. Growing company which offers excellent benefits and stock options starting day one. If you or know of anyone that would be interested, below is my contact information. Dawn Vale PorticoHR 2910 Westown Parkway, Ste. 106 W. Des Moines, IA 50266 dawn at porticohr.com www.porticohr.com 515-221-3233 - phone 515-221-3236 - fax Please Be GREEN Don't print this e-mail unless really necessary! https://twitter.com/PorticoHR http://porticohr.blogspot.com Directions: We are located one block EAST of Valley West Mall on the southeast corner of Westown Parkway and 30th. Turn south on 30th and make a left into the parking lot. We are the first floor. Make a left at the elevator and we are at the end of the hall. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Mon May 9 20:58:31 2011 From: eric at intellovations.com (Eric Floehr) Date: Mon, 9 May 2011 14:58:31 -0400 Subject: [CentralOH] May Meeting Message-ID: All, A couple of notes: 1. The May meeting will be a week earlier than expected (May 23) because of Memorial Day. 2. I haven't heard back from one of the fellows who offered to speak for May, so I'm opening up to suggestions. Here are a couple, unless a speaker comes forward: a. A dojoe, going through a chapter of Learn Python or another book. b. Hackathon... just doing some Python hacking together on whatever projects people bring. c. Lightning talks. d. A COhPy social... we just meet someplace and eat and drink. Let me know if you have any ideas! Cheers, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Tue May 10 19:20:48 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 10 May 2011 13:20:48 -0400 Subject: [CentralOH] May Meeting In-Reply-To: References: Message-ID: On May 9, 2011, at 2:58 PM, Eric Floehr wrote: > All, > > A couple of notes: > > > 1. The May meeting will be a week earlier than expected (May 23) because of Memorial Day. > > > > 2. I haven't heard back from one of the fellows who offered to speak for May, so I'm opening up to suggestions. Here are a couple, unless a speaker comes forward: > > a. A dojoe, going through a chapter of Learn Python or another book. > > b. Hackathon... just doing some Python hacking together on whatever projects people bring. > > c. Lightning talks. > > d. A COhPy social... we just meet someplace and eat and drink. > > > > Let me know if you have any ideas! > Eric, After hearing a report from Scott Scites about pair programming at the dojoe, I'd like to have an opportunity to watch or participate in a pair programming exercise. I'd be interested in some short demos of tools that folks use for Python development, either a full-blown IDE or an editor with plug-ins. I've been doing a lot of work with Eclipse/PyDev and would be willing to show off what little I've learned. Mark From mark at microenh.com Tue May 10 19:29:21 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 10 May 2011 13:29:21 -0400 Subject: [CentralOH] Python bit size Message-ID: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Is there a way to determine whether python is running in 32-bit or 64-bit mode? From miles.groman at gmail.com Tue May 10 20:00:52 2011 From: miles.groman at gmail.com (m g) Date: Tue, 10 May 2011 14:00:52 -0400 Subject: [CentralOH] Python bit size In-Reply-To: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: >>> import platform >>> platform.architecture() ('32bit', 'ELF') >>> On Tue, May 10, 2011 at 1:29 PM, Mark Erbaugh wrote: > Is there a way to determine whether python is running in 32-bit or 64-bit mode? > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > From mark at microenh.com Tue May 10 21:23:28 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 10 May 2011 15:23:28 -0400 Subject: [CentralOH] Python bit size In-Reply-To: References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: On May 10, 2011, at 2:00 PM, m g wrote: >>>> import platform >>>> platform.architecture() > ('32bit', 'ELF') >>>> > > On Tue, May 10, 2011 at 1:29 PM, Mark Erbaugh wrote: >> Is there a way to determine whether python is running in 32-bit or 64-bit mode? > Miles, Thanks for the reply, but this doesn't appear to work on a Mac with Snow Leopard. Apparently, the default Python that comes with SL is a universal binary containing both 32 and 64 bit versions. By using the arch command or setting an environment variable (VERSIONER_PYTHON_PREFER_32_BIT), you can force Python to load either as 32 or 64 bit. I know that I'm getting different versions because sys.maxint returns different values (2147483647 for 32-bit and 9223372036854775807 for 64-bit), but on my Mac platform.architecture() always returns ('64bit', ''). I think it's telling me that the OS is 64-bit. This is important to me because the default version of wxPython that comes with Snow Leopard only supports 32-bit. If you do an import wx with 64-bit python, you get a nice error message. If you do it with 32-bit python, it works fine. FWIW, wxPython now supports 64-bit python but pre-built installs are only available for Python 2.7 and later, the default Python on Snow Leopard is 2.6. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From morgan.goose at gmail.com Tue May 10 21:34:46 2011 From: morgan.goose at gmail.com (Morgan Goose) Date: Tue, 10 May 2011 15:34:46 -0400 Subject: [CentralOH] Python bit size In-Reply-To: References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: <20110510193446.GA29874@grumpy.morgan-dyn-o-saur.com> Looks like it defaults to using 64 bit, but a cli flag will force you to use 32. http://www.jaharmi.com/2009/08/29/python_32_bit_execution_on_snow_leopard goose On Tue, May 10, 2011 at 03:23:28PM -0400, Mark Erbaugh wrote: > On May 10, 2011, at 2:00 PM, m g wrote: > > import platform > > platform.architecture() > > ('32bit', 'ELF') > > On Tue, May 10, 2011 at 1:29 PM, Mark Erbaugh <[1]mark at microenh.com> > wrote: > > Is there a way to determine whether python is running in 32-bit or > 64-bit mode? > > Miles, > Thanks for the reply, but this doesn't appear to work on a Mac with Snow > Leopard. ?Apparently, the default Python that comes with SL is a universal > binary containing both 32 and 64 bit versions. ?By using the arch command > or setting an environment variable (VERSIONER_PYTHON_PREFER_32_BIT), you > can force Python to load either as 32 or 64 bit. ?I know that I'm getting > different versions because sys.maxint returns different values (2147483647 > for 32-bit and?9223372036854775807 for 64-bit), but on my Mac > platform.architecture() always returns ('64bit', ''). I think it's telling > me that the OS is 64-bit. > This is important to me because the default version of wxPython that comes > with Snow Leopard only supports 32-bit. If you do an import wx with 64-bit > python, you get a nice error message. If you do it with 32-bit python, it > works fine. ?FWIW, wxPython now supports 64-bit python but pre-built > installs are only available for Python 2.7 and later, the default Python > on Snow Leopard is 2.6. > Mark > > References > > Visible links > 1. mailto:mark at microenh.com > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh ---end quoted text--- From eric at intellovations.com Tue May 10 21:45:24 2011 From: eric at intellovations.com (Eric Floehr) Date: Tue, 10 May 2011 15:45:24 -0400 Subject: [CentralOH] Python bit size In-Reply-To: References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: Mark, > Thanks for the reply, but this doesn't appear to work on a Mac with Snow > Leopard. Apparently, the default Python that comes with SL is a universal > binary containing both 32 and 64 bit versions. By using the arch command or > setting an environment variable (VERSIONER_PYTHON_PREFER_32_BIT), you can > force Python to load either as 32 or 64 bit. I know that I'm getting > different versions because sys.maxint returns different values (2147483647 > for 32-bit and 9223372036854775807 for 64-bit), but on my Mac > platform.architecture() always returns ('64bit', ''). I think it's telling > me that the OS is 64-bit. > > I think your answer is right there (sys.maxint): def bits(): import sys x = sys.maxint n = 1 while x: n += 1 x >>= 1 return n -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Wed May 11 01:03:09 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 10 May 2011 19:03:09 -0400 Subject: [CentralOH] Python bit size In-Reply-To: References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: Sent from my iPad On May 10, 2011, at 3:45 PM, Eric Floehr wrote: > I think your answer is right there (sys.maxint): > > def bits(): > import sys > x = sys.maxint > n = 1 > while x: > n += 1 > x >>= 1 > return n > > -Eric Is that always guaranteed that the size of an int is the sizeof the Python bits? Mark From eric at intellovations.com Wed May 11 01:18:52 2011 From: eric at intellovations.com (Eric Floehr) Date: Tue, 10 May 2011 19:18:52 -0400 Subject: [CentralOH] Python bit size In-Reply-To: References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: Mark, Yes, but actually substitute sys.maxsize for sys.maxint for Python 3 compatibility. sys.maxsize (for CPython at least) is size_t of the compiler it was compiled with, which basically means it's supported "bitness". -Eric On Tue, May 10, 2011 at 7:03 PM, Mark Erbaugh wrote: > > > Sent from my iPad > > On May 10, 2011, at 3:45 PM, Eric Floehr wrote: > > > I think your answer is right there (sys.maxint): > > > > def bits(): > > import sys > > x = sys.maxint > > n = 1 > > while x: > > n += 1 > > x >>= 1 > > return n > > > > -Eric > > Is that always guaranteed that the size of an int is the sizeof the Python > bits? > > Mark > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wam at cisco.com Thu May 12 16:00:04 2011 From: wam at cisco.com (William McVey) Date: Thu, 12 May 2011 10:00:04 -0400 Subject: [CentralOH] Python bit size In-Reply-To: References: <7344BB3C-F88C-4840-BEAD-7B880B14454C@microenh.com> Message-ID: <1305208804.3497.8.camel@goldfinger> On Tue, 2011-05-10 at 14:00 -0400, m g wrote: > >>> import platform > >>> platform.architecture() > ('32bit', 'ELF') [sorry this is so late in the conversation, it got stuck in my outbox for some reason -- wam] Another way to get the information is to ask python's struct package how many bytes it takes to represent a pointer: goldfinger ~ $ uname -m i686 >>> import struct >>> struct.calcsize('P') * 8 32 And on a different machine: talyn ~ $ uname -m x86_64 >>> import struct >>> struct.calcsize('P') * 8 64 Hope this helps. -- William From mark at microenh.com Fri May 13 23:24:55 2011 From: mark at microenh.com (Mark Erbaugh) Date: Fri, 13 May 2011 17:24:55 -0400 Subject: [CentralOH] virtualenv and shared library Message-ID: On the Mac with OSX 10.6 (Snow Leopard), it appears that the install of bsddb is broken. If you try to run a script that uses bsddb, you get an error that it can't find _bsddb.so. If you look in the lib-dynload directory under site-packages, sure enough, that library is missing. I found a suggestion on the web that copying _bsddb.so from the ActiveState python install fixes that, and at least I no longer get the can't find error. I'm using virtualenv to install extra python libraries on my Mac and I'm trying to keep the default Python as close to that as originally supplied by Apple. While under site-packages in the virtualenv, there is a lib-dynload directory, but it is just a link to the default one. Is there a place to install shared libraries that will be unique to a given virtualenv? Mark P.S. Is anyone interested in using virtualenv's with Eclipse/Pydev? It appears that recent versions have built-in support that seems to be working. From wam at cisco.com Sat May 14 00:20:08 2011 From: wam at cisco.com (William McVey) Date: Fri, 13 May 2011 18:20:08 -0400 Subject: [CentralOH] virtualenv and shared library In-Reply-To: References: Message-ID: <1305325208.27878.12.camel@goldfinger> On Fri, 2011-05-13 at 17:24 -0400, Mark Erbaugh wrote: > On the Mac with OSX 10.6 (Snow Leopard), it appears that the install > of bsddb is broken. If you try to run a script that uses bsddb, you > get an error that it can't find _bsddb.so. If you look in the > lib-dynload directory under site-packages, sure enough, that library > is missing. I found a suggestion on the web that copying _bsddb.so > from the ActiveState python install fixes that, and at least I no > longer get the can't find error. > Considering bsddb is deprecated, you may want to consider other storage options (a buddy of mine has recently finished a project using Kyotocabinet for key/value storage, and was very happy with it). > I'm using virtualenv to install extra python libraries on my Mac and > I'm trying to keep the default Python as close to that as originally > supplied by Apple. While under site-packages in the virtualenv, there > is a lib-dynload directory, but it is just a link to the default one. > Is there a place to install shared libraries that will be unique to a > given virtualenv? I install python-ldap pretty frequently into virtualenvs, and the .so file ends up getting placed at the top level of site-packages. For example: PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/_ldap.so However, I also see that some packages install their .so within the egg directory of the package itself. For example: PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/psycopg2/_psycopg.so and PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/lxml-2.3beta1-py2.6-linux-i686.egg/lxml/etree.so > P.S. Is anyone interested in using virtualenv's with Eclipse/Pydev? It > appears that recent versions have built-in support that seems to be > working. Sorry, I'm a wingide and/or vi guy... -- William P.S. Looking at other virtualenvs, I see that _ldap.so is also sometimes dropped into the python_ldap egg directory (similar to how lxml handles it). Guess the behavior changed in different versions of the software. From mark at microenh.com Sun May 15 22:50:37 2011 From: mark at microenh.com (Mark Erbaugh) Date: Sun, 15 May 2011 16:50:37 -0400 Subject: [CentralOH] virtualenv and shared library In-Reply-To: <1305325208.27878.12.camel@goldfinger> References: <1305325208.27878.12.camel@goldfinger> Message-ID: On May 13, 2011, at 6:20 PM, William McVey wrote: > On Fri, 2011-05-13 at 17:24 -0400, Mark Erbaugh wrote: >> On the Mac with OSX 10.6 (Snow Leopard), it appears that the install >> of bsddb is broken. If you try to run a script that uses bsddb, you >> get an error that it can't find _bsddb.so. If you look in the >> lib-dynload directory under site-packages, sure enough, that library >> is missing. I found a suggestion on the web that copying _bsddb.so >> from the ActiveState python install fixes that, and at least I no >> longer get the can't find error. >> > Considering bsddb is deprecated, you may want to consider other storage > options (a buddy of mine has recently finished a project using > Kyotocabinet for key/value storage, and was very happy with it). Good point, but I am supporting a legacy app that uses bsddb. Hopefully, I'll get a chance to update it this year. > >> I'm using virtualenv to install extra python libraries on my Mac and >> I'm trying to keep the default Python as close to that as originally >> supplied by Apple. While under site-packages in the virtualenv, there >> is a lib-dynload directory, but it is just a link to the default one. >> Is there a place to install shared libraries that will be unique to a >> given virtualenv? > > I install python-ldap pretty frequently into virtualenvs, and the .so > file ends up getting placed at the top level of site-packages. For > example: > > > PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/_ldap.so > > However, I also see that some packages install their .so within the egg > directory of the package itself. For example: > PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/psycopg2/_psycopg.so > and > PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/lxml-2.3beta1-py2.6-linux-i686.egg/lxml/etree.so > I'm going to give that a try. > >> P.S. Is anyone interested in using virtualenv's with Eclipse/Pydev? It >> appears that recent versions have built-in support that seems to be >> working. > Thanks, Mark From mark at microenh.com Sun May 15 23:02:13 2011 From: mark at microenh.com (Mark Erbaugh) Date: Sun, 15 May 2011 17:02:13 -0400 Subject: [CentralOH] virtualenv and shared library In-Reply-To: <1305325208.27878.12.camel@goldfinger> References: <1305325208.27878.12.camel@goldfinger> Message-ID: <13D2021C-CDEF-44CE-A5BC-6A1D748280AC@microenh.com> On May 13, 2011, at 6:20 PM, William McVey wrote: >> >> I'm using virtualenv to install extra python libraries on my Mac and >> I'm trying to keep the default Python as close to that as originally >> supplied by Apple. While under site-packages in the virtualenv, there >> is a lib-dynload directory, but it is just a link to the default one. >> Is there a place to install shared libraries that will be unique to a >> given virtualenv? > > I install python-ldap pretty frequently into virtualenvs, and the .so > file ends up getting placed at the top level of site-packages. For > example: > > > PATH_TO_VIRTUALENV_ROOT/lib/python2.6/site-packages/_ldap.so Thanks again, I found that that putting _bsddb.so in site-packages does work. I also found that putting it one folder up, PATH_TO_VIRTUALENV_ROOT/lib/python2.6 worked Mark From eric at intellovations.com Mon May 16 20:05:44 2011 From: eric at intellovations.com (Eric Floehr) Date: Mon, 16 May 2011 14:05:44 -0400 Subject: [CentralOH] COhPy May Meeting Message-ID: All, Because of Memorial Day, our COhPy meeting will be next Monday, May 23. We're opening up the mic to anyone who wants to bounce ideas for PyOhio talks, have questions answered, or share cool Python tricks. We'll also head to dinner and drinks afterward (any suggestions?). The meeting is a 6:30pm at TechColumbus Conference Room A. I hope to see you there! RSVP and more details here: http://www.meetup.com/Central-Ohio-Python-Users-Group/events/18534591/ Best Regards, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.scites at railcar88.com Wed May 18 07:00:28 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Wed, 18 May 2011 01:00:28 -0400 Subject: [CentralOH] Python DoJoe Hacker Notes Message-ID: *5-17-11* Jason Denzin and I pair programmed Learn Python the Hard Way, exercises 11 (Asking Questions), 12 (Prompting People) and 13 (Parameters, Unpacking, Variables). Morgan Goose provided python support/consulting in our collabedit session:) Next week we'll aim to get the following exercises completed: 14 Prompting And Passing 15 Reading Files 16 Reading and Writing Files Tonight, I'll post the session notes from this and last week to the COhPy mailing list. Hack your world! P.S. "Hack your world" is a quote from Thomas Gideon of "The Command Line" podcast (http://thecommandline.net/) *5-10-11* Jason Denzin and I pair programmed Learn Python the Hard Way, exercises 8 (Printing, Printing), 9 (Printing, Printing, Printing) and 10 (What Was That?). Next week we'll aim to get the following exercises completed: 11 Asking Questions 12 Prompting People 13 Parameters, Unpacking, Variables The upcoming exercises should be good as we're moving into more interaction with the python interpreter. Hack your world! P.S. "Hack your world" is a quote from Thomas Gideon of "The Command Line" podcast (http://thecommandline.net/) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Wed May 18 14:08:15 2011 From: mark at microenh.com (Mark Erbaugh) Date: Wed, 18 May 2011 08:08:15 -0400 Subject: [CentralOH] Local IP Address in Python Message-ID: <53F66419-D008-4C5C-8079-177B71F973EA@microenh.com> Is there a Python library function to determine the IP address or addresses of the local machine? I'm looking for something that provides the information similar to what is displayed when you run ifconfig (Posix) or ipconfig (Windows)? Thanks, Mark Yes, I realize I could run ip / ifconfig in a shell, but I'm looking for something else. From kartic.krish at gmail.com Wed May 18 16:27:43 2011 From: kartic.krish at gmail.com (Kartic Krishnamurthy) Date: Wed, 18 May 2011 07:27:43 -0700 Subject: [CentralOH] Local IP Address in Python In-Reply-To: <53F66419-D008-4C5C-8079-177B71F973EA@microenh.com> References: <53F66419-D008-4C5C-8079-177B71F973EA@microenh.com> Message-ID: There is the netifaces module that does exactly what you want. In [1]: import netifaces In [2]: netifaces.interfaces() Out[2]: ['lo0', 'gif0', 'stf0', 'en0', 'en1', 'fw0'] In [3]: for iface in netifaces.interfaces(): ...: print netifaces.ifaddresses(iface) ...: ...: {18: [{'addr': ''}], 2: [{'peer': '127.0.0.1', 'netmask': '255.0.0.0', 'addr': '127.0.0.1'}], 30: [{'peer': '::1', 'netmask': 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', 'addr': '::1'}, {'netmask': 'ffff:ffff:ffff:ffff::', 'addr': 'fe80::1%lo0'}]} .... (output truncated) If you want to manipulate IP addresses, there are a bunch of other libraries listed at http://code.google.com/p/netaddr/wiki/YetAnotherPythonIPModule +Kartic On Wed, May 18, 2011 at 5:08 AM, Mark Erbaugh wrote: > Is there a Python library function to determine the IP address or addresses of the local machine? ?I'm looking for something that provides the information similar to what is displayed when you run ifconfig (Posix) or ipconfig (Windows)? > > Thanks, > Mark > > Yes, I realize I could run ip / ifconfig in a shell, but I'm looking for something else. From mark at microenh.com Wed May 18 16:34:30 2011 From: mark at microenh.com (Mark Erbaugh) Date: Wed, 18 May 2011 10:34:30 -0400 Subject: [CentralOH] OT: code.google.com bar code Message-ID: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> While researching for a Python library, I found a page on code.google.com and I noticed a square bar code-ish emblem. I've seen something similar on other web pages. Does it mean something? Thanks, Mark From eric at intellovations.com Wed May 18 16:55:08 2011 From: eric at intellovations.com (Eric Floehr) Date: Wed, 18 May 2011 10:55:08 -0400 Subject: [CentralOH] OT: code.google.com bar code In-Reply-To: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> References: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> Message-ID: Do you mean this: http://en.wikipedia.org/wiki/QR_code -Eric On Wed, May 18, 2011 at 10:34 AM, Mark Erbaugh wrote: > While researching for a Python library, I found a page on code.google.comand I noticed a square bar code-ish emblem. I've seen something similar on > other web pages. Does it mean something? > > Thanks, > Mark > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jshaffstall at gmail.com Wed May 18 17:00:20 2011 From: jshaffstall at gmail.com (Jay Shaffstall) Date: Wed, 18 May 2011 11:00:20 -0400 Subject: [CentralOH] OT: code.google.com bar code In-Reply-To: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> References: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> Message-ID: I've most often seen those lately on Android app sites. Android devices can scan those off the screen and get directed to a URL, which might be where you can purchase the app. In general, the barcode can encode any short piece of text, not just a URL. Jay On Wed, May 18, 2011 at 10:34 AM, Mark Erbaugh wrote: > While researching for a Python library, I found a page on code.google.com and I noticed a square bar code-ish emblem. I've seen something similar on other web pages. ?Does it mean something? > > Thanks, > Mark > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > From jonebird at gmail.com Wed May 18 17:11:27 2011 From: jonebird at gmail.com (Jon Miller) Date: Wed, 18 May 2011 11:11:27 -0400 Subject: [CentralOH] OT: code.google.com bar code In-Reply-To: References: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> Message-ID: I wrote up a small blog post about 2D barcodes which includes some online tools for decoding 2D barcodes: http://jonebird.com/2008/11/06/2d-barcodes/ Specifically, try using http://zxing.org/w/decode.jspx and punching in the URL of the image from the code.google.com site. -- Jon Miller On Wed, May 18, 2011 at 11:00 AM, Jay Shaffstall wrote: > I've most often seen those lately on Android app sites. ?Android > devices can scan those off the screen and get directed to a URL, which > might be where you can purchase the app. ?In general, the barcode can > encode any short piece of text, not just a URL. > > Jay > > On Wed, May 18, 2011 at 10:34 AM, Mark Erbaugh wrote: >> While researching for a Python library, I found a page on code.google.com and I noticed a square bar code-ish emblem. I've seen something similar on other web pages. ?Does it mean something? >> >> Thanks, >> Mark >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> http://mail.python.org/mailman/listinfo/centraloh >> > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > From chris at developingchris.com Wed May 18 17:26:30 2011 From: chris at developingchris.com (Chris Chandler) Date: Wed, 18 May 2011 11:26:30 -0400 Subject: [CentralOH] OT: code.google.com bar code In-Reply-To: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> References: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> Message-ID: You can use google code to host android apps, and install them via download and the QR code takes you to the page, so its easier than remembering the crazy url on your phone. You can also store them as pictures and kind of bookmark things for later that way. Thanks, Chris Chandler 352-871-0712 On Wed, May 18, 2011 at 10:34 AM, Mark Erbaugh wrote: > While researching for a Python library, I found a page on code.google.comand I noticed a square bar code-ish emblem. I've seen something similar on > other web pages. Does it mean something? > > Thanks, > Mark > _______________________________________________ > 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 Wed May 18 18:04:36 2011 From: mark at microenh.com (Mark Erbaugh) Date: Wed, 18 May 2011 12:04:36 -0400 Subject: [CentralOH] OT: code.google.com bar code In-Reply-To: References: <7016186D-8D0C-4CAB-B730-45085B296FFF@microenh.com> Message-ID: <451A1107-7561-4BD3-A98E-D45421B3A762@microenh.com> On May 18, 2011, at 10:55 AM, Eric Floehr wrote: > Do you mean this: http://en.wikipedia.org/wiki/QR_code > > -Eric > > > On Wed, May 18, 2011 at 10:34 AM, Mark Erbaugh wrote: > While researching for a Python library, I found a page on code.google.com and I noticed a square bar code-ish emblem. I've seen something similar on other web pages. Does it mean something? Eric, Thanks, that's it. That also explains a similar QR code I saw on a billboard recently. I'm guessing with a suitable camera on a suitable mobile device, the QR code would have linked me to the advertisers website. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Wed May 18 18:12:40 2011 From: mark at microenh.com (Mark Erbaugh) Date: Wed, 18 May 2011 12:12:40 -0400 Subject: [CentralOH] Local IP Address in Python In-Reply-To: <53F66419-D008-4C5C-8079-177B71F973EA@microenh.com> References: <53F66419-D008-4C5C-8079-177B71F973EA@microenh.com> Message-ID: On May 18, 2011, at 8:08 AM, Mark Erbaugh wrote: > Is there a Python library function to determine the IP address or addresses of the local machine? I'm looking for something that provides the information similar to what is displayed when you run ifconfig (Posix) or ipconfig (Windows)? > > Thanks, > Mark I'll answer my own question for others who might be interested: import socket x = [i[4][0] for i in socket.getaddrinfo(socket.gethostname(), None, socket.AF_INET, socket.SOCK_STREAM)] This seems to work on both my Mac and Windows. From mark at microenh.com Tue May 24 23:41:58 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 24 May 2011 17:41:58 -0400 Subject: [CentralOH] Checkboxes Message-ID: Did something change with webpy's handling of Checkboxes on web forms between 0.3 and 0.34 (and 0.35). I have an application that uses, among other things, Checkboxes. These worked using 0.3, but don't appear to under 0.34. For example, even though the data being displayed is such that the checkbox should be checked, it is not displaying as checked. Further, if I check the box and POST the form, the POST handler doesn't seem to detect that the box is checked. I switched back to 0.3 and it still works there. Here's the function that creates the webpy form: > def edit_form(ves): > return f.Form( > f.Checkbox("pass_el2", description="Pass Element 2"), > f.Checkbox("pass_el3", description="Pass Element 3"), > f.Checkbox("pass_el4", description="Pass Element 4"), > ... > ) Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From debacle at debian.org Wed May 25 01:54:04 2011 From: debacle at debian.org (W. Martin Borgert) Date: Wed, 25 May 2011 01:54:04 +0200 Subject: [CentralOH] [webpy] Checkboxes In-Reply-To: References: Message-ID: <20110524235404.GA16054@beron.tangosoft.com> On 2011-05-24 17:41, Mark Erbaugh wrote: > Did something change with webpy's handling of Checkboxes on web forms between 0.3 and 0.34 (and 0.35). Yes, that's why my own application contains the following compatibility code: # this is copied from 0.32, as 0.33 works differently class Checkbox(web.form.Input): def render(self): checked_description = self.attrs.pop('checked_description', None) x = u'' x += self.rendernote(self.note) if checked_description: return '' % (x, checked_description) else: return x Cheers From David at wwcols.com Wed May 25 15:45:50 2011 From: David at wwcols.com (David Chew) Date: Wed, 25 May 2011 09:45:50 -0400 Subject: [CentralOH] New to Python Message-ID: <001d01cc1ae2$1000a2f0$3001e8d0$@com> Hello, I'm new to Python and plan on working with Django and Plone. Is anyone in the Columbus area using these applications? I'm looking for everything from peer help to potential subcontractors. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.albright at gmail.com Wed May 25 16:33:46 2011 From: nick.albright at gmail.com (Nick Albright) Date: Wed, 25 May 2011 10:33:46 -0400 Subject: [CentralOH] New to Python In-Reply-To: <001d01cc1ae2$1000a2f0$3001e8d0$@com> References: <001d01cc1ae2$1000a2f0$3001e8d0$@com> Message-ID: I'm a big django fan/user myself! = ) Glad to help out with any Qs. :) -Nick On Wed, May 25, 2011 at 9:45 AM, David Chew wrote: > Hello, I?m new to Python and plan on working with Django and Plone. Is > anyone in the Columbus area using these applications? I?m looking for > everything from peer help to potential subcontractors? > > > > Thanks! > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Wed May 25 16:41:36 2011 From: eric at intellovations.com (Eric Floehr) Date: Wed, 25 May 2011 10:41:36 -0400 Subject: [CentralOH] Be famous, give back, learn by doing (PyOhio deadline approaching!) Message-ID: PyOhio is still looking for good talk, panel, or sprint proposals, but the deadline in next Friday June 3! Email to: cfp at pyohio.org (More details and the submission template can be found here: http://bit.ly/kBUYmk [pyohio.org]) There are many reasons why you want to submit a proposal: 1. Improve your public speaking skills 2. Give back to the Python community 3. Share your knowledge 4. Learn by doing 5. Increase participation in your open source project PyOhio attendees are courteous, attentive, and interested in what you have to say! PyOhio 2011, the fourth annual Python programming conference for Ohio and the surrounding region, will take place Saturday-Sunday, July 30-31, 2011 at the Ohio State University in Columbus, Ohio. A variety of activities are planned, including tutorials, scheduled talks, Lightning Talks, Open Spaces and Sprints. PyOhio may record presentations for later release over the web. Presenters will need to sign a release of recording rights to PyOhio; see http://wiki.python.org/moin/PyOhio/RecordingRelease All proposals should be emailed to cfp at pyohio.org for review. Please submit proposals by Friday, June 3, 2011. Accepted speakers will be notified by June 17. You can read more about the conference at http://pyohio.org. If you have questions about proposals, please email cfp at pyohio.org. You can also contact the PyOhio organizers at pyohio-organizers at python.org. More details and the submission template can be found here: http://bit.ly/kBUYmk [pyohio.org] -------------- next part -------------- An HTML attachment was scrubbed... URL: From issac.kelly at gmail.com Wed May 25 17:08:39 2011 From: issac.kelly at gmail.com (Issac Kelly) Date: Wed, 25 May 2011 11:08:39 -0400 Subject: [CentralOH] New to Python In-Reply-To: References: <001d01cc1ae2$1000a2f0$3001e8d0$@com> Message-ID: > > I'm a big django fan/user myself! = ) Glad to help out with any Qs. :) > -Nick > Same, I can say here's what helped me learn django. Do the tutorial, even if you don't know python yet, do the django tutorial. Read every word. The Django docs are really, really well written. Then do the python tutorial, and maybe work through some of Learn Python the Hard Way (mostly for non-programmers, you might go through it pretty quickly). Learn the basic python types, how control flow works, and get a quick understanding of generators and list comprehensions, so when you see one, you have a better understanding of what is happening. If you don't know the basics of Object Oriented Programming, Django will be difficult. If you don't know the basics of SQL, django _might_ be difficult (hard to say from my end). After you feel confident about reading python code, do the Django tutorial again (I did it three times). At this point, I started devouring videos from PyCon and DjangoCon. I still had some misunderstandings about core Django things, like packaging, schema or data migrations (changes to your models) and some other stuff. I hired a consultant for a few hours to read some of my code and tell me what I could be doing better. I spent a little money to deal with a real expert, who was also a great teacher, and it really helped. Ask on the list when you get stuck, the #django channel on freenode is a bit noisy, and not always the most helpful if you don't have a very specific question, that can't be answered in the documentation. (sorry for the double negative) So, some questions on my end: What do you do? What are you trying to build? If you're looking for consultants to help you learn in a more structured way, I'd be up for that, or someone to help you build your thing, we do contract development all the time, feel free to reach out to me off-list. Sorry I don't know anything about the Pylons/Pyramid world, but I can answer, or get the answer for any Django question you have. I love that more people in Columbus are getting into Django. Issac Kelly -------------- next part -------------- An HTML attachment was scrubbed... URL: From yyc at solvcon.net Wed May 25 17:54:21 2011 From: yyc at solvcon.net (Yung-Yu Chen) Date: Wed, 25 May 2011 11:54:21 -0400 Subject: [CentralOH] New to Python In-Reply-To: <001d01cc1ae2$1000a2f0$3001e8d0$@com> References: <001d01cc1ae2$1000a2f0$3001e8d0$@com> Message-ID: I am curious why would you consider both Django and Plone. I've used Plone long time ago. It's a nice CMS built upon Zope. But IMO, that actually made it less easy to work with. Zope is a very special system, which is totally different to Django. However I don't do web programming for a long time. I asked just out of curiosity. yyc On Wed, May 25, 2011 at 09:45, David Chew wrote: > Hello, I?m new to Python and plan on working with Django and Plone. Is > anyone in the Columbus area using these applications? I?m looking for > everything from peer help to potential subcontractors? > > > > Thanks! > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -- Yung-Yu Chen http://solvcon.net/yyc/ +1 (614) 859 2436 -------------- next part -------------- An HTML attachment was scrubbed... URL: From josh at globalherald.net Wed May 25 18:24:16 2011 From: josh at globalherald.net (Joshua Kramer) Date: Wed, 25 May 2011 12:24:16 -0400 (EDT) Subject: [CentralOH] New to Python In-Reply-To: References: <001d01cc1ae2$1000a2f0$3001e8d0$@com> Message-ID: > I am curious why would you consider both Django and Plone. > I've used Plone long time ago. ?It's a nice CMS built upon Zope. ?But IMO, They serve two very different needs. Django is an excellent general-purpose framework upon which to build web applications. Plone is very much like SharePoint in that it's aimed more towards document and content management - not applications. -JK From yyc at solvcon.net Wed May 25 19:33:11 2011 From: yyc at solvcon.net (Yung-Yu Chen) Date: Wed, 25 May 2011 13:33:11 -0400 Subject: [CentralOH] New to Python In-Reply-To: References: <001d01cc1ae2$1000a2f0$3001e8d0$@com> Message-ID: On Wed, May 25, 2011 at 12:24, Joshua Kramer wrote: > > I am curious why would you consider both Django and Plone. >> I've used Plone long time ago. It's a nice CMS built upon Zope. But IMO, >> > > They serve two very different needs. > > Django is an excellent general-purpose framework upon which to build web > applications. > > Plone is very much like SharePoint in that it's aimed more towards document > and content management - not applications. > > Exactly. In my understanding, the two systems have drastically different use cases. So I am very interested in the motivation to consider both systems at the same time. yyc > -JK > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -- Yung-Yu Chen http://solvcon.net/yyc/ +1 (614) 859 2436 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Thu May 26 15:35:20 2011 From: mark at microenh.com (Mark Erbaugh) Date: Thu, 26 May 2011 09:35:20 -0400 Subject: [CentralOH] Printing PDF files from Python Message-ID: I'm using the ReportLab library to generate PDF files from a Python application. Normally, I launch a native PDF viewer (Adobe Reader on Windows, Preview on Mac) and let the user print the document if they want. Is there a way to directly print the PDF file from the Python app? I could shell to the native reader, but it would be nice if I could keep this looking like it was "built-in" to the app, not a separate process. Thanks, Mark From David at wwcols.com Thu May 26 15:38:31 2011 From: David at wwcols.com (David Chew) Date: Thu, 26 May 2011 09:38:31 -0400 Subject: [CentralOH] CentralOH Digest, Vol 49, Issue 18 In-Reply-To: References: Message-ID: <001501cc1baa$345c3470$9d149d50$@com> Django vs. Plone: Plone is being used as the 'portal' to an internal website (do they still call them intranets?) that will organize training info, projects, blogs, forums, etc... Access to different areas will be controlled by roles, groups, workflows, etc... So the content management is very helpful. In addition, we have a lot of relational database needs that the site will also host. Django + MySQL should be able to serve up web forms for entering data, running reports, etc. I'm leaning towards Django simply to stay in the same realm of programming languages (python) without having to hobble something together that's completely separate (MS SQL + Dreamweaver for example)... So Plone would organize the content, while certain areas/modules/pages within the website will be pretty classic relational database stuff. I've done SQL and Access for years but really have not drank the Share-point koolaid. Ready to take the open source plunge. So I'm new, and at the beginning of a series of projects so any 'real world' experience would be great to know. Really appreciate the discussion! From eric at intellovations.com Thu May 26 16:23:14 2011 From: eric at intellovations.com (Eric Floehr) Date: Thu, 26 May 2011 10:23:14 -0400 Subject: [CentralOH] Printing PDF files from Python In-Reply-To: References: Message-ID: I would look at Poppler (http://poppler.freedesktop.org/) and the python-poppler bindings. Here's an example of using it in QT: http://code.google.com/p/python-poppler-qt4/ http://doc.qt.nokia.com/qq/qq27-poppler.html (C++ but concepts the same) Here is a recipe to use poppler within wxwindows: http://code.activestate.com/recipes/577195-wxpython-pdf-viewer-using-poppler/ -Eric On Thu, May 26, 2011 at 9:35 AM, Mark Erbaugh wrote: > I'm using the ReportLab library to generate PDF files from a Python > application. Normally, I launch a native PDF viewer (Adobe Reader on > Windows, Preview on Mac) and let the user print the document if they want. > Is there a way to directly print the PDF file from the Python app? I could > shell to the native reader, but it would be nice if I could keep this > looking like it was "built-in" to the app, not a separate process. > > Thanks, > Mark > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Thu May 26 16:39:39 2011 From: eric at intellovations.com (Eric Floehr) Date: Thu, 26 May 2011 10:39:39 -0400 Subject: [CentralOH] Printing PDF files from Python In-Reply-To: References: Message-ID: Of course after I send that I realize you are talking Windows... Sorry, I have a Linux bias :-). For Windows, you might see if there is an OLE container or something for Adobe? I'm not as familiar with current Windows state-of-the-art (even though I did C++ and MFC for a number of years long ago!). -Eric On Thu, May 26, 2011 at 10:23 AM, Eric Floehr wrote: > I would look at Poppler (http://poppler.freedesktop.org/) and the > python-poppler bindings. > > Here's an example of using it in QT: > > http://code.google.com/p/python-poppler-qt4/ > > http://doc.qt.nokia.com/qq/qq27-poppler.html (C++ but concepts the same) > > Here is a recipe to use > poppler within wxwindows: > > > http://code.activestate.com/recipes/577195-wxpython-pdf-viewer-using-poppler/ > > > > -Eric > > > On Thu, May 26, 2011 at 9:35 AM, Mark Erbaugh wrote: > >> I'm using the ReportLab library to generate PDF files from a Python >> application. Normally, I launch a native PDF viewer (Adobe Reader on >> Windows, Preview on Mac) and let the user print the document if they want. >> Is there a way to directly print the PDF file from the Python app? I could >> shell to the native reader, but it would be nice if I could keep this >> looking like it was "built-in" to the app, not a separate process. >> >> Thanks, >> Mark >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> http://mail.python.org/mailman/listinfo/centraloh >> > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kartic.krish at gmail.com Thu May 26 17:46:52 2011 From: kartic.krish at gmail.com (Kartic Krishnamurthy) Date: Thu, 26 May 2011 08:46:52 -0700 Subject: [CentralOH] Printing PDF files from Python In-Reply-To: References: Message-ID: I thought about suggesting printing using the shell (or may be win32api) and Google gave me this : http://timgolden.me.uk/python/win32_how_do_i/print.html#shellexecute - seems pretty elegant. +Kartic On Thu, May 26, 2011 at 6:35 AM, Mark Erbaugh wrote: > I'm using the ReportLab library to generate PDF files from a Python application. ?Normally, I launch a native PDF viewer (Adobe Reader on Windows, Preview on Mac) and let the user print the document if they want. Is there a way to directly print the PDF file from the Python app? ?I could shell to the native reader, but it would be nice if I could keep this looking like it was "built-in" to the app, not a separate process. > > Thanks, > Mark From mark at microenh.com Thu May 26 19:57:56 2011 From: mark at microenh.com (Mark Erbaugh) Date: Thu, 26 May 2011 13:57:56 -0400 Subject: [CentralOH] Printing PDF files from Python In-Reply-To: References: Message-ID: <1D7A00E3-F84D-4F26-88C7-AA8D6E5DBD5A@microenh.com> On May 26, 2011, at 10:39 AM, Eric Floehr wrote: > Of course after I send that I realize you are talking Windows... Sorry, I have a Linux bias :-). > > For Windows, you might see if there is an OLE container or something for Adobe? I'm not as familiar with current Windows state-of-the-art (even though I did C++ and MFC for a number of years long ago!). > Eric, I'm really looking for solutions that will work across platforms: Windows, Mac, Linux. Maybe Poppler will handle the Mac and Linux parts. Mark From mark at microenh.com Thu May 26 20:00:43 2011 From: mark at microenh.com (Mark Erbaugh) Date: Thu, 26 May 2011 14:00:43 -0400 Subject: [CentralOH] Printing PDF files from Python In-Reply-To: References: Message-ID: <84FBBA3F-495D-410F-9FB6-ECBA26B7B183@microenh.com> On May 26, 2011, at 11:46 AM, Kartic Krishnamurthy wrote: > I thought about suggesting printing using the shell (or may be > win32api) and Google gave me this : > http://timgolden.me.uk/python/win32_how_do_i/print.html#shellexecute - > seems pretty elegant. Kartic, Thanks. I'll check that out. I'm actually looking for solutions across platforms: Windows, Mac, Linux. This may work for Windows. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From kartic.krish at gmail.com Thu May 26 20:12:35 2011 From: kartic.krish at gmail.com (Kartic Krishnamurthy) Date: Thu, 26 May 2011 11:12:35 -0700 Subject: [CentralOH] Printing PDF files from Python In-Reply-To: <84FBBA3F-495D-410F-9FB6-ECBA26B7B183@microenh.com> References: <84FBBA3F-495D-410F-9FB6-ECBA26B7B183@microenh.com> Message-ID: <896FED8A-AA78-400D-AC2B-82F0D911E622@gmail.com> On May 26, 2011, at 11:00, Mark Erbaugh wrote: > > On May 26, 2011, at 11:46 AM, Kartic Krishnamurthy wrote: > >> I thought about suggesting printing using the shell (or may be >> win32api) and Google gave me this : >> http://timgolden.me.uk/python/win32_how_do_i/print.html#shellexecute - >> seems pretty elegant. > > > Kartic, > > Thanks. I'll check that out. I'm actually looking for solutions across platforms: Windows, Mac, Linux. This may work for Windows. > > Mark I guess between Eric and me, you are covered :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.scites at railcar88.com Tue May 31 13:22:11 2011 From: scott.scites at railcar88.com (Scott Scites) Date: Tue, 31 May 2011 07:22:11 -0400 Subject: [CentralOH] Python DoJoe Hacker Session Notes - 05-31-11 Message-ID: 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: