From jep200404 at columbus.rr.com Tue Oct 1 15:31:23 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 1 Oct 2013 09:31:23 -0400 Subject: [CentralOH] =?utf-8?q?2013-09-30_=E6=9C=83=E8=AD=B0_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8=?= Message-ID: <20131001093123.3195244c.jep200404@columbus.rr.com> Thanks to Pillar Technology with Ben Rogers and Chef Jeff CHEZJEF for their hospitality. Chef Jeff put out quite a spread with various salads, pizza, and beverages. Venkatesh Ganapathy business guy with startup looking for tech co-founder MoveEZ to find moving companies https://twitter.com/Move_EZ - but no tweets yet http://www.moveez.com 10X program http://10xelerator.com/10x-announces-the-teams-for-the-class-of-2013/ 8% of web site ready Raymond Chandler III agilehog http://agilehogs.com/blog/ (note singular/plural) spkrbar.com python & rails javascript will be free in Janauary django-rest-framework https://pypi.python.org/pypi?%3Aaction=search&term=django+rest+framework&submit=search ??? https://pypi.python.org/pypi/djangorestframework/2.3.8 1. create a model 2. write a serializer from rest_framework import serializers class TalkSerializer( 3. write a view from talks.serializers import TalkSerializer 4. configure the url url(r'lsjdflsjf', TalkDetail.as_view()) 5 ran presentation with reveal.js https://github.com/kitanata https://github.com/kitanata/DjangoRestFrameworkTalk will this be updated will be on spkrbar.com Famous Prison says seems like a lot of work to implement "active resource" in ruby Host says that serializers do queries(???) Jason Green Panda3d panda3d.org Unity looks solid raymond recommends pyglet kytten over pygame for 2D games _Includes_ Python 2.5.6 as ppython highjacks builtins Snake Example (Tutorial?) goo.gl/wmSeG9 gravity really sucks things that change are "actors" things that do not change are "models" actor is being sucked down to earth collision detection with earth bump mapping singlepoint of light labyrinth tasks task list the game of snake Joe Walsh Analog Man http://en.wikipedia.org/wiki/Analog_Man_(album) From jep200404 at columbus.rr.com Wed Oct 9 18:43:26 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Wed, 9 Oct 2013 12:43:26 -0400 Subject: [CentralOH] =?utf-8?q?2013-09-27_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz86IFBlZXdlZQ==?= In-Reply-To: <20130930152914.4c9d0acd.jep200404@columbus.rr.com> References: <20130930152914.4c9d0acd.jep200404@columbus.rr.com> Message-ID: <20131009124326.3f747f6e.jep200404@columbus.rr.com> On Mon, 30 Sep 2013 15:29:14 -0400, jep200404 at columbus.rr.com wrote: > peewee - very nice Third, behind Sqlalchemy & Storm, which are pretty good company. http://stackoverflow.com/questions/53428/what-are-some-good-python-orm-solutions From brian.costlow at gmail.com Fri Oct 11 16:38:32 2013 From: brian.costlow at gmail.com (Brian Costlow) Date: Fri, 11 Oct 2013 10:38:32 -0400 Subject: [CentralOH] Why Python Message-ID: Hi All, I am working on a short talk, titled Why Python? This talk is aimed at adults new to programming, or who are thinking about it, but have not even started yet, often those trying to learn outside a traditional academic environment. In an environment where certain other languages/skills will probably make it easier to find an internship or entry-level job (just because there are more of them out there, especially in "flyover country") why should they bother to learn Python instead of Java, C#, Ruby, PHP, or JavaScript + CSS & HTML? Or, even if not "instead of", why should they exert effort to learn Python "in addition to". After all, to people entirely new to this, Ruby and Python seem to be basically the same. I don't want this to just be my ideas, I want to solicit ideas from the community. So, jump in on the thread, and tell me what I should be including in the talk. --Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.costlow at gmail.com Fri Oct 11 16:56:55 2013 From: brian.costlow at gmail.com (Brian Costlow) Date: Fri, 11 Oct 2013 10:56:55 -0400 Subject: [CentralOH] Looking for a presenter for 10/28 COhPy Message-ID: Hi All, We need a presenter for 10/28. We are looking for a specific talk. We are expecting (hoping) that we will have a number of new faces, that are new to Python, from Catherine's class on 10/18-19. So we would like a very, very light intro talk on either Flask or Django. Start with nothing and end up with a very simple dynamic page or app. The idea is to whet appetites more than to 'teach everything you need to know about X'. The talk should be 45 minutes to an hour, and be accessible to people who have just done this: https://openhatch.org/wiki/Columbus_Python_Workshop_1/ If you are interested, send me an email. --Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From godber at gmail.com Fri Oct 11 17:14:42 2013 From: godber at gmail.com (Austin Godber) Date: Fri, 11 Oct 2013 08:14:42 -0700 Subject: [CentralOH] Why Python In-Reply-To: References: Message-ID: I will comment on "Ruby and Python are basically the same" ... I switched from writing Ruby for about five years to python predominantly because ruby lacked the broad ecosystem of third party libraries. Web has been so dominant in Ruby that the communities support of other things has waned. Specifically, for my purposes, I found Ruby support for scientific computing, plotting, and image processing to be lacking. Python's tools in these areas are a decade ahead, though it looks like Ruby is again trying to flesh these things out. - Austin On Fri, Oct 11, 2013 at 7:38 AM, Brian Costlow wrote: > Hi All, > > I am working on a short talk, titled Why Python? > > This talk is aimed at adults new to programming, or who are thinking about > it, but have not even started yet, often those trying to learn outside a > traditional academic environment. > > In an environment where certain other languages/skills will probably make > it easier to find an internship or entry-level job (just because there are > more of them out there, especially in "flyover country") why should they > bother to learn Python instead of Java, C#, Ruby, PHP, or JavaScript + CSS > & HTML? > > Or, even if not "instead of", why should they exert effort to learn Python > "in addition to". After all, to people entirely new to this, Ruby and > Python seem to be basically the same. > > I don't want this to just be my ideas, I want to solicit ideas from the > community. So, jump in on the thread, and tell me what I should be > including in the talk. > > --Brian > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joskra42.list at gmail.com Sat Oct 12 15:48:13 2013 From: joskra42.list at gmail.com (Joshua Kramer) Date: Sat, 12 Oct 2013 09:48:13 -0400 Subject: [CentralOH] Why Python In-Reply-To: References: Message-ID: One major plus is the cross platform aspect. For a lot of code, I can run it unmodified on IronPython under the Microsoft .NET platform, under java via jython, or as a standard C-based scripting language. Additionally, IronPython can use .NET assemblies and dll's natively, so it makes prototyping windows applications easy. On Oct 11, 2013 11:15 AM, "Austin Godber" wrote: > I will comment on "Ruby and Python are basically the same" ... I switched > from writing Ruby for about five years to python predominantly because ruby > lacked the broad ecosystem of third party libraries. Web has been so > dominant in Ruby that the communities support of other things has waned. > Specifically, for my purposes, I found Ruby support for scientific > computing, plotting, and image processing to be lacking. Python's tools in > these areas are a decade ahead, though it looks like Ruby is again trying > to flesh these things out. > > - Austin > > > > On Fri, Oct 11, 2013 at 7:38 AM, Brian Costlow wrote: > >> Hi All, >> >> I am working on a short talk, titled Why Python? >> >> This talk is aimed at adults new to programming, or who are thinking >> about it, but have not even started yet, often those trying to learn >> outside a traditional academic environment. >> >> In an environment where certain other languages/skills will probably make >> it easier to find an internship or entry-level job (just because there are >> more of them out there, especially in "flyover country") why should they >> bother to learn Python instead of Java, C#, Ruby, PHP, or JavaScript + CSS >> & HTML? >> >> Or, even if not "instead of", why should they exert effort to learn >> Python "in addition to". After all, to people entirely new to this, Ruby >> and Python seem to be basically the same. >> >> I don't want this to just be my ideas, I want to solicit ideas from the >> community. So, jump in on the thread, and tell me what I should be >> including in the talk. >> >> --Brian >> >> >> _______________________________________________ >> CentralOH mailing list >> CentralOH at python.org >> https://mail.python.org/mailman/listinfo/centraloh >> >> > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From catherine.devlin at gmail.com Sat Oct 12 17:08:59 2013 From: catherine.devlin at gmail.com (Catherine Devlin) Date: Sat, 12 Oct 2013 11:08:59 -0400 Subject: [CentralOH] Volunteers needed: Columbus Python Workshop Message-ID: Hi, COHPy! This coming weekend (Oct 18-19) is the second Columbus Python Workshop for women and their friends. Thanks for doing a great job of recruiting - we've got a huge class signed up! Teaching assistants ------------------- We need a few people circulating to help nudge students who've gotten stuck. You can be a beginner at Python yourself (actually, it's almost better that way). The class overall runs at The Forge by Pillar (in the Smith Bros hardware building) from 6 - 9 on Friday night and 9:30 to 4:30 on Saturday. TAs can come for any portion of that time. Our biggest need for TAs is on Friday evening. Saturday lunchtime lightning ---------------------------- As the students have lunch on Saturday, I like to provide some infotainment with lightning-ish talks from the community. (It's just lightning-ish because there's no strict 5-minute limit.) You're not generally teaching the students how to do any particular thing - their skills aren't really ready for that anyway - but you're wowing them with some of the neat things nthey'll be able to get into as their Python skills develop. Anything that makes a good, visually appealing demo is ideal for this. For example, last year we had two ideal examples in PyEphem and a string of Arduino-driven LEDs. Alternately, you can go for less visually stunning and more immediately practical - I've done a brief demo on consuming data from a spreadsheet, since that's a use almost everybody can relate to. Loaner laptops -------------- It would be wise to have a couple extra laptops on hand for the odd student who shows up without one, or with one that's hopelessly outdated or impossibly weird in configuration. If you've got a machine that you can make available for the whole class period, that would be fantastic. Anyway, if you can help in any of these capacities, please let me know! Thanks! And thanks again for recruiting a great class! -- - Catherine http://catherinedevlin.blogspot.com From catherine.devlin at gmail.com Sat Oct 12 17:29:11 2013 From: catherine.devlin at gmail.com (Catherine Devlin) Date: Sat, 12 Oct 2013 11:29:11 -0400 Subject: [CentralOH] Volunteers needed: Columbus Python Workshop In-Reply-To: References: Message-ID: Oh, I forgot one more type of volunteer I'd like - a photographer! It would be neat to get some good shots of the action, and I'll be way too busy to take any myself. If you can show up with a camera at some point, that would be great! (This can obviously be combined with being a TA or giving a lightning talk!) On Sat, Oct 12, 2013 at 11:08 AM, Catherine Devlin wrote: > Hi, COHPy! This coming weekend (Oct 18-19) is the second Columbus > Python Workshop for women and their friends. Thanks for doing a great > job of recruiting - we've got a huge class signed up! > -- - Catherine http://catherinedevlin.blogspot.com From pcarswell.1 at gmail.com Sun Oct 13 19:46:59 2013 From: pcarswell.1 at gmail.com (Peter Carswell) Date: Sun, 13 Oct 2013 13:46:59 -0400 Subject: [CentralOH] Volunteers needed: Columbus Python Workshop In-Reply-To: References: Message-ID: I can be there Friday ... possibly Saturday afternoon, as well. But definitely Friday. What time? pete On Sat, Oct 12, 2013 at 11:29 AM, Catherine Devlin < catherine.devlin at gmail.com> wrote: > Oh, I forgot one more type of volunteer I'd like - a photographer! It > would be neat to get some good shots of the action, and I'll be way > too busy to take any myself. If you can show up with a camera at some > point, that would be great! > > (This can obviously be combined with being a TA or giving a lightning > talk!) > > On Sat, Oct 12, 2013 at 11:08 AM, Catherine Devlin > wrote: > > Hi, COHPy! This coming weekend (Oct 18-19) is the second Columbus > > Python Workshop for women and their friends. Thanks for doing a great > > job of recruiting - we've got a huge class signed up! > > > > -- > - Catherine > http://catherinedevlin.blogspot.com > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at aufdencamp.com Mon Oct 14 16:48:31 2013 From: mark at aufdencamp.com (Mark Aufdencamp) Date: Mon, 14 Oct 2013 07:48:31 -0700 Subject: [CentralOH] Django, South, and PostgreSQL Message-ID: <20131014074831.181451e9c2a7ebbcd6ae28cea81146c8.780f0fa345.wbe@email17.secureserver.net> Hi All, I'm hoping for a little help in getting my Django tables created in Postgres with South. I've outlined my steps below. Any ideas on why my table isn't being created? Postgres use access rights? A problem with South and Django's multiple database adapters? Missing something? TIA Mark Aufdencamp Steps for implementation: 1. I've created a database and role in Postgres. createuser -U postgres cloudonyms -P createdb -U postgres -E utf8 -O cloudonyms cloudonyms -T postgistemplate psql -U postgres cloudonyms -c "GRANT ALL ON ALL TABLES IN SCHEMA public TO cloudonyms;" psql -U postgres cloudonyms -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO cloudonyms;" psql -U postgres cloudonyms -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO cloudonyms;" 2. I've configured my setting.py in Django with the database connection info. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. #'NAME': '/Users/maaufden/Documents/Aptana-RadRails-Workspace/cloudonyms/sqlite.db', # Or path to database file if using sqlite3. 'NAME': os.path.join( PROJECT_DIR, 'sqlite.db'), # Or path to database file if using sqlite3. # The following settings are not used with sqlite3: 'USER': '', 'PASSWORD': '', 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. 'PORT': '', # Set to empty string for default. }, 'cloudonyms': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'cloudonyms', 'USER': 'cloudonyms', 'PASSWORD': 'network-man', 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. 'PORT': '', # Set to empty string for default. }, } SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} 3. I've created an app and model in Django. python manage.py startapp networks networks/models.py from django.db import models # Create your models here. class Networks(models.Model): title = models.CharField(max_length=100) state = models.CharField(max_length=100) icon = models.CharField(max_length=255) disconnectedIconClass = models.CharField(max_length=40) connectedIconClass = models.CharField(max_length=40) 4. I've run manage.py dbsync python manage.py syncdb 5. I've created an initial south migration and have a db.create_table in the forward function. python manage.py schemamigration networks --initial 6. When I try to migrate, the table doesn't get created in Postgres python manage.py migrate networks Running migrations for networks: - Nothing to migrate. - Loading initial data for networks. Installed 0 object(s) from 0 fixture(s) 7. If I give the Postgres Role createdb permissions, manage.py test will run. psql -U postgres -d cloudonyms ALTER ROLE cloudonyms WITH CREATEDB; python manage.py test From brian.costlow at gmail.com Mon Oct 14 18:43:22 2013 From: brian.costlow at gmail.com (Brian Costlow) Date: Mon, 14 Oct 2013 12:43:22 -0400 Subject: [CentralOH] Django, South, and PostgreSQL In-Reply-To: <20131014074831.181451e9c2a7ebbcd6ae28cea81146c8.780f0fa345.wbe@email17.secureserver.net> References: <20131014074831.181451e9c2a7ebbcd6ae28cea81146c8.780f0fa345.wbe@email17.secureserver.net> Message-ID: Disclaimer. I've not used South on a multiple db setup, but does it honor database routers when doing migrations? If so, did you define one (because otherwise I think things happen to the 'default' db by default.) https://docs.djangoproject.com/en/dev/topics/db/multi-db/ In which case your syncdb in line 4 may have built the table for that model in sqllite On Mon, Oct 14, 2013 at 10:48 AM, Mark Aufdencamp wrote: > Hi All, > > I'm hoping for a little help in getting my Django tables created in > Postgres with South. I've outlined my steps below. > > Any ideas on why my table isn't being created? > > Postgres use access rights? > > A problem with South and Django's multiple database adapters? > > Missing something? > > TIA > Mark Aufdencamp > > > Steps for implementation: > > 1. I've created a database and role in Postgres. > > createuser -U postgres cloudonyms -P > createdb -U postgres -E utf8 -O cloudonyms cloudonyms -T postgistemplate > psql -U postgres cloudonyms -c "GRANT ALL ON ALL TABLES IN SCHEMA public > TO cloudonyms;" > psql -U postgres cloudonyms -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA > public TO cloudonyms;" > psql -U postgres cloudonyms -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA > public TO cloudonyms;" > > > 2. I've configured my setting.py in Django with the database connection > info. > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.sqlite3', # Add > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > #'NAME': > '/Users/maaufden/Documents/Aptana-RadRails-Workspace/cloudonyms/sqlite.db', > # Or path to database file if using sqlite3. > 'NAME': os.path.join( PROJECT_DIR, 'sqlite.db'), > # Or path to database file if using sqlite3. > # The following settings are not used with sqlite3: > 'USER': '', > 'PASSWORD': '', > 'HOST': '', # Empty for localhost through > domain sockets or '127.0.0.1' for localhost through TCP. > 'PORT': '', # Set to empty string for > default. > }, > 'cloudonyms': { > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > 'NAME': 'cloudonyms', > 'USER': 'cloudonyms', > 'PASSWORD': 'network-man', > 'HOST': '', # Empty for localhost through > domain sockets or '127.0.0.1' for localhost through TCP. > 'PORT': '', # Set to empty string for > default. > }, > } > SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} > > > 3. I've created an app and model in Django. > > python manage.py startapp networks > > networks/models.py > from django.db import models > > # Create your models here. > class Networks(models.Model): > title = models.CharField(max_length=100) > state = models.CharField(max_length=100) > icon = models.CharField(max_length=255) > disconnectedIconClass = models.CharField(max_length=40) > connectedIconClass = models.CharField(max_length=40) > > > 4. I've run manage.py dbsync > > python manage.py syncdb > > > 5. I've created an initial south migration and have a db.create_table in > the forward function. > > python manage.py schemamigration networks --initial > > > 6. When I try to migrate, the table doesn't get created in Postgres > > python manage.py migrate networks > > Running migrations for networks: > - Nothing to migrate. > - Loading initial data for networks. > Installed 0 object(s) from 0 fixture(s) > > > 7. If I give the Postgres Role createdb permissions, manage.py test will > run. > > psql -U postgres -d cloudonyms > ALTER ROLE cloudonyms WITH CREATEDB; > python manage.py test > > > > > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at aufdencamp.com Mon Oct 14 18:54:37 2013 From: mark at aufdencamp.com (Mark Aufdencamp) Date: Mon, 14 Oct 2013 09:54:37 -0700 Subject: [CentralOH] Django, South, and PostgreSQL Message-ID: <20131014095437.181451e9c2a7ebbcd6ae28cea81146c8.afb1beb4e3.wbe@email17.secureserver.net> Thanks for the reply Brian The SOUTH_DATABASE_ADAPTERS sets the adapter for South to utilize. I'm not seeing tables in SQLite or Postgres. I believe that it's respected by South because the "manage.py test" success/failure changes based on whether the Postgres Role has createdb rights. Does my basic South sequence look right? I can hack it back to the default adapter if you think it looks like Im doing it right and maybe south's getting confused. > -------- Original Message -------- > Subject: Re: [CentralOH] Django, South, and PostgreSQL > From: Brian Costlow > Date: Mon, October 14, 2013 12:43 pm > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > > > Disclaimer. > > I've not used South on a multiple db setup, but does it honor database > routers when doing migrations? If so, did you define one (because otherwise > I think things happen to the 'default' db by default.) > > https://docs.djangoproject.com/en/dev/topics/db/multi-db/ > > In which case your syncdb in line 4 may have built the table for that model > in sqllite > > > > On Mon, Oct 14, 2013 at 10:48 AM, Mark Aufdencamp wrote: > > > Hi All, > > > > I'm hoping for a little help in getting my Django tables created in > > Postgres with South. I've outlined my steps below. > > > > Any ideas on why my table isn't being created? > > > > Postgres use access rights? > > > > A problem with South and Django's multiple database adapters? > > > > Missing something? > > > > TIA > > Mark Aufdencamp > > > > > > Steps for implementation: > > > > 1. I've created a database and role in Postgres. > > > > createuser -U postgres cloudonyms -P > > createdb -U postgres -E utf8 -O cloudonyms cloudonyms -T postgistemplate > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL TABLES IN SCHEMA public > > TO cloudonyms;" > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA > > public TO cloudonyms;" > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA > > public TO cloudonyms;" > > > > > > 2. I've configured my setting.py in Django with the database connection > > info. > > > > DATABASES = { > > 'default': { > > 'ENGINE': 'django.db.backends.sqlite3', # Add > > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > > #'NAME': > > '/Users/maaufden/Documents/Aptana-RadRails-Workspace/cloudonyms/sqlite.db', > > # Or path to database file if using sqlite3. > > 'NAME': os.path.join( PROJECT_DIR, 'sqlite.db'), > > # Or path to database file if using sqlite3. > > # The following settings are not used with sqlite3: > > 'USER': '', > > 'PASSWORD': '', > > 'HOST': '', # Empty for localhost through > > domain sockets or '127.0.0.1' for localhost through TCP. > > 'PORT': '', # Set to empty string for > > default. > > }, > > 'cloudonyms': { > > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > > 'NAME': 'cloudonyms', > > 'USER': 'cloudonyms', > > 'PASSWORD': 'network-man', > > 'HOST': '', # Empty for localhost through > > domain sockets or '127.0.0.1' for localhost through TCP. > > 'PORT': '', # Set to empty string for > > default. > > }, > > } > > SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} > > > > > > 3. I've created an app and model in Django. > > > > python manage.py startapp networks > > > > networks/models.py > > from django.db import models > > > > # Create your models here. > > class Networks(models.Model): > > title = models.CharField(max_length=100) > > state = models.CharField(max_length=100) > > icon = models.CharField(max_length=255) > > disconnectedIconClass = models.CharField(max_length=40) > > connectedIconClass = models.CharField(max_length=40) > > > > > > 4. I've run manage.py dbsync > > > > python manage.py syncdb > > > > > > 5. I've created an initial south migration and have a db.create_table in > > the forward function. > > > > python manage.py schemamigration networks --initial > > > > > > 6. When I try to migrate, the table doesn't get created in Postgres > > > > python manage.py migrate networks > > > > Running migrations for networks: > > - Nothing to migrate. > > - Loading initial data for networks. > > Installed 0 object(s) from 0 fixture(s) > > > > > > 7. If I give the Postgres Role createdb permissions, manage.py test will > > run. > > > > psql -U postgres -d cloudonyms > > ALTER ROLE cloudonyms WITH CREATEDB; > > python manage.py test > > > > > > > > > > _______________________________________________ > > CentralOH mailing list > > CentralOH at python.org > > https://mail.python.org/mailman/listinfo/centraloh > >
_______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh From brian.costlow at gmail.com Mon Oct 14 19:43:44 2013 From: brian.costlow at gmail.com (Brian Costlow) Date: Mon, 14 Oct 2013 13:43:44 -0400 Subject: [CentralOH] Django, South, and PostgreSQL In-Reply-To: <20131014095437.181451e9c2a7ebbcd6ae28cea81146c8.afb1beb4e3.wbe@email17.secureserver.net> References: <20131014095437.181451e9c2a7ebbcd6ae28cea81146c8.afb1beb4e3.wbe@email17.secureserver.net> Message-ID: Mark SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} basically tells South that when it sees the django db alias 'cloudonyms' it should use the postgresql database adapter. But it doesn't map your db models themselves to the cloudonyms alias. You have two databases defined in your settings, and I don't see anything to tell django "when the model is Networks use cloudonyms and not default". Which usually means Django will use default. Which South should try to honor. So I'm surprised you're not seeing anything in either db. From what I can see I would expect it to be in sqlite. Is your app app defined in the settings file? Maybe Django is not picking it up at all. It needs an entry in Installed_Apps to be recognized. Unless you really need two db backends, it will always make your life easier in Django to use 'default' as the db alias. On Mon, Oct 14, 2013 at 12:54 PM, Mark Aufdencamp wrote: > Thanks for the reply Brian > > The SOUTH_DATABASE_ADAPTERS sets the adapter for South to utilize. I'm > not seeing tables in SQLite or Postgres. I believe that it's respected > by South because the "manage.py test" success/failure changes based on > whether the Postgres Role has createdb rights. > > Does my basic South sequence look right? I can hack it back to the > default adapter if you think it looks like Im doing it right and maybe > south's getting confused. > > > -------- Original Message -------- > > Subject: Re: [CentralOH] Django, South, and PostgreSQL > > From: Brian Costlow > > Date: Mon, October 14, 2013 12:43 pm > > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > > > > > > > Disclaimer. > > > > I've not used South on a multiple db setup, but does it honor database > > routers when doing migrations? If so, did you define one (because > otherwise > > I think things happen to the 'default' db by default.) > > > > https://docs.djangoproject.com/en/dev/topics/db/multi-db/ > > > > In which case your syncdb in line 4 may have built the table for that > model > > in sqllite > > > > > > > > On Mon, Oct 14, 2013 at 10:48 AM, Mark Aufdencamp >wrote: > > > > > Hi All, > > > > > > I'm hoping for a little help in getting my Django tables created in > > > Postgres with South. I've outlined my steps below. > > > > > > Any ideas on why my table isn't being created? > > > > > > Postgres use access rights? > > > > > > A problem with South and Django's multiple database adapters? > > > > > > Missing something? > > > > > > TIA > > > Mark Aufdencamp > > > > > > > > > Steps for implementation: > > > > > > 1. I've created a database and role in Postgres. > > > > > > createuser -U postgres cloudonyms -P > > > createdb -U postgres -E utf8 -O cloudonyms cloudonyms -T > postgistemplate > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL TABLES IN SCHEMA > public > > > TO cloudonyms;" > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA > > > public TO cloudonyms;" > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA > > > public TO cloudonyms;" > > > > > > > > > 2. I've configured my setting.py in Django with the database connection > > > info. > > > > > > DATABASES = { > > > 'default': { > > > 'ENGINE': 'django.db.backends.sqlite3', # Add > > > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > > > #'NAME': > > > > '/Users/maaufden/Documents/Aptana-RadRails-Workspace/cloudonyms/sqlite.db', > > > # Or path to database file if using sqlite3. > > > 'NAME': os.path.join( PROJECT_DIR, 'sqlite.db'), > > > # Or path to database file if using sqlite3. > > > # The following settings are not used with sqlite3: > > > 'USER': '', > > > 'PASSWORD': '', > > > 'HOST': '', # Empty for localhost through > > > domain sockets or '127.0.0.1' for localhost through TCP. > > > 'PORT': '', # Set to empty string for > > > default. > > > }, > > > 'cloudonyms': { > > > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > > > 'NAME': 'cloudonyms', > > > 'USER': 'cloudonyms', > > > 'PASSWORD': 'network-man', > > > 'HOST': '', # Empty for localhost through > > > domain sockets or '127.0.0.1' for localhost through TCP. > > > 'PORT': '', # Set to empty string for > > > default. > > > }, > > > } > > > SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} > > > > > > > > > 3. I've created an app and model in Django. > > > > > > python manage.py startapp networks > > > > > > networks/models.py > > > from django.db import models > > > > > > # Create your models here. > > > class Networks(models.Model): > > > title = models.CharField(max_length=100) > > > state = models.CharField(max_length=100) > > > icon = models.CharField(max_length=255) > > > disconnectedIconClass = models.CharField(max_length=40) > > > connectedIconClass = models.CharField(max_length=40) > > > > > > > > > 4. I've run manage.py dbsync > > > > > > python manage.py syncdb > > > > > > > > > 5. I've created an initial south migration and have a db.create_table > in > > > the forward function. > > > > > > python manage.py schemamigration networks --initial > > > > > > > > > 6. When I try to migrate, the table doesn't get created in Postgres > > > > > > python manage.py migrate networks > > > > > > Running migrations for networks: > > > - Nothing to migrate. > > > - Loading initial data for networks. > > > Installed 0 object(s) from 0 fixture(s) > > > > > > > > > 7. If I give the Postgres Role createdb permissions, manage.py test > will > > > run. > > > > > > psql -U postgres -d cloudonyms > > > ALTER ROLE cloudonyms WITH CREATEDB; > > > python manage.py test > > > > > > > > > > > > > > > _______________________________________________ > > > CentralOH mailing list > > > CentralOH at python.org > > > https://mail.python.org/mailman/listinfo/centraloh > > >
_______________________________________________ > > CentralOH mailing list > > CentralOH at python.org > > https://mail.python.org/mailman/listinfo/centraloh > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at aufdencamp.com Mon Oct 14 20:01:23 2013 From: mark at aufdencamp.com (Mark Aufdencamp) Date: Mon, 14 Oct 2013 11:01:23 -0700 Subject: [CentralOH] Django, South, and PostgreSQL Message-ID: <20131014110123.181451e9c2a7ebbcd6ae28cea81146c8.8a13c95ccd.wbe@email17.secureserver.net> Thanks Brian! Sounds like I have half of what I need in place for the multiple adapters. I looked at the routing configs, but it wasn't obvious I'd need both telling South which database and which tables. I'm going to back down to one db and try it with both to make sure I can touch each one with South, then I'll play with the routing. I'll need two databases with the project I'm working on. In production it will be an existing MySQL db and a Postgres db for GIS stuff. I also have a Java Tomcat Server (GeoServer) for my base maps and ActiveMQ for WebSockets in the mix . Web front end will utilize Backbone, Stomp, and OpenLayers. There will be a mobile PhoneGap client for metadata with location info. Should be interesting when I get it working. > -------- Original Message -------- > Subject: Re: [CentralOH] Django, South, and PostgreSQL > From: Brian Costlow > Date: Mon, October 14, 2013 1:43 pm > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > > > Mark > > SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} > > basically tells South that when it sees the django db alias 'cloudonyms' it > should use the postgresql database adapter. But it doesn't map your db > models themselves to the cloudonyms alias. > > You have two databases defined in your settings, and I don't see anything > to tell django "when the model is Networks use cloudonyms and not default". > Which usually means Django will use default. Which South should try to > honor. > > So I'm surprised you're not seeing anything in either db. From what I can > see I would expect it to be in sqlite. > > Is your app app defined in the settings file? Maybe Django is not picking > it up at all. It needs an entry in Installed_Apps to be recognized. > > Unless you really need two db backends, it will always make your life > easier in Django to use 'default' as the db alias. > > > > > > > > > On Mon, Oct 14, 2013 at 12:54 PM, Mark Aufdencamp wrote: > > > Thanks for the reply Brian > > > > The SOUTH_DATABASE_ADAPTERS sets the adapter for South to utilize. I'm > > not seeing tables in SQLite or Postgres. I believe that it's respected > > by South because the "manage.py test" success/failure changes based on > > whether the Postgres Role has createdb rights. > > > > Does my basic South sequence look right? I can hack it back to the > > default adapter if you think it looks like Im doing it right and maybe > > south's getting confused. > > > > > -------- Original Message -------- > > > Subject: Re: [CentralOH] Django, South, and PostgreSQL > > > From: Brian Costlow > > > Date: Mon, October 14, 2013 12:43 pm > > > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > > > > > > > > > > > Disclaimer. > > > > > > I've not used South on a multiple db setup, but does it honor database > > > routers when doing migrations? If so, did you define one (because > > otherwise > > > I think things happen to the 'default' db by default.) > > > > > > https://docs.djangoproject.com/en/dev/topics/db/multi-db/ > > > > > > In which case your syncdb in line 4 may have built the table for that > > model > > > in sqllite > > > > > > > > > > > > On Mon, Oct 14, 2013 at 10:48 AM, Mark Aufdencamp > >wrote: > > > > > > > Hi All, > > > > > > > > I'm hoping for a little help in getting my Django tables created in > > > > Postgres with South. I've outlined my steps below. > > > > > > > > Any ideas on why my table isn't being created? > > > > > > > > Postgres use access rights? > > > > > > > > A problem with South and Django's multiple database adapters? > > > > > > > > Missing something? > > > > > > > > TIA > > > > Mark Aufdencamp > > > > > > > > > > > > Steps for implementation: > > > > > > > > 1. I've created a database and role in Postgres. > > > > > > > > createuser -U postgres cloudonyms -P > > > > createdb -U postgres -E utf8 -O cloudonyms cloudonyms -T > > postgistemplate > > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL TABLES IN SCHEMA > > public > > > > TO cloudonyms;" > > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA > > > > public TO cloudonyms;" > > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA > > > > public TO cloudonyms;" > > > > > > > > > > > > 2. I've configured my setting.py in Django with the database connection > > > > info. > > > > > > > > DATABASES = { > > > > 'default': { > > > > 'ENGINE': 'django.db.backends.sqlite3', # Add > > > > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > > > > #'NAME': > > > > > > '/Users/maaufden/Documents/Aptana-RadRails-Workspace/cloudonyms/sqlite.db', > > > > # Or path to database file if using sqlite3. > > > > 'NAME': os.path.join( PROJECT_DIR, 'sqlite.db'), > > > > # Or path to database file if using sqlite3. > > > > # The following settings are not used with sqlite3: > > > > 'USER': '', > > > > 'PASSWORD': '', > > > > 'HOST': '', # Empty for localhost through > > > > domain sockets or '127.0.0.1' for localhost through TCP. > > > > 'PORT': '', # Set to empty string for > > > > default. > > > > }, > > > > 'cloudonyms': { > > > > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > > > > 'NAME': 'cloudonyms', > > > > 'USER': 'cloudonyms', > > > > 'PASSWORD': 'network-man', > > > > 'HOST': '', # Empty for localhost through > > > > domain sockets or '127.0.0.1' for localhost through TCP. > > > > 'PORT': '', # Set to empty string for > > > > default. > > > > }, > > > > } > > > > SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} > > > > > > > > > > > > 3. I've created an app and model in Django. > > > > > > > > python manage.py startapp networks > > > > > > > > networks/models.py > > > > from django.db import models > > > > > > > > # Create your models here. > > > > class Networks(models.Model): > > > > title = models.CharField(max_length=100) > > > > state = models.CharField(max_length=100) > > > > icon = models.CharField(max_length=255) > > > > disconnectedIconClass = models.CharField(max_length=40) > > > > connectedIconClass = models.CharField(max_length=40) > > > > > > > > > > > > 4. I've run manage.py dbsync > > > > > > > > python manage.py syncdb > > > > > > > > > > > > 5. I've created an initial south migration and have a db.create_table > > in > > > > the forward function. > > > > > > > > python manage.py schemamigration networks --initial > > > > > > > > > > > > 6. When I try to migrate, the table doesn't get created in Postgres > > > > > > > > python manage.py migrate networks > > > > > > > > Running migrations for networks: > > > > - Nothing to migrate. > > > > - Loading initial data for networks. > > > > Installed 0 object(s) from 0 fixture(s) > > > > > > > > > > > > 7. If I give the Postgres Role createdb permissions, manage.py test > > will > > > > run. > > > > > > > > psql -U postgres -d cloudonyms > > > > ALTER ROLE cloudonyms WITH CREATEDB; > > > > python manage.py test > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > CentralOH mailing list > > > > CentralOH at python.org > > > > https://mail.python.org/mailman/listinfo/centraloh > > > >
_______________________________________________ > > > CentralOH mailing list > > > CentralOH at python.org > > > https://mail.python.org/mailman/listinfo/centraloh > > _______________________________________________ > > CentralOH mailing list > > CentralOH at python.org > > https://mail.python.org/mailman/listinfo/centraloh > >
_______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh From jcfolsom at pureperfect.com Tue Oct 15 16:03:15 2013 From: jcfolsom at pureperfect.com (Chris Folsom) Date: Tue, 15 Oct 2013 07:03:15 -0700 Subject: [CentralOH] Django, South, and PostgreSQL Message-ID: <20131015070315.7098ff60d8000ac98b0356cd27c73871.260916ddea.wbe@email04.secureserver.net> An HTML attachment was scrubbed... URL: From blorenz at gmail.com Thu Oct 17 15:27:31 2013 From: blorenz at gmail.com (Brandon Lorenz) Date: Thu, 17 Oct 2013 09:27:31 -0400 Subject: [CentralOH] Django, South, and PostgreSQL In-Reply-To: <20131014110123.181451e9c2a7ebbcd6ae28cea81146c8.8a13c95ccd.wbe@email17.secureserver.net> References: <20131014110123.181451e9c2a7ebbcd6ae28cea81146c8.8a13c95ccd.wbe@email17.secureserver.net> Message-ID: Mark, Your database backend engine is incorrect for PostGIS. It should be 'ENGINE': 'django.contrib.gis.db.backends.postgis' or it won't be able to do spatial stuff. Brandon On Mon, Oct 14, 2013 at 2:01 PM, Mark Aufdencamp wrote: > Thanks Brian! > > Sounds like I have half of what I need in place for the multiple > adapters. I looked at the routing configs, but it wasn't obvious I'd > need both telling South which database and which tables. > > I'm going to back down to one db and try it with both to make sure I can > touch each one with South, then I'll play with the routing. > > I'll need two databases with the project I'm working on. In production > it will be an existing MySQL db and a Postgres db for GIS stuff. I also > have a Java Tomcat Server (GeoServer) for my base maps and ActiveMQ for > WebSockets in the mix . Web front end will utilize Backbone, Stomp, and > OpenLayers. There will be a mobile PhoneGap client for metadata with > location info. Should be interesting when I get it working. > > > > -------- Original Message -------- > > Subject: Re: [CentralOH] Django, South, and PostgreSQL > > From: Brian Costlow > > Date: Mon, October 14, 2013 1:43 pm > > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > > > > > > > Mark > > > > SOUTH_DATABASE_ADAPTERS = {'cloudonyms':'south.db.postgresql_psycopg2'} > > > > basically tells South that when it sees the django db alias 'cloudonyms' > it > > should use the postgresql database adapter. But it doesn't map your db > > models themselves to the cloudonyms alias. > > > > You have two databases defined in your settings, and I don't see anything > > to tell django "when the model is Networks use cloudonyms and not > default". > > Which usually means Django will use default. Which South should try to > > honor. > > > > So I'm surprised you're not seeing anything in either db. From what I can > > see I would expect it to be in sqlite. > > > > Is your app app defined in the settings file? Maybe Django is not picking > > it up at all. It needs an entry in Installed_Apps to be recognized. > > > > Unless you really need two db backends, it will always make your life > > easier in Django to use 'default' as the db alias. > > > > > > > > > > > > > > > > > > On Mon, Oct 14, 2013 at 12:54 PM, Mark Aufdencamp >wrote: > > > > > Thanks for the reply Brian > > > > > > The SOUTH_DATABASE_ADAPTERS sets the adapter for South to utilize. > I'm > > > not seeing tables in SQLite or Postgres. I believe that it's respected > > > by South because the "manage.py test" success/failure changes based on > > > whether the Postgres Role has createdb rights. > > > > > > Does my basic South sequence look right? I can hack it back to the > > > default adapter if you think it looks like Im doing it right and maybe > > > south's getting confused. > > > > > > > -------- Original Message -------- > > > > Subject: Re: [CentralOH] Django, South, and PostgreSQL > > > > From: Brian Costlow > > > > Date: Mon, October 14, 2013 12:43 pm > > > > To: "Mailing list for Central Ohio Python User Group (COhPy)" > > > > > > > > > > > > > > > > Disclaimer. > > > > > > > > I've not used South on a multiple db setup, but does it honor > database > > > > routers when doing migrations? If so, did you define one (because > > > otherwise > > > > I think things happen to the 'default' db by default.) > > > > > > > > https://docs.djangoproject.com/en/dev/topics/db/multi-db/ > > > > > > > > In which case your syncdb in line 4 may have built the table for that > > > model > > > > in sqllite > > > > > > > > > > > > > > > > On Mon, Oct 14, 2013 at 10:48 AM, Mark Aufdencamp < > mark at aufdencamp.com > > > >wrote: > > > > > > > > > Hi All, > > > > > > > > > > I'm hoping for a little help in getting my Django tables created in > > > > > Postgres with South. I've outlined my steps below. > > > > > > > > > > Any ideas on why my table isn't being created? > > > > > > > > > > Postgres use access rights? > > > > > > > > > > A problem with South and Django's multiple database adapters? > > > > > > > > > > Missing something? > > > > > > > > > > TIA > > > > > Mark Aufdencamp > > > > > > > > > > > > > > > Steps for implementation: > > > > > > > > > > 1. I've created a database and role in Postgres. > > > > > > > > > > createuser -U postgres cloudonyms -P > > > > > createdb -U postgres -E utf8 -O cloudonyms cloudonyms -T > > > postgistemplate > > > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL TABLES IN SCHEMA > > > public > > > > > TO cloudonyms;" > > > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL SEQUENCES IN > SCHEMA > > > > > public TO cloudonyms;" > > > > > psql -U postgres cloudonyms -c "GRANT ALL ON ALL FUNCTIONS IN > SCHEMA > > > > > public TO cloudonyms;" > > > > > > > > > > > > > > > 2. I've configured my setting.py in Django with the database > connection > > > > > info. > > > > > > > > > > DATABASES = { > > > > > 'default': { > > > > > 'ENGINE': 'django.db.backends.sqlite3', # Add > > > > > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > > > > > #'NAME': > > > > > > > > > '/Users/maaufden/Documents/Aptana-RadRails-Workspace/cloudonyms/sqlite.db', > > > > > # Or path to database file if using sqlite3. > > > > > 'NAME': os.path.join( PROJECT_DIR, 'sqlite.db'), > > > > > # Or path to database file if using sqlite3. > > > > > # The following settings are not used with sqlite3: > > > > > 'USER': '', > > > > > 'PASSWORD': '', > > > > > 'HOST': '', # Empty for localhost > through > > > > > domain sockets or '127.0.0.1' for localhost through TCP. > > > > > 'PORT': '', # Set to empty string for > > > > > default. > > > > > }, > > > > > 'cloudonyms': { > > > > > 'ENGINE': 'django.db.backends.postgresql_psycopg2', > > > > > 'NAME': 'cloudonyms', > > > > > 'USER': 'cloudonyms', > > > > > 'PASSWORD': 'network-man', > > > > > 'HOST': '', # Empty for localhost > through > > > > > domain sockets or '127.0.0.1' for localhost through TCP. > > > > > 'PORT': '', # Set to empty string for > > > > > default. > > > > > }, > > > > > } > > > > > SOUTH_DATABASE_ADAPTERS = > {'cloudonyms':'south.db.postgresql_psycopg2'} > > > > > > > > > > > > > > > 3. I've created an app and model in Django. > > > > > > > > > > python manage.py startapp networks > > > > > > > > > > networks/models.py > > > > > from django.db import models > > > > > > > > > > # Create your models here. > > > > > class Networks(models.Model): > > > > > title = models.CharField(max_length=100) > > > > > state = models.CharField(max_length=100) > > > > > icon = models.CharField(max_length=255) > > > > > disconnectedIconClass = models.CharField(max_length=40) > > > > > connectedIconClass = models.CharField(max_length=40) > > > > > > > > > > > > > > > 4. I've run manage.py dbsync > > > > > > > > > > python manage.py syncdb > > > > > > > > > > > > > > > 5. I've created an initial south migration and have a > db.create_table > > > in > > > > > the forward function. > > > > > > > > > > python manage.py schemamigration networks --initial > > > > > > > > > > > > > > > 6. When I try to migrate, the table doesn't get created in Postgres > > > > > > > > > > python manage.py migrate networks > > > > > > > > > > Running migrations for networks: > > > > > - Nothing to migrate. > > > > > - Loading initial data for networks. > > > > > Installed 0 object(s) from 0 fixture(s) > > > > > > > > > > > > > > > 7. If I give the Postgres Role createdb permissions, manage.py test > > > will > > > > > run. > > > > > > > > > > psql -U postgres -d cloudonyms > > > > > ALTER ROLE cloudonyms WITH CREATEDB; > > > > > python manage.py test > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > CentralOH mailing list > > > > > CentralOH at python.org > > > > > https://mail.python.org/mailman/listinfo/centraloh > > > > >
_______________________________________________ > > > > CentralOH mailing list > > > > CentralOH at python.org > > > > https://mail.python.org/mailman/listinfo/centraloh > > > _______________________________________________ > > > CentralOH mailing list > > > CentralOH at python.org > > > https://mail.python.org/mailman/listinfo/centraloh > > >
_______________________________________________ > > CentralOH mailing list > > CentralOH at python.org > > https://mail.python.org/mailman/listinfo/centraloh > _______________________________________________ > CentralOH mailing list > CentralOH at python.org > https://mail.python.org/mailman/listinfo/centraloh > -------------- next part -------------- An HTML attachment was scrubbed... URL: From catherine.devlin at gmail.com Fri Oct 18 17:33:16 2013 From: catherine.devlin at gmail.com (Catherine Devlin) Date: Fri, 18 Oct 2013 11:33:16 -0400 Subject: [CentralOH] Loaner laptop? Message-ID: Hi, everybody! Does anybody have a laptop they can loan for a student at the Columbus Python Workshop tonight and tomorrow? Workshop starts at 6 and most of you are already at work, so I realize this is a really optimistic request... Brian's providing one for a student who asked earlier, but I *just* got a request from another student. Thanks, -- - Catherine http://catherinedevlin.blogspot.com From catherine.devlin at gmail.com Fri Oct 18 18:42:55 2013 From: catherine.devlin at gmail.com (Catherine Devlin) Date: Fri, 18 Oct 2013 12:42:55 -0400 Subject: [CentralOH] Loaner laptop? In-Reply-To: References: Message-ID: Oh, good news - the other student we'd arranged Brian's laptop for will bring one from a friend after all - so it looks like we have the laptop we need after all. If you happen to be coming by tonight, it wouldn't hurt to have a fallback just in case, but this isn't an emergency after all. Whew! On Fri, Oct 18, 2013 at 11:33 AM, Catherine Devlin wrote: > Hi, everybody! Does anybody have a laptop they can loan for a student > at the Columbus Python Workshop tonight and tomorrow? > > Workshop starts at 6 and most of you are already at work, so I realize > this is a really optimistic request... Brian's providing one for a > student who asked earlier, but I *just* got a request from another > student. > > Thanks, > -- > - Catherine > http://catherinedevlin.blogspot.com -- - Catherine http://catherinedevlin.blogspot.com From catherine.devlin at gmail.com Sun Oct 20 19:34:47 2013 From: catherine.devlin at gmail.com (Catherine Devlin) Date: Sun, 20 Oct 2013 13:34:47 -0400 Subject: [CentralOH] Fwd: Glasses In-Reply-To: <1CEBF859-6311-4DF7-B190-2050181C9EC6@pillartechnology.com> References: <1CEBF859-6311-4DF7-B190-2050181C9EC6@pillartechnology.com> Message-ID: If you took part in this weekend's Python Workshop, and this email seems oddly blurry today, this message will be of interest to you... Thanks for holding onto them, Nate! - Catherine ---------- Forwarded message ---------- From: Nat Bennink Date: Sat, Oct 19, 2013 at 5:35 PM Subject: Glasses To: "catherine.devlin at gmail.com" Hey Catherine, Someone left their glasses at the Forge just so you know. They can get in touch with me and I'll hang unto them for them. Thanks! Nate Bennink Talent Engagement Pillar 614-512-5010 Sent from my iPhone -- - Catherine http://catherinedevlin.blogspot.com From jep200404 at columbus.rr.com Thu Oct 24 21:05:18 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Thu, 24 Oct 2013 15:05:18 -0400 Subject: [CentralOH] Fedora Still Working Towards Python 3 By Default Message-ID: <20131024150518.0d1f11a3.jep200404@columbus.rr.com> The following article was interesting. Fedora Still Working Towards Python 3 By Default http://www.phoronix.com/scan.php?page=news_item&px=MTQ5MzQ Indirectly, this should help advance Python 3 in general. Also, I would expect RHEL (and Centos) to adopt Python 3 after Fedora's migration to Python 3 has been successfully completed. From joskra42.list at gmail.com Fri Oct 25 15:34:41 2013 From: joskra42.list at gmail.com (Joshua Kramer) Date: Fri, 25 Oct 2013 09:34:41 -0400 Subject: [CentralOH] Fedora Still Working Towards Python 3 By Default In-Reply-To: <20131024150518.0d1f11a3.jep200404@columbus.rr.com> References: <20131024150518.0d1f11a3.jep200404@columbus.rr.com> Message-ID: I wonder if we can expect Python 3 in RHEL7? -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.costlow at gmail.com Fri Oct 25 20:58:41 2013 From: brian.costlow at gmail.com (Brian Costlow) Date: Fri, 25 Oct 2013 14:58:41 -0400 Subject: [CentralOH] Reminder, COhPy Monthly Meeting, Monday 10/28 Message-ID: We'll have a short presentation on web development for Python that's new-Pythonista friendly. After that, we're moving on to lighting talks. If you are coming to the meeting, please have a 5 minute presentation to give on something interesting, but newcomer friendly. After that, it's hack night. Work on what you want, and get help from your neighbor. The meeting is at the Forge downtown. Click here for more details: http://www.meetup.com/Central-Ohio-Python-Users-Group/events/132723182/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Sat Oct 26 20:54:20 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 26 Oct 2013 14:54:20 -0400 Subject: [CentralOH] =?utf-8?q?2013-10-25_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8=?= Message-ID: <20131026145420.6c7591e2.jep200404@columbus.rr.com> 6 folks tonight plus 2 more later on Two Most astounding statements at the dojo vi is better than any visual editor.[2] Did Chuck Norris write "The Big Bang Theory"?[1] Pointers are my friend and should be yours too. wp:The_C_Programming_Language The "Old Testament" is smaller, easier to understand, and wittier. http://www.tangowithdjango.com/ There are linguists who say that all thinking happens in language. Of course spatial thinkers say that's nonsense, that they think spatially without language. There are linguists who say that's nonsense, that such spatial thinkers are kidding themselves, that the spatial thinking must be in language somehow. Of course, this says more about such linguists than the spatial thinkers. test ability to read files with various paths from os.path.join() under Windows. graze stuff from earlier days test padding with struct library on 64-bit machine or is that best done on my own 64-bit machines? (with a 64-bit OS?) musician's earplugs etymotic earplugs http://www.etymotic.com/hp/er20.html http://www.westone.com/store/index.php/westone-music-products/accessories/musician-earplug-filters/er-25/etymotic-er-25-filter-single-clear.html http://www.etymotic.com/pdf/er_hearing_protection_brochure_2012.pdf audio video on 32GB Brooklyn Castle http://www.brooklyncastle.com/ http://www.pbs.org/pov/pressroom/2013/brooklyn-castle-premiere-pov-pbs-indies-showcase.php wp:Leadbelly wp:Goodnight_Irene http://www.pbs.org/program/10-buildings-changed-america/ Tony Ellis' Quest cocoa versus cacao Two Degrees of Tommy Emmanual Chet Atkins (named Django Reinhardt as most influential guitar player of 20th century) Mark Knopfler Jerry Reed Les Paul Jorma Kaukonen Doc Watson Tony Ellis Bill Monroe Steve Martin SpongeBob SquarePants wp:Lean_on_Me_(film) http://www.access-board.gov/ufas/ufas-html/ufas.htm (out of stock) wp:Coach_Carter http://docs.python.org/2/library/datetime.html programmingmother******.com wp:Kanban_(development) wp:Kanban_board http://www.theatlanticcities.com/neighborhoods/2013/10/140-acre-forest-about-materialize-middle-detroit/7371/ http://mashable.com/2013/10/25/google-floating-data/ Learning Python the Hard Way seems too easy for one beginner (a mathematician?). http://www.wasdkeyboards.com/mechanical-keyboard-guide http://www.codinghorror.com/blog/2013/08/the-code-keyboard.html http://codekeyboards.com/ someone's first Google app (release early!!!, release often) energyhawc.appspot.com location1 @static Poor man's VPN over ssh https://github.com/apenwarr/sshuttle wp:The_Deer_Hunter wp:Dirty_Harry wp:Magnum Force wp:Pulp Fiction http://docs.python.org/2/library/stdtypes.html#string-formatting http://docs.python.org/2/library/string.html https://duckduckgo.com/html/?q=python+string+format Mazah on Grandview Ave http://www.mazah-eatery.com/ Somebody took my power supply and somebody else's extra smart phone and returned them the next morning. [1] After the laughter died down, that led to a discussion of Chuck Norris facts, such as the following. When Chuck Norris does push ups, he does not push himself up, he pushes the earth down. http://www.chucknorrisfacts.com/chuck-norris-top-50-facts [2] It was pointed out that vi _is_ a visual editor. From jep200404 at columbus.rr.com Sat Oct 26 21:22:38 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Sat, 26 Oct 2013 15:22:38 -0400 Subject: [CentralOH] =?utf-8?q?2013-10-25_=E9=81=93=E5=A0=B4_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz86IElweXRob24gTm90ZWJvb2s=?= In-Reply-To: <20131026145420.6c7591e2.jep200404@columbus.rr.com> References: <20131026145420.6c7591e2.jep200404@columbus.rr.com> Message-ID: <20131026152238.6fb45357.jep200404@columbus.rr.com> An ipython notebook from last night is attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: dojo-20131025.ipynb Type: application/octet-stream Size: 10945 bytes Desc: not available URL: From eric at intellovations.com Tue Oct 29 16:04:07 2013 From: eric at intellovations.com (Eric Floehr) Date: Tue, 29 Oct 2013 11:04:07 -0400 Subject: [CentralOH] My presentation files, video, docs Message-ID: I've put the files from my presentation last night on github here: https://github.com/efloehr/cohpy-oct2013 This presentation was an introduction to Python image processing using PIL and matplotlib. It also talked a little about some nifty Python features like the enumerate built-in. You will need PIL, matplotlib, and ImageMagick (at least on Linux) to run these programs. For PIL, I would recommend the pillow fork, as it is the more maintained version. To make a movie out of the individual images generated, I ran ffmpeg with defaults: ffmpeg -i done/%d.png movie.mp4 The movie shown in the presentation can be viewed here: http://youtu.be/hNAMsyzoW3A Technologies introduced: PIL, specifically the pillow fork, for image manipulation: Code: https://github.com/python-imaging/Pillow Docs: http://pillow.readthedocs.org/en/latest/ Matplotlib, for graphing: http://matplotlib.org/ Built-in Python modules os, os.path, and fnmatch: os: http://docs.python.org/2/library/os.html os.path: http://docs.python.org/2/library/os.path.html fnmatch: http://docs.python.org/2/library/fnmatch.html Unpacking list into a set of arguments to a function: http://docs.python.org/2/tutorial/controlflow.html#unpacking-argument-lists The enumerate built-in: http://docs.python.org/2/library/functions.html#enumerate -------------- next part -------------- An HTML attachment was scrubbed... URL: From jep200404 at columbus.rr.com Tue Oct 29 18:30:01 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 29 Oct 2013 13:30:01 -0400 Subject: [CentralOH] =?utf-8?q?2013-10-28_=E6=9C=83=E8=AD=B0_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8=?= Message-ID: <20131029133001.1f6f0135.jep200404@columbus.rr.com> The dojos are great place for ill-formed questions. Is there a video of Brandon's PyCon Ireland 2013 presentation? Need to finish example of handling expected error with pytest. Please correct errors in the following. Professor James Reed Windows 8 cisprofjrr at alumni.ohio.edu Idle versus Microsoft Visual Studio Microsoft Visual Studio is now free. not N8NT immutability idempotency projector grief were using only center can use VGA output or HDMI output on Brandon's laptop, but not both at same time. http://www.unix.com/showthread.php?t=188749 Need to test with own computers. Projector only has HDMI cable to it? When one is using VGA output, projector shows that it futzing with HDMI source, so there is likely some magic VGA to HDMI converter. Brandon Rhodes presented about structure of code lightning version of PyCon Ireland 2013 presentation The Clean Architecture in Python @brandon_rhodes need to study his notes http://rhodesmill.org/brandon/slides/2013-10-pyconie/ http://blog.8thlight.com/uncle-bob/2011/11/22/Clean-Architecture.html http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html separate I/O easier to test SVG coolness http://kartograph.org/showcase/italia/ newcomer won an ebook from Manning both are for beginners Quick Python (more for adults) http://www.manning.com/ceder/ Hello World (more for kids) http://www.manning.com/sande/ Eric Floehr thunderstorm talk (longer than a lightning talk) https://mail.python.org/pipermail/centraloh/2013-October/001866.html weather movies PIL (python image library) poorly maintained, so it has been forked to pillow https://pypi.python.org/pypi/Pillow/1.7.7 Gnome 3.8 wohali is cherokee for eagle cStringIO -- Faster version of StringIO http://docs.python.org/release/2.5.2/lib/module-cStringIO.html http://docs.python.org/2/library/stringio.html Inconsolata fixed width font http://www.levien.com/type/myfonts/inconsolata.html foo(*bar) expands bar to individual arguments max(itertools.chain(redlist, greenlist, bluelist)) max(redlist + greenlist + bluelist) # Could be slow for big sequences. max(max(redlist), max(greenlist), max(bluelist)) os.listdir(dirpath) fnmatch.filter example.py """A simple example.""" def average(sequence): return sum(sequence) * 1.0 / len(sequence) test_1.py # 1990s style: The days of yore. # The days of everything written as if we were writing Java. import example import unittest class ExampleTests(unittest.TestCase): def test_single_element_sequence(self): a = example.average([11.0]) self.assertEqual(a, 11.0) def test_two_element_sequence(self): a = example.average([10.0, 20.0]) self.assertEqual(a, 15.0) def test_zero_element_sequence(self): a = example.average([]) self.assertEqual(a, 11.0) awkward syntax extra indentation hassle of "self" variable awkward self.assertWhatever(x, y) instead of intuitive x == y billions of assertWhatever() methods is good for showing details about failed test $ python -m unittest $ python -m unittest test_1 ..E (last test failed) ERROR: test_zero_element_sequence (test_1.ExampleTests) ZeroDivisionError: $ python -m zipfile ;# emergency command line zip utility # SimpleHTTPServer is part of base install $ python -m SimpleHTTPServer 8888 ;# ad-hoc file server (w/ subdirectories) # good for when someone forgets USB flash drive $ python -m SimpleHTTPServer --help $ python develop.py test ................................................................................................................................................................................................................................................................................SSSSSSSSSSSSSSSS..................................................................................... Michael Foord added test discovery http://www.voidspace.org.uk/python/articles/introduction-to-unittest.shtml $ python -m unittest discover . ;# discovers all tests (beginning with 'test_' in all python files in directory (and subdirectories thereof?). Begins with 'test_' or just 'test'? T-shirt of '..................................................... OK' to show off that they are TDD programmers. http://www.zazzle.com/ok_tee_shirt-235887995086133837 pip install pytest # http://pytest.org/latest/ # https://pypi.python.org/pypi/pytest test_2.py import example # just plain functions, no class stuff, no self stuff. # just plain assert statements # py.test convention: plain old functions that start # with "test" in their name! # actual code indented only one level # no ugly self argument # code if much easier to understand # don't have to import anything into code that is to be tested def test_single_element_sequence(self): a = example.average([11.0]) assert a == 11.0 def test_two_element_sequence(self): a = example.average([10.0, 20.0]) assert a == 15.0 def test_zero_element_sequence(self): a = example.average([]) assert a == 0.0 $py.text . # What if need to test that code must crash with Error? example.py """A simple example.""" def average(sequence): if not sequence: raise ValueError('inadequate seqeuence') return sum(sequence) * 1.0 / len(sequence) test_1.py # 1990s style: The days of yore. # The days of everything written as if we were writing Java. import example import unittest class ExampleTests(unittest.TestCase): def test_single_element_sequence(self): a = example.average([11.0]) self.assertEqual(a, 11.0) def test_two_element_sequence(self): a = example.average([10.0, 20.0]) self.assertEqual(a, 15.0) def test_zero_element_sequence(self): with self.assertRaises(ValueError): example.average([]) #self.assertEqual(a, 11.0) py.test has an exactly equivalent context manager thing, but Brandon did not remember the syntax will have to RTFM test_2.py import example def test_single_element_sequence(self): a = example.average([11.0]) assert a == 11.0 def test_two_element_sequence(self): a = example.average([10.0, 20.0]) assert a == 15.0 def test_zero_element_sequence(self): # forgot syntax for requiring an error a = example.average([]) assert a == 0.0 # http://pytest.org/latest/assert.html#assert-with-the-assert-statement nose compare to pytest similar to pytest does automatic test discovery nose has terrible terrible magic in it; someone (Brandon?) has been bitten by quirks, spent much time figuring out and working around such. pytest is much simpler and straightforward more automation less magic py.test versus pytest doctest one writes tests in docstrings, tests automatically generated from that looks for '>>> ' sensitive to exact match: does not handle floats well docopt: wonderful! docopt.org https://github.com/docopt/docopt one writes command line help first as doc string, then doctest analyzes that doc string to figure out how to parse command line. way cool! https://pypi.python.org/pypi/docopt/0.6.1 python sure library automates testing https://github.com/gabrielfalcao/sure Raymond Chandler presented about it cucumber envy Dec 9? OpenCV with augmented reality by Eric Floehr For folks logged in to meetup.com, click on "About us..." link near top in left column to see mailing list info. Bangkok Grocery & Restaurant lauded as excellent by native of SE Asia http://www.bangkokcolumbus.com/contact.html 3277 Refugee Rd. (just east of Winchester Pike) Name on web site does not exactly match that on building wp:Hawthorne_Effect wp:Novelty_effect Need to study how to connect to and use The Forge's projector and LCD monitors from my computers (VGA!!!!). Buying a Brown Cow in Friesland http://www.1066andallthat.com/english_old/mongrel-cow.asp https://www.youtube.com/watch?v=OeC1yAaWG34 wp:Friesland wp:Menno Simons wp:Bluffton_University Open to non-Mennonites since its founding. Mennonites are now minority there. wp:Bluffton,_Ohio whopping fifteen foot bluffs!!!! wp:Bluffton_University_bus_accident new guy needs help with serial I/O (ala RS-232). Told him to come to dojo. From jep200404 at columbus.rr.com Tue Oct 29 19:21:12 2013 From: jep200404 at columbus.rr.com (jep200404 at columbus.rr.com) Date: Tue, 29 Oct 2013 14:21:12 -0400 Subject: [CentralOH] =?utf-8?q?2013-10-28_=E6=9C=83=E8=AD=B0_Scribbles_?= =?utf-8?b?76SY5pu4L+aDoeaWhz8gVGhhbmtzIGFuZCBFeWUgQ2FuZHk=?= In-Reply-To: <20131029133001.1f6f0135.jep200404@columbus.rr.com> References: <20131029133001.1f6f0135.jep200404@columbus.rr.com> Message-ID: <20131029142112.3b03b598.jep200404@columbus.rr.com> On Tue, 29 Oct 2013 13:30:01 -0400, jep200404 at columbus.rr.com wrote: > Please correct errors in the following. Thanks again to Nate and Pillar[2] for their hospitality including but not limited to Chef Jeff[1]'s fixings and more pizza than we could eat. > SVG coolness > http://kartograph.org/showcase/italia/ wp:Designated_Market_Area http://kartograph.org/showcase/choropleth http://kartograph.org/showcase/projections [1] http://chefjeffcateringcec.com/aboutchefjeff/ [2] http://pillartechnology.com/