From cappy2112 at gmail.com Wed May 2 08:17:19 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Tue, 1 May 2012 23:17:19 -0700 Subject: [Baypiggies] Looking for 1 volunteer to review "RabbitMQ In Action" Message-ID: Hello Baypiggies, I have 1 print copy of "RabbitMQ In Action", from Manning Publications http://www.manning.com/videla/ If you would like to review it, please contact me off-list. Thanks Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Sat May 5 00:37:23 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Fri, 4 May 2012 15:37:23 -0700 Subject: [Baypiggies] Game Programming Camp Message-ID: Sorry if someone already brought this up, but there is going to be a Game Programming Camp at the Computer History Museum, and they're going to use Python: http://www.sfbasecamp.com/index.html Best Regards, -jj -- In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at zachary.com Tue May 8 22:29:53 2012 From: david at zachary.com (David Creemer) Date: Tue, 8 May 2012 13:29:53 -0700 Subject: [Baypiggies] Senior Python / Web developer job at Flipboard in Palo Alto Message-ID: Hi All- I manage the server engineering team at Flipboard and we have an opening for a senior developer. We're looking for someone with solid top-to-bottom web engineering experience (preferably in Python of course) to lead the development of significant new applications. Please contact jobs at flipboard.com if you're interested (and mention BayPIGgies), or just get in touch with me at work (dcreemer at flipboard.com). Thanks, -- David See http://flipboard.com for more information about us. Here's the "formal" job posting: Web Developer Engineer (Full Stack) Responsibilities: Delivering web applications that face our publishers and advertising partners. The ideal candidate can do everything from designing and understanding schemas, databases and caches to building interactive web applications. Working independently in designing and implementing sophisticated and elegant web applications, Translating business requirements into working systems. Ideal skills, experience and qualities: Excellent working knowledge of one or more web application frameworks Solid browser-based development (JavaScript, HTML, CSS) experience. 5+ years professional software development experience Solid SQL database experience Interest in learning and adopting new tools and techniques Why Join Flipboard? ? Team-up with cutting-edge thought leaders from Apple, Google, Netflix, Adobe, Ellerdale, Sony, Ning, Tellme, and Microsoft, Time Inc. & Martha Stewart Living Omniventure to help grow the world's first social magazine across multiple platforms. ? CEO, Mike McCue is a successful entrepreneur founding companies such as Paper Software (acquired by Netscape) and Tellme Networks (acquired by Microsoft), all delivering high-level valuations. ? Exciting and collaborative team working with a strong purpose and vision. Mockup Monday lunches held each week serve as a forum for team members to demo new ideas and projects. ? Pick your equipment: we provide your choice of Apple computers, screens, iPad?s, and peripherals along with Bose Active Noise Canceling Headsets! ? Flipboard?s HQ is an open, beautifully converted art studio centrally located in the heart of downtown Palo Alto. ? Compensation including base, equity, plus generous, comprehensive benefits (details below) Benefits & perks ? 401(k) with company contribution ? Vision, dental, life, and health insurance ? Paid time off- holidays, vacation, and sick leave- if you're sick, stay home ? Flexible hours ? Subsidized gym and commuter programs ? Beer Fridays: casual team & friend meet-ups at Flipboard HQ ? Team celebrations: company anniversaries, birthdays, Thanksgiving, weddings/babies - you name it, we celebrate it. ? Flipboard Sports- Basketball team, certified rock climbers, biking, or anything you?d like to organize. ? Lots of snacks (healthy and otherwise) ? Flexible hours ? Subsidized gym and commuter programs -------------- next part -------------- An HTML attachment was scrubbed... URL: From wescpy at gmail.com Thu May 10 20:19:38 2012 From: wescpy at gmail.com (wesley chun) Date: Thu, 10 May 2012 11:19:38 -0700 Subject: [Baypiggies] ANN: Intro+Intermediate Python, San Francisco, Aug 1-3 In-Reply-To: References: Message-ID: Greetings! I'll be doing a(nother) hardcore Python course this summer near the San Francisco airport. If you're somewhat new to Python or have tinkered but want to fill-in the holes, this course is for you. It's somewhat true you can learn Python online, watching videos, or reading books, but it still takes time and experience to master... I help accelerate this process. The course is based on my bestselling "Core Python" books and is made up of 3 full days complete with lectures and three hands-on coding labs per day. Please pass on this message to your colleagues who also need to learn Python. It's also a great excuse to coming to beautiful Northern California for a summer vacation! More details at http://goo.gl/uW4oF as well as the links in my .signature below. Since I hate spam, I'll only send out one more reminder as the date gets closer... probably around OSCON's timeframe. Hope to meet some of you soon! --Wesley Chun - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "A computer never does what you want... only what you tell it." ? ? wesley chun : wescpy at gmail?: @wescpy/+wescpy ? ? Python training & consulting :?http://CyberwebConsulting.com ? ? "Core Python" books :?http://CorePython.com ? ? Python blog: http://wescpy.blogspot.com From abhishek.vit at gmail.com Thu May 10 20:32:50 2012 From: abhishek.vit at gmail.com (Abhishek Pratap) Date: Thu, 10 May 2012 11:32:50 -0700 Subject: [Baypiggies] ANN: Intro+Intermediate Python, San Francisco, Aug 1-3 In-Reply-To: References: Message-ID: I can say that for a beginner looking to get a kick start with Python, this is a great class. I took them last year and now 70% of my code is in python..still have to carry some perl legacy code. The exercises are detailed and questions are answered patiently by Wesley. You should plan to ask as many questions as you can..it helped me get a better handle on the language specially when I wrote the first python line on day 1. -Abhi ---------------------------------- Abhishek Pratap Bioinformatics Systems Analyst - 3 DOE- Joint Genome Institute Lawrence Berkeley National Lab Walnut Creek, CA On Thu, May 10, 2012 at 11:19 AM, wesley chun wrote: > Greetings! > > I'll be doing a(nother) hardcore Python course this summer near the San > Francisco airport. If you're somewhat new to Python or have tinkered but > want to fill-in the holes, this course is for you. It's somewhat true > you can learn Python online, watching videos, or reading books, but it > still takes time and experience to master... I help accelerate this > process. The course is based on my bestselling "Core Python" books and > is made up of 3 full days complete with lectures and three hands-on > coding labs per day. > > Please pass on this message to your colleagues who also need to learn > Python. It's also a great excuse to coming to beautiful Northern > California for a summer vacation! More details at http://goo.gl/uW4oF > as well as the links in my .signature below. > > Since I hate spam, I'll only send out one more reminder as the date > gets closer... probably around OSCON's timeframe. > > Hope to meet some of you soon! > --Wesley Chun > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "A computer never does what you want... only what you tell it." > wesley chun : wescpy at gmail : @wescpy/+wescpy > Python training & consulting : http://CyberwebConsulting.com > "Core Python" books : http://CorePython.com > Python blog: http://wescpy.blogspot.com > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Thu May 10 22:51:35 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Thu, 10 May 2012 13:51:35 -0700 Subject: [Baypiggies] gevent Message-ID: Are any of you using gevent for non-web applications? If so, why did you choose it over other concurrency or parallelism options available in Python? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From wescpy at gmail.com Thu May 10 23:39:57 2012 From: wescpy at gmail.com (wesley chun) Date: Thu, 10 May 2012 14:39:57 -0700 Subject: [Baypiggies] gevent In-Reply-To: References: Message-ID: interestingly enough, gevent, and more broadly, non-blocking I/O, is the topic for the SeaPy users group meeting tonight: http://lists.seapig.org/pipermail/seattle-python/2012-May/004396.html too bad we're not all up there right now as i'd like to hear more about this stuff myself. anyone on the list feel like doing that, and perhaps answer tony's question also? cheers, --wesley On Thu, May 10, 2012 at 1:51 PM, Tony Cappellini wrote: > > Are any of you using gevent for non-web applications? > If so, why did you choose it over other concurrency or parallelism options > available in Python? -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "A computer never does what you want... only what you tell it." ? ? wesley chun : wescpy at gmail?: @wescpy/+wescpy ? ? Python training & consulting :?http://CyberwebConsulting.com ? ? "Core Python" books :?http://CorePython.com ? ? Python blog: http://wescpy.blogspot.com From david at bitcasa.com Thu May 10 23:49:19 2012 From: david at bitcasa.com (David Lawrence) Date: Thu, 10 May 2012 14:49:19 -0700 Subject: [Baypiggies] gevent In-Reply-To: References: Message-ID: Can't shed light but I'd like to second the request for a talk on this if somebody has the time to put it together. On Thu, May 10, 2012 at 2:39 PM, wesley chun wrote: > interestingly enough, gevent, and more broadly, non-blocking I/O, is > the topic for the SeaPy users group meeting tonight: > http://lists.seapig.org/pipermail/seattle-python/2012-May/004396.html > > too bad we're not all up there right now as i'd like to hear more > about this stuff myself. anyone on the list feel like doing that, and > perhaps answer tony's question also? > > cheers, > --wesley > > > On Thu, May 10, 2012 at 1:51 PM, Tony Cappellini > wrote: > > > > Are any of you using gevent for non-web applications? > > If so, why did you choose it over other concurrency or parallelism > options > > available in Python? > > > -- > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "A computer never does what you want... only what you tell it." > wesley chun : wescpy at gmail : @wescpy/+wescpy > Python training & consulting : http://CyberwebConsulting.com > "Core Python" books : http://CorePython.com > Python blog: http://wescpy.blogspot.com > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcquillan.sean at gmail.com Fri May 11 01:04:26 2012 From: mcquillan.sean at gmail.com (Sean McQuillan) Date: Thu, 10 May 2012 16:04:26 -0700 Subject: [Baypiggies] gevent In-Reply-To: References: Message-ID: I'm a bit of a lurker on this mailing list but I have a bunch of experience with Gevent and twisted and I stayed in a Holliday in express last night :). I'd be up for putting a talk together. Who should I contact? Sean On Thursday, May 10, 2012, David Lawrence wrote: > Can't shed light but I'd like to second the request for a talk on this if > somebody has the time to put it together. > > > > On Thu, May 10, 2012 at 2:39 PM, wesley chun > > wrote: > >> interestingly enough, gevent, and more broadly, non-blocking I/O, is >> the topic for the SeaPy users group meeting tonight: >> http://lists.seapig.org/pipermail/seattle-python/2012-May/004396.html >> >> too bad we're not all up there right now as i'd like to hear more >> about this stuff myself. anyone on the list feel like doing that, and >> perhaps answer tony's question also? >> >> cheers, >> --wesley >> >> >> On Thu, May 10, 2012 at 1:51 PM, Tony Cappellini > >> wrote: >> > >> > Are any of you using gevent for non-web applications? >> > If so, why did you choose it over other concurrency or parallelism >> options >> > available in Python? >> >> >> -- >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> "A computer never does what you want... only what you tell it." >> wesley chun : wescpy at gmail : @wescpy/+wescpy >> Python training & consulting : http://CyberwebConsulting.com >> "Core Python" books : http://CorePython.com >> Python blog: http://wescpy.blogspot.com >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org > 'Baypiggies at python.org');> >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies >> > > -- Sean McQuillan 415.990.0854 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at tcapp.com Fri May 11 01:10:45 2012 From: tony at tcapp.com (Tony Cappellini) Date: Thu, 10 May 2012 16:10:45 -0700 Subject: [Baypiggies] gevent In-Reply-To: References: Message-ID: Thanks Sean We have no one scheduled for June-Dec, so why don't you pick a month, an post a short abstract to the list so we can get some responses. On Thu, May 10, 2012 at 4:04 PM, Sean McQuillan wrote: > I'm a bit of a lurker on this mailing list but I have a bunch of > experience with Gevent and twisted and I stayed in a Holliday in express > last night :). > > I'd be up for putting a talk together. Who should I contact? > > Sean > > > On Thursday, May 10, 2012, David Lawrence wrote: > >> Can't shed light but I'd like to second the request for a talk on this if >> somebody has the time to put it together. >> >> >> >> On Thu, May 10, 2012 at 2:39 PM, wesley chun wrote: >> >>> interestingly enough, gevent, and more broadly, non-blocking I/O, is >>> the topic for the SeaPy users group meeting tonight: >>> http://lists.seapig.org/pipermail/seattle-python/2012-May/004396.html >>> >>> too bad we're not all up there right now as i'd like to hear more >>> about this stuff myself. anyone on the list feel like doing that, and >>> perhaps answer tony's question also? >>> >>> cheers, >>> --wesley >>> >>> >>> On Thu, May 10, 2012 at 1:51 PM, Tony Cappellini >>> wrote: >>> > >>> > Are any of you using gevent for non-web applications? >>> > If so, why did you choose it over other concurrency or parallelism >>> options >>> > available in Python? >>> >>> >>> -- >>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >>> "A computer never does what you want... only what you tell it." >>> wesley chun : wescpy at gmail : @wescpy/+wescpy >>> Python training & consulting : http://CyberwebConsulting.com >>> "Core Python" books : http://CorePython.com >>> Python blog: http://wescpy.blogspot.com >>> _______________________________________________ >>> Baypiggies mailing list >>> Baypiggies at python.org >>> To change your subscription options or unsubscribe: >>> http://mail.python.org/mailman/listinfo/baypiggies >>> >> >> > > -- > Sean McQuillan > 415.990.0854 > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Sat May 12 03:23:21 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Fri, 11 May 2012 18:23:21 -0700 Subject: [Baypiggies] gevent In-Reply-To: References: Message-ID: I used gevent for some non-web stuff at a previous company. I really like it. You may enjoy these blog posts: http://nichol.as/asynchronous-servers-in-python http://jjinux.blogspot.com/2012/02/python-concurrency-spreadsheet.html http://jjinux.blogspot.com/2009/12/python-concurrency.html http://jjinux.blogspot.com/search?q=gevent I gave a concurrency talk at Baypiggies several years ago, and subsequent versions of that talk talk about gevent, but we should definitely give Sean a chance to talk! Best Regards, -jj On Thu, May 10, 2012 at 4:10 PM, Tony Cappellini wrote: > Thanks Sean > > We have no one scheduled for June-Dec, so why don't you pick a month, an > post a short abstract to the list so we can get some responses. > > > > On Thu, May 10, 2012 at 4:04 PM, Sean McQuillan wrote: > >> I'm a bit of a lurker on this mailing list but I have a bunch of >> experience with Gevent and twisted and I stayed in a Holliday in express >> last night :). >> >> I'd be up for putting a talk together. Who should I contact? >> >> Sean >> >> >> On Thursday, May 10, 2012, David Lawrence wrote: >> >>> Can't shed light but I'd like to second the request for a talk on this >>> if somebody has the time to put it together. >>> >>> >>> >>> On Thu, May 10, 2012 at 2:39 PM, wesley chun wrote: >>> >>>> interestingly enough, gevent, and more broadly, non-blocking I/O, is >>>> the topic for the SeaPy users group meeting tonight: >>>> http://lists.seapig.org/pipermail/seattle-python/2012-May/004396.html >>>> >>>> too bad we're not all up there right now as i'd like to hear more >>>> about this stuff myself. anyone on the list feel like doing that, and >>>> perhaps answer tony's question also? >>>> >>>> cheers, >>>> --wesley >>>> >>>> >>>> On Thu, May 10, 2012 at 1:51 PM, Tony Cappellini >>>> wrote: >>>> > >>>> > Are any of you using gevent for non-web applications? >>>> > If so, why did you choose it over other concurrency or parallelism >>>> options >>>> > available in Python? >>>> >>>> >>>> -- >>>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >>>> "A computer never does what you want... only what you tell it." >>>> wesley chun : wescpy at gmail : @wescpy/+wescpy >>>> Python training & consulting : http://CyberwebConsulting.com >>>> "Core Python" books : http://CorePython.com >>>> Python blog: http://wescpy.blogspot.com >>>> _______________________________________________ >>>> Baypiggies mailing list >>>> Baypiggies at python.org >>>> To change your subscription options or unsubscribe: >>>> http://mail.python.org/mailman/listinfo/baypiggies >>>> >>> >>> >> >> -- >> Sean McQuillan >> 415.990.0854 >> >> >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies >> > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa -------------- next part -------------- An HTML attachment was scrubbed... URL: From nagappan at gmail.com Fri May 25 22:10:33 2012 From: nagappan at gmail.com (Nagappan Alagappan) Date: Fri, 25 May 2012 13:10:33 -0700 Subject: [Baypiggies] Slides of yesterday's talk - Cobra (WinLDTP) - GUI automation library Message-ID: Hello, http://people.freedesktop.org/~nagappan/LDTP.pdf Thanks Nagappan -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra http://nagappanal.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From anfrind at gmail.com Wed May 30 18:33:36 2012 From: anfrind at gmail.com (Lincoln Peters) Date: Wed, 30 May 2012 09:33:36 -0700 Subject: [Baypiggies] TypeError in os.path.realpath In-Reply-To: References: Message-ID: I'm developing a Python tool to monitor some of our Linux servers (running RHEL 5.6 and Python 2.4). In some cases, I need to track down the executable file for a running process, which I should be able to by resolving the symlink at /proc//cmd. When I use the "readlink" command at the shell, it works correctly, but sometimes when I call os.path.realpath with the exact same path, I get a TypeError the following traceback (note: copied by hand since the servers have no Internet access): File "/usr/lib64/python2.4/posixpath.py", line 423, in realpath resolved = _resolve_link(component) File "/usr/lib64/python2.4/posixpath.py", line 440, in _resolve_link while islink(path): File "/usr/lib64/python2.4/posixpath.py", line 159, in islink st = os.lstat(path) TypeError: lstat() argument 1 must be (encoded string without NULL bytes), not str Strangely, this only happens with some processes and not others, and I can't discern any pattern. Any thoughts? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From patenaude at gmail.com Wed May 30 20:05:20 2012 From: patenaude at gmail.com (Mitch Patenaude) Date: Wed, 30 May 2012 11:05:20 -0700 Subject: [Baypiggies] TypeError in os.path.realpath In-Reply-To: References: Message-ID: I believe the problem is that /proc//cmd has the whole command string, including arguments, separated by NULLs (\x00). The commands without arguments just look like a null terminated string, but the ones with arguments have nulls interspersed in the middle of the string. You probably want to split on \x00, and then take only the first element of the tuple. -- Mitch On Wed, May 30, 2012 at 9:33 AM, Lincoln Peters wrote: > I'm developing a Python tool to monitor some of our Linux servers (running > RHEL 5.6 and Python 2.4). In some cases, I need to track down the > executable file for a running process, which I should be able to by > resolving the symlink at /proc//cmd. When I use the "readlink" > command at the shell, it works correctly, but sometimes when I call > os.path.realpath with the exact same path, I get a TypeError the following > traceback (note: copied by hand since the servers have no Internet access): > > File "/usr/lib64/python2.4/posixpath.py", line 423, in realpath > resolved = _resolve_link(component) > File "/usr/lib64/python2.4/posixpath.py", line 440, in _resolve_link > while islink(path): > File "/usr/lib64/python2.4/posixpath.py", line 159, in islink > st = os.lstat(path) > TypeError: lstat() argument 1 must be (encoded string without NULL bytes), > not str > > Strangely, this only happens with some processes and not others, and I > can't discern any pattern. Any thoughts? > > Thanks in advance. > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anfrind at gmail.com Wed May 30 21:05:50 2012 From: anfrind at gmail.com (Lincoln Peters) Date: Wed, 30 May 2012 12:05:50 -0700 Subject: [Baypiggies] TypeError in os.path.realpath In-Reply-To: References: Message-ID: I mis-spoke in my original post. I'm trying to read the symlink at /proc//exe, not the command-line arguments at /proc//cmdline. Sorry about that. On May 30, 2012 11:05 AM, "Mitch Patenaude" wrote: > I believe the problem is that /proc//cmd has the whole command > string, including arguments, separated by NULLs (\x00). The commands > without arguments just look like a null terminated string, but the ones > with arguments have nulls interspersed in the middle of the string. You > probably want to split on \x00, and then take only the first element of the > tuple. > > -- Mitch > > > On Wed, May 30, 2012 at 9:33 AM, Lincoln Peters wrote: > >> I'm developing a Python tool to monitor some of our Linux servers >> (running RHEL 5.6 and Python 2.4). In some cases, I need to track down the >> executable file for a running process, which I should be able to by >> resolving the symlink at /proc//cmd. When I use the "readlink" >> command at the shell, it works correctly, but sometimes when I call >> os.path.realpath with the exact same path, I get a TypeError the following >> traceback (note: copied by hand since the servers have no Internet access): >> >> File "/usr/lib64/python2.4/posixpath.py", line 423, in realpath >> resolved = _resolve_link(component) >> File "/usr/lib64/python2.4/posixpath.py", line 440, in _resolve_link >> while islink(path): >> File "/usr/lib64/python2.4/posixpath.py", line 159, in islink >> st = os.lstat(path) >> TypeError: lstat() argument 1 must be (encoded string without NULL >> bytes), not str >> >> Strangely, this only happens with some processes and not others, and I >> can't discern any pattern. Any thoughts? >> >> Thanks in advance. >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Wed May 30 22:42:31 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 30 May 2012 13:42:31 -0700 Subject: [Baypiggies] TypeError in os.path.realpath In-Reply-To: References: Message-ID: Try this: try: do_whatever() except TypeError: print "The original whatever was %r" % whatever_piece_of_data If you need to, hack posixpath.py itself. -jj On Wed, May 30, 2012 at 9:33 AM, Lincoln Peters wrote: > I'm developing a Python tool to monitor some of our Linux servers (running > RHEL 5.6 and Python 2.4). In some cases, I need to track down the > executable file for a running process, which I should be able to by > resolving the symlink at /proc//cmd. When I use the "readlink" > command at the shell, it works correctly, but sometimes when I call > os.path.realpath with the exact same path, I get a TypeError the following > traceback (note: copied by hand since the servers have no Internet access): > > File "/usr/lib64/python2.4/posixpath.py", line 423, in realpath > resolved = _resolve_link(component) > File "/usr/lib64/python2.4/posixpath.py", line 440, in _resolve_link > while islink(path): > File "/usr/lib64/python2.4/posixpath.py", line 159, in islink > st = os.lstat(path) > TypeError: lstat() argument 1 must be (encoded string without NULL bytes), > not str > > Strangely, this only happens with some processes and not others, and I > can't discern any pattern. Any thoughts? > > Thanks in advance. > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdmorrison at gmail.com Wed May 30 23:32:07 2012 From: bdmorrison at gmail.com (Barry Morrison) Date: Wed, 30 May 2012 14:32:07 -0700 Subject: [Baypiggies] Any Django Guru's? Message-ID: Django newbie here. Will soon need to deploy a production Django site. Looking for someone who has been there, done that a few times to pick your brain regarding best practices, security, etc. etc. Also, anyone have a preference for managing images/thumbnails in Django? Thanks for your time! Much appreciated, Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: From xr.lists at gmail.com Wed May 30 23:54:40 2012 From: xr.lists at gmail.com (Alexander) Date: Thu, 31 May 2012 09:54:40 +1200 Subject: [Baypiggies] Any Django Guru's? In-Reply-To: References: Message-ID: Hi Barry, Firstly, django is just a WSGI application, you need any recipe for deploying WSGI applications Secondly, there are heaps of recipes on https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/ (Yes, you have to RTFM) And finally, if you do not understand your options after reading the documentation, please just write the simplest WSGI app (~5 LOC, I guess) and test. Regards, Alex On Thu, May 31, 2012 at 9:32 AM, Barry Morrison wrote: > Django newbie here. > > Will soon need to deploy a production Django site.? Looking for someone who > has been there, done that a few times to pick your brain regarding best > practices, security, etc. etc. > > Also, anyone have a preference for managing images/thumbnails in Django? > > Thanks for your time! > > Much appreciated, > Barry > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From simeonf at gmail.com Thu May 31 00:08:25 2012 From: simeonf at gmail.com (Simeon Franklin) Date: Wed, 30 May 2012 15:08:25 -0700 Subject: [Baypiggies] Any Django Guru's? In-Reply-To: References: Message-ID: On Wed, May 30, 2012 at 2:32 PM, Barry Morrison wrote: > Django newbie here. > > Will soon need to deploy a production Django site. Looking for someone > who has been there, done that a few times to pick your brain regarding best > practices, security, etc. etc. > I'd be happy to talk to you Barry if you're looking for somebody to take it off the list. > > Also, anyone have a preference for managing images/thumbnails in Django? > See http://www.djangopackages.com/grids/g/thumbnails/ for options - but I have always used sorl. -regards Simeon Franklin -------------- next part -------------- An HTML attachment was scrubbed... URL: From kellankade at gmail.com Thu May 31 02:23:51 2012 From: kellankade at gmail.com (Daniel Nowak) Date: Wed, 30 May 2012 17:23:51 -0700 Subject: [Baypiggies] Any Django Guru's? In-Reply-To: References: Message-ID: <-3740989217641670482@unknownmsgid> In my experience there are way to many ways to deploy django. Here are what I think are some best practices. First decide on your web server. It will make some of your deployment decisions for you. If you like apache than you will most likely be using mod_wsgi. If you like nginx like me them mod_wsgi is not an option. Second don't put your django code in your webroot. 3. Don't give your webserver or your wsgi app write access to your django app. On ubuntu apache runs as the user www-data. Our django apps perme Sent from my iPhone On May 30, 2012, at 2:33 PM, Barry Morrison wrote: > Django newbie here. > > Will soon need to deploy a production Django site. Looking for someone who has been there, done that a few times to pick your brain regarding best practices, security, etc. etc. > > Also, anyone have a preference for managing images/thumbnails in Django? > > Thanks for your time! > > Much appreciated, > Barry > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From bdmorrison at gmail.com Thu May 31 02:58:37 2012 From: bdmorrison at gmail.com (Barry Morrison) Date: Wed, 30 May 2012 17:58:37 -0700 Subject: [Baypiggies] Any Django Guru's? In-Reply-To: <-3740989217641670482@unknownmsgid> References: <-3740989217641670482@unknownmsgid> Message-ID: Some background and a high-level overview perhaps to shed light on what I'm working with. Ubuntu 12.04 Server 32-bit Nginx 1.1.19-1 uWSGI 1.0.3+dfsg-1 Django==1.4 PIL==1.1.7 argparse==1.2.1 distribute==0.6.24 wsgiref==0.1.2 root = /usr/share/nginx/www/hellodjango/ | root:root venv = /usr/share/nginx/www/hellodjango/venv | root:root db = /usr/share/nginx/www/hellodjango/db | www-data:www-data project = /usr/share/nginx/www/hellodjango/hellodjango | root:root app(s) = /usr/share/nginx/www/hellodjango/hellodjango/$app | root:root socket = /usr/share/nginx/www/run | www-data:www-data The above works. I can serve a Django site just fine. Though I'm certain it is not the best way to deploy it. I'm looking for do's, don't's, best practices, lessons learned, etc. etc. Figured I'd reach out to the local Python community to see if I'd have any luck. I will of course continue researching the (insert word of choice here) out of this until I'm confident I have the answers I need and am comfortable with this being public. Thanks again for your time. Much appreciated! On Wed, May 30, 2012 at 5:23 PM, Daniel Nowak wrote: > In my experience there are way to many ways to deploy django. Here are > what I think are some best practices. > > First decide on your web server. It will make some of your deployment > decisions for you. If you like apache than you will most likely be > using mod_wsgi. If you like nginx like me them mod_wsgi is not an > option. > > Second don't put your django code in your webroot. > > 3. Don't give your webserver or your wsgi app write access to your > django app. On ubuntu apache runs as the user www-data. Our django > apps perme > > Sent from my iPhone > > On May 30, 2012, at 2:33 PM, Barry Morrison wrote: > > > Django newbie here. > > > > Will soon need to deploy a production Django site. Looking for someone > who has been there, done that a few times to pick your brain regarding best > practices, security, etc. etc. > > > > Also, anyone have a preference for managing images/thumbnails in Django? > > > > Thanks for your time! > > > > Much appreciated, > > Barry > > _______________________________________________ > > Baypiggies mailing list > > Baypiggies at python.org > > To change your subscription options or unsubscribe: > > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aahz at pythoncraft.com Thu May 31 16:21:13 2012 From: aahz at pythoncraft.com (Aahz) Date: Thu, 31 May 2012 07:21:13 -0700 Subject: [Baypiggies] TypeError in os.path.realpath In-Reply-To: References: Message-ID: <20120531142113.GA23596@panix.com> On Wed, May 30, 2012, Lincoln Peters wrote: > > I'm developing a Python tool to monitor some of our Linux servers (running > RHEL 5.6 and Python 2.4). In some cases, I need to track down the > executable file for a running process, which I should be able to by > resolving the symlink at /proc//cmd. When I use the "readlink" > command at the shell, it works correctly, but sometimes when I call > os.path.realpath with the exact same path, I get a TypeError the following > traceback (note: copied by hand since the servers have no Internet access): > > File "/usr/lib64/python2.4/posixpath.py", line 423, in realpath > resolved = _resolve_link(component) > File "/usr/lib64/python2.4/posixpath.py", line 440, in _resolve_link > while islink(path): > File "/usr/lib64/python2.4/posixpath.py", line 159, in islink > st = os.lstat(path) > TypeError: lstat() argument 1 must be (encoded string without NULL bytes), > not str How do you know it's the same path? Any chance you could be having unicode issues? -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ https://en.wikipedia.org/wiki/Mary_Anning