From catherine.devlin at gmail.com Tue May 6 19:40:20 2008 From: catherine.devlin at gmail.com (Catherine Devlin) Date: Tue, 6 May 2008 13:40:20 -0400 Subject: [CentralOH] PyOhio: Call for Presentations Message-ID: <6523e39a0805061040u23d9337alc9bac9974dd867c3@mail.gmail.com> PyOhio , the first annual Python programming mini-conference for Ohio and surrounding areas will take place Saturday, July 26, in Columbus, Ohio. The conference is free of change and will include scheduled presentations, Lighting Talks and unconference-style Open Spaces. You can read more about the conference at http://pyohio.org PyOhio invites all interested people to present scheduled talks. All presentations are expected to last 40 minutes with a 10 minute question-and-answer period. PyOhiowill accept abstracts covering any area of Python programming. A classroom area with computers will also be available for possible hands-on sessions. All presentations proposals should submit abstracts no longer than 500 words in length. Abstracts must include the title, summary of the presentation, the expertise level targeted, and a brief description of the area of Python programming it relates to. All proposals should be emailed to for review. The submission deadline will be June 1, 2008. Accepted proposals will be notified by July 1. If you have trouble submitting a proposal, or have specific questions about proposals please email Mat Kovach or call at 216-798-3397. -- - Catherine http://catherinedevlin.blogspot.com/ *** PyOhio 2008 * Columbus * July 26, 2008 * pyohio.org *** -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at microenh.com Sat May 10 14:13:49 2008 From: mark at microenh.com (Mark Erbaugh) Date: Sat, 10 May 2008 08:13:49 -0400 Subject: [CentralOH] Unit Testing with PyDev Message-ID: <1210421629.5654.4.camel@P1900> Hello, I'm using Eclipse with PyDev for Python development. I've written several unit test scipts. I can run each one using Eclipse/Pydev's Run as Python unit-test command. Is there a way to automatically run them all at once? I created a simple script that sort of works: from Test1 import * from Test2 import * [...] However, the problem is that I wasn't very creative in naming my test cases so Test1 and Test2 may have test cases with the same name, which would mean that some test cases may be skipped. I've noticed that Run As Python unit-test ignores the code I've placed in the if __name__ == '__main__' suite. Apparently, it just looks for Test... objects. Mark From mark at microenh.com Mon May 12 04:49:33 2008 From: mark at microenh.com (Mark Erbaugh) Date: Sun, 11 May 2008 22:49:33 -0400 Subject: [CentralOH] os.stat Message-ID: <1210560573.8164.81.camel@P1900> I'm working on a program that needs to extract a date* from a file and I'm using the os.stat function. I'm running Ubuntu Linux. import os import stat import datetime datetime.datetime.fromtimestamp(os.stat[stat.ST_CTIME]) On several files that I've tested, this code returns the same date that I get from ls -l. However, for one file, the time is off by about 8 seconds. It this a rounding issue or is it actually retrieving a different date? Or is it something else altogether? Thanks, Mark * ideally the creation date, but from the Python docs, it looks like under Unix (and I assume Linux) it is actually the date of the last metadata change (whatever that is). From mark at microenh.com Mon May 12 04:50:29 2008 From: mark at microenh.com (Mark Erbaugh) Date: Sun, 11 May 2008 22:50:29 -0400 Subject: [CentralOH] Unit Testing with PyDev In-Reply-To: <1210421629.5654.4.camel@P1900> References: <1210421629.5654.4.camel@P1900> Message-ID: <1210560630.8164.83.camel@P1900> On Sat, 2008-05-10 at 08:13 -0400, Mark Erbaugh wrote: > Hello, > > I'm using Eclipse with PyDev for Python development. I've written > several unit test scipts. I can run each one using Eclipse/Pydev's Run > as Python unit-test command. > > Is there a way to automatically run them all at once? I created a > simple script that sort of works: > > from Test1 import * > from Test2 import * > [...] > > However, the problem is that I wasn't very creative in naming my test > cases so Test1 and Test2 may have test cases with the same name, which > would mean that some test cases may be skipped. > > I've noticed that Run As Python unit-test ignores the code I've placed > in the if __name__ == '__main__' suite. Apparently, it just looks for > Test... objects. > Here's a solution I worked up. The MODULES is a list of s of the test module names. Comments are welcome. """ all tests runner for Eclipse add name of test module as to MODULES """ MODULES = ( 'test_attachment', 'test_comm_event', 'test_filter', 'test_nosy_ce', 'test_query_strings', #'test_role_base', 'test_rsn_name', 'test_slot_result_set', 'test_sr_query', 'testAddressFmt', 'testConditionalSeparators', 'testFieldMap', 'testparse_select', ) ct = 0 for i in MODULES: exec 'import %s as X' % i for j in dir(X): if j.find('Test') == 0: exec 'Test%d = X.%s' % (ct, j) ct += 1 From wam at cisco.com Mon May 12 16:30:43 2008 From: wam at cisco.com (William McVey) Date: Mon, 12 May 2008 10:30:43 -0400 Subject: [CentralOH] os.stat In-Reply-To: <1210560573.8164.81.camel@P1900> References: <1210560573.8164.81.camel@P1900> Message-ID: <1210602643.28336.161.camel@tardis> On Sun, 2008-05-11 at 22:49 -0400, Mark Erbaugh wrote: > I'm working on a program that needs to extract a date* from a file and > I'm using the os.stat function. I'm running Ubuntu Linux. > > import os > import stat > import datetime > > datetime.datetime.fromtimestamp(os.stat[stat.ST_CTIME]) I'm not sure if you were intending this to be illustrative, or as a real code sample. Since it looks like the latter, it should probably be pointed out that this doesn't look right. You probably want: >>> your_path = "/etc/passwd" >>> ctime = datetime.datetime.fromtimestamp(os.stat(your_path).st_ctime) >>> ctime datetime.datetime(2008, 1, 2, 10, 29, 50) > On several files that I've tested, this code returns the same date that > I get from ls -l. The timestamp from 'ls -l' output is by default modification time. You need to add the '-c' option for ls to display the ctime. > However, for one file, the time is off by about 8 > seconds. It this a rounding issue or is it actually retrieving a > different date? Or is it something else altogether? Your python program is extracting the ctime and 'ls' is displaying the mtime. > * ideally the creation date, but from the Python docs, it looks like > under Unix (and I assume Linux) it is actually the date of the last > metadata change (whatever that is). The ctime is updated whenever the inode of the file is updated. This includes operations on the owner, group, permission, and notably link count. That last one is notable because in general, only the owner can update the ownership, group ownership or permission of a file, but just about anyone can change the link count of a file, so long as there is a writeable directory on the filesystem on which the target file exists. I point this out because if you're really looking for creation date, you should well be aware that "settling on" ctime may very well put that timestamp under the control of arbitrary (depending on how locked down the partition is). On the other hand, the mtime (modification time) puts the time stamp only under the control of those who have been granted write access to the file. -- William From cbc at unc.edu Mon May 19 21:53:13 2008 From: cbc at unc.edu (Chris Calloway) Date: Mon, 19 May 2008 15:53:13 -0400 Subject: [CentralOH] Python and Plone Boot Camps in Chapel Hill, NC Message-ID: <4831DAA9.1060501@unc.edu> CJ got the drop on this already. But here's the official announcement for user groups going out today (cuz I would never wanna leave out my good friends, the Atlanta Plonistas): Triangle (NC) Zope and Python Users Group (TriZPUG) is proud to open registration for our fourth annual ultra-low cost Plone and Python training camps, BootCampArama 2008: http://trizpug.org/boot-camp/2008/ Registration is now open for: PyCamp: Python Boot Camp, August 4 - 8 Plone Boot Camp: Customizing Plone, July 28 - August 1 Advanced Plone Boot Camp: Plone 3 Techniques, August 4 - 8 All of these take place on the campus of the University of North Carolina at Chapel Hill in state of the art high tech classrooms, with free mass transit, low-cost accommodations with free wireless, and convenient dining options. Plone Boot Camp is taught by Joel Burton, twice chair of the Plone Foundation. Joel has logged more the 200 days at the head of Plone classrooms on four continents. See plonebootcamps.com for dozens of testimonials from Joel's students. PyCamp is taught by Chris Calloway, facilitator for TriZPUG and application analyst for the Southeast Coastal Ocean Observing System. Chris has developed PyCamp for over 1500 hours on behalf of Python user groups. Early bird registration runs through June 30. So register today! PyCamp is TriZPUG's Python Boot Camp, which takes a programmer familiar with basic programming concepts to the status of Python developer with one week of training. If you have previous scripting or programming experience and want to step into Python programming as quickly and painlessly as possible, this boot camp is for you. PyCamp is also the perfect follow-on to Plone Boot Camp: Customizing Plone the previous week. At Plone Boot Camp: Customizing Plone you will learn the essentials you need to build your Plone site and deploy it. This course is the most popular in the Plone world--for a good reason: it teaches you practical skills in a friendly, hands-on format. This bootcamp is aimed at: * people with HTML or web design experience * people with some or no Python experience * people with some or no Zope/Plone experience It covers using Plone, customizing, and deploying Plone sites. At Advanced Plone Boot Camp: Plone 3 Techniques you will learn to build a site using the best practices of Plone 3 as well as advance your skills in scripting and developing for Plone. The course covers the new technologies in Plone 3.0 and 3.1 intended for site integrators and developers: our new portlet infrastructure, viewlets, versioning, and a friendly introduction to Zope 3 component architecture. Now, updated for Plone 3.1! The course is intended for people who have experience with the basics of Plone site development and HTML/CSS. It will cover what you need to know to take advantage of these new technologies in Plone 3. For more information contact: info at trizpug.org