From michelle at pdxpython.org Tue Feb 9 22:01:24 2010 From: michelle at pdxpython.org (michelle rowley) Date: Tue, 9 Feb 2010 13:01:24 -0800 Subject: [portland] PDX Python: Tonight, 6:30pm @ Webtrends Message-ID: <813046e41002091301w4409a93dt409c2a989968c76b@mail.gmail.com> Hey Pythoneers, The second Tuesday of the month is here... and you know what that means: The mystical, magical PDX Python Oracle has declared that it is time again for another user group meeting! Same time, same place: 6:30pm at Webtrends. What's on for tonight? First, Michel P. will himself do Michel's Monthly Module, dateutil! Following the Monthly Module, we have some talks on cool and helpful hacking tools. Chris Pitzer has two toolsets to share: "I Hate Passwords": ssh-copy-id, ssh config, and managing multiple keys, and "Play Nice": virtualenv, pip, ipython, with a special guest appearance from ipdb. Then, Chris McDonald will give us a tour of bpython, an ipython replacement, including its integration with Django and virtualenv. If you've got a cool tool you'd like to share, bring a 5-minute lightning talk (even if your name isn't Chris), or even just a few helpful tips! After the meeting, the discussion will continue at a TBD location (but probably Bailey's Taproom). Details: Wait, when: 6:30 - 8:30(ish) PM, tonight! Okay... where: Webtrends 851 SW 6th Ave. Suite 1600 Portland, OR 97204 Note: The Webtrends building is locked after 6:00pm, but there will be a guard in the lobby to let us in the door and activate the elevator to get us upstairs. Just let them know you're with the Python group. All are welcome, so please join us! See you tonight, Michelle From adam at therobots.org Wed Feb 10 03:53:42 2010 From: adam at therobots.org (Adam Lowry) Date: Tue, 9 Feb 2010 18:53:42 -0800 Subject: [portland] PDX Django meeting, Feb 17 Message-ID: Michelle reminded me to post to this list! Despite missing December and January, February's PDX Django meeting looks like a great one. We have one short and one long talk scheduled -- if you'd like to do a 5 minute or so talk on a tool, problem, or feature, why not let us know? It's also the day before PyCon starts, so we might just chat about what looks interesting there. The talks: - Dermot Maty on a problem he had with Proxy Models, and how he solved it - Michael Richardson will be previewing a talk he's giving at DjangoSki. Here's the summary from their talks page: "Michael is a cofounder at Urban Airship where he spends his day working on a RESTful API to deliver notifications and in-app content to mobile devices. His talk, "RESTful APIs with Django and Piston," pulls from Urban Airship's experience and goes through creating an API in Django with Piston along with pitfalls you may experience along the way. Michael was also the developer behind the massive Django-powered meat conglomerate bacn.com until it was sold earlier this year. Bac'n did not, sadly, have an API." The meeting will be at 7pm at PIE, 1227 NW Davis St (directly opposite the North Face store -- look for the big brown armchairs in the window. Adam http://groups.google.com/group/pdxdjango/browse_thread/thread/f0669768c0f62402 http://calagator.org/events/1250458296 From igal at pragmaticraft.com Wed Feb 10 05:12:25 2010 From: igal at pragmaticraft.com (Igal Koshevoy) Date: Tue, 09 Feb 2010 20:12:25 -0800 Subject: [portland] keychain and ssh-agent: Use ssh keys more easily Message-ID: <4B723229.1090608@pragmaticraft.com> Chris Pitzer talked about ssh-copy-id, you can find his notes online at: http://blog.christopherpitzer.com/2010/ssh-copy-id/ I mentioned that it's possible to use a persistent program to load your SSH keys, which will ask you to enter the passwords for your keys, and then keep them loaded in memory so you don't have to keep re-entering the key passwords. "keychain" is a third-party program for use with OpenSSH to keep your credentials in memory and accessible across logins, and continues to run until the machine is shutdown or the keychain or agents are deliberately stopped. MacOS and some UNIX distros may provide a specialized way to do this. Details on using the keychain program: http://www.gentoo.org/proj/en/keychain/ Typical usage from a bash shell: # Start the keychain and add your keys, which may ask for passwords -- I # keep my keys in ~/.ssh and give them names ending with "_rsa" and "_dsa": keychain ~/.ssh/*_{dsa,rsa} # Load the credentials into a session (the file sourced is created by "keychain"): . ~/.keychain/${HOSTNAME}-sh* # You can combine these steps together by using a single bash function, # that can start keychain if needed and load your credentials. You can run # this function from .Xsession and again any time you need to load # credentials from a session that's not managed by X (e.g., you SSH into a # machine already running your keychain). Here's the function: keychainize () { keychain ~/.ssh/*_{dsa,rsa}; . ~/.keychain/${HOSTNAME}-sh*; } If you're looking for something more lightweight and standard, you can use "ssh-agent", which is what "keychain" is providing a wrapper for. "ssh-agent" is a program that comes with OpenSSH and keeps your credentials in memory. It lets you enter the passwords for your SSH keys once on startup and keep using the keys without passwords for the duration of your session. For details read: http://www.securityfocus.com/infocus/1812 Typical usage from a bash shell: # Start the agent, it's not smart enough to realize one's already running eval `ssh-agent` # Add your keys to the agent, which may ask for passwords ssh-add ~/.ssh/*_{dsa,rsa} # See what keys you've got loaded, if curious ssh-add -l # Use your credentials without having to re-enter passwords ssh myusername at myhostname -igal From ric at digitalmarbles.com Wed Feb 10 05:55:42 2010 From: ric at digitalmarbles.com (Ricardo Newbery) Date: Tue, 9 Feb 2010 20:55:42 -0800 Subject: [portland] keychain and ssh-agent: Use ssh keys more easily In-Reply-To: <4B723229.1090608@pragmaticraft.com> References: <4B723229.1090608@pragmaticraft.com> Message-ID: A related recent post by Tarek Ziade... http://tarekziade.wordpress.com/2010/02/01/simple-command-line-vault-clvault/ Cheers, Ric On Feb 9, 2010, at 8:12 PM, Igal Koshevoy wrote: > Chris Pitzer talked about ssh-copy-id, you can find his notes online > at: > http://blog.christopherpitzer.com/2010/ssh-copy-id/ > > I mentioned that it's possible to use a persistent program to load > your > SSH keys, which will ask you to enter the passwords for your keys, > and > then keep them loaded in memory so you don't have to keep re-entering > the key passwords. > > "keychain" is a third-party program for use with OpenSSH to keep your > credentials in memory and accessible across logins, and continues to > run > until the machine is shutdown or the keychain or agents are > deliberately > stopped. MacOS and some UNIX distros may provide a specialized way > to do > this. Details on using the keychain program: > http://www.gentoo.org/proj/en/keychain/ > > Typical usage from a bash shell: > # Start the keychain and add your keys, which may ask for > passwords -- I > # keep my keys in ~/.ssh and give them names ending with "_rsa" and > "_dsa": > keychain ~/.ssh/*_{dsa,rsa} > > # Load the credentials into a session (the file sourced is created > by "keychain"): > . ~/.keychain/${HOSTNAME}-sh* > > # You can combine these steps together by using a single bash > function, > # that can start keychain if needed and load your credentials. You > can run > # this function from .Xsession and again any time you need to load > # credentials from a session that's not managed by X (e.g., you SSH > into a > # machine already running your keychain). Here's the function: > keychainize () { keychain ~/.ssh/*_{dsa,rsa}; . > ~/.keychain/${HOSTNAME}-sh*; } > > > If you're looking for something more lightweight and standard, you can > use "ssh-agent", which is what "keychain" is providing a wrapper for. > "ssh-agent" is a program that comes with OpenSSH and keeps your > credentials in memory. It lets you enter the passwords for your SSH > keys > once on startup and keep using the keys without passwords for the > duration of your session. For details read: > http://www.securityfocus.com/infocus/1812 > > Typical usage from a bash shell: > # Start the agent, it's not smart enough to realize one's already > running > eval `ssh-agent` > # Add your keys to the agent, which may ask for passwords > ssh-add ~/.ssh/*_{dsa,rsa} > # See what keys you've got loaded, if curious > ssh-add -l > # Use your credentials without having to re-enter passwords > ssh myusername at myhostname > > -igal > _______________________________________________ > Portland mailing list > Portland at python.org > http://mail.python.org/mailman/listinfo/portland From brandon at ifup.org Wed Feb 10 06:16:53 2010 From: brandon at ifup.org (Brandon Philips) Date: Tue, 9 Feb 2010 21:16:53 -0800 Subject: [portland] keychain and ssh-agent: Use ssh keys more easily In-Reply-To: <4B723229.1090608@pragmaticraft.com> References: <4B723229.1090608@pragmaticraft.com> Message-ID: <20100210051653.GS2118@jenkins.home.ifup.org> On 20:12 Tue 09 Feb 2010, Igal Koshevoy wrote: > MacOS and some UNIX distros may provide a specialized way to do > this. All of the Linux distros using GNOME provide "seahorse" which creates an agent upon logging which is bound to that session: http://projects.gnome.org/seahorse/ Seahorse can also manage and save your GPG keys too. Cheers, Brandon From michael at susens-schurter.com Wed Feb 10 18:55:58 2010 From: michael at susens-schurter.com (Michael Schurter) Date: Wed, 10 Feb 2010 09:55:58 -0800 Subject: [portland] keychain and ssh-agent: Use ssh keys more easily In-Reply-To: <20100210051653.GS2118@jenkins.home.ifup.org> References: <4B723229.1090608@pragmaticraft.com> <20100210051653.GS2118@jenkins.home.ifup.org> Message-ID: <240b71641002100955x127788e7nccb77f75536d3149@mail.gmail.com> On Tue, Feb 9, 2010 at 9:16 PM, Brandon Philips wrote: > On 20:12 Tue 09 Feb 2010, Igal Koshevoy wrote: >> MacOS and some UNIX distros may provide a specialized way to do >> this. > > All of the Linux distros using GNOME provide "seahorse" which creates > an agent upon logging which is bound to that session: > > ?http://projects.gnome.org/seahorse/ > > Seahorse can also manage and save your GPG keys too. +1 for Seahorse (under Applications > Accessories > Passwords and Encryption Keys in Ubuntu). It can also replace ssh-copy-id for people who prefer GUIs and gives you access to your Gnome Keyring. From kim at arlim.org Sat Feb 13 19:07:09 2010 From: kim at arlim.org (Kimberly Wallmark) Date: Sat, 13 Feb 2010 10:07:09 -0800 Subject: [portland] XPDX meeting on the 17th may be interesting to Pythonistas Message-ID: <9E4D4ABB-180F-4C4D-B112-EFE1FAB4A93A@arlim.org> Last fall I mentioned that the local agile practitioners' group, XPDX, often has presentations which may be interesting to Python folks. Our upcoming meeting is one of those: Elisabeth Hendrickson will be running a simulation of a software organization. I participated in a longer version of this simulation at a conference last year and found that it mapped uncannily well to my experiences in a variety of companies, both agile and not. If you're interested, come join us on Wednesday: http://calagator.org/events/1250458315 --Kim From pcurtain at gmail.com Sat Feb 13 20:00:26 2010 From: pcurtain at gmail.com (Patrick Curtain) Date: Sat, 13 Feb 2010 11:00:26 -0800 Subject: [portland] XPDX meeting on the 17th may be interesting to Pythonistas In-Reply-To: <9E4D4ABB-180F-4C4D-B112-EFE1FAB4A93A@arlim.org> References: <9E4D4ABB-180F-4C4D-B112-EFE1FAB4A93A@arlim.org> Message-ID: Bummed that I'm teaching that night. Would love to otherwise! --p On Sat, Feb 13, 2010 at 10:07 AM, Kimberly Wallmark wrote: > Last fall I mentioned that the local agile practitioners' group, XPDX, often > has presentations which may be interesting to Python folks. ?Our upcoming > meeting is one of those: Elisabeth Hendrickson will be running a simulation > of a software organization. ?I participated in a longer version of this > simulation at a conference last year and found that it mapped uncannily well > to my experiences in a variety of companies, both agile and not. ?If you're > interested, come join us on Wednesday: > http://calagator.org/events/1250458315 > > --Kim > _______________________________________________ > Portland mailing list > Portland at python.org > http://mail.python.org/mailman/listinfo/portland > -- Patrick Curtain, Husband & Father ( i also write software ) http://www.patrickcurtain.com/ 360.521.9625 From xwraithanx at gmail.com Sun Feb 14 00:07:02 2010 From: xwraithanx at gmail.com (Chris McDonald) Date: Sat, 13 Feb 2010 15:07:02 -0800 Subject: [portland] Django, virtualenv and making it work with bpython Message-ID: <20100213230702.GC2589@li76-252.members.linode.com> PDXPython, I gave a talk last tuesday about bpython and making it work with virtualenv and django. It also failed when I gave the example due to --no-site-packages what I should have done at that point is install it instide of the virtualenv which does indeed work. For those who missed the talk or want a recap I wrote a blog post detailing a bit about it: http://blagwraith.blogspot.com/2010/02/bpython-and-django.html -Chris McDonald From python at dylanreinhardt.com Wed Feb 24 23:01:06 2010 From: python at dylanreinhardt.com (Dylan Reinhardt) Date: Wed, 24 Feb 2010 14:01:06 -0800 Subject: [portland] Like Python Message-ID: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> Saw this on the Bay Piggies list, thought y'all might like a chuckle... http://www.staringispolite.com/likepython/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jd at commandprompt.com Wed Feb 24 23:13:16 2010 From: jd at commandprompt.com (Joshua D. Drake) Date: Wed, 24 Feb 2010 14:13:16 -0800 Subject: [portland] Like Python In-Reply-To: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> References: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> Message-ID: <1267049596.17525.164.camel@jd-desktop.unknown.charter.com> On Wed, 2010-02-24 at 14:01 -0800, Dylan Reinhardt wrote: > Saw this on the Bay Piggies list, thought y'all might like a chuckle... Wrong... on many, many cerebral levels. > > http://www.staringispolite.com/likepython/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > _______________________________________________ > Portland mailing list > Portland at python.org > http://mail.python.org/mailman/listinfo/portland > -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir. From ryan.arana at gmail.com Wed Feb 24 23:30:41 2010 From: ryan.arana at gmail.com (Ryan Arana) Date: Wed, 24 Feb 2010 14:30:41 -0800 Subject: [portland] Like Python In-Reply-To: <1267049596.17525.164.camel@jd-desktop.unknown.charter.com> References: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> <1267049596.17525.164.camel@jd-desktop.unknown.charter.com> Message-ID: <7ad394fa1002241430i2673d60ate4e74b803134f664@mail.gmail.com> Reminds me of http://lolcode.com/. Except Like, Python is a little easier to read. ;) On Wed, Feb 24, 2010 at 2:13 PM, Joshua D. Drake wrote: > On Wed, 2010-02-24 at 14:01 -0800, Dylan Reinhardt wrote: > > Saw this on the Bay Piggies list, thought y'all might like a chuckle... > > Wrong... on many, many cerebral levels. > > > > > http://www.staringispolite.com/likepython/ > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: < > http://mail.python.org/pipermail/portland/attachments/20100224/4ffd717b/attachment.html > > > > _______________________________________________ > > Portland mailing list > > Portland at python.org > > http://mail.python.org/mailman/listinfo/portland > > > > > -- > PostgreSQL.org Major Contributor > Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 > Consulting, Training, Support, Custom Development, Engineering > Respect is earned, not gained through arbitrary and repetitive use or Mr. > or Sir. > > _______________________________________________ > Portland mailing list > Portland at python.org > http://mail.python.org/mailman/listinfo/portland > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jd at commandprompt.com Wed Feb 24 23:37:04 2010 From: jd at commandprompt.com (Joshua D. Drake) Date: Wed, 24 Feb 2010 14:37:04 -0800 Subject: [portland] Like Python In-Reply-To: <7ad394fa1002241430i2673d60ate4e74b803134f664@mail.gmail.com> References: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> <1267049596.17525.164.camel@jd-desktop.unknown.charter.com> <7ad394fa1002241430i2673d60ate4e74b803134f664@mail.gmail.com> Message-ID: <1267051024.17525.167.camel@jd-desktop.unknown.charter.com> On Wed, 2010-02-24 at 14:30 -0800, Ryan Arana wrote: > Reminds me of http://lolcode.com/. Except Like, Python is a little easier to > read. ;) Oh, if you are a lolcode fan... Did you know that there is pllolcode for PostgreSQL? Yes, you can write your procedures in lolcode. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir. From ryan.arana at gmail.com Wed Feb 24 23:46:45 2010 From: ryan.arana at gmail.com (Ryan Arana) Date: Wed, 24 Feb 2010 14:46:45 -0800 Subject: [portland] Like Python In-Reply-To: <1267051024.17525.167.camel@jd-desktop.unknown.charter.com> References: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> <1267049596.17525.164.camel@jd-desktop.unknown.charter.com> <7ad394fa1002241430i2673d60ate4e74b803134f664@mail.gmail.com> <1267051024.17525.167.camel@jd-desktop.unknown.charter.com> Message-ID: <7ad394fa1002241446k72466579r6989c8a9c2f87f1@mail.gmail.com> Actually I hadn't even heard of lolcode until this past week at PyCon where I ended up going to dinner with a few people, including the guy who wrote it (Adam Lindsay). But that's funny that there's a procedural lolcode too. On Wed, Feb 24, 2010 at 2:37 PM, Joshua D. Drake wrote: > On Wed, 2010-02-24 at 14:30 -0800, Ryan Arana wrote: > > Reminds me of http://lolcode.com/. Except Like, Python is a little > easier to > > read. ;) > > Oh, if you are a lolcode fan... Did you know that there is pllolcode for > PostgreSQL? Yes, you can write your procedures in lolcode. > > Joshua D. Drake > > > -- > PostgreSQL.org Major Contributor > Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 > Consulting, Training, Support, Custom Development, Engineering > Respect is earned, not gained through arbitrary and repetitive use or Mr. > or Sir. > > _______________________________________________ > Portland mailing list > Portland at python.org > http://mail.python.org/mailman/listinfo/portland > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jd at commandprompt.com Thu Feb 25 01:01:10 2010 From: jd at commandprompt.com (Joshua D. Drake) Date: Wed, 24 Feb 2010 16:01:10 -0800 Subject: [portland] Like Python In-Reply-To: <7ad394fa1002241446k72466579r6989c8a9c2f87f1@mail.gmail.com> References: <4c645a721002241401i5dcd0d07sf15a055078472e39@mail.gmail.com> <1267049596.17525.164.camel@jd-desktop.unknown.charter.com> <7ad394fa1002241430i2673d60ate4e74b803134f664@mail.gmail.com> <1267051024.17525.167.camel@jd-desktop.unknown.charter.com> <7ad394fa1002241446k72466579r6989c8a9c2f87f1@mail.gmail.com> Message-ID: <1267056070.17525.174.camel@jd-desktop.unknown.charter.com> On Wed, 2010-02-24 at 14:46 -0800, Ryan Arana wrote: > Actually I hadn't even heard of lolcode until this past week at PyCon > where I ended up going to dinner with a few people, including the guy > who wrote it (Adam Lindsay). http://www.vimeo.com/3728119 Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir. From chiller at decipherinc.com Thu Feb 25 01:49:09 2010 From: chiller at decipherinc.com (Christopher Hiller) Date: Wed, 24 Feb 2010 16:49:09 -0800 Subject: [portland] detecting implicit encoding conversion Message-ID: List, I'm having a difficult time with this particular problem. I have a codebase where I would like to find all occurrences of implicit decodes. It's difficult to do this with grep, and I was wondering if there was another way by means of decorators or monkeypatching or compiler/parse tree analysis or something. An example: foo = u'bar' + 'baz' This implicitly decodes "baz" using the system default encoding. In my case this encoding is ASCII. However -- and this is where problems can arise -- what if you had this: foo = u'bar' + 'b?z' ...which results in a SyntaxError if your default encoding is ASCII. Any ideas? I'm having problems googling for solutions because I'm not entirely sure what to google for. thanks Chris -- christopher hiller sr software engineer decipher 34 nw 1st ave, ste 305 portland or 97209 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jek at discorporate.us Thu Feb 25 02:08:07 2010 From: jek at discorporate.us (jason kirtland) Date: Wed, 24 Feb 2010 17:08:07 -0800 Subject: [portland] detecting implicit encoding conversion In-Reply-To: References: Message-ID: <28dcaea51002241708h58f7a6e4u8b25bcbe2e090ddb@mail.gmail.com> On Wed, Feb 24, 2010 at 4:49 PM, Christopher Hiller wrote: > List, > > I'm having a difficult time with this particular problem. ?I have a codebase > where I would like to find all occurrences of implicit decodes. ?It's > difficult to do this with grep, and I was wondering if there was another way > by means of decorators or monkeypatching or compiler/parse tree analysis or > something. ?An example: > > foo = u'bar' + 'baz' > > This implicitly decodes "baz" using the system default encoding. ?In my case > this encoding is ASCII. > > However -- and this is where problems can arise -- what if you had this: > > foo = u'bar' + 'b?z' > > ...which results in a SyntaxError if your default encoding is ASCII. > > Any ideas? ?I'm having problems googling for solutions because I'm not > entirely sure what to google for. I went through this process myself recently. The path I took was to switch out the default unicode codec with one that explodes, run the unit tests, and incrementally fix the problems. The code is open source and you can snag it here: http://bitbucket.org/jek/flatland/src/75d8155a30a2/tests/__init__.py http://bitbucket.org/jek/flatland/src/75d8155a30a2/tests/_util.py The short version looks like: class NoCoercionCodec(codecs.Codec): def encode(self, input, errors='string'): raise UnicodeError("encoding coercion blocked") def decode(self, input, errors='strict'): raise UnicodeError("encoding coercion blocked") The real version is a little longer. The stdlib does some implicit conversions, and in my case I didn't want those to explode. From chiller at decipherinc.com Thu Feb 25 03:14:52 2010 From: chiller at decipherinc.com (Christopher Hiller) Date: Wed, 24 Feb 2010 18:14:52 -0800 Subject: [portland] detecting implicit encoding conversion In-Reply-To: <28dcaea51002241708h58f7a6e4u8b25bcbe2e090ddb@mail.gmail.com> References: <28dcaea51002241708h58f7a6e4u8b25bcbe2e090ddb@mail.gmail.com> Message-ID: Awesome! Thanks. On Wed, Feb 24, 2010 at 5:08 PM, jason kirtland wrote: > On Wed, Feb 24, 2010 at 4:49 PM, Christopher Hiller > wrote: > > List, > > > > I'm having a difficult time with this particular problem. I have a > codebase > > where I would like to find all occurrences of implicit decodes. It's > > difficult to do this with grep, and I was wondering if there was another > way > > by means of decorators or monkeypatching or compiler/parse tree analysis > or > > something. An example: > > > > foo = u'bar' + 'baz' > > > > This implicitly decodes "baz" using the system default encoding. In my > case > > this encoding is ASCII. > > > > However -- and this is where problems can arise -- what if you had this: > > > > foo = u'bar' + 'b?z' > > > > ...which results in a SyntaxError if your default encoding is ASCII. > > > > Any ideas? I'm having problems googling for solutions because I'm not > > entirely sure what to google for. > > I went through this process myself recently. The path I took was to > switch out the default unicode codec with one that explodes, run the > unit tests, and incrementally fix the problems. The code is open > source and you can snag it here: > > http://bitbucket.org/jek/flatland/src/75d8155a30a2/tests/__init__.py > http://bitbucket.org/jek/flatland/src/75d8155a30a2/tests/_util.py > > The short version looks like: > > class NoCoercionCodec(codecs.Codec): > def encode(self, input, errors='string'): > raise UnicodeError("encoding coercion blocked") > > def decode(self, input, errors='strict'): > raise UnicodeError("encoding coercion blocked") > > The real version is a little longer. The stdlib does some implicit > conversions, and in my case I didn't want those to explode. > _______________________________________________ > Portland mailing list > Portland at python.org > http://mail.python.org/mailman/listinfo/portland > -- christopher hiller sr software engineer decipher 34 nw 1st ave, ste 305 portland or 97209 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Thu Feb 25 06:21:22 2010 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 24 Feb 2010 21:21:22 -0800 Subject: [portland] from the Chicago list... Message-ID: I'm still subscribed to ChiPy from usa.pycon 2009, thought this one (appended) worth relaying. Still hanging out on edu-sig, math-thinking-l, math-teach, osbridge and some others. I enjoy reading the banter here. Kirby Urner psf 09 ============ Hey ChiPy, As some of you know, I'm much involved in that exciting realm between Python and the JVM. Here's news on some things I've been working on that might be of interest you. I'd be happy to speak about any of them in upcoming meetings, and even happier to enlist your help in these open-source efforts. *1. Jython - embedded progress; ctypes coming!* I've mostly been working on getting embedded Jython working properly, and there's been terrific progress there. An ongoing challenge right now is to get it playing nicely with other JVM languages, notably JRuby. Everybody involved (Nicholas Reily and Wayne Meissner) is willing to make it work, and the future is bright. In the meantime, you may be happy to know that initial ctypes support has been merged into Jython trunk. This will make Jython compatible with more Python libraries. *2. Jygments - a Java port of Pygments* I'm sure many of you are familiar with Pygments, a widely-used Python tool that colors syntax of a many computing languages, and exports to many formats. I've been working on a Java port/rewrite, lovingly and ridiculously named Jygments. It's been a good exercise in just how different the languages are in the real world, despite academic similarities. In the midst, I've been working with Goerg Brandl, Pygments creator, on a common interchange format for language lexers. It's essentially an extension of JSON to allow for Python-style regular expressions -- I call it REJSON. The format is thus very similar to how Pygments lexers are stored now, but is more language-agnostic. The goal is to create a repository of lexers that would work with Pygments, Jygments, and possibly other future ports. Jygments is still at an early stage, feature incomplete, but already lexes a few languages well. By the way, it performs much better than Pygments! http://jygments.tigris.org/ *3. SQLAlchemy dialect for H2* H2 is one of my favorite database servers. It has about the same footprint and performance characteristics as SQLite, but supports more features and configurations, offering better scalability. In addition to embedded mode, it runs as a standalone server, and even in clustered mode. It even contains a great web admin tool. I've been working on getting SQLAlchemy to support H2, and my prototype runs well enough. My primary goal is to support embedded mode, only useful for Jython/zxJDBC configurations. But, it may be possible to support the standalone server from other Python implementations. http://www.h2database.com/ That's it for now! -Tal ______________________________ _________________ Chicago mailing list Chicago at python.org http://mail.python.org/mailman/listinfo/chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: