From lynn at fastmail.es Mon Mar 3 02:45:56 2014 From: lynn at fastmail.es (Lynn Root) Date: Sun, 02 Mar 2014 17:45:56 -0800 Subject: [Baypiggies] [Event] PyLadies SF mini-PyCon Message-ID: Hey all- I'd like to announce the next PyLadies event: a PyCon 2014 preview! On Tuesday, March 11th, Yelp will be hosting PyLadies San Francisco for a series of PyCon preview talks. Details and RSVP [here](https://www.eventbrite.com/e/pyladiessf-presents-pycon-2014-preview-registration-8670470611). I will post this on our Meetup.com page once the site functionality has returned, but please note - RSVP is through the Eventbrite page! This event is open for all Pythonistas! Hope to see you there, Lynn Root -------------- next part -------------- An HTML attachment was scrubbed... URL: From lynn at lynnroot.com Wed Mar 5 20:01:03 2014 From: lynn at lynnroot.com (Lynn Root) Date: Wed, 05 Mar 2014 11:01:03 -0800 Subject: [Baypiggies] PyLadies: Get paid to contribute to Python this Summer Message-ID: <86B0F43A-F2A0-4BA9-A483-AA6A948B8193@lynnroot.com> Hey folks - The PSF is sponsoring CPython internships for women this summer through the GNOME Outreach Program for Women. Folks selected will receive $5500 USD stipend for contributing to the CPython interpreter & standard lib. More info [1]. No need to be a super Pythonista or know C, there are a lot of opportunities to contribute for every level of experience. I am one of the mentors for the project - and there will be a workshop via IRC this Sunday for those interested in learning about the process so they can apply to the program. More info [2]. Please pass around to anyone who you feel would be interested! LR [1]: http://www.pyladies.com/blog/opw/ [2]: http://www.pyladies.com/blog/opw-office-hours/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lynn at lynnroot.com Mon Mar 24 20:13:13 2014 From: lynn at lynnroot.com (Lynn Root) Date: Mon, 24 Mar 2014 12:13:13 -0700 Subject: [Baypiggies] Spotify Tech Meetup Message-ID: <60B751B1-6704-45EB-B292-4738DE108C9D@lynnroot.com> Hey all - My office, Spotify, is hosting a tech meet up on Wednesday evening in San Francisco. If you're interested, please come on by! Feel free to pass around as well. http://www.meetup.com/Spotify-SF-Dev/events/171110552/ When: Wed Mar 26th, 6:30-9pm Where: Spotify SF, 6th & Market (Warfield Theater) Food & drinks provided! What: Join the SF Spotify engineers with food & beer, and listen to tech talks about the following topics: * What we learned when [re]designing our APIs * What's going on with Luigi? The Python module that helps build complex pipelines of batch jobs * In praise of antiquated systems: our use of DNS (I'll be giving this talk! It's my prep for PyCon 2014!) Cheers, LR -------------- next part -------------- An HTML attachment was scrubbed... URL: From vikthirtyfive at gmail.com Wed Mar 26 20:10:37 2014 From: vikthirtyfive at gmail.com (Vikram K) Date: Wed, 26 Mar 2014 15:10:37 -0400 Subject: [Baypiggies] adding color to excel files programmatically Message-ID: Could someone kindly tell me how i can add color programmatically to specific rows in an excel file. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at tcapp.com Wed Mar 26 20:27:30 2014 From: tony at tcapp.com (Tony Cappellini) Date: Wed, 26 Mar 2014 12:27:30 -0700 Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: References: Message-ID: Take a look at this http://sourceforge.net/projects/pyxlwriter/ It *may* support the feature you're looking for Also- take a look at this,. Unfortunately it is a commercial solution https://www.pyxll.com/ On Wed, Mar 26, 2014 at 12:10 PM, Vikram K wrote: > Could someone kindly tell me how i can add color programmatically to > specific rows in an excel file. > Thank you. > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Wed Mar 26 20:39:08 2014 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 26 Mar 2014 12:39:08 -0700 Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: References: Message-ID: You may be able to use https://datanitro.com/. Also, you can directly use COM from Python on Windows. On Wed, Mar 26, 2014 at 12:10 PM, Vikram K wrote: > Could someone kindly tell me how i can add color programmatically to > specific rows in an excel file. > Thank you. > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://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 martin at falatic.com Wed Mar 26 21:12:18 2014 From: martin at falatic.com (Martin Falatic) Date: Wed, 26 Mar 2014 13:12:18 -0700 (PDT) Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: References: Message-ID: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> If you're generating a new excel file, xlwt works... some ideas: http://stackoverflow.com/questions/15649482/how-to-set-color-of-text-using-xlwt http://stackoverflow.com/questions/7746837/python-xlwt-set-custom-background-colour-of-a-cell http://stackoverflow.com/questions/2981293/python-excel-xlwt-colouring-every-second-row?rq=1 - Marty On Wed, March 26, 2014 12:10, Vikram K wrote: > Could someone kindly tell me how i can add color programmatically to > specific rows in an excel file. Thank you. > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies From vikthirtyfive at gmail.com Thu Mar 27 05:11:28 2014 From: vikthirtyfive at gmail.com (Vikram K) Date: Thu, 27 Mar 2014 00:11:28 -0400 Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> References: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: I had already worked with xlrd in the past (while continuing to use csv module for writing a file) so decided to take a look at xlwt. I found an example on the net which works fine: import xlwt book = xlwt.Workbook() xlwt.add_palette_colour("custom_color",0x21) book.set_colour_RGB(0x21,251,228,228) sheet1 = book.add_sheet('Sheet1') style = xlwt.easyxf('pattern:pattern solid, fore_colour 0x21') sheet1.write(0,0,'Some text', style) book.save('test.xls') The above code generates an excel file with the top-left cell having the value 'Some text' which is in color. Now, suppose i have a nested list like this: >>> x = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] >>> x [['cat', 10, 20, 30], ['cat', 50, 60, 70], ['dog', 20, 30, 40]] >>> for i in x: print i ['cat', 10, 20, 30] ['cat', 50, 60, 70] ['dog', 20, 30, 40] >>> I wish to write out the nested list x to an excel file using xlwt in such a way that the rows which start with 'cat' are colored while the row starting with 'dog' are in a different color. Alternatively, the row starting with 'cat' can be colored, while the row starting with 'dog' can be left as is without any color. If anyone has worked on something like this, please help. Thank you. On Wed, Mar 26, 2014 at 4:12 PM, Martin Falatic wrote: > If you're generating a new excel file, xlwt works... some ideas: > > > http://stackoverflow.com/questions/15649482/how-to-set-color-of-text-using-xlwt > > > http://stackoverflow.com/questions/7746837/python-xlwt-set-custom-background-colour-of-a-cell > > > http://stackoverflow.com/questions/2981293/python-excel-xlwt-colouring-every-second-row?rq=1 > > - Marty > > > On Wed, March 26, 2014 12:10, Vikram K wrote: > > Could someone kindly tell me how i can add color programmatically to > > specific rows in an excel file. Thank you. > > _______________________________________________ > > Baypiggies mailing list > > Baypiggies at python.org > > To change your subscription options or unsubscribe: > > https://mail.python.org/mailman/listinfo/baypiggies > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholsonjf at gmail.com Thu Mar 27 06:11:37 2014 From: nicholsonjf at gmail.com (James Nicholson) Date: Wed, 26 Mar 2014 22:11:37 -0700 Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: References: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: Hey Vikram, Tested the below code, it works. Output file is attached. Let me know if you have any questions, hopefully you can adapt this to what you're trying to do. Also, check out the python-excel pdf, it's an excellent resource. -------------------------------------------------------------------------------------------------------------------------- from xlwt import Workbook, easyxf book = Workbook() sheet1 = book.add_sheet('sheet1') cat_cell = easyxf('pattern: pattern solid, fore_colour red') rows = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] for x, row in enumerate(rows): if row[0] == 'cat': for y, value in enumerate(row): sheet1.write(x, y, value, cat_cell) else: for y, value in enumerate(row): sheet1.write(x, y, value) book.save('cat.xls') -------------------------------------------------------------------------------------------------------------------------- James Nicholson nicholsonjf.com On Wed, Mar 26, 2014 at 9:11 PM, Vikram K wrote: > I had already worked with xlrd in the past (while continuing to use csv > module for writing a file) so decided to take a look at xlwt. I found an > example on the net which works fine: > > import xlwt > book = xlwt.Workbook() > xlwt.add_palette_colour("custom_color",0x21) > > book.set_colour_RGB(0x21,251,228,228) > > sheet1 = book.add_sheet('Sheet1') > > style = xlwt.easyxf('pattern:pattern solid, fore_colour 0x21') > sheet1.write(0,0,'Some text', style) > book.save('test.xls') > > The above code generates an excel file with the top-left cell having the > value 'Some text' which is in color. Now, suppose i have a nested list like > this: > > >>> x = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] > >>> x > [['cat', 10, 20, 30], ['cat', 50, 60, 70], ['dog', 20, 30, 40]] > >>> for i in x: > print i > > ['cat', 10, 20, 30] > ['cat', 50, 60, 70] > ['dog', 20, 30, 40] > >>> > > I wish to write out the nested list x to an excel file using xlwt in such > a way that the rows which start with 'cat' are colored while the row > starting with 'dog' are in a different color. Alternatively, the row > starting with 'cat' can be colored, while the row starting with 'dog' can > be left as is without any color. If anyone has worked on something like > this, please help. Thank you. > > > On Wed, Mar 26, 2014 at 4:12 PM, Martin Falatic wrote: > >> If you're generating a new excel file, xlwt works... some ideas: >> >> >> http://stackoverflow.com/questions/15649482/how-to-set-color-of-text-using-xlwt >> >> >> http://stackoverflow.com/questions/7746837/python-xlwt-set-custom-background-colour-of-a-cell >> >> >> http://stackoverflow.com/questions/2981293/python-excel-xlwt-colouring-every-second-row?rq=1 >> >> - Marty >> >> >> On Wed, March 26, 2014 12:10, Vikram K wrote: >> > Could someone kindly tell me how i can add color programmatically to >> > specific rows in an excel file. Thank you. >> > _______________________________________________ >> > Baypiggies mailing list >> > Baypiggies at python.org >> > To change your subscription options or unsubscribe: >> > https://mail.python.org/mailman/listinfo/baypiggies >> >> >> > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cat.xls Type: application/vnd.ms-excel Size: 5632 bytes Desc: not available URL: From vikthirtyfive at gmail.com Thu Mar 27 17:04:45 2014 From: vikthirtyfive at gmail.com (Vikram K) Date: Thu, 27 Mar 2014 12:04:45 -0400 Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: References: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: This is perfect. Many thanks. On Thu, Mar 27, 2014 at 1:11 AM, James Nicholson wrote: > Hey Vikram, > > Tested the below code, it works. Output file is attached. > > Let me know if you have any questions, hopefully you can adapt this to > what you're trying to do. > > Also, check out the python-excel pdf, > it's an excellent resource. > > > -------------------------------------------------------------------------------------------------------------------------- > from xlwt import Workbook, easyxf > > book = Workbook() > > sheet1 = book.add_sheet('sheet1') > > cat_cell = easyxf('pattern: pattern solid, fore_colour red') > > rows = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] > > for x, row in enumerate(rows): > if row[0] == 'cat': > for y, value in enumerate(row): > sheet1.write(x, y, value, cat_cell) > else: > for y, value in enumerate(row): > sheet1.write(x, y, value) > > book.save('cat.xls') > > -------------------------------------------------------------------------------------------------------------------------- > > James Nicholson > nicholsonjf.com > > > On Wed, Mar 26, 2014 at 9:11 PM, Vikram K wrote: > >> I had already worked with xlrd in the past (while continuing to use csv >> module for writing a file) so decided to take a look at xlwt. I found an >> example on the net which works fine: >> >> import xlwt >> book = xlwt.Workbook() >> xlwt.add_palette_colour("custom_color",0x21) >> >> book.set_colour_RGB(0x21,251,228,228) >> >> sheet1 = book.add_sheet('Sheet1') >> >> style = xlwt.easyxf('pattern:pattern solid, fore_colour 0x21') >> sheet1.write(0,0,'Some text', style) >> book.save('test.xls') >> >> The above code generates an excel file with the top-left cell having the >> value 'Some text' which is in color. Now, suppose i have a nested list like >> this: >> >> >>> x = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] >> >>> x >> [['cat', 10, 20, 30], ['cat', 50, 60, 70], ['dog', 20, 30, 40]] >> >>> for i in x: >> print i >> >> ['cat', 10, 20, 30] >> ['cat', 50, 60, 70] >> ['dog', 20, 30, 40] >> >>> >> >> I wish to write out the nested list x to an excel file using xlwt in such >> a way that the rows which start with 'cat' are colored while the row >> starting with 'dog' are in a different color. Alternatively, the row >> starting with 'cat' can be colored, while the row starting with 'dog' can >> be left as is without any color. If anyone has worked on something like >> this, please help. Thank you. >> >> >> On Wed, Mar 26, 2014 at 4:12 PM, Martin Falatic wrote: >> >>> If you're generating a new excel file, xlwt works... some ideas: >>> >>> >>> http://stackoverflow.com/questions/15649482/how-to-set-color-of-text-using-xlwt >>> >>> >>> http://stackoverflow.com/questions/7746837/python-xlwt-set-custom-background-colour-of-a-cell >>> >>> >>> http://stackoverflow.com/questions/2981293/python-excel-xlwt-colouring-every-second-row?rq=1 >>> >>> - Marty >>> >>> >>> On Wed, March 26, 2014 12:10, Vikram K wrote: >>> > Could someone kindly tell me how i can add color programmatically to >>> > specific rows in an excel file. Thank you. >>> > _______________________________________________ >>> > Baypiggies mailing list >>> > Baypiggies at python.org >>> > To change your subscription options or unsubscribe: >>> > https://mail.python.org/mailman/listinfo/baypiggies >>> >>> >>> >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> https://mail.python.org/mailman/listinfo/baypiggies >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jwegis at gmail.com Fri Mar 28 00:34:08 2014 From: jwegis at gmail.com (John Wegis) Date: Thu, 27 Mar 2014 16:34:08 -0700 Subject: [Baypiggies] Baypiggies Meeting Tonight @LinkedIn - Computing Document Similarity using NLTK Message-ID: Hello Everyone, Our presentation tonight will be: "Computing Document Similarity using NLTK" by Harshvardhan (Hersh) Kelkar. *Location:* *LinkedIn Corporation2061 Stierlin Ct (aka Bldg 6)Room - Neon CarrotMountain View, CA 94043* *Abstract:* *We will explore techniques to determine the amount of similarity between documents. Specifically we will look at the intuition behind tf-idf and cosine similarity. With that as a foundation we will see how to compute these metrics with the natural language tool kit.* *Speaker:* *Harshvardhan Kelkar is a Software Engineer at Martini Media Inc. where he builds software for the Display Advertising Industry. Prior to that he worked at BMC Software on building the next generation Remedy Platform. He also likes the * *zen of python. (import this)* *Meeting ScheduleThe meeting begins @ 7:30PM.The main presentation will start @ 7:40 PM, after the usual announcements.If you wish to post jobs here, please go to: Job Listings * -------------- next part -------------- An HTML attachment was scrubbed... URL: From jwegis at gmail.com Fri Mar 28 03:10:28 2014 From: jwegis at gmail.com (John Wegis) Date: Thu, 27 Mar 2014 19:10:28 -0700 Subject: [Baypiggies] Baypiggies Meeting Tonight @LinkedIn - Computing Document Similarity using NLTK In-Reply-To: References: Message-ID: Sorry for the last minute location change. We were moved to Building 3 - Unite Conference room. Just follow the BayPiggies signs at LinkedIn. *LinkedIn Corporation* *2061 Stierlin Ct (aka Bldg 3)* *Room - **Unite* *Mountain View, CA 94043* On Thu, Mar 27, 2014 at 4:34 PM, John Wegis wrote: > Hello Everyone, > > Our presentation tonight will be: "Computing Document Similarity using > NLTK" by Harshvardhan (Hersh) Kelkar. > > *Location:* > > > > > *LinkedIn Corporation2061 Stierlin Ct (aka Bldg 6)Room - Neon > CarrotMountain View, CA 94043* > > *Abstract:* > *We will explore techniques to determine the amount of similarity between > documents. Specifically we will look at the intuition behind tf-idf and > cosine similarity. With that as a foundation we will see how to compute > these metrics with the natural language tool kit.* > > *Speaker:* > *Harshvardhan Kelkar is a Software Engineer at Martini Media Inc. where he > builds software for the Display Advertising Industry. Prior to that he > worked at BMC Software on building the next generation Remedy Platform. He > also likes the * > * zen of python. (import this)* > > > > * Meeting ScheduleThe meeting begins @ 7:30PM. The main presentation will > start @ 7:40 PM, after the usual announcements. If you wish to post jobs > here, please go to: Job Listings > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Fri Mar 28 03:31:40 2014 From: glen at glenjarvis.com (Glen Jarvis) Date: Thu, 27 Mar 2014 19:31:40 -0700 Subject: [Baypiggies] We are streaming tonight - and we moved rooms Message-ID: We won't be able to record tonight. But, we do have a streaming -- if you're interested: https://plus.google.com/hangouts/_/calendar/Z2xlbi5yLmphcnZpc0BnbWFpbC5jb20.b7flg8sdf795vphd0ec08glk74 Cheers, Glen -- We should be taught not to wait for inspiration to start a thing. Action always generates inspiration. Inspiration seldom generates action. -- Frank Tibolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Fri Mar 28 04:13:07 2014 From: cappy2112 at gmail.com (Tony Cappellini) Date: Thu, 27 Mar 2014 20:13:07 -0700 Subject: [Baypiggies] Natural Language Processing with Python Message-ID: For those who are interested in the NLTK aspect of the presentation tonight, there is a review of Natural Language Processing with Python on the Baypiggies website. http://www.baypiggies.net/user-group-association-program/BookReviews/natural-language-processing-with-python -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholsonjf at gmail.com Sat Mar 29 05:13:15 2014 From: nicholsonjf at gmail.com (James Nicholson) Date: Fri, 28 Mar 2014 21:13:15 -0700 Subject: [Baypiggies] We are streaming tonight - and we moved rooms In-Reply-To: References: Message-ID: Hey everyone, My sincerest apologies for missing this meeting and hence not filming the talk. Glen, did the recording of the Hangout on Air make it to your YouTube channel? If so, you can download the MPEG-4 from the video manager and I can upload to the BayPiggies channel. See you all for next month's iPython talk, looking forward to it. -James James Nicholson nicholsonjf.com On Thu, Mar 27, 2014 at 7:31 PM, Glen Jarvis wrote: > We won't be able to record tonight. But, we do have a streaming -- if > you're interested: > > > https://plus.google.com/hangouts/_/calendar/Z2xlbi5yLmphcnZpc0BnbWFpbC5jb20.b7flg8sdf795vphd0ec08glk74 > > Cheers, > > > Glen > -- > > We should be taught not to wait for inspiration to start a thing. Action > always generates inspiration. Inspiration seldom generates action. > > -- Frank Tibolt > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Sat Mar 29 06:11:23 2014 From: glen at glenjarvis.com (Glen Jarvis) Date: Fri, 28 Mar 2014 22:11:23 -0700 Subject: [Baypiggies] We are streaming tonight - and we moved rooms In-Reply-To: References: Message-ID: I was able to set up a Google Hangout pretty quickly, but not a Google Hangout on air. The A/V guy didn't want to connect again --- I was lucky to get him to connect to the Google Hangout (because we didn't have another way to use the A/V equipment). So, in short, no Google Hangout on Air, thus, no YouTube video. :( sorry Cheers, Glen On Mar 28, 2014 9:13 PM, "James Nicholson" wrote: > Hey everyone, > > My sincerest apologies for missing this meeting and hence not filming the > talk. > > Glen, did the recording of the Hangout on Air make it to your YouTube > channel? If so, you can download the MPEG-4 from the video manager and I > can upload to the BayPiggies channel. > > See you all for next month's iPython talk, looking forward to it. > > -James > > James Nicholson > nicholsonjf.com > > > On Thu, Mar 27, 2014 at 7:31 PM, Glen Jarvis wrote: > >> We won't be able to record tonight. But, we do have a streaming -- if >> you're interested: >> >> >> https://plus.google.com/hangouts/_/calendar/Z2xlbi5yLmphcnZpc0BnbWFpbC5jb20.b7flg8sdf795vphd0ec08glk74 >> >> Cheers, >> >> >> Glen >> -- >> >> We should be taught not to wait for inspiration to start a thing. Action >> always generates inspiration. Inspiration seldom generates action. >> >> -- Frank Tibolt >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> https://mail.python.org/mailman/listinfo/baypiggies >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicholsonjf at gmail.com Sat Mar 29 18:48:49 2014 From: nicholsonjf at gmail.com (James Nicholson) Date: Sat, 29 Mar 2014 10:48:49 -0700 Subject: [Baypiggies] We are streaming tonight - and we moved rooms In-Reply-To: References: Message-ID: Not your fault Glen, this one will have to live on in our memories ;) James Nicholson nicholsonjf.com On Fri, Mar 28, 2014 at 10:11 PM, Glen Jarvis wrote: > I was able to set up a Google Hangout pretty quickly, but not a Google > Hangout on air. The A/V guy didn't want to connect again --- I was lucky to > get him to connect to the Google Hangout (because we didn't have another > way to use the A/V equipment). > > So, in short, no Google Hangout on Air, thus, no YouTube video. :( sorry > > Cheers, > > Glen > On Mar 28, 2014 9:13 PM, "James Nicholson" wrote: > >> Hey everyone, >> >> My sincerest apologies for missing this meeting and hence not filming the >> talk. >> >> Glen, did the recording of the Hangout on Air make it to your YouTube >> channel? If so, you can download the MPEG-4 from the video manager and I >> can upload to the BayPiggies channel. >> >> See you all for next month's iPython talk, looking forward to it. >> >> -James >> >> James Nicholson >> nicholsonjf.com >> >> >> On Thu, Mar 27, 2014 at 7:31 PM, Glen Jarvis wrote: >> >>> We won't be able to record tonight. But, we do have a streaming -- if >>> you're interested: >>> >>> >>> https://plus.google.com/hangouts/_/calendar/Z2xlbi5yLmphcnZpc0BnbWFpbC5jb20.b7flg8sdf795vphd0ec08glk74 >>> >>> Cheers, >>> >>> >>> Glen >>> -- >>> >>> We should be taught not to wait for inspiration to start a thing. Action >>> always generates inspiration. Inspiration seldom generates action. >>> >>> -- Frank Tibolt >>> >>> _______________________________________________ >>> Baypiggies mailing list >>> Baypiggies at python.org >>> To change your subscription options or unsubscribe: >>> https://mail.python.org/mailman/listinfo/baypiggies >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From hershvd at gmail.com Sat Mar 29 22:30:12 2014 From: hershvd at gmail.com (Harshvardhan Kelkar) Date: Sat, 29 Mar 2014 14:30:12 -0700 Subject: [Baypiggies] Presentation and Code for Computing Document similarity using nltk Message-ID: http://bit.ly/1iyPjxn Thanks Hersh -------------- next part -------------- An HTML attachment was scrubbed... URL: From dineshbvadhia at hotmail.com Sun Mar 30 17:15:40 2014 From: dineshbvadhia at hotmail.com (Dinesh Vadhia) Date: Sun, 30 Mar 2014 08:15:40 -0700 Subject: [Baypiggies] Presentation and Code for Computing Document similarity using nltk In-Reply-To: References: Message-ID: Hersh Wasn't at the talk and as the YouTube isn't available was wondering: a) Most search engines provide a document similarity function and so was the talk focus on education or is document similarity still a problem that hasn't been fully solved? b) If not a solved problem, what are the current limitations? Thx! Date: Sat, 29 Mar 2014 14:30:12 -0700 From: Harshvardhan Kelkar To: baypiggies at python.org Subject: [Baypiggies] Presentation and Code for Computing Document similarity using nltk Message-ID: Content-Type: text/plain; charset="iso-8859-1" http://bit.ly/1iyPjxn Thanks Hersh From glen at glenjarvis.com Mon Mar 31 02:25:59 2014 From: glen at glenjarvis.com (Glen Jarvis) Date: Sun, 30 Mar 2014 17:25:59 -0700 Subject: [Baypiggies] Presentation and Code for Computing Document similarity using nltk In-Reply-To: References: Message-ID: And, if you didn't catch this, Hersh recorded the talk again for those who missed it: https://plus.google.com/events/c61oh3bqdvq810vtujjsdsi2lpc?authkey=CLTl-N-NwbaR0gE&cfem=1 How cool is that? Cheers, Glen 2014-03-29 14:30 GMT-07:00 Harshvardhan Kelkar : > http://bit.ly/1iyPjxn > > Thanks > Hersh > > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies > -- We should be taught not to wait for inspiration to start a thing. Action always generates inspiration. Inspiration seldom generates action. -- Frank Tibolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Mon Mar 31 02:25:21 2014 From: glen at glenjarvis.com (Glen Jarvis) Date: Sun, 30 Mar 2014 17:25:21 -0700 Subject: [Baypiggies] Presentation and Code for Computing Document similarity using nltk In-Reply-To: References: Message-ID: Hersh was awesome enough to also post a recording of the talk online: https://plus.google.com/events/c61oh3bqdvq810vtujjsdsi2lpc?authkey=CLTl-N-NwbaR0gE&cfem=1 Cheers, Glen On Sun, Mar 30, 2014 at 8:15 AM, Dinesh Vadhia wrote: > Hersh > > Wasn't at the talk and as the YouTube isn't available was wondering: > a) Most search engines provide a document similarity function and so was > the talk focus on education or is document similarity still a problem that > hasn't been fully solved? > b) If not a solved problem, what are the current limitations? > Thx! > > > Date: Sat, 29 Mar 2014 14:30:12 -0700 > From: Harshvardhan Kelkar > To: baypiggies at python.org > Subject: [Baypiggies] Presentation and Code for Computing Document > similarity using nltk > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > http://bit.ly/1iyPjxn > > Thanks > Hersh > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies > -- We should be taught not to wait for inspiration to start a thing. Action always generates inspiration. Inspiration seldom generates action. -- Frank Tibolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From sfseth at gmail.com Mon Mar 31 03:28:36 2014 From: sfseth at gmail.com (seth f) Date: Sun, 30 Mar 2014 18:28:36 -0700 Subject: [Baypiggies] Suggestions on Python training for first programming language? Message-ID: Hi folks, I have a good friend of 20+ years that seems curious about getting more technical. She's whip-smart, super creative, and frustrated with her current gig, which I gather is like somewhere in between editor of content and QA. My initial reaction was, the Python community especially around here is super cool, of course that's what my first thought is. Get above (or below) the content level, get to the machinery at work, a happier life exists. Question to the group, I ask on her behalf: can anyone recommend any particular python classes? Or is anyone doing tutoring kind of stuff? jj? It would sadden me to see her go off into PHP or Perl lands, I think it would be a couple of years of "wow" and then a world of despair. Java I think the corporateness would get to her right off. So of course I'm biased but I suggested Python... I suggested Ruby too, with the caveat that I just found Ruby to be cutesy, and both of us are pretty dark in our senses of humor. Anyway, if we've got any Python educators on the list please let me know. Thanks! seth -------------- next part -------------- An HTML attachment was scrubbed... URL: From Web at StevePiercy.com Mon Mar 31 10:35:31 2014 From: Web at StevePiercy.com (Steve Piercy - Web Site Builder) Date: Mon, 31 Mar 2014 01:35:31 -0700 Subject: [Baypiggies] Suggestions on Python training for first programming language? In-Reply-To: Message-ID: There are several groups I would suggest to her. SFPython has hack nights on the third Wednesday where tutoring and hacking take place. http://www.meetup.com/sfpython/ PyLadiesSF has both hack nights and classes, and has chapters in SF and South Bay. http://www.meetup.com/PyLadiesSF/ Women Who Code has broader interests across multiple languages, including Python. http://www.meetup.com/Women-Who-Code-SF/ --steve On 3/30/14 at 6:28 PM, sfseth at gmail.com (seth f) pronounced: > Hi folks, > > I have a good friend of 20+ years that seems curious about getting more > technical. She's whip-smart, super creative, and frustrated with her > current gig, which I gather is like somewhere in between editor of content > and QA. > > My initial reaction was, the Python community especially around here is > super cool, of course that's what my first thought is. Get above (or > below) the content level, get to the machinery at work, a happier life > exists. > > Question to the group, I ask on her behalf: can anyone recommend any > particular python classes? Or is anyone doing tutoring kind of stuff? jj? > > It would sadden me to see her go off into PHP or Perl lands, I think it > would be a couple of years of "wow" and then a world of despair. Java I > think the corporateness would get to her right off. > > So of course I'm biased but I suggested Python... I suggested Ruby too, > with the caveat that I just found Ruby to be cutesy, and both of us are > pretty dark in our senses of humor. > > Anyway, if we've got any Python educators on the list please let me know. > > Thanks! > seth > > > ----- > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > https://mail.python.org/mailman/listinfo/baypiggies -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Web Site Builder Soquel, CA From aahz at pythoncraft.com Mon Mar 31 21:11:41 2014 From: aahz at pythoncraft.com (Aahz) Date: Mon, 31 Mar 2014 12:11:41 -0700 Subject: [Baypiggies] Suggestions on Python training for first programming language? In-Reply-To: References: Message-ID: <20140331191141.GA20348@panix.com> On Sun, Mar 30, 2014, seth f wrote: > > I have a good friend of 20+ years that seems curious about getting more > technical. She's whip-smart, super creative, and frustrated with her > current gig, which I gather is like somewhere in between editor of content > and QA. > > Question to the group, I ask on her behalf: can anyone recommend any > particular python classes? Or is anyone doing tutoring kind of stuff? jj? The first question is, what's her learning style? Some people don't particularly like getting into a community as part of the learning process. Other people might prefer an online community. Does she learn better from vision or hearing? For one of my partners, I advocated _Learn Python the Hard Way_, which basically teaches by making you type lots of correct code, but that's not what I'd recommend to most people. One thing I would note is that while programming offers some outlet for creativity, it's not particularly what I'd call an activity that offers lots of creativity; I'd say more that programming is a good activity for people who like solving problems. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "usenet imitates usenet" --Darkhawk From vikthirtyfive at gmail.com Mon Mar 31 23:28:00 2014 From: vikthirtyfive at gmail.com (Vikram K) Date: Mon, 31 Mar 2014 17:28:00 -0400 Subject: [Baypiggies] adding color to excel files programmatically In-Reply-To: References: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: Got stuck again. Please help. I only wanted to color the values of the nested list 'data' after they have been printed to an excel sheet based on whether the second last element in each row of the nested list data has the value 'Agree'. After giving the code and the error msg, i give the value of data[0] and data[1] to give you an idea of the data structure. This is my code: from xlrd import * from xlwt import Workbook, easyxf book = Workbook() sheet1 = book.add_sheet('sheet1') cat_cell = easyxf('pattern: pattern solid, fore_colour orange') workbook = open_workbook ("merged_manip_OUT.xlsx") sheet = workbook.sheet_by_index(0) #print sheet.cell_value(0,0) print sheet.nrows print sheet.ncols ##for col in range (sheet.ncols): ## print sheet.cell_value(0,col) print '------' data = [[sheet.cell_value(r,c) for c in range(sheet.ncols)] for r in range (sheet.nrows)] print len(data) header = data[0] data = data[1:] print len(data) print '------' for x, row in enumerate(data): if str(row[-2]).strip() =='Agree': for y,value in enumerate(row): sheet1.write(x,y,row[0],row[1],cat_cell) else: for y,value in enumerate(row): sheet1.write(x,y,row[0],row[1]) book.save('merged_manip_OUT_mod.xls') *********** This is the error message: >>> 2452 27 ------ 2452 2451 ------ Traceback (most recent call last): File "/Users/king/Desktop/cell_line_comparison/comparison/Merged/color/color.py", line 39, in sheet1.write(x,y,row[0],row[1]) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Worksheet.py", line 1030, in write self.row(r).write(c, label, style) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Row.py", line 234, in write self.__adjust_height(style) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Row.py", line 64, in __adjust_height twips = style.font.height AttributeError: 'float' object has no attribute 'font' >>> ******* And these are the first two elements of the nested list data: >>> data[0] [u'230484_at', 55349.0, u'CHDH', u'choline dehydrogenase', u'3p21.1', 7.40318345, 7.40318345, 7.40318345, 0.0, 7.40318345, 1.0, 1.0, u'Same', u'Same', u'ILMN_2135321', u'CHDH', 55349.0, 3.0, 4.682925638, 3.856160407, 0.000480349, 3.765115429, -0.82676523, 0.563791944, u'Down', u'Disagree', u'Favorite'] >>> data[1] [u'1559591_s_at', 55349.0, u'CHDH', u'choline dehydrogenase', u'3p21.1', 6.682511457, 7.221781517, 9.847400986, -3.164889529, 6.977198106, 0.111499602, 0.136767478, u'Down', u'Down', u'ILMN_2135321', u'CHDH', 55349.0, 3.0, 4.682925638, 3.856160407, 0.000480349, 3.765115429, -0.82676523, 0.563791944, u'Down', u'Agree', ''] Notice that the string values have all been converted to unicode string values by xlrd. On Thu, Mar 27, 2014 at 12:04 PM, Vikram K wrote: > This is perfect. Many thanks. > > > On Thu, Mar 27, 2014 at 1:11 AM, James Nicholson wrote: > >> Hey Vikram, >> >> Tested the below code, it works. Output file is attached. >> >> Let me know if you have any questions, hopefully you can adapt this to >> what you're trying to do. >> >> Also, check out the python-excel pdf, >> it's an excellent resource. >> >> >> -------------------------------------------------------------------------------------------------------------------------- >> from xlwt import Workbook, easyxf >> >> book = Workbook() >> >> sheet1 = book.add_sheet('sheet1') >> >> cat_cell = easyxf('pattern: pattern solid, fore_colour red') >> >> rows = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] >> >> for x, row in enumerate(rows): >> if row[0] == 'cat': >> for y, value in enumerate(row): >> sheet1.write(x, y, value, cat_cell) >> else: >> for y, value in enumerate(row): >> sheet1.write(x, y, value) >> >> book.save('cat.xls') >> >> -------------------------------------------------------------------------------------------------------------------------- >> >> James Nicholson >> nicholsonjf.com >> >> >> On Wed, Mar 26, 2014 at 9:11 PM, Vikram K wrote: >> >>> I had already worked with xlrd in the past (while continuing to use csv >>> module for writing a file) so decided to take a look at xlwt. I found an >>> example on the net which works fine: >>> >>> import xlwt >>> book = xlwt.Workbook() >>> xlwt.add_palette_colour("custom_color",0x21) >>> >>> book.set_colour_RGB(0x21,251,228,228) >>> >>> sheet1 = book.add_sheet('Sheet1') >>> >>> style = xlwt.easyxf('pattern:pattern solid, fore_colour 0x21') >>> sheet1.write(0,0,'Some text', style) >>> book.save('test.xls') >>> >>> The above code generates an excel file with the top-left cell having the >>> value 'Some text' which is in color. Now, suppose i have a nested list like >>> this: >>> >>> >>> x = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] >>> >>> x >>> [['cat', 10, 20, 30], ['cat', 50, 60, 70], ['dog', 20, 30, 40]] >>> >>> for i in x: >>> print i >>> >>> ['cat', 10, 20, 30] >>> ['cat', 50, 60, 70] >>> ['dog', 20, 30, 40] >>> >>> >>> >>> I wish to write out the nested list x to an excel file using xlwt in >>> such a way that the rows which start with 'cat' are colored while the row >>> starting with 'dog' are in a different color. Alternatively, the row >>> starting with 'cat' can be colored, while the row starting with 'dog' can >>> be left as is without any color. If anyone has worked on something like >>> this, please help. Thank you. >>> >>> >>> On Wed, Mar 26, 2014 at 4:12 PM, Martin Falatic wrote: >>> >>>> If you're generating a new excel file, xlwt works... some ideas: >>>> >>>> >>>> http://stackoverflow.com/questions/15649482/how-to-set-color-of-text-using-xlwt >>>> >>>> >>>> http://stackoverflow.com/questions/7746837/python-xlwt-set-custom-background-colour-of-a-cell >>>> >>>> >>>> http://stackoverflow.com/questions/2981293/python-excel-xlwt-colouring-every-second-row?rq=1 >>>> >>>> - Marty >>>> >>>> >>>> On Wed, March 26, 2014 12:10, Vikram K wrote: >>>> > Could someone kindly tell me how i can add color programmatically to >>>> > specific rows in an excel file. Thank you. >>>> > _______________________________________________ >>>> > Baypiggies mailing list >>>> > Baypiggies at python.org >>>> > To change your subscription options or unsubscribe: >>>> > https://mail.python.org/mailman/listinfo/baypiggies >>>> >>>> >>>> >>> >>> _______________________________________________ >>> Baypiggies mailing list >>> Baypiggies at python.org >>> To change your subscription options or unsubscribe: >>> https://mail.python.org/mailman/listinfo/baypiggies >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vikthirtyfive at gmail.com Mon Mar 31 23:58:31 2014 From: vikthirtyfive at gmail.com (Vikram K) Date: Mon, 31 Mar 2014 17:58:31 -0400 Subject: [Baypiggies] Fwd: adding color to excel files programmatically In-Reply-To: References: <41814.24.23.181.240.1395864738.squirrel@martin-wwwss5.ssl.supercp.com> Message-ID: Made a slight correction to the code: from xlrd import * from xlwt import Workbook, easyxf book = Workbook() sheet1 = book.add_sheet('sheet1') cat_cell = easyxf('pattern: pattern solid, fore_colour orange') workbook = open_workbook ("merged_manip_OUT.xlsx") sheet = workbook.sheet_by_index(0) #print sheet.cell_value(0,0) print sheet.nrows print sheet.ncols ##for col in range (sheet.ncols): ## print sheet.cell_value(0,col) print '------' data = [[sheet.cell_value(r,c) for c in range(sheet.ncols)] for r in range (sheet.nrows)] print len(data) header = data[0] data = data[1:] print len(data) print '------' for x, row in enumerate(data): if str(row[-2]).strip() =='Agree': for y,value in enumerate(row): sheet1.write(x,y,value[0],value[1],cat_cell) else: for y,value in enumerate(row): sheet1.write(x,y,value[0],value[1]) book.save('merged_manip_OUT_mod.xls') I am only trying to print the first two values of each row in the nested list data to the output file (for starters). Error msg is: Traceback (most recent call last): File "/Users/katju/Desktop/cell_line_comparison/comparison/Merged/color/color.py", line 40, in sheet1.write(x,y,value[0],value[1]) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Worksheet.py", line 1030, in write self.row(r).write(c, label, style) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Row.py", line 234, in write self.__adjust_height(style) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Row.py", line 64, in __adjust_height twips = style.font.height AttributeError: 'unicode' object has no attribute 'font' >>> i want the first element value[0] to be a string and the second element value[1] to be an int. I tried doing str(value[0]) and int(value[1]) but again got a similar error msg. ---------- Forwarded message ---------- From: Vikram K Date: Mon, Mar 31, 2014 at 5:28 PM Subject: Re: [Baypiggies] adding color to excel files programmatically To: James Nicholson Cc: Martin Falatic , Baypiggies Got stuck again. Please help. I only wanted to color the values of the nested list 'data' after they have been printed to an excel sheet based on whether the second last element in each row of the nested list data has the value 'Agree'. After giving the code and the error msg, i give the value of data[0] and data[1] to give you an idea of the data structure. This is my code: from xlrd import * from xlwt import Workbook, easyxf book = Workbook() sheet1 = book.add_sheet('sheet1') cat_cell = easyxf('pattern: pattern solid, fore_colour orange') workbook = open_workbook ("merged_manip_OUT.xlsx") sheet = workbook.sheet_by_index(0) #print sheet.cell_value(0,0) print sheet.nrows print sheet.ncols ##for col in range (sheet.ncols): ## print sheet.cell_value(0,col) print '------' data = [[sheet.cell_value(r,c) for c in range(sheet.ncols)] for r in range (sheet.nrows)] print len(data) header = data[0] data = data[1:] print len(data) print '------' for x, row in enumerate(data): if str(row[-2]).strip() =='Agree': for y,value in enumerate(row): sheet1.write(x,y,row[0],row[1],cat_cell) else: for y,value in enumerate(row): sheet1.write(x,y,row[0],row[1]) book.save('merged_manip_OUT_mod.xls') *********** This is the error message: >>> 2452 27 ------ 2452 2451 ------ Traceback (most recent call last): File "/Users/king/Desktop/cell_line_comparison/comparison/Merged/color/color.py", line 39, in sheet1.write(x,y,row[0],row[1]) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Worksheet.py", line 1030, in write self.row(r).write(c, label, style) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Row.py", line 234, in write self.__adjust_height(style) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xlwt/Row.py", line 64, in __adjust_height twips = style.font.height AttributeError: 'float' object has no attribute 'font' >>> ******* And these are the first two elements of the nested list data: >>> data[0] [u'230484_at', 55349.0, u'CHDH', u'choline dehydrogenase', u'3p21.1', 7.40318345, 7.40318345, 7.40318345, 0.0, 7.40318345, 1.0, 1.0, u'Same', u'Same', u'ILMN_2135321', u'CHDH', 55349.0, 3.0, 4.682925638, 3.856160407, 0.000480349, 3.765115429, -0.82676523, 0.563791944, u'Down', u'Disagree', u'Favorite'] >>> data[1] [u'1559591_s_at', 55349.0, u'CHDH', u'choline dehydrogenase', u'3p21.1', 6.682511457, 7.221781517, 9.847400986, -3.164889529, 6.977198106, 0.111499602, 0.136767478, u'Down', u'Down', u'ILMN_2135321', u'CHDH', 55349.0, 3.0, 4.682925638, 3.856160407, 0.000480349, 3.765115429, -0.82676523, 0.563791944, u'Down', u'Agree', ''] Notice that the string values have all been converted to unicode string values by xlrd. On Thu, Mar 27, 2014 at 12:04 PM, Vikram K wrote: > This is perfect. Many thanks. > > > On Thu, Mar 27, 2014 at 1:11 AM, James Nicholson wrote: > >> Hey Vikram, >> >> Tested the below code, it works. Output file is attached. >> >> Let me know if you have any questions, hopefully you can adapt this to >> what you're trying to do. >> >> Also, check out the python-excel pdf, >> it's an excellent resource. >> >> >> -------------------------------------------------------------------------------------------------------------------------- >> from xlwt import Workbook, easyxf >> >> book = Workbook() >> >> sheet1 = book.add_sheet('sheet1') >> >> cat_cell = easyxf('pattern: pattern solid, fore_colour red') >> >> rows = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] >> >> for x, row in enumerate(rows): >> if row[0] == 'cat': >> for y, value in enumerate(row): >> sheet1.write(x, y, value, cat_cell) >> else: >> for y, value in enumerate(row): >> sheet1.write(x, y, value) >> >> book.save('cat.xls') >> >> -------------------------------------------------------------------------------------------------------------------------- >> >> James Nicholson >> nicholsonjf.com >> >> >> On Wed, Mar 26, 2014 at 9:11 PM, Vikram K wrote: >> >>> I had already worked with xlrd in the past (while continuing to use csv >>> module for writing a file) so decided to take a look at xlwt. I found an >>> example on the net which works fine: >>> >>> import xlwt >>> book = xlwt.Workbook() >>> xlwt.add_palette_colour("custom_color",0x21) >>> >>> book.set_colour_RGB(0x21,251,228,228) >>> >>> sheet1 = book.add_sheet('Sheet1') >>> >>> style = xlwt.easyxf('pattern:pattern solid, fore_colour 0x21') >>> sheet1.write(0,0,'Some text', style) >>> book.save('test.xls') >>> >>> The above code generates an excel file with the top-left cell having the >>> value 'Some text' which is in color. Now, suppose i have a nested list like >>> this: >>> >>> >>> x = [['cat',10,20,30],['cat',50,60,70],['dog',20,30,40]] >>> >>> x >>> [['cat', 10, 20, 30], ['cat', 50, 60, 70], ['dog', 20, 30, 40]] >>> >>> for i in x: >>> print i >>> >>> ['cat', 10, 20, 30] >>> ['cat', 50, 60, 70] >>> ['dog', 20, 30, 40] >>> >>> >>> >>> I wish to write out the nested list x to an excel file using xlwt in >>> such a way that the rows which start with 'cat' are colored while the row >>> starting with 'dog' are in a different color. Alternatively, the row >>> starting with 'cat' can be colored, while the row starting with 'dog' can >>> be left as is without any color. If anyone has worked on something like >>> this, please help. Thank you. >>> >>> >>> On Wed, Mar 26, 2014 at 4:12 PM, Martin Falatic wrote: >>> >>>> If you're generating a new excel file, xlwt works... some ideas: >>>> >>>> >>>> http://stackoverflow.com/questions/15649482/how-to-set-color-of-text-using-xlwt >>>> >>>> >>>> http://stackoverflow.com/questions/7746837/python-xlwt-set-custom-background-colour-of-a-cell >>>> >>>> >>>> http://stackoverflow.com/questions/2981293/python-excel-xlwt-colouring-every-second-row?rq=1 >>>> >>>> - Marty >>>> >>>> >>>> On Wed, March 26, 2014 12:10, Vikram K wrote: >>>> > Could someone kindly tell me how i can add color programmatically to >>>> > specific rows in an excel file. Thank you. >>>> > _______________________________________________ >>>> > Baypiggies mailing list >>>> > Baypiggies at python.org >>>> > To change your subscription options or unsubscribe: >>>> > https://mail.python.org/mailman/listinfo/baypiggies >>>> >>>> >>>> >>> >>> _______________________________________________ >>> Baypiggies mailing list >>> Baypiggies at python.org >>> To change your subscription options or unsubscribe: >>> https://mail.python.org/mailman/listinfo/baypiggies >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: