Re: ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol

2017-12-16 Thread dieter
Piyush Verma <114piy...@gmail.com> writes:

> Getting SSL error while connecting from httplib.HTTPSConnection.
>
> Any help would be appreciated.
> ...
> line 579, in __init__
> self.do_handshake()
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py",
> line 808, in do_handshake
> self._sslobj.do_handshake()
> ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)

Are you sure, you try to connect to an HTTPS port?

The error message tells you that the "ssl" handshake failed because
the protocol was unknown (likely because the message was not understood).
The most natural reason is to try to connect to something which is not
prepared for an "ssl" handshake.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Marko Rauhamaa
r...@zedat.fu-berlin.de (Stefan Ram):

> Varun R  writes:
>>I'm new to programming, can anyone guide me, how to start
>>learning python programming language
>
>   As a start, one should learn:
>
> 1.) how to install Python
> (if not already installed)
>
> 2.) how to start the Python console
> (if not already started)
>
> 3.) how to type characters into a line of the
> console and how to submit the line (using
> the Enter key) (if this is not already known)

A good list. Even more important, though, is the installation, use and
understanding of a text editor. What is the difference of MS Word,
Notepad and a Python-aware text editor? What text editors are there?
What is a newline? What is whitespace? (Advanced: what is a TAB.) What
is the difference between lower case and upper case? What is trailing
whitespace? What is an underscore? What is the difference between a
parenthesis, bracket and a brace?

What is a file? What is a filename? What is a directory/folder? What is
a pathname? What is a terminal (emulator)? What is standard input? What
is standard output?

How do I see the listing of files? How do I erase a file? How do I
rename a file? What is the current working directory? How do I change it
and why?


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Chris Angelico
On Sat, Dec 16, 2017 at 11:41 PM, Marko Rauhamaa  wrote:
> r...@zedat.fu-berlin.de (Stefan Ram):
>
>> Varun R  writes:
>>>I'm new to programming, can anyone guide me, how to start
>>>learning python programming language
>>
>>   As a start, one should learn:
>>
>> 1.) how to install Python
>> (if not already installed)
>>
>> 2.) how to start the Python console
>> (if not already started)
>>
>> 3.) how to type characters into a line of the
>> console and how to submit the line (using
>> the Enter key) (if this is not already known)
>
> A good list. Even more important, though, is the installation, use and
> understanding of a text editor. What is the difference of MS Word,
> Notepad and a Python-aware text editor? What text editors are there?
> What is a newline? What is whitespace? (Advanced: what is a TAB.) What
> is the difference between lower case and upper case? What is trailing
> whitespace? What is an underscore? What is the difference between a
> parenthesis, bracket and a brace?
>
> What is a file? What is a filename? What is a directory/folder? What is
> a pathname? What is a terminal (emulator)? What is standard input? What
> is standard output?
>
> How do I see the listing of files? How do I erase a file? How do I
> rename a file? What is the current working directory? How do I change it
> and why?
>

... at which point you realize that you're deep in TL;DR territory and
none of what you mentioned will be even thought about.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Marko Rauhamaa
Chris Angelico :

> On Sat, Dec 16, 2017 at 11:41 PM, Marko Rauhamaa  wrote:
>> r...@zedat.fu-berlin.de (Stefan Ram):
>>>   As a start, one should learn:
>>>
>>> 1.) how to install Python
>>> (if not already installed)
>>>
>>> 2.) how to start the Python console
>>> (if not already started)
>>>
>>> 3.) how to type characters into a line of the
>>> console and how to submit the line (using
>>> the Enter key) (if this is not already known)
>>
>> A good list. Even more important, though, is the installation, use and
>> understanding of a text editor. What is the difference of MS Word,
>> Notepad and a Python-aware text editor? What text editors are there?
>> What is a newline? What is whitespace? (Advanced: what is a TAB.) What
>> is the difference between lower case and upper case? What is trailing
>> whitespace? What is an underscore? What is the difference between a
>> parenthesis, bracket and a brace?
>>
>> What is a file? What is a filename? What is a directory/folder? What is
>> a pathname? What is a terminal (emulator)? What is standard input? What
>> is standard output?
>>
>> How do I see the listing of files? How do I erase a file? How do I
>> rename a file? What is the current working directory? How do I change it
>> and why?
>
> ... at which point you realize that you're deep in TL;DR territory and
> none of what you mentioned will be even thought about.

Hm. I don't think you can get away from getting acquainted with all of
the above before you can write your first "Hello, World!" program in
Python.

It was simpler when I first learned Basic. There were no files, and your
REPL was your editor. The ingenious line numbers took the role of the
text editor.

Unfortunately, Python's indentation mechanism makes the REPL too
frustrating an environment to type in even the simplest of function
definitions, let alone a whole class.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread edmondo . giovannozzi
Il giorno venerdì 15 dicembre 2017 12:50:08 UTC+1, Varun R ha scritto:
> Hi All,
> 
> I'm new to programming, can anyone guide me, how to start learning python 
> programming language,...plz suggest some books also.
> 
> Thanks all

Personally I learnt python from the tutorial that you can find in:

https://docs.python.org/3/tutorial/index.html

But I should say that I already knew other programming languages. 
By the way I would give a try at that tutorial and ask if you cannot understand 
something.
:-)

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread ROGER GRAYDON CHRISTMAN
On Sat, Dec 16, 2017, Bill wrote:
>
Varun R wrote:
>> Hi All,
>>
>> I'm new to programming, can anyone guide me, how to start learning python
programming language,...plz suggest some books also.
>>
>> Thanks all
>
>Are you sure you want to learn Python first?
>Python does enough things "behind the scene"
>that it makes me question the wisdom of that.
>Other points of view are welcome, of course.
>Learning the primitives of C++ first, may make for an easier transition.
>Surely this has been discussed before?
>


Having taught introductory courses both with C++ and Python
 as first languages, I really think Python is a better choice.

Consider this nice simple Python program:

print('Hello, world!')
How much background does a student need to understand this,
or to produce programs of equivalent complexity?

Do you really want to get into explaining why you need to
refer to the iostream library, consult the std namespace,
and define a function named main, and why it returns zero?

Is any of that really necessary to understand how to print output?


Or by primitives, do you first get into the integer data type,
how to declare variables, and how to do arithmetic (all of which
are nice and primitive and C++) and postpone all input and output
until the third month of the course, after you have had adequate
time to to explain in detail the meanings of function declarations,
namespaces, streams and #include?

>From my experience, both as instructor and student, with
introductory programming courses with half a dozen different
first languages  to use for those courses, I think C++ is one
of the worst choices!   (In my humble opinion, of course)

Roger Christman
Pennsylvania State University

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread ROGER GRAYDON CHRISTMAN

On Sat, Dec 16, 2017, Marko Rauhamaa wrote: >
Chris Angelico :
>
>> On Sat, Dec 16, 2017 at 11:41 PM, Marko Rauhamaa  wrote:
>> r...@zedat.fu-berlin.de (Stefan Ram):
>>   As a start, one should learn:
>>
>> 1.) how to install Python
>> (if not already installed)
>>
>> 2.) how to start the Python console
>> (if not already started)
>>
>> 3.) how to type characters into a line of the
>> console and how to submit the line (using
>> the Enter key) (if this is not already known)
>>
>> A good list. Even more important, though, is the installation, use and
>> understanding of a text editor. What is the difference of MS Word,
>> Notepad and a Python-aware text editor? What text editors are there?
>> What is a newline? What is whitespace? (Advanced: what is a TAB.) What
>> is the difference between lower case and upper case? What is trailing
>> whitespace? What is an underscore? What is the difference between a
>> parenthesis, bracket and a brace?
>>
>> What is a file? What is a filename? What is a directory/folder? What is
>> a pathname? What is a terminal (emulator)? What is standard input? What
>> is standard output?
>>
>> How do I see the listing of files? How do I erase a file? How do I
>> rename a file? What is the current working directory? How do I change it
>> and why?
>>
>> ... at which point you realize that you're deep in TL;DR territory and
>> none of what you mentioned will be even thought about.
>
>Hm. I don't think you can get away from getting acquainted with all of
>the above before you can write your first "Hello, World!" program in
>Python.
>
>It was simpler when I first learned Basic. There were no files, and your
>REPL was your editor. The ingenious line numbers took the role of the
>text editor.
>
>Unfortunately, Python's indentation mechanism makes the REPL too
>frustrating an environment to type in even the simplest of function
>definitions, let alone a whole class.
>
>
>Marko
>


On the contrary, I think I think you can getaway with a lot of those items:
Let's see:

All the stuff about files, folders, directories, etc:

Running the Python IDLE environment that comes for free along with the
free download, creates its own little folder for all the work, saves the files
in that folder, and makes it easy for you to see what is in there, recover
your previous programs, etc.  I have never had any difficulty in using the
File menu to Open a Recent File, etc.

Of course, I assume the ability to obtain the Python environment, that
requires pointing your browser at the appropriate web site, find the
download page, and so on.   I guess I am assuming that most of my 
students have either used the web before, or have downloaded software
(such as their favorite games or apps).   It has been about twenty years
since I felt a need to teach my students how to find the on/off switch.

MS Word, vs. Notepad, vs. vi, vs. Emacs, vs. vs. vs. vs.
Since Python IDLE has its own development environment,
that is sufficient.   And it even addresses the tab vs. space
indentation issues all by itself, and lets you Indent and Dedent
whole blocks of code cleanly and easily.   

So, Hello World is trivial.  In fact, there are two trivial ways to do it
with Python IDLE.

You get the Shell for free, and just type your print call there.

Or you go to the File Menu, Open a new file, type in one statement,
and activate the Run option on the menu bar.

Now, as far as those other items you think impose an excessive
burden on our poor students:

Difference between parenthesis, bracket, and a brace:
These are simple syntactic punctuation, introduced one item at a time.
They should already know about parentheses from even elementary
arithmetic courses, if not basic algebra.
Brackets can be postponed until you are ready to reach about lists.
Braces can be postponed until you are ready to teach about dictionaries.
Put them in their proper context, and then thinking in the proper context
should make the correct choice of punctuation automatic.

"Python's indentation mechanism ... frustrating ...
even the simplest function definitions, let alone a whole class."
When first reading this, I was wondering why you were even 
considering class definitions in a first course.If you find
print("Hello, world!"   to be too complicated for this first course,
how can you expect any meaningful coverage of OOP?

But aside from that, indentation can also be postponed.
I went four-five weeks into my course before needing any indentation
whatsoever.   All the code was straight down top to bottom
with no function definitions, conditional statements, or loops.
I did make use of some short lists and dictionaries, since 
those conveniently have many useful methods defined within them,
so could solve several interesting straightforward problems
without introducing too much of the language.

Oh, and when the time comes, as above, the Python IDLE
environment does a perfectly adequate job in handling indentation.

Re: Python Learning

2017-12-16 Thread Ziggy
On 2017-12-15, Varun R wrote:
> Hi All,
>
> I'm new to programming, can anyone guide me, how to start learning python 
> programming language,...plz suggest some books also.
>
> Thanks all

IMHO These're must have look at:
http://opim.wharton.upenn.edu/~sok/idtresources/python/instant-hacking.html
https://www.learnpython.org
https://docs.python.org/3.5/

http://stackoverflow.com

--
Thank you
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Terry Reedy

On 12/16/2017 8:26 AM, Marko Rauhamaa wrote:


Unfortunately, Python's indentation mechanism makes the REPL too
frustrating an environment to type in even the simplest of function
definitions, let alone a whole class.


The fundamental problem is that most REPLs are for 'command lines', and 
Python does not have 'command lines'.  It has statements.  A statement 
may consist of a single line, and if simple, it looks and acts like a 
command line.  But a statement may also be multiple lines.  Even without 
indentation, a single-line editing and history mechanism is a poor fit 
to a multiline statement language.


IDLE has a shell built for Python and Python only.  One enters, edits, 
and retrieves complete statements.  Indentation is automatic.  There is 
currently a glitch in that Shell indents with tabs instead of spaces, 
but I want to change that and know of two ways to do so.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


pip failed installs

2017-12-16 Thread Bryan Zimmer
I have had only partial success with pip. Some things seem to install OK.
But I've tried a couple of packages, specifically "BeautifulSoup" and
"WxPython", and they fail with the same message, e.g.:

*Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-ku98d6jd/BeautifulSoup/*

I've gotten this error for most of the packages I have tried to install,
but I don't know what causes the error. I have successfully installed some
packages, such as html5lib, so my installation isn't totally messed up.

I am using a Slackware Linux. I have gotten this error message both on a
64-bit installation and a 32-bit installation.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can't install wrapt on Windows

2017-12-16 Thread Cutter

Le 10/12/2017 à 21:46, dieter (dieter) a écrit :

Cutter  writes:

...
I have trouble installing pylint on Windows 10, Python 3.6. There's a
problem during the installation of wrapt, which is a dependency of
pylint.

Here are the contents of the commandline:


C:\WINDOWS\system32>python -m pip install pylint
...
Collecting wrapt (from astroid>=1.5.1->pylint)
   Using cached wrapt-1.10.11.tar.gz
Installing collected packages: colorama, wrapt, astroid, pylint
   Running setup.py install for wrapt ... error
Exception:
Traceback (most recent call last):
   File "C:\Users\(...)\AppData\Local\Programs\Python\Python36\lib\site-packa

ges\pip\compat\__init__.py", line 73, in console_to_str

 return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 51:

invalid start byte

Obviously, something causes some "s" to be decoded using the "stdout" encoding
(which usually is the system encoding). In your case, this encoding is "utf-8",
  but "s" does not seem to be utf-8 encoded.

I would use debugging to find out what "s" is, where is comes from and why it
does not use the "stdout" encoding.



I don't know how to use pdb. Instead, I've added the following 
instruction at line 73 before the error occurs:


print("!! TEST !! : ", s)

Here's the output now:

> C:\WINDOWS\system32>python -m pdb 
C:\Users\(...)\AppData\Local\Programs\Python\Python36\Lib\site-packages\pip\__main__.py 
install pylint
>> 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages\pip\__main__.py(1)()

> -> from __future__ import absolute_import
> (Pdb) c
> Requirement already satisfied: pylint in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages
> Requirement already satisfied: mccabe in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages 
(from pylint)
> Requirement already satisfied: six in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages 
(from pylint)
> Requirement already satisfied: isort>=4.2.5 in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages 
(from pylint)
> Requirement already satisfied: astroid<2.0 in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages 
(from pylint)
> Requirement already satisfied: colorama; sys_platform == "win32" in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages 
(from pylint)
> Requirement already satisfied: lazy-object-proxy in 
c:\users\(...)\appdata\local\programs\python\python36\lib\site-packages 
(from astroid<2.0->pylint)

> Collecting wrapt (from astroid<2.0->pylint)
>   Using cached wrapt-1.10.11.tar.gz
> !! TEST !! :  b'running egg_info\r\n'
> !! TEST !! :  b'creating pip-egg-info\\wrapt.egg-info\r\n'
> !! TEST !! :  b'writing pip-egg-info\\wrapt.egg-info\\PKG-INFO\r\n'
> !! TEST !! :  b'writing dependency_links to 
pip-egg-info\\wrapt.egg-info\\dependency_links.txt\r\n'
> !! TEST !! :  b'writing top-level names to 
pip-egg-info\\wrapt.egg-info\\top_level.txt\r\n'
> !! TEST !! :  b"writing manifest file 
'pip-egg-info\\wrapt.egg-info\\SOURCES.txt'\r\n"
> !! TEST !! :  b"warning: manifest_maker: standard file '-c' not 
found\r\n"

> !! TEST !! :  b'\r\n'
> !! TEST !! :  b"reading manifest file 
'pip-egg-info\\wrapt.egg-info\\SOURCES.txt'\r\n"
> !! TEST !! :  b"writing manifest file 
'pip-egg-info\\wrapt.egg-info\\SOURCES.txt'\r\n"

> !! TEST !! :  b''
> Building wheels for collected packages: wrapt
>   Running setup.py bdist_wheel for wrapt ... !! TEST !! :  b'usage: 
-c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\r\n'

> -!! TEST !! :  b'   or: -c --help [cmd1 cmd2 ...]\r\n'
> !! TEST !! :  b'   or: -c --help-commands\r\n'
> !! TEST !! :  b'   or: -c cmd --help\r\n'
> !! TEST !! :  b'\r\n'
> !! TEST !! :  b"error: invalid command 'bdist_wheel'\r\n"
> !! TEST !! :  b''
> error
>   Complete output from command 
C:\Users\(...)\AppData\Local\Programs\Python\Python36\python.exe -u -c 
"import setuptools, 
tokenize;__file__='C:\\Users\\(...)\\AppData\\Local\\Temp\\pip-build-4_065lch\\wrapt\\setup.py';f=getattr(tokenize, 
'open', open)(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d 
C:\Users\(...)\AppData\Local\Temp\tmpzyfae43tpip-wheel- --python-tag cp36:

>   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
>  or: -c --help [cmd1 cmd2 ...]
>  or: -c --help-commands
>  or: -c cmd --help
>
>   error: invalid command 'bdist_wheel'
>
>   
>   Failed building wheel for wrapt
>   Running setup.py clean for wrapt
> !! TEST !! :  b'running clean\r\n'
> !! TEST !! :  b"'build\\lib.win-amd64-3.6' does not exist -- can't 
clean it\r\n"
> !! TEST !! :  b"'build\\bdist.win-amd64' does not exist -- can't 
clean it\r\n"
> !! TEST !! :  b"'build\\scripts-3.6' does not exist -- can't clean 
it\r\n"

> !! TEST !! :  b''
> Failed to build wrapt
> Installing collected packages: wrapt

Re: Repeated Names (Repeated Names)

2017-12-16 Thread Peter Pearson
On Sat, 16 Dec 2017 12:56:07 +1300, Gregory Ewing wrote:
> Anyone else now getting duplicate posts with the sender's
> name repeated in parentheses?

Yes.  Both of the posts on this thread appear twice, once
with and once without the parenthesized name.  In each pair,
the Date field differed by one second, once in each direction.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Bill

Rustom Mody (Rustom Mody) wrote:

On Saturday, December 16, 2017 at 9:45:17 AM UTC+5:30, Bill wrote:

Chris Angelico wrote:

On Sat, Dec 16, 2017 at 8:51 AM, Bill wrote:

Varun R wrote:

Hi All,

I'm new to programming, can anyone guide me, how to start learning python
programming language,...plz suggest some books also.

Thanks all

Are you sure you want to learn Python first?
Python does enough things "behind the scene"
that it makes me question the wisdom of that.
Other points of view are welcome, of course.
Learning the primitives of C++ first, may make for an easier transition.
Surely this has been discussed before?

On the contrary, that makes Python an *excellent* first language. We
don't force people to learn about the chemistry of petrochemical
combustion before letting them learn how to drive a car; we don't make
people understand TCP/IP networking before they're allowed to type
something into Google. And if you DO want people to start off with a
lower-level language, why C++? Why not machine code (or at least
assembly code), since that's what the CPU actually executes?

Most decent introductions to C++ discuss machine language (it helps make
sense of compilation).
As you indirectly suggest, learning is something of a circular process,
so it really doesn't make that much difference where one starts, just
"Do It!".  :  )

Reallyâ¿?
https://en.wikipedia.org/wiki/Principles_of_learning#Primacy



You would give precedence to something written on a wikipedia page over 
your experience?
In our current context, we are talking about self-learning where one is 
one's own teacher. To my mind, if one gets that part right, one doesn't 
need to worry about the other types. I learned a great deal from BYTE 
magazine and before that Popular Electronics. Computer technology is so 
ubiquitous today, that the interested person one need only grab hold of 
something and start learning. YouTube for instance, offers a plethora of 
places to "begin".  I tell students, that if they have the math behind 
them, then the doors of science will be open to them. In my experience, 
if they do not have the basic (~pre-calc) math behind them, then 
learning from a textbook on a programming language, say,  may be a bit 
beyond them.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Gregory Ewing

Bill wrote:
In my experience, 
if they do not have the basic (~pre-calc) math behind them, then 
learning from a textbook on a programming language, say,  may be a bit 
beyond them.


Very little mathematical *knowledge* is needed to get started
with programming. You can do a lot of useful things in Python
without even using any arithmetic.

What does seem to correlate is that if you're the sort of
person who finds maths interesting and fun to play with, you're
also likely to take to programming easily. The same kind of
logical thought processes are involved.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: Repeated Names (Repeated Names)

2017-12-16 Thread Gregory Ewing

The duplicate posts all seem to have this header:

Injection-Info: news.bbs.geek.nz; 
posting-host="M6YmRdZYyc42DJk0lNlt/X4dpP4dzvceBNabSmESN3E";

logging-data="4415"; mail-complaints-to="ab...@news.bbs.geek.nz"

I've emailed the administrator of bbs.geek.nz, maybe he
will be able to stop it.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Bill

Gregory Ewing wrote:

Bill wrote:
In my experience, if they do not have the basic (~pre-calc) math 
behind them, then learning from a textbook on a programming language, 
say,  may be a bit beyond them.


Very little mathematical *knowledge* is needed to get started
with programming. You can do a lot of useful things in Python
without even using any arithmetic.

What does seem to correlate is that if you're the sort of
person who finds maths interesting and fun to play with, you're
also likely to take to programming easily. The same kind of
logical thought processes are involved.



I think we are talking about the same people.
But in college, the prerequisite of "at least co-enrolled in pre-calc", 
turned out to be the right one (based upon quite a lot of teaching 
experience).

--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Learning

2017-12-16 Thread Chris Angelico
On Sun, Dec 17, 2017 at 12:01 PM, Bill  wrote:
> Gregory Ewing wrote:
>>
>> Bill wrote:
>>>
>>> In my experience, if they do not have the basic (~pre-calc) math behind
>>> them, then learning from a textbook on a programming language, say,  may be
>>> a bit beyond them.
>>
>>
>> Very little mathematical *knowledge* is needed to get started
>> with programming. You can do a lot of useful things in Python
>> without even using any arithmetic.
>>
>> What does seem to correlate is that if you're the sort of
>> person who finds maths interesting and fun to play with, you're
>> also likely to take to programming easily. The same kind of
>> logical thought processes are involved.
>>
>
> I think we are talking about the same people.
> But in college, the prerequisite of "at least co-enrolled in pre-calc",
> turned out to be the right one (based upon quite a lot of teaching
> experience).

Fortunately for the programming world, college isn't when everyone
starts. I started coding at six years old. Should I have waited till I
had some pre-calc before getting into programming?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


argparse.ArgumentParser formatter_class argument

2017-12-16 Thread Seb
Hello,

As far as I can see it is currently impossible to apply more than one
class to an ArgumentParser.  For example, I'd like to use both
RawDescriptionHelpFormatter *and* ArgumentDefaultsHelpFormatter in an
ArgumentParser, but it seems that's impossible, as one can only choose a
single one.  Any suggestions?

-- 
Seb

-- 
https://mail.python.org/mailman/listinfo/python-list


pip failed installs

2017-12-16 Thread Bryan Zimmer
I believe it's because you're installing that into a directory that the
current user has no write privileges for. Try installing those into a
virtual environment (if you don't know what that is, let us know!).

-Jorge

On Sat, Dec 16, 2017 at 1:27 PM, Bryan Zimmer 
wrote:
I have had only partial success with pip. Some things seem to install OK.
But I've tried a couple of packages, specifically "BeautifulSoup" and
"WxPython", and they fail with the same message, e.g.:

*Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-ku98d6jd/BeautifulSoup/*

Thanks for the reply.

I have taken to performing pip installs as root (on Slackware Linux),
precisely because my regular user (baz) does not have the permissions
necessary to install most software. So root, when performing a pip install,
also gets error 1 when trying to install packages.

I did follow your advice and set up a virtual environment using
python3.6's *venv
*module. According to the documentation, installations would go into the
virtual environment if it is activated at install-time. But I got the same
error. This time it took the following form:


*Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-zhuoo23l/BeautifulSoup/*
Permissions on the /tmp directory are 1777, or read-write-execute allowed
for everybody, plus it is a sticky directory (which shouldn't be important
here).
-- 
https://mail.python.org/mailman/listinfo/python-list


pip failed installs

2017-12-16 Thread Bryan Zimmer
Wait! Cancel my last post!

In exploring the virtual environment, I was struck by the existence of an
executable *pip *in the virtual environment's "bin" directory. So I tried
again to install BeautifulSoup, but this time I got a very different error
message. This pip couldn't find BeautifulSoup, unlike the module I had been
using. (My python3.6 installation does not include a command-line
executable pip).

So I reissued the command, this time giving it the name of the module,"bs4".

And this time, pip found and installed beautifulsoup (note the lowercasing)
into my virtual environment!

Thanks for your help.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Repeated Names (Repeated Names)

2017-12-16 Thread Tim Golden

On 17/12/17 00:10, Gregory Ewing wrote:

The duplicate posts all seem to have this header:

Injection-Info: news.bbs.geek.nz; 
posting-host="M6YmRdZYyc42DJk0lNlt/X4dpP4dzvceBNabSmESN3E";

 logging-data="4415"; mail-complaints-to="ab...@news.bbs.geek.nz"

I've emailed the administrator of bbs.geek.nz, maybe he
will be able to stop it.



Thanks, Greg. We're actually blocking via that and related headers at 
the gateway, which is why the mailing list is no longer seeing the 
duplicates. I'm not sure any of us thought to email the news server 
admin, though!


TJG
--
https://mail.python.org/mailman/listinfo/python-list


Python Templating Language

2017-12-16 Thread Abdur-Rahmaan Janhangeer
Hi all,

Can somebody point out to me some py-based template languages interpreters
resources?

Thank you !
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Templating Language

2017-12-16 Thread Tim Daneliuk
On 12/17/2017 12:41 AM, Abdur-Rahmaan Janhangeer wrote:
> Hi all,
> 
> Can somebody point out to me some py-based template languages interpreters
> resources?
> 
> Thank you !
> 

http://jinja.pocoo.org/

-- 
https://mail.python.org/mailman/listinfo/python-list