From mark at microenh.com Tue Nov 1 22:01:15 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 1 Nov 2011 17:01:15 -0400 Subject: [CentralOH] Unittesting with vi(m) Message-ID: So I'm using Test Driven Development. I have vim open with two side by side windows. One window has the code under test, the other the unit tests. I have a code runner under the if __name__ == '__main__': section of the unit test file. I can quickly run my unit tests by switching to that window (ctrl-W W) and doing :! python %. I think it would be smoother if I could execute python with the unit test file regardless of which window is active. Of course I could specify the path to the unittest file, but that's awkward. The next best solution would be to create a quick map (which is what I'll probably do if I don't come up with something better). But I wonder if there is a way to specify a file by buffer number as the argument to :! python instead of % (for the current buffer)? Thanks, Mark From wilson.eric.n at gmail.com Wed Nov 2 00:44:18 2011 From: wilson.eric.n at gmail.com (Eric Wilson) Date: Tue, 1 Nov 2011 19:44:18 -0400 Subject: [CentralOH] Unittesting with vi(m) In-Reply-To: References: Message-ID: Eventually, you may want to look into nosetests. It will find and execute all tests in all test files, based on naming conventions. Eric Wilson On Tue, Nov 1, 2011 at 5:01 PM, Mark Erbaugh wrote: > So I'm using Test Driven Development. I have vim open with two side by > side windows. One window has the code under test, the other the unit tests. > I have a code runner under the if __name__ == '__main__': section of the > unit test file. I can quickly run my unit tests by switching to that > window (ctrl-W W) and doing :! python %. > > I think it would be smoother if I could execute python with the unit test > file regardless of which window is active. Of course I could specify the > path to the unittest file, but that's awkward. The next best solution would > be to create a quick map (which is what I'll probably do if I don't come up > with something better). > > But I wonder if there is a way to specify a file by buffer number as the > argument to :! python instead of % (for the current buffer)? > > 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 Nov 2 01:14:18 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 1 Nov 2011 20:14:18 -0400 Subject: [CentralOH] Unittesting with vi(m) In-Reply-To: References: Message-ID: <66BCF1BF-3B28-4EB0-828F-8E7096EA1F8F@microenh.com> Eric, Thanks. I am aware of nosetests. I'm not running all the unit tests, just the ones in a test file for the current module. Mark On Nov 1, 2011, at 7:44 PM, Eric Wilson wrote: > Eventually, you may want to look into nosetests. It will find and execute all tests in all test files, based on naming conventions. > > Eric Wilson > > On Tue, Nov 1, 2011 at 5:01 PM, Mark Erbaugh wrote: > So I'm using Test Driven Development. I have vim open with two side by side windows. One window has the code under test, the other the unit tests. I have a code runner under the if __name__ == '__main__': section of the unit test file. I can quickly run my unit tests by switching to that window (ctrl-W W) and doing :! python %. > > I think it would be smoother if I could execute python with the unit test file regardless of which window is active. Of course I could specify the path to the unittest file, but that's awkward. The next best solution would be to create a quick map (which is what I'll probably do if I don't come up with something better). > > But I wonder if there is a way to specify a file by buffer number as the argument to :! python instead of % (for the current buffer)? > > 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 jep200404 at columbus.rr.com Wed Nov 2 02:00:52 2011 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 1 Nov 2011 21:00:52 -0400 Subject: [CentralOH] Unittesting with vi(m) In-Reply-To: References: Message-ID: <20111101210052.5b51697a.jep200404@columbus.rr.com> On Tue, 1 Nov 2011 17:01:15 -0400, Mark Erbaugh wrote: > So I'm using Test Driven Development. I have vim open with two side by side wi > > I think it would be smoother if I could execute python with the unit test file > > But I wonder if there is a way to specify a file by buffer number as the argum This would be a good thing to ask at the next vim meeting. Bring your computer and show what you are doing. http://www.techlifeohio.com/events/vim-columbus-meeting http://www.meetup.com/Vim-Columbus/ http://vim-columbus.github.com/ From jon at hogue.org Wed Nov 2 02:02:52 2011 From: jon at hogue.org (Jonathan Hogue) Date: Tue, 1 Nov 2011 21:02:52 -0400 Subject: [CentralOH] Unittesting with vi(m) In-Reply-To: <20111101210052.5b51697a.jep200404@columbus.rr.com> References: <20111101210052.5b51697a.jep200404@columbus.rr.com> Message-ID: plug badge :-) On Tue, Nov 1, 2011 at 9:00 PM, wrote: > On Tue, 1 Nov 2011 17:01:15 -0400, Mark Erbaugh wrote: > >> So I'm using Test Driven Development. I have vim open with two side by side wi >> >> I think it would be smoother if I could execute python with the unit test file >> >> But I wonder if there is a way to specify a file by buffer number as the argum > > This would be a good thing to ask at the next vim meeting. > Bring your computer and show what you are doing. > http://www.techlifeohio.com/events/vim-columbus-meeting > http://www.meetup.com/Vim-Columbus/ > http://vim-columbus.github.com/ > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > From eric at intellovations.com Wed Nov 2 20:35:51 2011 From: eric at intellovations.com (Eric Floehr) Date: Wed, 2 Nov 2011 15:35:51 -0400 Subject: [CentralOH] Unittesting with vi(m) In-Reply-To: <20111101210052.5b51697a.jep200404@columbus.rr.com> References: <20111101210052.5b51697a.jep200404@columbus.rr.com> Message-ID: Not to get too off topic, but today I learned that vi was originally written by Bill Joy, co-founder of Sun Microsystems. And that vim was first written as a vi clone for the Amiga exactly 20 years ago today (November 2). http://arstechnica.com/open-source/news/2011/11/two-decades-of-productivity-vims-20th-anniversary.ars Cheers, Eric On Tue, Nov 1, 2011 at 9:00 PM, wrote: > On Tue, 1 Nov 2011 17:01:15 -0400, Mark Erbaugh wrote: > > > So I'm using Test Driven Development. I have vim open with two side by > side wi > > > > I think it would be smoother if I could execute python with the unit > test file > > > > But I wonder if there is a way to specify a file by buffer number as the > argum > > This would be a good thing to ask at the next vim meeting. > Bring your computer and show what you are doing. > http://www.techlifeohio.com/events/vim-columbus-meeting > http://www.meetup.com/Vim-Columbus/ > http://vim-columbus.github.com/ > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From godber at gmail.com Thu Nov 3 01:25:46 2011 From: godber at gmail.com (Austin Godber) Date: Wed, 2 Nov 2011 17:25:46 -0700 Subject: [CentralOH] Unittesting with vi(m) In-Reply-To: References: Message-ID: Mark It seems to me you can solve this by just typing: :! python filename.py in any of the windows. Referencing the file seems somewhat more natural than remembering the mapping between buffers and files. Or am I missing something? Also, I came across this recently ... for VIM + Python users, I haven't tried it yet: https://github.com/klen/python-mode Austin On Tue, Nov 1, 2011 at 2:01 PM, Mark Erbaugh wrote: > So I'm using Test Driven Development. I have vim open with two side by > side windows. One window has the code under test, the other the unit tests. > I have a code runner under the if __name__ == '__main__': section of the > unit test file. I can quickly run my unit tests by switching to that > window (ctrl-W W) and doing :! python %. > > I think it would be smoother if I could execute python with the unit test > file regardless of which window is active. Of course I could specify the > path to the unittest file, but that's awkward. The next best solution would > be to create a quick map (which is what I'll probably do if I don't come up > with something better). > > But I wonder if there is a way to specify a file by buffer number as the > argument to :! python instead of % (for the current buffer)? > > 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 brandon at rhodesmill.org Sat Nov 12 02:07:11 2011 From: brandon at rhodesmill.org (Brandon Craig Rhodes) Date: Fri, 11 Nov 2011 20:07:11 -0500 Subject: [CentralOH] any CodeMash room sharing? Message-ID: <87vcqq9mio.fsf@asaph.rhodesmill.org> Jackie and I are in the final stages of preparation for our move to Bluffton - we met with the Mayflower representative yesterday, in fact - and we should arrive in Ohio the second weekend in December. I look forward to meeting everyone again, this time as an actual resident! But I wanted to go ahead and ask: are any Python folks planning on attending CodeMash and, if so, do people ever share rooms? Or does everyone just sign up for separate rooms because most people need rooms for their families anyway, since it's a water park? :) -- Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon From mark at microenh.com Tue Nov 15 16:33:34 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 15 Nov 2011 10:33:34 -0500 Subject: [CentralOH] WSGI Friendly Hosting Message-ID: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> I'm looking for suggestions for an online hosting service that supports WSGI, shell accounts and wildcard domain (i.e. *.microenh.com) HTTPS. I've been using Dreamhost for several years and I'm pleased with them. While it's labeled 'experimental', I've been running a couple of small Pyramid-based (WSGI) websites and they seem to work. My problem is HTTPS. According to the Dreamhost docs, to add HTTPS, I need to obtain a static IP address from them which is $4/month additional. Currently, my monthly bill is only $8/month, so that's a 50% increase. Also, the HTTPS would only apply to one domain. I currently run several websites using a sub domain and it looks like I'd have to get static IP addresses for each of them (another $4/month) if I wanted HTTPS. Mark From issac.kelly at gmail.com Tue Nov 15 17:17:04 2011 From: issac.kelly at gmail.com (Issac Kelly) Date: Tue, 15 Nov 2011 08:17:04 -0800 Subject: [CentralOH] WSGI Friendly Hosting In-Reply-To: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> References: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> Message-ID: No matter where you are, you need 1 static IP address per SSL certificate, your certicicate can cover either one fully qualified domain (x.you.com, or you.com) OR a much more costly wildcard SSL *.you.com $4/mo is about the standard, Rackspace will do it for $3/mo last I checked, but you're going to be managing everything about your server there (it's a VPS, not managed hosting) and it starts @ $9/mo. Sometime in the future the tech will be available for this not to be such a pain, but that's just the way it is right now. On Tue, Nov 15, 2011 at 7:33 AM, Mark Erbaugh wrote: > I'm looking for suggestions for an online hosting service that supports > WSGI, shell accounts and wildcard domain (i.e. *.microenh.com) HTTPS. > > I've been using Dreamhost for several years and I'm pleased with them. > While it's labeled 'experimental', I've been running a couple of small > Pyramid-based (WSGI) websites and they seem to work. My problem is HTTPS. > According to the Dreamhost docs, to add HTTPS, I need to obtain a static > IP address from them which is $4/month additional. Currently, my monthly > bill is only $8/month, so that's a 50% increase. Also, the HTTPS would only > apply to one domain. I currently run several websites using a sub domain > and it looks like I'd have to get static IP addresses for each of them > (another $4/month) if I wanted HTTPS. > > 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 Tue Nov 15 18:38:37 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 15 Nov 2011 12:38:37 -0500 Subject: [CentralOH] WSGI Friendly Hosting In-Reply-To: References: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> Message-ID: Issac, Thanks for the information. I have one website for a volunteer non-profit where we sometimes need to submit the applicant's personal information. The only thing in that process that isn't public information is the SSN. I've donated the hosting but didn't want to pay the extra if I didn't have to. If I do buy a static IP address and SSL certificate for a single domain, would it be possible to maintain multiple non-secure domains that link to webpages under the secure domain when they need secure transfers, or would that be a lot of work to save $4 a month? Mark > No matter where you are, you need 1 static IP address per SSL certificate, your certicicate can cover either one fully qualified domain (x.you.com, or you.com) OR a much more costly wildcard SSL *.you.com > > $4/mo is about the standard, Rackspace will do it for $3/mo last I checked, but you're going to be managing everything about your server there (it's a VPS, not managed hosting) and it starts @ $9/mo. > > Sometime in the future the tech will be available for this not to be such a pain, but that's just the way it is right now. > > > On Tue, Nov 15, 2011 at 7:33 AM, Mark Erbaugh wrote: > I'm looking for suggestions for an online hosting service that supports WSGI, shell accounts and wildcard domain (i.e. *.microenh.com) HTTPS. > > I've been using Dreamhost for several years and I'm pleased with them. While it's labeled 'experimental', I've been running a couple of small Pyramid-based (WSGI) websites and they seem to work. My problem is HTTPS. According to the Dreamhost docs, to add HTTPS, I need to obtain a static IP address from them which is $4/month additional. Currently, my monthly bill is only $8/month, so that's a 50% increase. Also, the HTTPS would only apply to one domain. I currently run several websites using a sub domain and it looks like I'd have to get static IP addresses for each of them (another $4/month) if I wanted HTTPS. > > 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 issac.kelly at gmail.com Tue Nov 15 18:45:23 2011 From: issac.kelly at gmail.com (Issac Kelly) Date: Tue, 15 Nov 2011 09:45:23 -0800 Subject: [CentralOH] WSGI Friendly Hosting In-Reply-To: References: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> Message-ID: It's definitely possible to do that, but yeah, it's ~$50/yr. Maybe you can just ask somebody @ the non-profit to donate it? $150/yr TOTAL for web fees seems totally reasonable. The other thing is that there is a little cognative dissonance between switching URLs for the 'secure' site. to the point of it feeling less secure for a lot of people to be kicked around between several sites, that they may or might not know the source. On Tue, Nov 15, 2011 at 9:38 AM, Mark Erbaugh wrote: > Issac, > > Thanks for the information. I have one website for a volunteer non-profit > where we sometimes need to submit the applicant's personal information. The > only thing in that process that isn't public information is the SSN. I've > donated the hosting but didn't want to pay the extra if I didn't have to. > > If I do buy a static IP address and SSL certificate for a single domain, > would it be possible to maintain multiple non-secure domains that link to > webpages under the secure domain when they need secure transfers, or would > that be a lot of work to save $4 a month? > > Mark > > > > No matter where you are, you need 1 static IP address per SSL certificate, > your certicicate can cover either one fully qualified domain (x.you.com, > or you.com) OR a much more costly wildcard SSL *.you.com > > $4/mo is about the standard, Rackspace will do it for $3/mo last I > checked, but you're going to be managing everything about your server there > (it's a VPS, not managed hosting) and it starts @ $9/mo. > > Sometime in the future the tech will be available for this not to be such > a pain, but that's just the way it is right now. > > > On Tue, Nov 15, 2011 at 7:33 AM, Mark Erbaugh wrote: > >> I'm looking for suggestions for an online hosting service that supports >> WSGI, shell accounts and wildcard domain (i.e. *.microenh.com) HTTPS. >> >> I've been using Dreamhost for several years and I'm pleased with them. >> While it's labeled 'experimental', I've been running a couple of small >> Pyramid-based (WSGI) websites and they seem to work. My problem is HTTPS. >> According to the Dreamhost docs, to add HTTPS, I need to obtain a static >> IP address from them which is $4/month additional. Currently, my monthly >> bill is only $8/month, so that's a 50% increase. Also, the HTTPS would only >> apply to one domain. I currently run several websites using a sub domain >> and it looks like I'd have to get static IP addresses for each of them >> (another $4/month) if I wanted HTTPS. >> >> 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 > > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lenjaffe at jaffesystems.com Tue Nov 15 19:35:45 2011 From: lenjaffe at jaffesystems.com (Len Jaffe) Date: Tue, 15 Nov 2011 13:35:45 -0500 Subject: [CentralOH] WSGI Friendly Hosting In-Reply-To: References: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> Message-ID: On Tue, Nov 15, 2011 at 12:38 PM, Mark Erbaugh wrote: > Issac, > > Thanks for the information. I have one website for a volunteer non-profit > where we sometimes need to submit the applicant's personal information. The > only thing in that process that isn't public information is the SSN. I've > donated the hosting but didn't want to pay the extra if I didn't have to. > > If I do buy a static IP address and SSL certificate for a single domain, > would it be possible to maintain multiple non-secure domains that link to > webpages under the secure domain when they need secure transfers, or would > that be a lot of work to save $4 a month? > > I just want to make sure that you are aware that Dreamhost offers "free hosting for life" for non-profits. All you need is to send them a copy of your 501c3. It is a standard hosting account. Not crippled in any way. I use them for free hosting for a boy scout troop and an elementary school PTA. Lowering your cost to 0 for hosting could make it cost effective to add a static IP. Len -- lenjaffe at jaffesystems.com 614-404-4214 Proprietor: http://www.theycomewithcheese.com/ - An Homage to Fromage Grubmaster: Greenbar 2011, 2010, 2009, Grub Asst. 2008, Trained 2007. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Tue Nov 15 19:45:03 2011 From: mark at microenh.com (Mark Erbaugh) Date: Tue, 15 Nov 2011 13:45:03 -0500 Subject: [CentralOH] WSGI Friendly Hosting In-Reply-To: References: <58BB7C5C-382C-4681-A25A-BA39D8D3860A@microenh.com> Message-ID: <461C2C37-785D-4FCC-947D-263E5687703A@microenh.com> On Nov 15, 2011, at 1:35 PM, Len Jaffe wrote: > On Tue, Nov 15, 2011 at 12:38 PM, Mark Erbaugh wrote: > Issac, > > Thanks for the information. I have one website for a volunteer non-profit where we sometimes need to submit the applicant's personal information. The only thing in that process that isn't public information is the SSN. I've donated the hosting but didn't want to pay the extra if I didn't have to. > > If I do buy a static IP address and SSL certificate for a single domain, would it be possible to maintain multiple non-secure domains that link to webpages under the secure domain when they need secure transfers, or would that be a lot of work to save $4 a month? > > > I just want to make sure that you are aware that Dreamhost offers "free hosting for life" for non-profits. All you need is to send them a copy of your 501c3. > It is a standard hosting account. Not crippled in any way. I use them for free hosting for a boy scout troop and an elementary school PTA. > Lowering your cost to 0 for hosting could make it cost effective to add a static IP. > Len Len, Thanks, I didn't know that. Unfortunately, the group I'm working with is not a 501(c)3. It's non-profit only in the sense that it doesn't charge for its services, and while the costs are kept low, they are borne by the volunteers themselves. For example, most of the software they use, I wrote and donated. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From joskra42.list at gmail.com Mon Nov 28 05:15:55 2011 From: joskra42.list at gmail.com (Joshua Kramer) Date: Sun, 27 Nov 2011 23:15:55 -0500 Subject: [CentralOH] Python + Open/Libre Office Message-ID: Howdy Everybody... As I was preparing my household budget for 2012, I decided to use Python to automate some of the acrobatics involved with my spreadsheet. It's actually pretty easy once you get the hang of it. http://wiki.services.openoffice.org/wiki/Python In my workbook, I have a base "Builder" worksheet with named ranges for expenses, income, etc. What I wanted to do was create an additional worksheet for each of the 26 pay periods in the year. Then, I thought I'd get fancy and link each worksheet, so that extra money left over from one pay period is automatically linked to the next worksheet. The Python script is attached for the curious. I can provide the spreadsheet on request. I'd welcome any suggestions for improvement, as I haven't dabbled in Python for quite a while and I'm excited to get back into it. Cheers, -JK -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WeekEndingCalculator.py Type: application/octet-stream Size: 3647 bytes Desc: not available URL: From james at atlantixeng.com Wed Nov 30 19:19:15 2011 From: james at atlantixeng.com (James -- Atlantix) Date: Wed, 30 Nov 2011 13:19:15 -0500 Subject: [CentralOH] Python on Ubuntu Question Message-ID: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Hello Folks; I am doing some work with Python 2.7 on Ubuntu these days, and since this is my first foray from Windows into Linux in some time, I have some general questions. My Unix graduate school daze still remain with me, so I am okay with general setup. Maybe some of you could provide your thoughts. The first question is would you install setuptools and use easy_install OR would you tend to use the Synaptic package manager within Ubuntu . . . i.e. Sudo apt-get install python-dev python-setuptools Sudo easy_install scipy Sudo easy_install numpy Sudo easy_install matplotlib Or use the Ubuntu tools. The second question is with regards to the development environment on Ubuntu, is there something better than Wing IDE that is native to Linux that is not in Windows? The third question is has anyone run stackless python in Ubuntu? What are your thoughts? Thanks, James -------------- next part -------------- An HTML attachment was scrubbed... URL: From james at atlantixeng.com Wed Nov 30 19:27:07 2011 From: james at atlantixeng.com (James -- Atlantix) Date: Wed, 30 Nov 2011 13:27:07 -0500 Subject: [CentralOH] Stackless Python Message-ID: <00e501ccaf8d$ab689870$0239c950$@atlantixeng.com> How to use it is the general question . . . and how many have had good results with it? James -------------- next part -------------- An HTML attachment was scrubbed... URL: From winningham at gmail.com Wed Nov 30 19:35:42 2011 From: winningham at gmail.com (Thomas Winningham) Date: Wed, 30 Nov 2011 13:35:42 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: I can add some things: 1. I would use synaptic and/or apt-get or aptitude to install any python package if it exists in your repositories. Those builds are marked correctly for dependencies and generally work. It is not terrible however to use easy_install for packages, even if they exist in the repositories, the only caveats I can think of is that you may have to install further -dev packages to support compilation, or the dependencies will not be tracked as well. With many packages, your only option is easy_install, but things like scipy or numpy seem to work better using the distro packages. Often, I for whatever ill-advised reason, like to get the latest whatever by downloading the package and running its setup.py ... and this causes issues if it needs something newer than what my distro offers, so I have then go hunt all of that down and install it to, and I probably should've just used easy_install in that case. 2. I don't know about IDEs... I use GEdit for everything, and I don't know your needs. I've used Codeweavers and Eclipse and they have all the bells and whistles, even if it takes a while to setup and normalize to what you want to do. I do like nosetests and nosed and have that run the tests when I hit save in GEdit. 3. I used stackless once for an ssh project, and it seemed to do what I wanted at the time. For the most part I personally am fine with traditional threads, and I can live with the interpreter lock. That being said, I've been really amazed with the multiprocessing module or setting up a message queue to dispatch events and report back to the queue and the whole consumer / producer model. I think stackless might have less of an importance lately due to pypy, multiprocessing, and the whole message queuing structures I've seen lately, but hopefully someone else can comment on that, I don't do it every day. thanks, and best of luck, Thomas On Wed, Nov 30, 2011 at 1:19 PM, James -- Atlantix wrote: > Hello Folks; I am doing some work with Python 2.7 on Ubuntu these days, > and since this is my first foray from Windows into Linux in some time, I > have some general questions. My Unix graduate school daze still remain with > me, so I am okay with general setup. Maybe some of you could provide your > thoughts. The first question is would you install setuptools and use > easy_install OR would you tend to use the Synaptic package manager within > Ubuntu . . . i.e. **** > > ** ** > > Sudo apt-get install python-dev python-setuptools > > Sudo easy_install scipy > Sudo easy_install numpy > Sudo easy_install matplotlib**** > > ** ** > > Or use the Ubuntu tools. **** > > ** ** > > The second question is with regards to the development environment on > Ubuntu, is there something better than Wing IDE that is native to Linux > that is not in Windows? **** > > ** ** > > The third question is has anyone run stackless python in Ubuntu? What are > your thoughts?**** > > ** ** > > Thanks,**** > > James**** > > ** ** > > ** ** > > ** ** > > _______________________________________________ > 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 Nov 30 19:41:48 2011 From: jshaffstall at gmail.com (Jay Shaffstall) Date: Wed, 30 Nov 2011 13:41:48 -0500 Subject: [CentralOH] Stackless Python In-Reply-To: <00e501ccaf8d$ab689870$0239c950$@atlantixeng.com> References: <00e501ccaf8d$ab689870$0239c950$@atlantixeng.com> Message-ID: On Wed, Nov 30, 2011 at 1:27 PM, James -- Atlantix wrote: > How to use it is the general question . . . and how many have had good > results with it? James It's been a couple of years for me, so I'll refer you to the Stackless tutorials on how to use it. What I used it for was a simulation of cavern development in three dimensions, so the number of nodes that needed processing grew quickly. I created coroutines for those nodes that needed processing. We did have good results, although profiling the app showed that the initial creation of the coroutines was pretty expensive. Lazy creation of the coroutines was necessary to prevent a huge amount of overhead (in cavern development, many of the nodes would remain static and never need processed). We used Stackless specifically so we could process only those nodes that needed it, and ignore the rest. Stackless scheduling did that, in a way that didn't require synchronization headaches. Jay From brandon at rhodesmill.org Wed Nov 30 19:39:52 2011 From: brandon at rhodesmill.org (Brandon Craig Rhodes) Date: Wed, 30 Nov 2011 13:39:52 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> (james@atlantixeng.com's message of "Wed, 30 Nov 2011 13:19:15 -0500") References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: <87vcq1wj2f.fsf@asaph.rhodesmill.org> "James -- Atlantix" writes: > The third question is has anyone run stackless python in Ubuntu? What > are your thoughts? >From what I can tell, people these days just tend to use greenlet / eventlet in combination with normal Python, which gives them roughly the same capabilities they could get in Stackless, but without having to have a whole other version of Python installed! -- Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon From brandon at rhodesmill.org Wed Nov 30 19:38:16 2011 From: brandon at rhodesmill.org (Brandon Craig Rhodes) Date: Wed, 30 Nov 2011 13:38:16 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> (james@atlantixeng.com's message of "Wed, 30 Nov 2011 13:19:15 -0500") References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: <87zkfdwj53.fsf@asaph.rhodesmill.org> "James -- Atlantix" writes: > The first question is would you install setuptools and use > easy_install You are close, but slightly out of date; "setuptools" is now, thankfully, deprecated, since it was always an absolute nightmare to try to use directly. Instead, install the most recent version of "virtualenv" and then create virtual environments with it; they will come built-in with the setuptools replacement, "distribute", and with the command you should use instead of "easy_install", which is named "pip" (written by the famous Ian Bicking). > OR would you tend to use the Synaptic package manager within Ubuntu > sudo apt-get install python-dev python-setuptools ... For things like scipy and numpy, just "apt-get" them directly: sudo apt-get python-scipy sudo apt-get python-numpy sudo apt-get python-matplotlib By going with the standard Ubuntu pre-compiled versions, you will tend to save yourself LOTS of time. :) -- Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon From brywilharris at gmail.com Wed Nov 30 19:46:21 2011 From: brywilharris at gmail.com (Bryan Harris) Date: Wed, 30 Nov 2011 13:46:21 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: If you want to get higher performance out of a python program by using more than one core, you basically have to use stackless or processing. Threading can never use more than one core. Stackless sounds like a nice solution and frankly I don't know why stackless hasn't just merged into the main python tree. As it is, stackless is a PITA to get set up and the performance isn't that different for most things. It would be nice to take away recursion limits and such. Does anybody know what the disadvantages of stackless are? Why hasn't default python interpreter gone stackless? Is there a performance hit in some situations? From brywilharris at gmail.com Wed Nov 30 19:50:15 2011 From: brywilharris at gmail.com (Bryan Harris) Date: Wed, 30 Nov 2011 13:50:15 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <87vcq1wj2f.fsf@asaph.rhodesmill.org> References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> <87vcq1wj2f.fsf@asaph.rhodesmill.org> Message-ID: Can greenlets use multiple cores? In my limited testing, I couldn't get more than 100% cpu utilization with greenlets (one full core was the max no matter what). Greenlets did better than threading which had ridiculous overhead. Has anybody actually tested this in multithreaded, cpu-bound code? From james at atlantixeng.com Wed Nov 30 19:55:03 2011 From: james at atlantixeng.com (James -- Atlantix) Date: Wed, 30 Nov 2011 13:55:03 -0500 Subject: [CentralOH] Stackless Python & Ubuntu Message-ID: <010301ccaf91$9214d7e0$b63e87a0$@atlantixeng.com> Thanks Jay and Thomas. The comments were particularly helpful. I guess the overall question would be: go stackless or PyPy for distributing a large simulation over a network? I like the maturity of Stackless from what I've seen . . . James From jshaffstall at gmail.com Wed Nov 30 20:05:11 2011 From: jshaffstall at gmail.com (Jay Shaffstall) Date: Wed, 30 Nov 2011 14:05:11 -0500 Subject: [CentralOH] Stackless Python & Ubuntu In-Reply-To: <010301ccaf91$9214d7e0$b63e87a0$@atlantixeng.com> References: <010301ccaf91$9214d7e0$b63e87a0$@atlantixeng.com> Message-ID: On Wed, Nov 30, 2011 at 1:55 PM, James -- Atlantix wrote: > I guess the overall question would be: go stackless or PyPy for distributing > a large simulation over a network? We didn't get to the point in our simulation of distributing nodes across the network (that was the next step, but expected funding didn't materialize). So I can't comment on how Stackless works in that environment, but it worked well in a single machine. Our plan had been to use MPI for communication between machines, and Stackless for scheduling coroutines on a single machine. PyPy hadn't had Stackless-style support when we were doing our initial work, so I can't comment on how complete that is. Jay From brandon at rhodesmill.org Wed Nov 30 20:17:23 2011 From: brandon at rhodesmill.org (Brandon Craig Rhodes) Date: Wed, 30 Nov 2011 14:17:23 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: (Bryan Harris's message of "Wed, 30 Nov 2011 13:46:21 -0500") References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: <87r50pwhbw.fsf@asaph.rhodesmill.org> Bryan Harris writes: > If you want to get higher performance out of a python program by using > more than one core, you basically have to use stackless or processing. > Threading can never use more than one core. You might be confusing Stackless Python with some other experiment in multiprocessing from the early 2000's. Stackless Python, like eventlet, lets you write cooperative co-routines that can suspend their state; and it does this by moving stack frames from the traditional C stack to the heap instead. But it does nothing about the Python interpreter's inability to use more than one CPU core. -- Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon From mark at microenh.com Wed Nov 30 21:01:49 2011 From: mark at microenh.com (Mark Erbaugh) Date: Wed, 30 Nov 2011 15:01:49 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: <1BA011E8-1874-4CF8-BEB4-9684D6DDB201@microenh.com> On Nov 30, 2011, at 1:19 PM, James -- Atlantix wrote: > Hello Folks; I am doing some work with Python 2.7 on Ubuntu these days, and since this is my first foray from Windows into Linux in some time, I have some general questions. My Unix graduate school daze still remain with me, so I am okay with general setup. Maybe some of you could provide your thoughts. The first question is would you install setuptools and use easy_install OR would you tend to use the Synaptic package manager within Ubuntu . . . i.e. As someone else said, I recommend virtualenv. Use the Ubuntu package manger to install virtualenv. Then use virtualenv to create a "clean" environment for each project and install the needed Python add-ons in the virtualenv using pip. Even if you routinely use the "same" add-ons for different projects, this would protect you from incompatible changes in version updates of the add-ons. > > The second question is with regards to the development environment on Ubuntu, is there something better than Wing IDE that is native to Linux that is not in Windows? I used to use Eclipse with PyDev and liked it. Lately I've switched to using vim (vi) as a text editor and running the program from the command line or with :! from inside vim. I had a little problem getting PyDev to play nice with virtualenv, but that was about the time I switched to using vim, so I never came up with a complete solution. When I need to browse library module source code or when I need to do some manual experimentation with Python, I use still use IDLE. IDLE does play nice with virtualenv. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at intellovations.com Wed Nov 30 19:43:09 2011 From: eric at intellovations.com (Eric Floehr) Date: Wed, 30 Nov 2011 13:43:09 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> Message-ID: James, Hello Folks; I am doing some work with Python 2.7 on Ubuntu these days, and > since this is my first foray from Windows into Linux in some time, I have > some general questions. My Unix graduate school daze still remain with me, > so I am okay with general setup. Maybe some of you could provide your > thoughts. The first question is would you install setuptools and use > easy_install OR would you tend to use the Synaptic package manager within > Ubuntu . . . i.e. **** > > ** ** > > Sudo apt-get install python-dev python-setuptools > > Sudo easy_install scipy > Sudo easy_install numpy > Sudo easy_install matplotlib**** > > ** ** > > Or use the Ubuntu tools. > I install packages for things that are a pain to install any other way (like scipy and numpy), and then create virtualenv's (using virtualenvwrapper) for specific projects. I also prefer pip over easy_install, however sometimes pip doesn't work the way you'd like. But, pip gives you easy uninstall and requirements documentation via "pip freeze". However... knowing the work you do, and that you specifically mentioned scipy, numpy, and matplotlib, I would highly recommend you check out Enthought's Python Distribution (EPD). It works on Linux and Windows, and has its own python package manager with packages that are compiled with some high performance libraries. And there is a free version (only difference is support and which packages come "pre-installed"): http://www.enthought.com/products/epd_free.php As for IDE... Wing IDE works really well on Linux... don't really know of any that are "Linux specific". -Eric > **** > > ** ** > > The second question is with regards to the development environment on > Ubuntu, is there something better than Wing IDE that is native to Linux > that is not in Windows? **** > > ** ** > > The third question is has anyone run stackless python in Ubuntu? What are > your thoughts?**** > > ** ** > > Thanks,**** > > James**** > > ** ** > > ** ** > > ** ** > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > http://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brywilharris at gmail.com Wed Nov 30 22:09:15 2011 From: brywilharris at gmail.com (Bryan Harris) Date: Wed, 30 Nov 2011 16:09:15 -0500 Subject: [CentralOH] Python on Ubuntu Question In-Reply-To: <87r50pwhbw.fsf@asaph.rhodesmill.org> References: <00da01ccaf8c$91fed120$b5fc7360$@atlantixeng.com> <87r50pwhbw.fsf@asaph.rhodesmill.org> Message-ID: Unless the global interpreter lock has somehow disappeared, i doubt it has changed in the last couple years. Threading can use 1 core or less, as did most every other python library I tried. I'd love to be wrong. try it. I modified a program of mine to be multithreaded and it got slower - even on my quad core machine. Stock python will quite happily run threads on more than one core, just never 2 at once! I guess this wasn't really his question, but something worth discussing. -------------- next part -------------- An HTML attachment was scrubbed... URL: From james at atlantixeng.com Wed Nov 30 22:05:34 2011 From: james at atlantixeng.com (James -- Atlantix) Date: Wed, 30 Nov 2011 16:05:34 -0500 Subject: [CentralOH] Virtual ENV Message-ID: <011f01ccafa3$ce0cb0d0$6a261270$@atlantixeng.com> Thanks everyone for their comments on virtual env. I look forward to working with it. -James