From bob.haffner at gmail.com Sat Nov 1 00:13:51 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Fri, 31 Oct 2014 18:13:51 -0500 Subject: [omaha] Which Relational Database!! In-Reply-To: References: <1414781786.1353957.185653521.6DCB7792@webmail.messagingengine.com> <229BE0D0-9F6E-4559-B8E3-5A90AAAA1370@gmail.com> Message-ID: Veran, check out PythonAnywhere for hosting. I know they support mySql and Postgres is coming soon. I can't speak to what versions or anything, but I use them for other things and they have good service and prices. -bob On Fri, Oct 31, 2014 at 5:35 PM, Jay Bendon wrote: > SQLAlchemy supports pytnon 2.5-3.x (including 3.4 as i understand it) > > http://www.sqlalchemy.org/features.html > > http://docs.sqlalchemy.org/en/latest/changelog/changelog_09.html#change-0.9.8 > > --Jay > > On Fri, Oct 31, 2014 at 3:00 PM, Varun Mehta > wrote: > > > Thanks for this one stop shop info Aaron. > > > > Varun > > > > On Oct 31, 2014, at 4:44 PM, Aaron Keck wrote: > > > > > You can check the https://python3wos.appspot.com/ Wall of > > Shame/Superpowers > > > for quick support info on the major libraries. Even if supported, it's > > > important to look into each library's support for Python3. For > example, > > > boto supports Python 3 for most of the AWS integrations, but not for > > Google > > > App Engine yet. > > > > > > Unless you're dependent on a particular library that is Python 2.x > only, > > > Python 3.x is a perfectly valid commercial product. I don't see 2.7 > > > support dropping any time soon, but the Python 3 train seems to keep > > > moving steadily forward. > > > > > > If you're looking at a long-term product, I'd try to go Python 3. > > > > > > On Fri, Oct 31, 2014 at 2:14 PM, Varun Mehta > > wrote: > > > > > >> Thanks Jeff. Instagram with PostgreSQL is definitely a convincing > > >> reasoning. > > >> > > >> Eli, Mysql C wrapper is definitely not working directly in current > > version > > >> of 3.4. A python alternative might not be a viable commercial > solution. > > >> But thank you for Google App engine which powers quite large apps. > > >> > > >> So, now, i have a very interesting point for evaluation - Google App > > >> Engine with MySQL and Amazon EC2 with PostgreSQL. > > >> > > >> And I agree Mike, it?s case by case basis. But i have no preference at > > the > > >> moment as i have to learn both and i am quite open with only > > consideration > > >> of reaping benefits of today?s effort in future. :) > > >> > > >> But i still have an unanswered question: > > >> Where i can check for libraries yet to be ported to Python 3.4? > > >> Which is better for commercial solution - Python 2.x vs 3.x? > > >> > > >> Thank you all once again for prompt and deta :) > > >> > > >> Varun > > >> > > >> On Oct 31, 2014, at 1:56 PM, Mike Hostetler > > >> wrote: > > >> > > >>> > > >>> I use PostgreSQL for all my Django apps. > > >>> > > >>> The default MySQL tables didn't use to have referential integrity and > > >>> transactions by default (you had to change table types to get > those). I > > >>> don't thing that is the case anymore. > > >>> > > >>> In the end I think that's a preference and a case-by-case basis. If > > it's > > >>> just a CRUD app, either one is just fine > > >>> -- > > >>> Mike Hostetler > > >>> mike at hostetlerhome.com > > >>> > > >>> On Fri, Oct 31, 2014, at 01:10 PM, Varun Mehta wrote: > > >>>> Hi > > >>>> > > >>>> I am learning Django and i wanted to use MySql as database with > Python > > >>>> 3.4.2. > > >>>> But i learnt that MySQL_Python is not supported for > > >>>> Python3.x.( > > >> > > > http://stackoverflow.com/questions/23376103/python-3-4-0-with-mysql-database > > >> ) > > >>>> > > >>>> So,i have a few queries: > > >>>> Which is best performing relational Database with Python? > > >>>> Would it be beneficial to use a Python based driver (PyMySQL) for a > > >>>> commercial solution? > > >>>> Are there any other libraries which are not supported in 3.x? > > >>>> > > >>>> Thanks in advance. > > >>>> > > >>>> Varun > > >>>> > > >>>> _______________________________________________ > > >>>> Omaha Python Users Group mailing list > > >>>> Omaha at python.org > > >>>> https://mail.python.org/mailman/listinfo/omaha > > >>>> http://www.OmahaPython.org > > >>> _______________________________________________ > > >>> Omaha Python Users Group mailing list > > >>> Omaha at python.org > > >>> https://mail.python.org/mailman/listinfo/omaha > > >>> http://www.OmahaPython.org > > >> > > >> _______________________________________________ > > >> Omaha Python Users Group mailing list > > >> Omaha at python.org > > >> https://mail.python.org/mailman/listinfo/omaha > > >> http://www.OmahaPython.org > > >> > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From wereapwhatwesow at gmail.com Tue Nov 4 03:22:55 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Mon, 3 Nov 2014 20:22:55 -0600 Subject: [omaha] Languages, fonts, scripts? In-Reply-To: References: Message-ID: In case anyone needs to deal with this in the future: Some languages have some advanced scripts - for example Hindi has 'dependent vowels': In some words, written vowels change their form in order to join up with consonants. - With ?i?: ? ? ?? [ki] is a combination of ? + ? (k + i). The character ? is added to the left and above. There are about a dozen of these rules. When typing the Hindi word ????? ('book' in English) you press ? then ? and the result is ??. Reportlabs does not seem to know the rule, and prints ? ?. I have not been able to figure exactly why reportlabs fails, so I started trying other solutions. (kind of a bummer, because up to that point I liked working with it) On the web, using font-families helps solve the problem of missing glyphs, as there can be many fonts in a family. (there are still too many glyphs to put all the languages into a single font) and most OS's since around 2006 recognize most of the world's languages. I looked at xhtml2pdf but it uses the reportlab toolkit so I thought it might have the same problem, and moved on to WeasyPrint. Like xhtml2pdf It uses html and css to format the output, and pycairo to save to a pdf. Pycairo seems to convert the text to vector graphics so I don't have to worry about embedding fonts. I sent a pdf sample to the printer for approval and keeping my fingers crossed. On Sat, Oct 25, 2014 at 11:46 AM, Jeff Hinrichs - DM&T wrote: > In general, for the web, you need to always think about graceful > degradation. Our designers, who generally work in print, or like to submit > a graphic, tend to specify individual fonts, without considering what > happens if a specified font is not available to the users browser. > > http://ffffallback.com/ > http://blog.typekit.com/2011/03/24/type-study-choosing-fallback-fonts/ > > -j > > On Sat, Oct 25, 2014 at 9:33 AM, Steve Young > wrote: > > > Sorry for the run on thread. > > > > For example on my site I have: > > > > font-family: "Lucida Grande", Verdana, Arial, sans-serif; > > > > and this has so far been able to display all the text properly in its > > respective languages. > > > > On Sat, Oct 25, 2014 at 9:26 AM, Steve Young > > wrote: > > > > > I just found this https://code.google.com/p/noto/issues/detail?id=13, > > > which describes my question exactly. And gives the answer that, no, > there > > > is not on font to rule them all, and I am going to have to deal with > > > multiple fonts creating my PDFs. > > > > > > But can someone answer how the website manages this? Does it have > > > something to do with specifying font families instead of individual > > fonts? > > > > > > On Sat, Oct 25, 2014 at 9:13 AM, Steve Young < > wereapwhatwesow at gmail.com> > > > wrote: > > > > > >> Question about fonts: > > >> > > >> Still working on a flashcard site with Django 1.7 and python 3.3. So > > far > > >> the website has handled all the text in latin, cyrillic, arabic, > hindi, > > >> without a hitch. I copy the text and paste it into the django admin > for > > >> that field and it just works. > > >> > > >> I thought this magic was working because of unicode fonts, but while > > >> working with reportlab and creating pdfs the magic goes away and I > have > > to > > >> choose fonts that contain the correct characters for the languages. > > >> > > >> Has anyone worked with languages and can point me in the right > direction > > >> to learn about this? > > >> > > >> Thanks. > > >> > > > > > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > > > > -- > Best, > > Jeff Hinrichs > 402.218.1473 > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From jeffh at dundeemt.com Tue Nov 4 03:54:26 2014 From: jeffh at dundeemt.com (Jeff Hinrichs - DM&T) Date: Mon, 3 Nov 2014 20:54:26 -0600 Subject: [omaha] Languages, fonts, scripts? In-Reply-To: References: Message-ID: Not that you should change your solution, but a quesiton. If you use css+html, what is displayed in the browser? And if it is correct, I would think that reportlab would get it right. In fonts, there is no adding of fonts, it would have to replace the two glyphs with another from the font's glyph table. ?? -j On Mon, Nov 3, 2014 at 8:22 PM, Steve Young wrote: > In case anyone needs to deal with this in the future: > > Some languages have some advanced scripts - for example Hindi has > 'dependent vowels': > In some words, written vowels change their form in order to join up with > consonants. > > - With ?i?: ? ? ?? [ki] is a combination of ? + ? (k + i). The character ? > is > added to the left and above. > > There are about a dozen of these rules. When typing the Hindi word ????? > ('book' in English) you press ? then ? and the result is ??. > > Reportlabs does not seem to know the rule, and prints ? ?. I have not been > able to figure exactly why reportlabs fails, so I started trying other > solutions. (kind of a bummer, because up to that point I liked working with > it) > > On the web, using font-families helps solve the problem of missing glyphs, > as there can be many fonts in a family. (there are still too many glyphs to > put all the languages into a single font) and most OS's since around 2006 > recognize most of the world's languages. > > I looked at xhtml2pdf but it uses the reportlab toolkit so I thought it > might have the same problem, and moved on to WeasyPrint. Like xhtml2pdf It > uses html and css to format the output, and pycairo to save to a pdf. > Pycairo seems to convert the text to vector graphics so I don't have to > worry about embedding fonts. I sent a pdf sample to the printer for > approval and keeping my fingers crossed. > > On Sat, Oct 25, 2014 at 11:46 AM, Jeff Hinrichs - DM&T > > wrote: > > > In general, for the web, you need to always think about graceful > > degradation. Our designers, who generally work in print, or like to > submit > > a graphic, tend to specify individual fonts, without considering what > > happens if a specified font is not available to the users browser. > > > > http://ffffallback.com/ > > http://blog.typekit.com/2011/03/24/type-study-choosing-fallback-fonts/ > > > > -j > > > > On Sat, Oct 25, 2014 at 9:33 AM, Steve Young > > wrote: > > > > > Sorry for the run on thread. > > > > > > For example on my site I have: > > > > > > font-family: "Lucida Grande", Verdana, Arial, sans-serif; > > > > > > and this has so far been able to display all the text properly in its > > > respective languages. > > > > > > On Sat, Oct 25, 2014 at 9:26 AM, Steve Young < > wereapwhatwesow at gmail.com> > > > wrote: > > > > > > > I just found this https://code.google.com/p/noto/issues/detail?id=13 > , > > > > which describes my question exactly. And gives the answer that, no, > > there > > > > is not on font to rule them all, and I am going to have to deal with > > > > multiple fonts creating my PDFs. > > > > > > > > But can someone answer how the website manages this? Does it have > > > > something to do with specifying font families instead of individual > > > fonts? > > > > > > > > On Sat, Oct 25, 2014 at 9:13 AM, Steve Young < > > wereapwhatwesow at gmail.com> > > > > wrote: > > > > > > > >> Question about fonts: > > > >> > > > >> Still working on a flashcard site with Django 1.7 and python 3.3. > So > > > far > > > >> the website has handled all the text in latin, cyrillic, arabic, > > hindi, > > > >> without a hitch. I copy the text and paste it into the django admin > > for > > > >> that field and it just works. > > > >> > > > >> I thought this magic was working because of unicode fonts, but while > > > >> working with reportlab and creating pdfs the magic goes away and I > > have > > > to > > > >> choose fonts that contain the correct characters for the languages. > > > >> > > > >> Has anyone worked with languages and can point me in the right > > direction > > > >> to learn about this? > > > >> > > > >> Thanks. > > > >> > > > > > > > > > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > > > > > > > -- > > Best, > > > > Jeff Hinrichs > > 402.218.1473 > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -- Best, Jeff Hinrichs 402.218.1473 From wereapwhatwesow at gmail.com Wed Nov 5 02:19:11 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Tue, 4 Nov 2014 19:19:11 -0600 Subject: [omaha] Languages, fonts, scripts? In-Reply-To: References: Message-ID: I did not try css and html with Reportlab or xhtml2pdf. I was using platypus and strings. What happens with the fonts are interesting. When typing the first letter it appears normally, when the 2nd (dependent) letter is pressed the first font shifts/changes to appropriate set of characters. I am guessing that the way reportlabs processes the strings it is not taking advantage of the OS's ability to deal with the scripts. It is possible that xhtml2pdf will work, I just did not try. WeasyPrint had a feature or 2 that xhtml2pdf did not, so I gave it a try. I really liked platypus because it was fairly easy to format the layout exactly like I needed. I am just beginning to try with weasyprint so I don't know how successful I will be. On Mon, Nov 3, 2014 at 8:54 PM, Jeff Hinrichs - DM&T wrote: > Not that you should change your solution, but a quesiton. If you use > css+html, what is displayed in the browser? And if it is correct, I would > think that reportlab would get it right. In fonts, there is no adding of > fonts, it would have to replace the two glyphs with another from the font's > glyph table. ?? > -j > > On Mon, Nov 3, 2014 at 8:22 PM, Steve Young > wrote: > > > In case anyone needs to deal with this in the future: > > > > Some languages have some advanced scripts - for example Hindi has > > 'dependent vowels': > > In some words, written vowels change their form in order to join up with > > consonants. > > > > - With ?i?: ? ? ?? [ki] is a combination of ? + ? (k + i). The character > ? > > is > > added to the left and above. > > > > There are about a dozen of these rules. When typing the Hindi word ????? > > ('book' in English) you press ? then ? and the result is ??. > > > > Reportlabs does not seem to know the rule, and prints ? ?. I have not > been > > able to figure exactly why reportlabs fails, so I started trying other > > solutions. (kind of a bummer, because up to that point I liked working > with > > it) > > > > On the web, using font-families helps solve the problem of missing > glyphs, > > as there can be many fonts in a family. (there are still too many glyphs > to > > put all the languages into a single font) and most OS's since around 2006 > > recognize most of the world's languages. > > > > I looked at xhtml2pdf but it uses the reportlab toolkit so I thought it > > might have the same problem, and moved on to WeasyPrint. Like xhtml2pdf > It > > uses html and css to format the output, and pycairo to save to a pdf. > > Pycairo seems to convert the text to vector graphics so I don't have to > > worry about embedding fonts. I sent a pdf sample to the printer for > > approval and keeping my fingers crossed. > > > > On Sat, Oct 25, 2014 at 11:46 AM, Jeff Hinrichs - DM&T < > jeffh at dundeemt.com > > > > > wrote: > > > > > In general, for the web, you need to always think about graceful > > > degradation. Our designers, who generally work in print, or like to > > submit > > > a graphic, tend to specify individual fonts, without considering what > > > happens if a specified font is not available to the users browser. > > > > > > http://ffffallback.com/ > > > http://blog.typekit.com/2011/03/24/type-study-choosing-fallback-fonts/ > > > > > > -j > > > > > > On Sat, Oct 25, 2014 at 9:33 AM, Steve Young < > wereapwhatwesow at gmail.com> > > > wrote: > > > > > > > Sorry for the run on thread. > > > > > > > > For example on my site I have: > > > > > > > > font-family: "Lucida Grande", Verdana, Arial, sans-serif; > > > > > > > > and this has so far been able to display all the text properly in its > > > > respective languages. > > > > > > > > On Sat, Oct 25, 2014 at 9:26 AM, Steve Young < > > wereapwhatwesow at gmail.com> > > > > wrote: > > > > > > > > > I just found this > https://code.google.com/p/noto/issues/detail?id=13 > > , > > > > > which describes my question exactly. And gives the answer that, no, > > > there > > > > > is not on font to rule them all, and I am going to have to deal > with > > > > > multiple fonts creating my PDFs. > > > > > > > > > > But can someone answer how the website manages this? Does it have > > > > > something to do with specifying font families instead of individual > > > > fonts? > > > > > > > > > > On Sat, Oct 25, 2014 at 9:13 AM, Steve Young < > > > wereapwhatwesow at gmail.com> > > > > > wrote: > > > > > > > > > >> Question about fonts: > > > > >> > > > > >> Still working on a flashcard site with Django 1.7 and python 3.3. > > So > > > > far > > > > >> the website has handled all the text in latin, cyrillic, arabic, > > > hindi, > > > > >> without a hitch. I copy the text and paste it into the django > admin > > > for > > > > >> that field and it just works. > > > > >> > > > > >> I thought this magic was working because of unicode fonts, but > while > > > > >> working with reportlab and creating pdfs the magic goes away and I > > > have > > > > to > > > > >> choose fonts that contain the correct characters for the > languages. > > > > >> > > > > >> Has anyone worked with languages and can point me in the right > > > direction > > > > >> to learn about this? > > > > >> > > > > >> Thanks. > > > > >> > > > > > > > > > > > > > > _______________________________________________ > > > > Omaha Python Users Group mailing list > > > > Omaha at python.org > > > > https://mail.python.org/mailman/listinfo/omaha > > > > http://www.OmahaPython.org > > > > > > > > > > > > > > > > -- > > > Best, > > > > > > Jeff Hinrichs > > > 402.218.1473 > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > > > > -- > Best, > > Jeff Hinrichs > 402.218.1473 > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From bob.haffner at gmail.com Wed Nov 5 04:14:30 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Tue, 4 Nov 2014 21:14:30 -0600 Subject: [omaha] Web scraping and funky characters Message-ID: Hey gang, I got a script running in 2.7 that checks a website daily, finds some info and then sends some messages (email and text) through gmail. Pretty simple and runs without any problems... most of the time. When it does have problems its usually because of some funky character (ex: ×) in the html. These cause problems when searching for keywords or with the gmail portion. Doing a .encode('utf-8') seemed to help with the crashing while sending, but the characters still come across funny. Any advice? -bob From jeffh at dundeemt.com Wed Nov 5 04:25:00 2014 From: jeffh at dundeemt.com (Jeff Hinrichs - DM&T) Date: Tue, 4 Nov 2014 21:25:00 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: What library are you using? Built-in, beautiful soup, requests? and then are you sending the information in a plain-text email or an html email? Plain-text won't be able to display extended characters without some encoding in the message. Others can chime in here, but it seems that you either have to transmit those chars in a format that can handle them or if you are using plain-text, remove them completely or substitute another character for them. Ahh, the joys of glyphs - or forget english, everyone speak ascii :)0 Almost as enjoyable as users who cut and paste random things from the internet and then save them to an accounting database via windows who speaks cp1252. :p On Tue, Nov 4, 2014 at 9:14 PM, Bob Haffner wrote: > Hey gang, > > I got a script running in 2.7 that checks a website daily, finds some info > and then sends some messages (email and text) through gmail. > > Pretty simple and runs without any problems... most of the time. > > When it does have problems its usually because of some funky character (ex: > ×) in the html. These cause problems when searching for keywords or > with the gmail portion. > > Doing a .encode('utf-8') seemed to help with the crashing while sending, > but the characters still come across funny. > > Any advice? > > -bob > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -- Best, Jeff Hinrichs 402.218.1473 From bob.haffner at gmail.com Wed Nov 5 05:24:10 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Tue, 4 Nov 2014 22:24:10 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: Hey Jeff thanks for the input I'm using requests. As far as the message, plain text. I'm assuming i have to do that cause I'm sending a mix of texts and emails. When i did encode it the crashes stopped, but the funky output persisted. Yeah, I think thats exactly what's going on. Meaning, the copy and pasting of some cool chars. On Tue, Nov 4, 2014 at 9:25 PM, Jeff Hinrichs - DM&T wrote: > What library are you using? Built-in, beautiful soup, requests? and then > are you sending the information in a plain-text email or an html email? > Plain-text won't be able to display extended characters without some > encoding in the message. Others can chime in here, but it seems that you > either have to transmit those chars in a format that can handle them or if > you are using plain-text, remove them completely or substitute another > character for them. Ahh, the joys of glyphs - or forget english, everyone > speak ascii :)0 > > Almost as enjoyable as users who cut and paste random things from the > internet and then save them to an accounting database via windows who > speaks cp1252. :p > > On Tue, Nov 4, 2014 at 9:14 PM, Bob Haffner wrote: > > > Hey gang, > > > > I got a script running in 2.7 that checks a website daily, finds some > info > > and then sends some messages (email and text) through gmail. > > > > Pretty simple and runs without any problems... most of the time. > > > > When it does have problems its usually because of some funky character > (ex: > > ×) in the html. These cause problems when searching for keywords or > > with the gmail portion. > > > > Doing a .encode('utf-8') seemed to help with the crashing while sending, > > but the characters still come across funny. > > > > Any advice? > > > > -bob > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > > > > -- > Best, > > Jeff Hinrichs > 402.218.1473 > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From jeffh at dundeemt.com Wed Nov 5 06:57:29 2014 From: jeffh at dundeemt.com (Jeff Hinrichs - DM&T) Date: Tue, 4 Nov 2014 23:57:29 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: If the character(s) in question don't convey meaning/context, you could potentially replace/remove those characters. Something like: def scrub(buf): bad_things = ['×', ...] for bad in bad_things: buf = buf.replace(bad, '') return buf or it could be a replacement censored = {'sad': 'happy', ...} for bad in censored.keys(): buf = buf.replace(bad, censored[bad]) ... On Tue, Nov 4, 2014 at 10:24 PM, Bob Haffner wrote: > Hey Jeff thanks for the input > > I'm using requests. As far as the message, plain text. I'm assuming i > have to do that cause I'm sending a mix of texts and emails. > > When i did encode it the crashes stopped, but the funky output persisted. > > Yeah, I think thats exactly what's going on. Meaning, the copy and pasting > of some cool chars. > > > > > > On Tue, Nov 4, 2014 at 9:25 PM, Jeff Hinrichs - DM&T > wrote: > > > What library are you using? Built-in, beautiful soup, requests? and then > > are you sending the information in a plain-text email or an html email? > > Plain-text won't be able to display extended characters without some > > encoding in the message. Others can chime in here, but it seems that you > > either have to transmit those chars in a format that can handle them or > if > > you are using plain-text, remove them completely or substitute another > > character for them. Ahh, the joys of glyphs - or forget english, > everyone > > speak ascii :)0 > > > > Almost as enjoyable as users who cut and paste random things from the > > internet and then save them to an accounting database via windows who > > speaks cp1252. :p > > > > On Tue, Nov 4, 2014 at 9:14 PM, Bob Haffner > wrote: > > > > > Hey gang, > > > > > > I got a script running in 2.7 that checks a website daily, finds some > > info > > > and then sends some messages (email and text) through gmail. > > > > > > Pretty simple and runs without any problems... most of the time. > > > > > > When it does have problems its usually because of some funky character > > (ex: > > > ×) in the html. These cause problems when searching for keywords > or > > > with the gmail portion. > > > > > > Doing a .encode('utf-8') seemed to help with the crashing while > sending, > > > but the characters still come across funny. > > > > > > Any advice? > > > > > > -bob > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > > > > > > > -- > > Best, > > > > Jeff Hinrichs > > 402.218.1473 > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -- Best, Jeff Hinrichs 402.218.1473 From wes.turner at gmail.com Wed Nov 5 08:01:18 2014 From: wes.turner at gmail.com (Wes Turner) Date: Wed, 5 Nov 2014 01:01:18 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: If it is a charset issue, these packages and documentation links may be helpful for working with unicode characters and HTML named entities in email with Python 2.7: * http://dev.w3.org/html5/html-author/charref * http://www.w3.org/html/wg/drafts/html/master/syntax.html#named-character-references * https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references * https://pypi.python.org/pypi/namedentities * https://bitbucket.org/jeunice/namedentities * https://docs.python.org/2/howto/unicode.html * http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ * https://pypi.python.org/pypi/chardet * https://github.com/chardet/chardet * https://chardet.github.io/chardet/ On Tue, Nov 4, 2014 at 11:57 PM, Jeff Hinrichs - DM&T wrote: > If the character(s) in question don't convey meaning/context, you could > potentially replace/remove those characters. Something like: > > def scrub(buf): > bad_things = ['×', ...] > for bad in bad_things: > buf = buf.replace(bad, '') > return buf > > or it could be a replacement > > censored = {'sad': 'happy', ...} > for bad in censored.keys(): > buf = buf.replace(bad, censored[bad]) > > > ... > > > > On Tue, Nov 4, 2014 at 10:24 PM, Bob Haffner > wrote: > > > Hey Jeff thanks for the input > > > > I'm using requests. As far as the message, plain text. I'm assuming i > > have to do that cause I'm sending a mix of texts and emails. > > > > When i did encode it the crashes stopped, but the funky output persisted. > > > > Yeah, I think thats exactly what's going on. Meaning, the copy and > pasting > > of some cool chars. > > > > > > > > > > > > On Tue, Nov 4, 2014 at 9:25 PM, Jeff Hinrichs - DM&T > > > wrote: > > > > > What library are you using? Built-in, beautiful soup, requests? and > then > > > are you sending the information in a plain-text email or an html email? > > > Plain-text won't be able to display extended characters without some > > > encoding in the message. Others can chime in here, but it seems that > you > > > either have to transmit those chars in a format that can handle them or > > if > > > you are using plain-text, remove them completely or substitute another > > > character for them. Ahh, the joys of glyphs - or forget english, > > everyone > > > speak ascii :)0 > > > > > > Almost as enjoyable as users who cut and paste random things from the > > > internet and then save them to an accounting database via windows who > > > speaks cp1252. :p > > > > > > On Tue, Nov 4, 2014 at 9:14 PM, Bob Haffner > > wrote: > > > > > > > Hey gang, > > > > > > > > I got a script running in 2.7 that checks a website daily, finds some > > > info > > > > and then sends some messages (email and text) through gmail. > > > > > > > > Pretty simple and runs without any problems... most of the time. > > > > > > > > When it does have problems its usually because of some funky > character > > > (ex: > > > > ×) in the html. These cause problems when searching for keywords > > or > > > > with the gmail portion. > > > > > > > > Doing a .encode('utf-8') seemed to help with the crashing while > > sending, > > > > but the characters still come across funny. > > > > > > > > Any advice? > > > > > > > > -bob > > > > _______________________________________________ > > > > Omaha Python Users Group mailing list > > > > Omaha at python.org > > > > https://mail.python.org/mailman/listinfo/omaha > > > > http://www.OmahaPython.org > > > > > > > > > > > > > > > > -- > > > Best, > > > > > > Jeff Hinrichs > > > 402.218.1473 > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > > > > -- > Best, > > Jeff Hinrichs > 402.218.1473 > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -- Wes Turner https://westurner.github.io/ From wes.turner at gmail.com Wed Nov 5 08:11:39 2014 From: wes.turner at gmail.com (Wes Turner) Date: Wed, 5 Nov 2014 01:11:39 -0600 Subject: [omaha] Languages, fonts, scripts? In-Reply-To: References: Message-ID: This sounds like something that would be good to also report to the reportlab mailing list? I'm sure they'd be happy ot have an additional test case. http://www.reportlab.com/software/documentation/faq/#2.6.2 ("Fonts" fails to link to the relevant pages in the User Guide) * https://groups.google.com/forum/#!forum/reportlab-users * http://two.pairlist.net/mailman/listinfo/reportlab-users On Tue, Nov 4, 2014 at 7:19 PM, Steve Young wrote: > I did not try css and html with Reportlab or xhtml2pdf. I was using > platypus and strings. > > What happens with the fonts are interesting. When typing the first letter > it appears normally, when the 2nd (dependent) letter is pressed the first > font shifts/changes to appropriate set of characters. I am guessing that > the way reportlabs processes the strings it is not taking advantage of the > OS's ability to deal with the scripts. > > It is possible that xhtml2pdf will work, I just did not try. WeasyPrint > had a feature or 2 that xhtml2pdf did not, so I gave it a try. > > I really liked platypus because it was fairly easy to format the layout > exactly like I needed. I am just beginning to try with weasyprint so I > don't know how successful I will be. > > > On Mon, Nov 3, 2014 at 8:54 PM, Jeff Hinrichs - DM&T > wrote: > > > Not that you should change your solution, but a quesiton. If you use > > css+html, what is displayed in the browser? And if it is correct, I > would > > think that reportlab would get it right. In fonts, there is no adding of > > fonts, it would have to replace the two glyphs with another from the > font's > > glyph table. ?? > > -j > > > > On Mon, Nov 3, 2014 at 8:22 PM, Steve Young > > wrote: > > > > > In case anyone needs to deal with this in the future: > > > > > > Some languages have some advanced scripts - for example Hindi has > > > 'dependent vowels': > > > In some words, written vowels change their form in order to join up > with > > > consonants. > > > > > > - With ?i?: ? ? ?? [ki] is a combination of ? + ? (k + i). The > character > > ? > > > is > > > added to the left and above. > > > > > > There are about a dozen of these rules. When typing the Hindi word > ????? > > > ('book' in English) you press ? then ? and the result is ??. > > > > > > Reportlabs does not seem to know the rule, and prints ? ?. I have not > > been > > > able to figure exactly why reportlabs fails, so I started trying other > > > solutions. (kind of a bummer, because up to that point I liked working > > with > > > it) > > > > > > On the web, using font-families helps solve the problem of missing > > glyphs, > > > as there can be many fonts in a family. (there are still too many > glyphs > > to > > > put all the languages into a single font) and most OS's since around > 2006 > > > recognize most of the world's languages. > > > > > > I looked at xhtml2pdf but it uses the reportlab toolkit so I thought it > > > might have the same problem, and moved on to WeasyPrint. Like > xhtml2pdf > > It > > > uses html and css to format the output, and pycairo to save to a pdf. > > > Pycairo seems to convert the text to vector graphics so I don't have to > > > worry about embedding fonts. I sent a pdf sample to the printer for > > > approval and keeping my fingers crossed. > > > > > > On Sat, Oct 25, 2014 at 11:46 AM, Jeff Hinrichs - DM&T < > > jeffh at dundeemt.com > > > > > > > wrote: > > > > > > > In general, for the web, you need to always think about graceful > > > > degradation. Our designers, who generally work in print, or like to > > > submit > > > > a graphic, tend to specify individual fonts, without considering what > > > > happens if a specified font is not available to the users browser. > > > > > > > > http://ffffallback.com/ > > > > > http://blog.typekit.com/2011/03/24/type-study-choosing-fallback-fonts/ > > > > > > > > -j > > > > > > > > On Sat, Oct 25, 2014 at 9:33 AM, Steve Young < > > wereapwhatwesow at gmail.com> > > > > wrote: > > > > > > > > > Sorry for the run on thread. > > > > > > > > > > For example on my site I have: > > > > > > > > > > font-family: "Lucida Grande", Verdana, Arial, sans-serif; > > > > > > > > > > and this has so far been able to display all the text properly in > its > > > > > respective languages. > > > > > > > > > > On Sat, Oct 25, 2014 at 9:26 AM, Steve Young < > > > wereapwhatwesow at gmail.com> > > > > > wrote: > > > > > > > > > > > I just found this > > https://code.google.com/p/noto/issues/detail?id=13 > > > , > > > > > > which describes my question exactly. And gives the answer that, > no, > > > > there > > > > > > is not on font to rule them all, and I am going to have to deal > > with > > > > > > multiple fonts creating my PDFs. > > > > > > > > > > > > But can someone answer how the website manages this? Does it > have > > > > > > something to do with specifying font families instead of > individual > > > > > fonts? > > > > > > > > > > > > On Sat, Oct 25, 2014 at 9:13 AM, Steve Young < > > > > wereapwhatwesow at gmail.com> > > > > > > wrote: > > > > > > > > > > > >> Question about fonts: > > > > > >> > > > > > >> Still working on a flashcard site with Django 1.7 and python > 3.3. > > > So > > > > > far > > > > > >> the website has handled all the text in latin, cyrillic, arabic, > > > > hindi, > > > > > >> without a hitch. I copy the text and paste it into the django > > admin > > > > for > > > > > >> that field and it just works. > > > > > >> > > > > > >> I thought this magic was working because of unicode fonts, but > > while > > > > > >> working with reportlab and creating pdfs the magic goes away > and I > > > > have > > > > > to > > > > > >> choose fonts that contain the correct characters for the > > languages. > > > > > >> > > > > > >> Has anyone worked with languages and can point me in the right > > > > direction > > > > > >> to learn about this? > > > > > >> > > > > > >> Thanks. > > > > > >> > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Omaha Python Users Group mailing list > > > > > Omaha at python.org > > > > > https://mail.python.org/mailman/listinfo/omaha > > > > > http://www.OmahaPython.org > > > > > > > > > > > > > > > > > > > > > -- > > > > Best, > > > > > > > > Jeff Hinrichs > > > > 402.218.1473 > > > > _______________________________________________ > > > > Omaha Python Users Group mailing list > > > > Omaha at python.org > > > > https://mail.python.org/mailman/listinfo/omaha > > > > http://www.OmahaPython.org > > > > > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > > > > > > > -- > > Best, > > > > Jeff Hinrichs > > 402.218.1473 > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -- Wes Turner https://westurner.github.io/ From bob.haffner at gmail.com Wed Nov 5 14:07:48 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Wed, 5 Nov 2014 07:07:48 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: Thanks Jeff! Wes, appreciate the links. I should've mentioned this in the original email. Going to python3 is an option with this. Would life be easier? On Wed, Nov 5, 2014 at 1:01 AM, Wes Turner wrote: > If it is a charset issue, these packages and documentation links may be > helpful for working with unicode characters and HTML named entities in > email with Python 2.7: > > > * http://dev.w3.org/html5/html-author/charref > * > > http://www.w3.org/html/wg/drafts/html/master/syntax.html#named-character-references > * > > https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references > > * https://pypi.python.org/pypi/namedentities > * https://bitbucket.org/jeunice/namedentities > > * https://docs.python.org/2/howto/unicode.html > * http://lucumr.pocoo.org/2014/5/12/everything-about-unicode/ > > * https://pypi.python.org/pypi/chardet > * https://github.com/chardet/chardet > * https://chardet.github.io/chardet/ > > > > > On Tue, Nov 4, 2014 at 11:57 PM, Jeff Hinrichs - DM&T > wrote: > > > If the character(s) in question don't convey meaning/context, you could > > potentially replace/remove those characters. Something like: > > > > def scrub(buf): > > bad_things = ['×', ...] > > for bad in bad_things: > > buf = buf.replace(bad, '') > > return buf > > > > or it could be a replacement > > > > censored = {'sad': 'happy', ...} > > for bad in censored.keys(): > > buf = buf.replace(bad, censored[bad]) > > > > > > ... > > > > > > > > On Tue, Nov 4, 2014 at 10:24 PM, Bob Haffner > > wrote: > > > > > Hey Jeff thanks for the input > > > > > > I'm using requests. As far as the message, plain text. I'm assuming i > > > have to do that cause I'm sending a mix of texts and emails. > > > > > > When i did encode it the crashes stopped, but the funky output > persisted. > > > > > > Yeah, I think thats exactly what's going on. Meaning, the copy and > > pasting > > > of some cool chars. > > > > > > > > > > > > > > > > > > On Tue, Nov 4, 2014 at 9:25 PM, Jeff Hinrichs - DM&T < > jeffh at dundeemt.com > > > > > > wrote: > > > > > > > What library are you using? Built-in, beautiful soup, requests? and > > then > > > > are you sending the information in a plain-text email or an html > email? > > > > Plain-text won't be able to display extended characters without some > > > > encoding in the message. Others can chime in here, but it seems that > > you > > > > either have to transmit those chars in a format that can handle them > or > > > if > > > > you are using plain-text, remove them completely or substitute > another > > > > character for them. Ahh, the joys of glyphs - or forget english, > > > everyone > > > > speak ascii :)0 > > > > > > > > Almost as enjoyable as users who cut and paste random things from the > > > > internet and then save them to an accounting database via windows who > > > > speaks cp1252. :p > > > > > > > > On Tue, Nov 4, 2014 at 9:14 PM, Bob Haffner > > > wrote: > > > > > > > > > Hey gang, > > > > > > > > > > I got a script running in 2.7 that checks a website daily, finds > some > > > > info > > > > > and then sends some messages (email and text) through gmail. > > > > > > > > > > Pretty simple and runs without any problems... most of the time. > > > > > > > > > > When it does have problems its usually because of some funky > > character > > > > (ex: > > > > > ×) in the html. These cause problems when searching for > keywords > > > or > > > > > with the gmail portion. > > > > > > > > > > Doing a .encode('utf-8') seemed to help with the crashing while > > > sending, > > > > > but the characters still come across funny. > > > > > > > > > > Any advice? > > > > > > > > > > -bob > > > > > _______________________________________________ > > > > > Omaha Python Users Group mailing list > > > > > Omaha at python.org > > > > > https://mail.python.org/mailman/listinfo/omaha > > > > > http://www.OmahaPython.org > > > > > > > > > > > > > > > > > > > > > -- > > > > Best, > > > > > > > > Jeff Hinrichs > > > > 402.218.1473 > > > > _______________________________________________ > > > > Omaha Python Users Group mailing list > > > > Omaha at python.org > > > > https://mail.python.org/mailman/listinfo/omaha > > > > http://www.OmahaPython.org > > > > > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > > > > > > > -- > > Best, > > > > Jeff Hinrichs > > 402.218.1473 > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > > > > -- > Wes Turner > https://westurner.github.io/ > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From eric.edens at gmail.com Wed Nov 5 18:17:37 2014 From: eric.edens at gmail.com (Eric Edens) Date: Wed, 5 Nov 2014 11:17:37 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: Hey Bob! It sounds like you want to unescape sequences such as `<` back to their ASCII / unicode equivalent? urllib's unquote should take care of that. [1]. If you want to further standardize stuff, you can fold accents (caf? to cafe) using ASCII dammit [2]. Does this help? Eric 1. https://docs.python.org/2/library/urllib.html#urllib.unquote 2. https://github.com/tnajdek/ASCII--Dammit On Tue, Nov 4, 2014 at 9:14 PM, Bob Haffner wrote: > Hey gang, > > I got a script running in 2.7 that checks a website daily, finds some info > and then sends some messages (email and text) through gmail. > > Pretty simple and runs without any problems... most of the time. > > When it does have problems its usually because of some funky character (ex: > ×) in the html. These cause problems when searching for keywords or > with the gmail portion. > > Doing a .encode('utf-8') seemed to help with the crashing while sending, > but the characters still come across funny. > > Any advice? > > -bob > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org From eric.edens at gmail.com Wed Nov 5 18:27:15 2014 From: eric.edens at gmail.com (Eric Edens) Date: Wed, 5 Nov 2014 11:27:15 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: Whoops, ASCII dammit won't help with accent folding (but it could be helpful here). For accent folding, take a look at unicodedata [1]. - Eric 1. http://stackoverflow.com/a/517974 From bob.haffner at gmail.com Wed Nov 5 19:01:02 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Wed, 5 Nov 2014 12:01:02 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: Yes, that would be ideal. I'll give these a look. Thanks Eric! On Wed, Nov 5, 2014 at 11:27 AM, Eric Edens wrote: > Whoops, ASCII dammit won't help with accent folding (but it could be > helpful here). For accent folding, take a look at unicodedata [1]. > > - Eric > > 1. http://stackoverflow.com/a/517974 > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From eric.edens at gmail.com Wed Nov 5 19:09:47 2014 From: eric.edens at gmail.com (Eric Edens) Date: Wed, 5 Nov 2014 12:09:47 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: No problem! Last correction -- the urllib.unquote handles url-encoding, not html-encoding! HTMLParser.unescape will handle the HTML-encoded sequences. http://stackoverflow.com/a/2087433 -- Eric On Wed, Nov 5, 2014 at 12:01 PM, Bob Haffner wrote: > Yes, that would be ideal. I'll give these a look. > > Thanks Eric! > > On Wed, Nov 5, 2014 at 11:27 AM, Eric Edens wrote: > >> Whoops, ASCII dammit won't help with accent folding (but it could be >> helpful here). For accent folding, take a look at unicodedata [1]. >> >> - Eric >> >> 1. http://stackoverflow.com/a/517974 >> _______________________________________________ >> Omaha Python Users Group mailing list >> Omaha at python.org >> https://mail.python.org/mailman/listinfo/omaha >> http://www.OmahaPython.org >> > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org From wes.turner at gmail.com Wed Nov 5 20:10:24 2014 From: wes.turner at gmail.com (Wes Turner) Date: Wed, 5 Nov 2014 13:10:24 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: On Nov 5, 2014 12:09 PM, "Eric Edens" wrote: > > No problem! > > Last correction -- the urllib.unquote handles url-encoding, not > html-encoding! HTMLParser.unescape will handle the HTML-encoded > sequences. http://stackoverflow.com/a/2087433 Is this what https://pypi.python.org/pypi/namedentities does? From eric.edens at gmail.com Wed Nov 5 20:37:08 2014 From: eric.edens at gmail.com (Eric Edens) Date: Wed, 5 Nov 2014 13:37:08 -0600 Subject: [omaha] Web scraping and funky characters In-Reply-To: References: Message-ID: Hey Wes, Yeah! Good catch! It looks like HTMLParser.unescape [1] and namedentities.unescape [2] both handle named entities (©) and numerical entities (;©). The only difference I see is that HTMLParser ignores ' and namedentities ignores < > and &. -- Eric 1. https://github.com/python-git/python/blob/715a6e5035bb21ac49382772076ec4c630d6e960/Lib/HTMLParser.py#L362 2. https://bitbucket.org/jeunice/namedentities/src/da4a9889c8509352aa691b7375a1ca6b716a528f/namedentities/core.py?at=default#cl-18 From keckbug at gmail.com Fri Nov 14 22:29:11 2014 From: keckbug at gmail.com (Aaron Keck) Date: Fri, 14 Nov 2014 15:29:11 -0600 Subject: [omaha] with blocks and conditions Message-ID: I've found myself trying to find a cleaner way of doing this: if *condition_is_true*: with *file* as *fp:* * do_stuff()* else: * do_stuff()* Is there a reasonable way to wrap some code using *with* but only in certain circumstances? Most of the scenarios I've bumped up against have had some sort of alternate solution that works well, but I'm still curious. -Aaron From davidgilman1 at gmail.com Fri Nov 14 23:23:48 2014 From: davidgilman1 at gmail.com (David Gilman) Date: Fri, 14 Nov 2014 16:23:48 -0600 Subject: [omaha] with blocks and conditions In-Reply-To: References: Message-ID: For Python 3.3 and onward, you have contextlib.ExitStack. with ExitStack() as stack: if condition: stack.push(open(path)) do_stuff() On Fri, Nov 14, 2014 at 3:29 PM, Aaron Keck wrote: > I've found myself trying to find a cleaner way of doing this: > > if *condition_is_true*: > with *file* as *fp:* > * do_stuff()* > else: > * do_stuff()* > > > Is there a reasonable way to wrap some code using *with* but only in > certain circumstances? Most of the scenarios I've bumped up against have > had some sort of alternate solution that works well, but I'm still curious. > > > -Aaron > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org -- David Gilman :DG< From jeffh at delasco.com Sat Nov 15 05:31:43 2014 From: jeffh at delasco.com (Jeff Hinrichs) Date: Fri, 14 Nov 2014 22:31:43 -0600 Subject: [omaha] with blocks and conditions In-Reply-To: References: Message-ID: does do_stuff() do anything with the file? or the file contents? Seems like things are switch-a-roo'd. Maybe do_stuff() does too much? if condition_is true: file = blah else: file = None do_stuff(file=file, ...) Even that seems ugly. Can you flesh out a slightly more detailed -Jeff On Fri, Nov 14, 2014 at 3:29 PM, Aaron Keck wrote: > I've found myself trying to find a cleaner way of doing this: > > if *condition_is_true*: > with *file* as *fp:* > * do_stuff()* > else: > * do_stuff()* > > > Is there a reasonable way to wrap some code using *with* but only in > certain circumstances? Most of the scenarios I've bumped up against have > had some sort of alternate solution that works well, but I'm still curious. > > > -Aaron > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From keckbug at gmail.com Sat Nov 15 06:46:17 2014 From: keckbug at gmail.com (Aaron Keck) Date: Fri, 14 Nov 2014 23:46:17 -0600 Subject: [omaha] with blocks and conditions In-Reply-To: References: Message-ID: As a little more context, here's a few of the use cases I came across. I understand there are certainly other ways to structure these to avoid my problem, but it made me curious nonetheless. Case 1 - Some bit of code needs to run. Normally, print the output to the console, but if a flag of some sort is set, write things to a file instead. Case 2 - I wrote (stole) some relatively handy code to impersonate another user on Windows, and I wrapped it with __enter__ and __exit__ blocks. My code reads credentials from a configuration file, and if a credential exists for a particular run, I want to impersonate that user. If there isn't any credentials configured, just keep running as the current user. Case 3 - Some bit of code does some processing. Sometimes the input is a file, other times the input is simply text Now in many of these cases, I can resolve this by putting the logic in an input agnostic "do stuff" function, but typically the "do stuff" comprises the majority of the function I'm working with, and the with statement is purely intended to alter the environment that it's running in. On Fri, Nov 14, 2014 at 10:31 PM, Jeff Hinrichs wrote: > does do_stuff() do anything with the file? or the file contents? Seems > like things are switch-a-roo'd. > Maybe do_stuff() does too much? > > if condition_is true: > file = blah > else: > file = None > > do_stuff(file=file, ...) > > Even that seems ugly. Can you flesh out a slightly more detailed > > -Jeff > > On Fri, Nov 14, 2014 at 3:29 PM, Aaron Keck wrote: > > > I've found myself trying to find a cleaner way of doing this: > > > > if *condition_is_true*: > > with *file* as *fp:* > > * do_stuff()* > > else: > > * do_stuff()* > > > > > > Is there a reasonable way to wrap some code using *with* but only in > > certain circumstances? Most of the scenarios I've bumped up against have > > had some sort of alternate solution that works well, but I'm still > curious. > > > > > > -Aaron > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From jeffh at delasco.com Sat Nov 15 07:36:04 2014 From: jeffh at delasco.com (Jeff Hinrichs) Date: Sat, 15 Nov 2014 00:36:04 -0600 Subject: [omaha] with blocks and conditions In-Reply-To: References: Message-ID: case 3 - file or a string, use IO to convert string to a file like object, then you can handle both in the same fashion (Python 3 only, Python 2 - cStringIO is not context aware so you have to write a wrapper for it. import io>>> with io.BytesIO(b"foo") as f: f.read() case 1 - Logging module, console, file, both or more. case 2 - modify code to handle missing config or credentials is None. Since you wrapped it and are handling __enter__/__exit__ I'd imagine this is possible. The point being, is the code can follow one of 2 code paths in all of these cases. If you can collapse the paths to a single one, readability goes up and testing is easier (IMO). In general the pattern if foo: ... do_something() else: do_something() has a certain smell to it that I've grown to dislike and I prefer: if foo: ... do_something() i.e. if is_file: fobject = open(name, encoding) else: fobject = io.BytesIO(buffer) with fobject as f: do_something(f) -Jeff On Fri, Nov 14, 2014 at 11:46 PM, Aaron Keck wrote: > As a little more context, here's a few of the use cases I came across. I > understand there are certainly other ways to structure these to avoid my > problem, but it made me curious nonetheless. > > Case 1 - Some bit of code needs to run. Normally, print the output to the > console, but if a flag of some sort is set, write things to a file instead. > > Case 2 - I wrote (stole) some relatively handy code to impersonate another > user on Windows, and I wrapped it with __enter__ and __exit__ blocks. My > code reads credentials from a configuration file, and if a credential > exists for a particular run, I want to impersonate that user. If there > isn't any credentials configured, just keep running as the current user. > > Case 3 - Some bit of code does some processing. Sometimes the input is a > file, other times the input is simply text > > > Now in many of these cases, I can resolve this by putting the logic in an > input agnostic "do stuff" function, but typically the "do stuff" comprises > the majority of the function I'm working with, and the with statement is > purely intended to alter the environment that it's running in. > > On Fri, Nov 14, 2014 at 10:31 PM, Jeff Hinrichs wrote: > > > does do_stuff() do anything with the file? or the file contents? Seems > > like things are switch-a-roo'd. > > Maybe do_stuff() does too much? > > > > if condition_is true: > > file = blah > > else: > > file = None > > > > do_stuff(file=file, ...) > > > > Even that seems ugly. Can you flesh out a slightly more detailed > > > > -Jeff > > > > On Fri, Nov 14, 2014 at 3:29 PM, Aaron Keck wrote: > > > > > I've found myself trying to find a cleaner way of doing this: > > > > > > if *condition_is_true*: > > > with *file* as *fp:* > > > * do_stuff()* > > > else: > > > * do_stuff()* > > > > > > > > > Is there a reasonable way to wrap some code using *with* but only in > > > certain circumstances? Most of the scenarios I've bumped up against > have > > > had some sort of alternate solution that works well, but I'm still > > curious. > > > > > > > > > -Aaron > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From wereapwhatwesow at gmail.com Tue Nov 18 00:32:23 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Mon, 17 Nov 2014 17:32:23 -0600 Subject: [omaha] November Meeting Wednesday 11/17 Message-ID: Meeting Location: @Aaron - are you and a room available? Please respond if you are planning to attend. Thanks, Steve From keckbug at gmail.com Tue Nov 18 00:39:30 2014 From: keckbug at gmail.com (Aaron Keck) Date: Mon, 17 Nov 2014 17:39:30 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: Message-ID: Unfortunately, I'll have to sit this one out due to some family plans. On Mon, Nov 17, 2014 at 5:32 PM, Steve Young wrote: > Meeting Location: @Aaron - are you and a room available? > > Please respond if you are planning to attend. > > Thanks, > > Steve > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From wereapwhatwesow at gmail.com Tue Nov 18 01:28:26 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Mon, 17 Nov 2014 18:28:26 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: Message-ID: I have a room available downtown at my office at 1516 Cuming Street. Projector, whiteboard, similar to Aaron's but not as fancy. Or we can get a count of who is coming and choose a site convenient to all. I will be coming from 42nd and Center. It would be nice to meet this month - in the past we usually end up skipping December due to busy schedules. On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck wrote: > Unfortunately, I'll have to sit this one out due to some family plans. > > On Mon, Nov 17, 2014 at 5:32 PM, Steve Young > wrote: > > > Meeting Location: @Aaron - are you and a room available? > > > > Please respond if you are planning to attend. > > > > Thanks, > > > > Steve > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From varun.sagi20 at gmail.com Tue Nov 18 01:29:33 2014 From: varun.sagi20 at gmail.com (Varun Mehta) Date: Mon, 17 Nov 2014 18:29:33 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: Message-ID: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> I?ll be coming. Thanks Varun On Nov 17, 2014, at 6:28 PM, Steve Young wrote: > I have a room available downtown at my office at 1516 Cuming Street. > Projector, whiteboard, similar to Aaron's but not as fancy. > > Or we can get a count of who is coming and choose a site convenient to > all. I will be coming from 42nd and Center. > > It would be nice to meet this month - in the past we usually end up > skipping December due to busy schedules. > > On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck wrote: > >> Unfortunately, I'll have to sit this one out due to some family plans. >> >> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young >> wrote: >> >>> Meeting Location: @Aaron - are you and a room available? >>> >>> Please respond if you are planning to attend. >>> >>> Thanks, >>> >>> Steve >>> _______________________________________________ >>> Omaha Python Users Group mailing list >>> Omaha at python.org >>> https://mail.python.org/mailman/listinfo/omaha >>> http://www.OmahaPython.org >>> >> _______________________________________________ >> Omaha Python Users Group mailing list >> Omaha at python.org >> https://mail.python.org/mailman/listinfo/omaha >> http://www.OmahaPython.org >> > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org From bob.haffner at gmail.com Tue Nov 18 04:14:04 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Mon, 17 Nov 2014 21:14:04 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> References: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> Message-ID: <44555B5D-5512-4E91-993D-D21464BDD6FD@gmail.com> I'm in Sent from my iPhone > On Nov 17, 2014, at 6:29 PM, Varun Mehta wrote: > > I?ll be coming. > > Thanks > Varun > >> On Nov 17, 2014, at 6:28 PM, Steve Young wrote: >> >> I have a room available downtown at my office at 1516 Cuming Street. >> Projector, whiteboard, similar to Aaron's but not as fancy. >> >> Or we can get a count of who is coming and choose a site convenient to >> all. I will be coming from 42nd and Center. >> >> It would be nice to meet this month - in the past we usually end up >> skipping December due to busy schedules. >> >>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck wrote: >>> >>> Unfortunately, I'll have to sit this one out due to some family plans. >>> >>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young >>> wrote: >>> >>>> Meeting Location: @Aaron - are you and a room available? >>>> >>>> Please respond if you are planning to attend. >>>> >>>> Thanks, >>>> >>>> Steve >>>> _______________________________________________ >>>> Omaha Python Users Group mailing list >>>> Omaha at python.org >>>> https://mail.python.org/mailman/listinfo/omaha >>>> http://www.OmahaPython.org >>> _______________________________________________ >>> Omaha Python Users Group mailing list >>> Omaha at python.org >>> https://mail.python.org/mailman/listinfo/omaha >>> http://www.OmahaPython.org >> _______________________________________________ >> Omaha Python Users Group mailing list >> Omaha at python.org >> https://mail.python.org/mailman/listinfo/omaha >> http://www.OmahaPython.org > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org From jeffh at dundeemt.com Tue Nov 18 04:53:59 2014 From: jeffh at dundeemt.com (Jeff Hinrichs - DM&T) Date: Mon, 17 Nov 2014 21:53:59 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: <44555B5D-5512-4E91-993D-D21464BDD6FD@gmail.com> References: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> <44555B5D-5512-4E91-993D-D21464BDD6FD@gmail.com> Message-ID: unfortunately, I will miss this meeting. Drat. On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner wrote: > I'm in > > Sent from my iPhone > > > On Nov 17, 2014, at 6:29 PM, Varun Mehta wrote: > > > > I?ll be coming. > > > > Thanks > > Varun > > > >> On Nov 17, 2014, at 6:28 PM, Steve Young > wrote: > >> > >> I have a room available downtown at my office at 1516 Cuming Street. > >> Projector, whiteboard, similar to Aaron's but not as fancy. > >> > >> Or we can get a count of who is coming and choose a site convenient to > >> all. I will be coming from 42nd and Center. > >> > >> It would be nice to meet this month - in the past we usually end up > >> skipping December due to busy schedules. > >> > >>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck wrote: > >>> > >>> Unfortunately, I'll have to sit this one out due to some family plans. > >>> > >>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < > wereapwhatwesow at gmail.com> > >>> wrote: > >>> > >>>> Meeting Location: @Aaron - are you and a room available? > >>>> > >>>> Please respond if you are planning to attend. > >>>> > >>>> Thanks, > >>>> > >>>> Steve > >>>> _______________________________________________ > >>>> Omaha Python Users Group mailing list > >>>> Omaha at python.org > >>>> https://mail.python.org/mailman/listinfo/omaha > >>>> http://www.OmahaPython.org > >>> _______________________________________________ > >>> Omaha Python Users Group mailing list > >>> Omaha at python.org > >>> https://mail.python.org/mailman/listinfo/omaha > >>> http://www.OmahaPython.org > >> _______________________________________________ > >> Omaha Python Users Group mailing list > >> Omaha at python.org > >> https://mail.python.org/mailman/listinfo/omaha > >> http://www.OmahaPython.org > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -- Best, Jeff Hinrichs 402.218.1473 From bob.haffner at gmail.com Tue Nov 18 18:14:02 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Tue, 18 Nov 2014 11:14:02 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> <44555B5D-5512-4E91-993D-D21464BDD6FD@gmail.com> Message-ID: Steve and Varun, How about that Panera off of 78th and Dodge? Meeting at Steve's office would work too. Bob On Mon, Nov 17, 2014 at 9:53 PM, Jeff Hinrichs - DM&T wrote: > unfortunately, I will miss this meeting. Drat. > > On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner > wrote: > > > I'm in > > > > Sent from my iPhone > > > > > On Nov 17, 2014, at 6:29 PM, Varun Mehta > wrote: > > > > > > I?ll be coming. > > > > > > Thanks > > > Varun > > > > > >> On Nov 17, 2014, at 6:28 PM, Steve Young > > wrote: > > >> > > >> I have a room available downtown at my office at 1516 Cuming Street. > > >> Projector, whiteboard, similar to Aaron's but not as fancy. > > >> > > >> Or we can get a count of who is coming and choose a site convenient to > > >> all. I will be coming from 42nd and Center. > > >> > > >> It would be nice to meet this month - in the past we usually end up > > >> skipping December due to busy schedules. > > >> > > >>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck > wrote: > > >>> > > >>> Unfortunately, I'll have to sit this one out due to some family > plans. > > >>> > > >>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < > > wereapwhatwesow at gmail.com> > > >>> wrote: > > >>> > > >>>> Meeting Location: @Aaron - are you and a room available? > > >>>> > > >>>> Please respond if you are planning to attend. > > >>>> > > >>>> Thanks, > > >>>> > > >>>> Steve > > >>>> _______________________________________________ > > >>>> Omaha Python Users Group mailing list > > >>>> Omaha at python.org > > >>>> https://mail.python.org/mailman/listinfo/omaha > > >>>> http://www.OmahaPython.org > > >>> _______________________________________________ > > >>> Omaha Python Users Group mailing list > > >>> Omaha at python.org > > >>> https://mail.python.org/mailman/listinfo/omaha > > >>> http://www.OmahaPython.org > > >> _______________________________________________ > > >> Omaha Python Users Group mailing list > > >> Omaha at python.org > > >> https://mail.python.org/mailman/listinfo/omaha > > >> http://www.OmahaPython.org > > > > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > > > > -- > Best, > > Jeff Hinrichs > 402.218.1473 > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From varun.sagi20 at gmail.com Tue Nov 18 18:17:43 2014 From: varun.sagi20 at gmail.com (Varun Mehta) Date: Tue, 18 Nov 2014 11:17:43 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> <44555B5D-5512-4E91-993D-D21464BDD6FD@gmail.com> Message-ID: Fine with any place. Varun On Nov 18, 2014, at 11:14 AM, Bob Haffner wrote: > Steve and Varun, > > How about that Panera off of 78th and Dodge? Meeting at Steve's office > would work too. > > Bob > > On Mon, Nov 17, 2014 at 9:53 PM, Jeff Hinrichs - DM&T > wrote: > >> unfortunately, I will miss this meeting. Drat. >> >> On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner >> wrote: >> >>> I'm in >>> >>> Sent from my iPhone >>> >>>> On Nov 17, 2014, at 6:29 PM, Varun Mehta >> wrote: >>>> >>>> I?ll be coming. >>>> >>>> Thanks >>>> Varun >>>> >>>>> On Nov 17, 2014, at 6:28 PM, Steve Young >>> wrote: >>>>> >>>>> I have a room available downtown at my office at 1516 Cuming Street. >>>>> Projector, whiteboard, similar to Aaron's but not as fancy. >>>>> >>>>> Or we can get a count of who is coming and choose a site convenient to >>>>> all. I will be coming from 42nd and Center. >>>>> >>>>> It would be nice to meet this month - in the past we usually end up >>>>> skipping December due to busy schedules. >>>>> >>>>>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck >> wrote: >>>>>> >>>>>> Unfortunately, I'll have to sit this one out due to some family >> plans. >>>>>> >>>>>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < >>> wereapwhatwesow at gmail.com> >>>>>> wrote: >>>>>> >>>>>>> Meeting Location: @Aaron - are you and a room available? >>>>>>> >>>>>>> Please respond if you are planning to attend. >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Steve >>>>>>> _______________________________________________ >>>>>>> Omaha Python Users Group mailing list >>>>>>> Omaha at python.org >>>>>>> https://mail.python.org/mailman/listinfo/omaha >>>>>>> http://www.OmahaPython.org >>>>>> _______________________________________________ >>>>>> Omaha Python Users Group mailing list >>>>>> Omaha at python.org >>>>>> https://mail.python.org/mailman/listinfo/omaha >>>>>> http://www.OmahaPython.org >>>>> _______________________________________________ >>>>> Omaha Python Users Group mailing list >>>>> Omaha at python.org >>>>> https://mail.python.org/mailman/listinfo/omaha >>>>> http://www.OmahaPython.org >>>> >>>> _______________________________________________ >>>> Omaha Python Users Group mailing list >>>> Omaha at python.org >>>> https://mail.python.org/mailman/listinfo/omaha >>>> http://www.OmahaPython.org >>> _______________________________________________ >>> Omaha Python Users Group mailing list >>> Omaha at python.org >>> https://mail.python.org/mailman/listinfo/omaha >>> http://www.OmahaPython.org >>> >> >> >> >> -- >> Best, >> >> Jeff Hinrichs >> 402.218.1473 >> _______________________________________________ >> Omaha Python Users Group mailing list >> Omaha at python.org >> https://mail.python.org/mailman/listinfo/omaha >> http://www.OmahaPython.org >> > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org From wereapwhatwesow at gmail.com Wed Nov 19 01:09:00 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Tue, 18 Nov 2014 18:09:00 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: <947B03A6-B30F-4EC3-B54E-FB909B4C8D5A@gmail.com> <44555B5D-5512-4E91-993D-D21464BDD6FD@gmail.com> Message-ID: If only 3 or 4 people are coming Panera's should be OK. On Tue, Nov 18, 2014 at 11:17 AM, Varun Mehta wrote: > Fine with any place. > > Varun > > On Nov 18, 2014, at 11:14 AM, Bob Haffner wrote: > > > Steve and Varun, > > > > How about that Panera off of 78th and Dodge? Meeting at Steve's office > > would work too. > > > > Bob > > > > On Mon, Nov 17, 2014 at 9:53 PM, Jeff Hinrichs - DM&T < > jeffh at dundeemt.com> > > wrote: > > > >> unfortunately, I will miss this meeting. Drat. > >> > >> On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner > >> wrote: > >> > >>> I'm in > >>> > >>> Sent from my iPhone > >>> > >>>> On Nov 17, 2014, at 6:29 PM, Varun Mehta > >> wrote: > >>>> > >>>> I?ll be coming. > >>>> > >>>> Thanks > >>>> Varun > >>>> > >>>>> On Nov 17, 2014, at 6:28 PM, Steve Young > >>> wrote: > >>>>> > >>>>> I have a room available downtown at my office at 1516 Cuming Street. > >>>>> Projector, whiteboard, similar to Aaron's but not as fancy. > >>>>> > >>>>> Or we can get a count of who is coming and choose a site convenient > to > >>>>> all. I will be coming from 42nd and Center. > >>>>> > >>>>> It would be nice to meet this month - in the past we usually end up > >>>>> skipping December due to busy schedules. > >>>>> > >>>>>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck > >> wrote: > >>>>>> > >>>>>> Unfortunately, I'll have to sit this one out due to some family > >> plans. > >>>>>> > >>>>>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < > >>> wereapwhatwesow at gmail.com> > >>>>>> wrote: > >>>>>> > >>>>>>> Meeting Location: @Aaron - are you and a room available? > >>>>>>> > >>>>>>> Please respond if you are planning to attend. > >>>>>>> > >>>>>>> Thanks, > >>>>>>> > >>>>>>> Steve > >>>>>>> _______________________________________________ > >>>>>>> Omaha Python Users Group mailing list > >>>>>>> Omaha at python.org > >>>>>>> https://mail.python.org/mailman/listinfo/omaha > >>>>>>> http://www.OmahaPython.org > >>>>>> _______________________________________________ > >>>>>> Omaha Python Users Group mailing list > >>>>>> Omaha at python.org > >>>>>> https://mail.python.org/mailman/listinfo/omaha > >>>>>> http://www.OmahaPython.org > >>>>> _______________________________________________ > >>>>> Omaha Python Users Group mailing list > >>>>> Omaha at python.org > >>>>> https://mail.python.org/mailman/listinfo/omaha > >>>>> http://www.OmahaPython.org > >>>> > >>>> _______________________________________________ > >>>> Omaha Python Users Group mailing list > >>>> Omaha at python.org > >>>> https://mail.python.org/mailman/listinfo/omaha > >>>> http://www.OmahaPython.org > >>> _______________________________________________ > >>> Omaha Python Users Group mailing list > >>> Omaha at python.org > >>> https://mail.python.org/mailman/listinfo/omaha > >>> http://www.OmahaPython.org > >>> > >> > >> > >> > >> -- > >> Best, > >> > >> Jeff Hinrichs > >> 402.218.1473 > >> _______________________________________________ > >> Omaha Python Users Group mailing list > >> Omaha at python.org > >> https://mail.python.org/mailman/listinfo/omaha > >> http://www.OmahaPython.org > >> > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From jrguliz at yahoo.com Wed Nov 19 05:23:01 2014 From: jrguliz at yahoo.com (Joe Gulizia) Date: Wed, 19 Nov 2014 04:23:01 +0000 (UTC) Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: Message-ID: <1442026145.1554552.1416370981345.JavaMail.yahoo@jws100177.mail.ne1.yahoo.com> I will probably make this one. Still @ 7 PM? Liked the projector/whiteboard idea. Joe On Tuesday, November 18, 2014 6:09 PM, Steve Young wrote: If only 3 or 4 people are coming Panera's should be OK. On Tue, Nov 18, 2014 at 11:17 AM, Varun Mehta wrote: > Fine with any place. > > Varun > > On Nov 18, 2014, at 11:14 AM, Bob Haffner wrote: > > > Steve and Varun, > > > > How about that Panera off of 78th and Dodge?? Meeting at Steve's office > > would work too. > > > > Bob > > > > On Mon, Nov 17, 2014 at 9:53 PM, Jeff Hinrichs - DM&T < > jeffh at dundeemt.com> > > wrote: > > > >> unfortunately, I will miss this meeting.? Drat. > >> > >> On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner > >> wrote: > >> > >>> I'm in > >>> > >>> Sent from my iPhone > >>> > >>>> On Nov 17, 2014, at 6:29 PM, Varun Mehta > >> wrote: > >>>> > >>>> I?ll be coming. > >>>> > >>>> Thanks > >>>> Varun > >>>> > >>>>> On Nov 17, 2014, at 6:28 PM, Steve Young > >>> wrote: > >>>>> > >>>>> I have a room available downtown at my office at 1516 Cuming Street. > >>>>> Projector, whiteboard, similar to Aaron's but not as fancy. > >>>>> > >>>>> Or we can get a count of who is coming and choose a site convenient > to > >>>>> all.? I will be coming from 42nd and Center. > >>>>> > >>>>> It would be nice to meet this month - in the past we usually end up > >>>>> skipping December due to busy schedules. > >>>>> > >>>>>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck > >> wrote: > >>>>>> > >>>>>> Unfortunately, I'll have to sit this one out due to some family > >> plans. > >>>>>> > >>>>>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < > >>> wereapwhatwesow at gmail.com> > >>>>>> wrote: > >>>>>> > >>>>>>> Meeting Location: @Aaron - are you and a room available? > >>>>>>> > >>>>>>> Please respond if you are planning to attend. > >>>>>>> > >>>>>>> Thanks, > >>>>>>> > >>>>>>> Steve > >>>>>>> _______________________________________________ > >>>>>>> Omaha Python Users Group mailing list > >>>>>>> Omaha at python.org > >>>>>>> https://mail.python.org/mailman/listinfo/omaha > >>>>>>> http://www.OmahaPython.org > >>>>>> _______________________________________________ > >>>>>> Omaha Python Users Group mailing list > >>>>>> Omaha at python.org > >>>>>> https://mail.python.org/mailman/listinfo/omaha > >>>>>> http://www.OmahaPython.org > >>>>> _______________________________________________ > >>>>> Omaha Python Users Group mailing list > >>>>> Omaha at python.org > >>>>> https://mail.python.org/mailman/listinfo/omaha > >>>>> http://www.OmahaPython.org > >>>> > >>>> _______________________________________________ > >>>> Omaha Python Users Group mailing list > >>>> Omaha at python.org > >>>> https://mail.python.org/mailman/listinfo/omaha > >>>> http://www.OmahaPython.org > >>> _______________________________________________ > >>> Omaha Python Users Group mailing list > >>> Omaha at python.org > >>> https://mail.python.org/mailman/listinfo/omaha > >>> http://www.OmahaPython.org > >>> > >> > >> > >> > >> -- > >> Best, > >> > >> Jeff Hinrichs > >> 402.218.1473 > >> _______________________________________________ > >> Omaha Python Users Group mailing list > >> Omaha at python.org > >> https://mail.python.org/mailman/listinfo/omaha > >> http://www.OmahaPython.org > >> > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > _______________________________________________ Omaha Python Users Group mailing list Omaha at python.org https://mail.python.org/mailman/listinfo/omaha http://www.OmahaPython.org From wereapwhatwesow at gmail.com Wed Nov 19 15:52:48 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Wed, 19 Nov 2014 08:52:48 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: <1442026145.1554552.1416370981345.JavaMail.yahoo@jws100177.mail.ne1.yahoo.com> References: <1442026145.1554552.1416370981345.JavaMail.yahoo@jws100177.mail.ne1.yahoo.com> Message-ID: Let's meet at my office since Joe is coming. 1516 Cuming Street NE Corner of 16th and Cuming. The red area on the map is reserved for Alley Poyner and you can park in those spots if the front parking lot is full. The door is locked, so call or text 402-522-6075 if I am not there to let you in. [image: Inline image 3] Steve On Tue, Nov 18, 2014 at 10:23 PM, Joe Gulizia < jrguliz at yahoo.com.dmarc.invalid> wrote: > I will probably make this one. > Still @ 7 PM? > Liked the projector/whiteboard idea. > > Joe > > > On Tuesday, November 18, 2014 6:09 PM, Steve Young < > wereapwhatwesow at gmail.com> wrote: > > > If only 3 or 4 people are coming Panera's should be OK. > > On Tue, Nov 18, 2014 at 11:17 AM, Varun Mehta > wrote: > > > Fine with any place. > > > > Varun > > > > On Nov 18, 2014, at 11:14 AM, Bob Haffner wrote: > > > > > Steve and Varun, > > > > > > How about that Panera off of 78th and Dodge? Meeting at Steve's office > > > would work too. > > > > > > Bob > > > > > > On Mon, Nov 17, 2014 at 9:53 PM, Jeff Hinrichs - DM&T < > > jeffh at dundeemt.com> > > > wrote: > > > > > >> unfortunately, I will miss this meeting. Drat. > > >> > > >> On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner > > >> wrote: > > >> > > >>> I'm in > > >>> > > >>> Sent from my iPhone > > >>> > > >>>> On Nov 17, 2014, at 6:29 PM, Varun Mehta > > >> wrote: > > >>>> > > >>>> I?ll be coming. > > >>>> > > >>>> Thanks > > >>>> Varun > > >>>> > > >>>>> On Nov 17, 2014, at 6:28 PM, Steve Young < > wereapwhatwesow at gmail.com> > > >>> wrote: > > >>>>> > > >>>>> I have a room available downtown at my office at 1516 Cuming > Street. > > >>>>> Projector, whiteboard, similar to Aaron's but not as fancy. > > >>>>> > > >>>>> Or we can get a count of who is coming and choose a site convenient > > to > > >>>>> all. I will be coming from 42nd and Center. > > >>>>> > > >>>>> It would be nice to meet this month - in the past we usually end up > > >>>>> skipping December due to busy schedules. > > >>>>> > > >>>>>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck > > >> wrote: > > >>>>>> > > >>>>>> Unfortunately, I'll have to sit this one out due to some family > > >> plans. > > >>>>>> > > >>>>>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < > > >>> wereapwhatwesow at gmail.com> > > >>>>>> wrote: > > >>>>>> > > >>>>>>> Meeting Location: @Aaron - are you and a room available? > > >>>>>>> > > >>>>>>> Please respond if you are planning to attend. > > >>>>>>> > > >>>>>>> Thanks, > > >>>>>>> > > >>>>>>> Steve > > >>>>>>> _______________________________________________ > > >>>>>>> Omaha Python Users Group mailing list > > >>>>>>> Omaha at python.org > > >>>>>>> https://mail.python.org/mailman/listinfo/omaha > > >>>>>>> http://www.OmahaPython.org > > >>>>>> _______________________________________________ > > >>>>>> Omaha Python Users Group mailing list > > >>>>>> Omaha at python.org > > >>>>>> https://mail.python.org/mailman/listinfo/omaha > > >>>>>> http://www.OmahaPython.org > > >>>>> _______________________________________________ > > >>>>> Omaha Python Users Group mailing list > > >>>>> Omaha at python.org > > >>>>> https://mail.python.org/mailman/listinfo/omaha > > >>>>> http://www.OmahaPython.org > > >>>> > > >>>> _______________________________________________ > > >>>> Omaha Python Users Group mailing list > > >>>> Omaha at python.org > > >>>> https://mail.python.org/mailman/listinfo/omaha > > >>>> http://www.OmahaPython.org > > >>> _______________________________________________ > > >>> Omaha Python Users Group mailing list > > >>> Omaha at python.org > > >>> https://mail.python.org/mailman/listinfo/omaha > > >>> http://www.OmahaPython.org > > >>> > > >> > > >> > > >> > > >> -- > > >> Best, > > >> > > >> Jeff Hinrichs > > >> 402.218.1473 > > >> _______________________________________________ > > >> Omaha Python Users Group mailing list > > >> Omaha at python.org > > >> https://mail.python.org/mailman/listinfo/omaha > > >> http://www.OmahaPython.org > > >> > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 156599 bytes Desc: not available URL: From jrguliz at yahoo.com Wed Nov 19 22:35:43 2014 From: jrguliz at yahoo.com (Joe Gulizia) Date: Wed, 19 Nov 2014 21:35:43 +0000 (UTC) Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: References: Message-ID: <1857433399.1786650.1416432944036.JavaMail.yahoo@jws10092.mail.ne1.yahoo.com> Apologies.? I may have run into a snag...won't know if coming until after 4:30. Joe On Wednesday, November 19, 2014 10:49 AM, Steve Young wrote: Let's meet at my office since Joe is coming. 1516 Cuming Street NE Corner of 16th and Cuming. The red area on the map is reserved for Alley Poyner and you can park in those spots if the front parking lot is full. The door is locked, so call or text 402-522-6075 if I am not there to let you in. [image: Inline image 3] Steve On Tue, Nov 18, 2014 at 10:23 PM, Joe Gulizia < jrguliz at yahoo.com.dmarc.invalid> wrote: > I will probably make this one. > Still @ 7 PM? > Liked the projector/whiteboard idea. > > Joe > > >? ? ? On Tuesday, November 18, 2014 6:09 PM, Steve Young < > wereapwhatwesow at gmail.com> wrote: > > >? If only 3 or 4 people are coming Panera's should be OK. > > On Tue, Nov 18, 2014 at 11:17 AM, Varun Mehta > wrote: > > > Fine with any place. > > > > Varun > > > > On Nov 18, 2014, at 11:14 AM, Bob Haffner wrote: > > > > > Steve and Varun, > > > > > > How about that Panera off of 78th and Dodge?? Meeting at Steve's office > > > would work too. > > > > > > Bob > > > > > > On Mon, Nov 17, 2014 at 9:53 PM, Jeff Hinrichs - DM&T < > > jeffh at dundeemt.com> > > > wrote: > > > > > >> unfortunately, I will miss this meeting.? Drat. > > >> > > >> On Mon, Nov 17, 2014 at 9:14 PM, Bob Haffner > > >> wrote: > > >> > > >>> I'm in > > >>> > > >>> Sent from my iPhone > > >>> > > >>>> On Nov 17, 2014, at 6:29 PM, Varun Mehta > > >> wrote: > > >>>> > > >>>> I?ll be coming. > > >>>> > > >>>> Thanks > > >>>> Varun > > >>>> > > >>>>> On Nov 17, 2014, at 6:28 PM, Steve Young < > wereapwhatwesow at gmail.com> > > >>> wrote: > > >>>>> > > >>>>> I have a room available downtown at my office at 1516 Cuming > Street. > > >>>>> Projector, whiteboard, similar to Aaron's but not as fancy. > > >>>>> > > >>>>> Or we can get a count of who is coming and choose a site convenient > > to > > >>>>> all.? I will be coming from 42nd and Center. > > >>>>> > > >>>>> It would be nice to meet this month - in the past we usually end up > > >>>>> skipping December due to busy schedules. > > >>>>> > > >>>>>> On Mon, Nov 17, 2014 at 5:39 PM, Aaron Keck > > >> wrote: > > >>>>>> > > >>>>>> Unfortunately, I'll have to sit this one out due to some family > > >> plans. > > >>>>>> > > >>>>>> On Mon, Nov 17, 2014 at 5:32 PM, Steve Young < > > >>> wereapwhatwesow at gmail.com> > > >>>>>> wrote: > > >>>>>> > > >>>>>>> Meeting Location: @Aaron - are you and a room available? > > >>>>>>> > > >>>>>>> Please respond if you are planning to attend. > > >>>>>>> > > >>>>>>> Thanks, > > >>>>>>> > > >>>>>>> Steve > > >>>>>>> _______________________________________________ > > >>>>>>> Omaha Python Users Group mailing list > > >>>>>>> Omaha at python.org > > >>>>>>> https://mail.python.org/mailman/listinfo/omaha > > >>>>>>> http://www.OmahaPython.org > > >>>>>> _______________________________________________ > > >>>>>> Omaha Python Users Group mailing list > > >>>>>> Omaha at python.org > > >>>>>> https://mail.python.org/mailman/listinfo/omaha > > >>>>>> http://www.OmahaPython.org > > >>>>> _______________________________________________ > > >>>>> Omaha Python Users Group mailing list > > >>>>> Omaha at python.org > > >>>>> https://mail.python.org/mailman/listinfo/omaha > > >>>>> http://www.OmahaPython.org > > >>>> > > >>>> _______________________________________________ > > >>>> Omaha Python Users Group mailing list > > >>>> Omaha at python.org > > >>>> https://mail.python.org/mailman/listinfo/omaha > > >>>> http://www.OmahaPython.org > > >>> _______________________________________________ > > >>> Omaha Python Users Group mailing list > > >>> Omaha at python.org > > >>> https://mail.python.org/mailman/listinfo/omaha > > >>> http://www.OmahaPython.org > > >>> > > >> > > >> > > >> > > >> -- > > >> Best, > > >> > > >> Jeff Hinrichs > > >> 402.218.1473 > > >> _______________________________________________ > > >> Omaha Python Users Group mailing list > > >> Omaha at python.org > > >> https://mail.python.org/mailman/listinfo/omaha > > >> http://www.OmahaPython.org > > >> > > > _______________________________________________ > > > Omaha Python Users Group mailing list > > > Omaha at python.org > > > https://mail.python.org/mailman/listinfo/omaha > > > http://www.OmahaPython.org > > > > _______________________________________________ > > Omaha Python Users Group mailing list > > Omaha at python.org > > https://mail.python.org/mailman/listinfo/omaha > > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > _______________________________________________ Omaha Python Users Group mailing list Omaha at python.org https://mail.python.org/mailman/listinfo/omaha http://www.OmahaPython.org From jrguliz at yahoo.com Wed Nov 19 23:55:12 2014 From: jrguliz at yahoo.com (Joe Gulizia) Date: Wed, 19 Nov 2014 14:55:12 -0800 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: <1857433399.1786650.1416432944036.JavaMail.yahoo@jws10092.mail.ne1.yahoo.com> Message-ID: <1416437712.99824.YahooMailAndroidMobile@web126201.mail.ne1.yahoo.com> Sorry...won't make it Sent from Yahoo Mail on Android From wereapwhatwesow at gmail.com Wed Nov 19 23:57:51 2014 From: wereapwhatwesow at gmail.com (Steve Young) Date: Wed, 19 Nov 2014 16:57:51 -0600 Subject: [omaha] November Meeting Wednesday 11/17 In-Reply-To: <1416437712.99824.YahooMailAndroidMobile@web126201.mail.ne1.yahoo.com> References: <1857433399.1786650.1416432944036.JavaMail.yahoo@jws10092.mail.ne1.yahoo.com> <1416437712.99824.YahooMailAndroidMobile@web126201.mail.ne1.yahoo.com> Message-ID: Thanks for letting us know, Joe. Hope to see you at the next one. On Wed, Nov 19, 2014 at 4:55 PM, Joe Gulizia < jrguliz at yahoo.com.dmarc.invalid> wrote: > Sorry...won't make it > > Sent from Yahoo Mail on Android > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org > From sy at foreignlanguageflashcards.com Fri Nov 21 17:37:22 2014 From: sy at foreignlanguageflashcards.com (Steve Young) Date: Fri, 21 Nov 2014 10:37:22 -0600 Subject: [omaha] Fwd: PyCharm 4 is out, with MORE of everything In-Reply-To: <2143813057.195371011.1416485662964.JavaMail.root@lon-mas1.marketo.org> References: <2143813057.195371011.1416485662964.JavaMail.root@lon-mas1.marketo.org> Message-ID: <546F6A42.3000401@foreignlanguageflashcards.com> From bob.haffner at gmail.com Sat Nov 22 18:31:44 2014 From: bob.haffner at gmail.com (Bob Haffner) Date: Sat, 22 Nov 2014 11:31:44 -0600 Subject: [omaha] Fwd: PyCharm 4 is out, with MORE of everything Message-ID: <97F5B847-2C95-412C-837D-D9697C755DFB@gmail.com> Ooh, ipython notebook support. Gonna have to check it out Sent from my iPad > On Nov 21, 2014, at 10:37 AM, Steve Young wrote: > > > _______________________________________________ > Omaha Python Users Group mailing list > Omaha at python.org > https://mail.python.org/mailman/listinfo/omaha > http://www.OmahaPython.org