Re: Whittle it on down

2016-05-04 Thread Stephen Hansen
On Wed, May 4, 2016, at 11:04 PM, Steven D'Aprano wrote: > Start by writing a function or a regex that will distinguish strings that > match your conditions from those that don't. A regex might be faster, but > here's a function version. > ... snip ... Yikes. I'm all for the idea that one should

Re: Whittle it on down

2016-05-04 Thread Steven D'Aprano
On Thursday 05 May 2016 14:58, DFS wrote: > Want to whittle a list like this: [...] > Want to keep all elements containing only upper case letters or upper > case letters and ampersand (where ampersand is surrounded by spaces) Start by writing a function or a regex that will distinguish strings

Re: Whittle it on down

2016-05-04 Thread Jussi Piitulainen
DFS writes: . . > Want to keep all elements containing only upper case letters or upper > case letters and ampersand (where ampersand is surrounded by spaces) > > Is it easier to extract elements meeting those conditions, or remove > elements meeting the following conditions: > > * elements with

Re: Whittle it on down

2016-05-04 Thread Stephen Hansen
On Wed, May 4, 2016, at 09:58 PM, DFS wrote: > Want to whittle a list like this: > > [u'Espa\xf1ol', 'Health & Fitness Clubs (36)', 'Health Clubs & > Gymnasiums (42)', 'Health Fitness Clubs', 'Name', 'Atlanta city guide', > 'edit address', 'Tweet', 'PHYSICAL FITNESS CONSULTANTS & TRAINERS', > '

Re: No SQLite newsgroup, so I'll ask here about SQLite, python and MS Access

2016-05-04 Thread DFS
On 5/4/2016 10:02 PM, Stephen Hansen wrote: On Wed, May 4, 2016, at 03:46 PM, DFS wrote: I can't find anything on the web. Have you tried: http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users If you really must access it over a newsgroup, you can use the Gmane mirror: h

Whittle it on down

2016-05-04 Thread DFS
Want to whittle a list like this: [u'Espa\xf1ol', 'Health & Fitness Clubs (36)', 'Health Clubs & Gymnasiums (42)', 'Health Fitness Clubs', 'Name', 'Atlanta city guide', 'edit address', 'Tweet', 'PHYSICAL FITNESS CONSULTANTS & TRAINERS', 'HEALTH CLUBS & GYMNASIUMS', 'HEALTH CLUBS & GYMNASIUMS',

Re: No SQLite newsgroup, so I'll ask here about SQLite, python and MS Access

2016-05-04 Thread Michael Selik
On Wed, May 4, 2016, 6:51 PM DFS wrote: > Both of the following python commands successfully create a SQLite3 > datafile which crashes Access 2003 immediately upon trying to open it > (via an ODBC linked table). > Have you tried using Access 2013? On the other hand, a SQLite3 file created in VB

Re: No SQLite newsgroup, so I'll ask here about SQLite, python and MS Access

2016-05-04 Thread Stephen Hansen
On Wed, May 4, 2016, at 03:46 PM, DFS wrote: > I can't find anything on the web. Have you tried: http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users If you really must access it over a newsgroup, you can use the Gmane mirror: http://gmane.org/info.php?group=gmane.comp.db.

Re: Interacting with Subprocesses

2016-05-04 Thread Akira Li
Terry Reedy writes: > On 5/4/2016 2:41 PM, Dick Holmes wrote: >> I am attempting to write a Python program that will interact with >> a (non-Python) process. The programs will run under MinGW. The >> process can use stdin/stdout commands and responses and can work >> with pipes. The problem I'm h

Re: Interacting with Subprocesses

2016-05-04 Thread Terry Reedy
On 5/4/2016 2:41 PM, Dick Holmes wrote: I am attempting to write a Python program that will interact with a (non-Python) process. The programs will run under MinGW. The process can use stdin/stdout commands and responses and can work with pipes. The problem I'm having is that I can't find any way

[ANN] Aenum 1.4.1

2016-05-04 Thread Ethan Furman
aenum 1.4.1 Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants aenum includes a Python stdlib Enum-compatible data type, as well as a metaclass-based NamedTuple implementation and a NamedConstant class. An Enum is a set of symbolic names (members)

No SQLite newsgroup, so I'll ask here about SQLite, python and MS Access

2016-05-04 Thread DFS
Both of the following python commands successfully create a SQLite3 datafile which crashes Access 2003 immediately upon trying to open it (via an ODBC linked table). import sqlite3 conn = sqlite3.connect("dfile.db") import pyodbc conn = pyodbc.connect('Driver={SQLite3 ODBC Driver};Database=

Re: Not x.islower() has different output than x.isupper() in list output...

2016-05-04 Thread DFS
On 5/4/2016 11:37 AM, Steven D'Aprano wrote: On Thu, 5 May 2016 12:09 am, DFS wrote: On 5/3/2016 11:28 PM, Steven D'Aprano wrote: Languages with two distinct lettercases, like English, are called bicameral. [...] Linguist much? Possibly even a cunning one. I see you as more of a Col

Re: Interacting with Subprocesses

2016-05-04 Thread Akira Li
Dick Holmes writes: > I am attempting to write a Python program that will interact with > a (non-Python) process. The programs will run under MinGW. The > process can use stdin/stdout commands and responses and can work > with pipes. The problem I'm having is that I can't find any > way in Pytho

windows 7 install trouble

2016-05-04 Thread Eric and Bella via Python-list
hello, could someone please help.  I had installed python 3.? on my computer.  it had issues.  so i tried to uninstall and it wouldn't.  so i deleted all the files and used microsoft fixit to uninstall.  that worked.  but i now can't re-install it.  on the off chance it was firewall related, t

Re: Analytical Geometry in Python with GeoMath

2016-05-04 Thread Fabien
On 05/04/2016 01:48 AM, Vinicius Mesel wrote: f you want to check it out, here is the link:https://github.com/vmesel/GeoMath Thanks! What differences will your package have with shapely? https://github.com/Toblerity/Shapely Cheers Fabien -- https://mail.python.org/mailman/listinfo/python-lis

Re: Conditionals And Control Flows

2016-05-04 Thread Stephen Hansen
On Wed, May 4, 2016, at 07:41 AM, Cai Gengyang wrote: > I am trying to understand the boolean operator "and" in Python. It is > supposed to return "True" when the expression on both sides of "and" are > true The thing is, its kinda dubious to think of 'and' as a 'boolean operator', because once y

Interacting with Subprocesses

2016-05-04 Thread Dick Holmes
I am attempting to write a Python program that will interact with a (non-Python) process. The programs will run under MinGW. The process can use stdin/stdout commands and responses and can work with pipes. The problem I'm having is that I can't find any way in Python to have a continuing dialog wi

Re: After a year using Node.js, the prodigal son returns

2016-05-04 Thread sohcahtoa82
On Wednesday, May 4, 2016 at 1:59:15 AM UTC-7, Steven D'Aprano wrote: > A year ago, Gavin Vickery decided to move away from Python and give > Javascript with Node.js a try. Twelve months later, he has written about his > experiences: > > > http://geekforbrains.com/post/after-a-year-of-nodejs-in

Re: Analytical Geometry in Python with GeoMath

2016-05-04 Thread Vinicius
Yes sure, To add a point, you do: From geomath import point A = point.Point(x,y) A.distance(PointB) A.mispoint(PointB) A.quadrant() To make usage of the Figure class From geomath import figure Square = figure.Figure() Square.addpoints(pointA, PointB, PointC, PointD) To make use of the line clas

Re: Conditionals And Control Flows

2016-05-04 Thread Jussi Piitulainen
Cai Gengyang writes: > Sorry I mistyped , this should be correct : > > bool_one = False and False --- This should give False because none of the > statements are True > bool_two = True and False --- This should give False because only 1 statement > is True > bool_three = False and True --- Thi

Re: Mentor Request

2016-05-04 Thread Paul Rubin
Sayth Renshaw writes: > Live in New South Wales Australia somewhat regional, closest local > python group is 2 and a half hours away in Sydney. Try here: https://wiki.hackerspaces.org/RoboDojo -- https://mail.python.org/mailman/listinfo/python-list

Re: Not x.islower() has different output than x.isupper() in list output...

2016-05-04 Thread Steven D'Aprano
On Thu, 5 May 2016 12:09 am, DFS wrote: > On 5/3/2016 11:28 PM, Steven D'Aprano wrote: >> Languages with two distinct lettercases, like English, are called >> bicameral. [...] > Linguist much? Possibly even a cunning one. Somebody-had-to-say-it-ly y'rs, -- Steven -- https://mail.pyth

Re: Conditionals And Control Flows

2016-05-04 Thread Cai Gengyang
Sorry I mistyped , this should be correct : bool_one = False and False --- This should give False because none of the statements are True bool_two = True and False --- This should give False because only 1 statement is True bool_three = False and True --- This should give False because only 1

Re: Conditionals And Control Flows

2016-05-04 Thread Ben Bacarisse
Jussi Piitulainen writes: > Cai Gengyang writes: > >> I am trying to understand the boolean operator "and" in Python. It is >> supposed to return "True" when the expression on both sides of "and" >> are true >> >> For instance, >> >> 1 < 3 and 10 < 20 is True --- (because both statements are true

Re: Conditionals And Control Flows

2016-05-04 Thread Jussi Piitulainen
Cai Gengyang writes: > I am trying to understand the boolean operator "and" in Python. It is > supposed to return "True" when the expression on both sides of "and" > are true > > For instance, > > 1 < 3 and 10 < 20 is True --- (because both statements are true) Yes. > 1 < 5 and 5 > 12 is False -

Re: Conditionals And Control Flows

2016-05-04 Thread Chris Angelico
On Thu, May 5, 2016 at 12:41 AM, Cai Gengyang wrote: > I am trying to understand the boolean operator "and" in Python. It is > supposed to return "True" when the expression on both sides of "and" are true > > For instance, > > 1 < 3 and 10 < 20 is True --- (because both statements are true) > 1 <

Re: Conditionals And Control Flows

2016-05-04 Thread Bob Gailer
On May 4, 2016 10:45 AM, "Cai Gengyang" wrote: > > I am trying to understand the boolean operator "and" in Python. It is supposed to return "True" when the expression on both sides of "and" are true > > For instance, > > 1 < 3 and 10 < 20 is True --- (because both statements are true) > 1 < 5 and

Re: Conditionals And Control Flows

2016-05-04 Thread Michael Selik
On Wed, May 4, 2016 at 10:46 AM Cai Gengyang wrote: > I am trying to understand the boolean operator "and" in Python. It is > supposed to return "True" when the expression on both sides of "and" are > true > Not exactly, because they will short-circuit. Take a look at the docs. ( https://docs.py

Re: After a year using Node.js, the prodigal son returns

2016-05-04 Thread Jussi Piitulainen
Grant Edwards writes: > On 2016-05-04, Steven D'Aprano wrote: >> A year ago, Gavin Vickery decided to move away from Python and give >> Javascript with Node.js a try. Twelve months later, he has written about his >> experiences: >> >> http://geekforbrains.com/post/after-a-year-of-nodejs-in-prod

Conditionals And Control Flows

2016-05-04 Thread Cai Gengyang
I am trying to understand the boolean operator "and" in Python. It is supposed to return "True" when the expression on both sides of "and" are true For instance, 1 < 3 and 10 < 20 is True --- (because both statements are true) 1 < 5 and 5 > 12 is False --- (because both statements are false) b

Re: Not x.islower() has different output than x.isupper() in list output...

2016-05-04 Thread Chris Angelico
On Thu, May 5, 2016 at 12:09 AM, DFS wrote: > On 5/3/2016 11:28 PM, Steven D'Aprano wrote: >> [ lengthy piece about text, Unicode, and letter case ] > > Linguist much? As an English-only speaker who writes code that needs to be used around the world, you end up accruing tidbits of language and te

Re: Not x.islower() has different output than x.isupper() in list output...

2016-05-04 Thread DFS
On 5/3/2016 11:28 PM, Steven D'Aprano wrote: On Wed, 4 May 2016 12:49 am, Jussi Piitulainen wrote: DFS writes: On 5/3/2016 9:13 AM, Chris Angelico wrote: It doesn't invert, the way numeric negation does. What do you mean by 'case inverted'? It looks like it swaps the case correctly betw

Re: After a year using Node.js, the prodigal son returns

2016-05-04 Thread Grant Edwards
On 2016-05-04, Steven D'Aprano wrote: > A year ago, Gavin Vickery decided to move away from Python and give > Javascript with Node.js a try. Twelve months later, he has written about his > experiences: > > http://geekforbrains.com/post/after-a-year-of-nodejs-in-production [Regarding Python]

Re: How to become more motivated to learn Python

2016-05-04 Thread alex wright
Beyond motivation, it's not likely just reading a flat text will be retained meaningfully without creative problem solving. Personal projects are the best route in my opinion. I like reading technical books but I figure I retain a small percentage of the specifics. On May 4, 2016 6:32 AM, "mvilja

Re: Mentor Request

2016-05-04 Thread Chris Angelico
On Wed, May 4, 2016 at 8:51 PM, Sayth Renshaw wrote: > Wanting to ask if there was anyone on the list that would like to be a mentor? > > I have no expectation that you would do it for free, so would accept fair > offers as well monetary or skill trade, or something regional from Australia > tha

Mentor Request

2016-05-04 Thread Sayth Renshaw
Hi Wanting to ask if there was anyone on the list that would like to be a mentor? I have no expectation that you would do it for free, so would accept fair offers as well monetary or skill trade, or something regional from Australia that you would otherwise not have access to etc. I want to be

Re: How to become more motivated to learn Python

2016-05-04 Thread mviljamaa
I tend to not have the patience to go through programming tutorials, because I think they're boring. I sometimes use them as reference to see or recall how something is done, but I don't step through them in order to learn a language. Rather, I write programs to learn programming and languages

Re: How to become more motivated to learn Python

2016-05-04 Thread Marko Rauhamaa
Terry Reedy : > In case you like minecraft, I just discovered this today > https://www.nostarch.com/programwithminecraft "Learn to Program with > Minecraft" > > It uses a socket client written in 3.5 to interface to a minecraft 1.8 > socket server written in java 7. One can at least do simple thin

Re: Not x.islower() has different output than x.isupper() in list output...

2016-05-04 Thread Steven D'Aprano
On Wednesday 04 May 2016 18:34, Gregory Ewing wrote: > Jussi Piitulainen wrote: >> Ceterum censeo, the only suggested use for .swapcase I've ever heard of >> is encryption. > > Yep, all the smart terrorists these days are using a > combination of swapcase and rot13. Totally bamboozles > the FBI.

Re: Analytical Geometry in Python with GeoMath

2016-05-04 Thread Steven D'Aprano
On Wednesday 04 May 2016 09:48, Vinicius Mesel wrote: > I created a library called "GeoMath" that it's intent is to solve all > Analytical Geometry problems in a simple way using Python. > > If you want to check it out, here is the link: > https://github.com/vmesel/GeoMath > > And if you want to

After a year using Node.js, the prodigal son returns

2016-05-04 Thread Steven D'Aprano
A year ago, Gavin Vickery decided to move away from Python and give Javascript with Node.js a try. Twelve months later, he has written about his experiences: http://geekforbrains.com/post/after-a-year-of-nodejs-in-production -- Steve -- https://mail.python.org/mailman/listinfo/python-list

Re: Not x.islower() has different output than x.isupper() in list output...

2016-05-04 Thread Gregory Ewing
Jussi Piitulainen wrote: Ceterum censeo, the only suggested use for .swapcase I've ever heard of is encryption. Yep, all the smart terrorists these days are using a combination of swapcase and rot13. Totally bamboozles the FBI. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble porting glob bash behavior with argparse to windows shell

2016-05-04 Thread Sayth Renshaw
Oops sorry noticed you did in the glob. Sorry squinting at phone. Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble porting glob bash behavior with argparse to windows shell

2016-05-04 Thread Sayth Renshaw
Thank you Peter. I was starting to flail and thought my use of glob.glob was wrong. As an aside should I be using os.path to negate system inconsistency? Thanks Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: How to become more motivated to learn Python

2016-05-04 Thread Terry Reedy
On 5/3/2016 10:55 PM, Cai Gengyang wrote: Guess it would be really cool to work on AI and games. ( I have been addicted to computer games for a long time lol --- To be able to design a blockbuster like Starcraft 2, Diablo 3 or Final Fantasy 7 would be an incredible feat !) In case you like min