Re: Ohnoes significant whitespace

2016-02-18 Thread Marko Rauhamaa
Ben Finney : > So I am sympathetic to Python newcomers recoiling in horror from > significant whitespace, *before* they try it. And because of that, we > are burdened with forever needing to deal with that reaction and > soothing it. I remember being *very* doubtful how the whitespace would work

Weird and sparese cgi:error

2016-02-18 Thread Φώντας Λαδοπρακόπουλος
Hello, I recentely changed VPS server and when i try to load my webiste iam receiving 500 error which i wasnt receiving in my old VPS server with the same exact cgi scripts. After looking at Apacher's error_log iam seeing the following output when i try to load scripts from cgi-bin directory.

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-18 Thread Ian Kelly
On Mon, Feb 15, 2016 at 7:02 PM, Rick Johnson wrote: > WxPython is not ported either, much to my chagrin. If wxPython "Classic" had just been ported to Python 3, I'm sure it would be all done by now. But it was decided to rebuild wxPython from the ground up instead. Last I've heard, people gener

Re: Guido on python3 for beginners

2016-02-18 Thread Rustom Mody
On Friday, February 19, 2016 at 6:48:12 AM UTC+5:30, Steven D'Aprano wrote: > > > But apart from that, I think that "teaching" versus "doing" language is a > false dichotomy. Teaching languages should have a shallow learning curve > (easy to get started and learn the language, easy discoverabili

Re: extending PATH on Windows?

2016-02-18 Thread pyotr filipivich
Dennis Lee Bieber on Thu, 18 Feb 2016 21:57:13 -0500 typed in comp.lang.python the following: >On Thu, 18 Feb 2016 16:24:00 + (UTC), Ulli Horlacher > declaimed the following: > >>Dennis Lee Bieber wrote: >> >>> >I have >>> >"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC >

Re: Passing data across callbacks in ThreadPoolExecutor

2016-02-18 Thread Ian Kelly
On Thu, Feb 18, 2016 at 12:06 PM, Joseph L. Casale wrote: > On Thur, Feb 17, 2016 at 9:24 AM, Ian Kelly wrote: >>> What is the pattern for chaining execution of tasks with ThreadPoolExecutor? >>> Callbacks is not an adequate facility as each task I have will generate new >>> output. >> >> Can yo

Re: Guido on python3 for beginners

2016-02-18 Thread Rustom Mody
On Thursday, February 18, 2016 at 9:22:10 PM UTC+5:30, Random832 wrote: > On Thu, Feb 18, 2016, at 07:25, Rustom Mody wrote: > > My beef is somewhat different: viz that post 70s (Pascal) and 80s > > (scheme) > > programming pedagogy has deteriorated with general purpose languages > > replacing > >

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread BartC
On 19/02/2016 00:30, Steven D'Aprano wrote: On Thu, 18 Feb 2016 10:32 pm, Chris Angelico wrote: The biggest disadvantage of Python is that, in a number of ways, it surprises people. Significant whitespace bugs a lot of experienced programmers This is why we cannot have nice things. "But what

Weird python 2.7 import thing

2016-02-18 Thread Dan Stromberg
OK, I'd rather be on 3.x, but that's not going to happen today. So 2.7. I have added directories to my sys.path hundreds of times before importing from them, and know what to expect from that. I confess, I don't have a lot of package or egg experience. However, I have a somewhat special (appare

Re: Guido on python3 for beginners

2016-02-18 Thread Steven D'Aprano
On Fri, 19 Feb 2016 02:51 am, Random832 wrote: > On Thu, Feb 18, 2016, at 07:25, Rustom Mody wrote: >> My beef is somewhat different: viz that post 70s (Pascal) and 80s >> (scheme) >> programming pedagogy has deteriorated with general purpose languages >> replacing >> 'teaching-purpose language' f

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Steven D'Aprano
On Fri, 19 Feb 2016 02:35 am, wrong.addres...@gmail.com wrote: > I am almost eager to do this but want to be sure that I know the pitfalls > in using Python for my purposes. Thanks for your encouraging response. Honestly "wrong.address.1", the ONLY pitfall you need to be aware of is to beware of

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Mark Lawrence
On 18/02/2016 11:32, Chris Angelico wrote: On Thu, Feb 18, 2016 at 10:11 PM, wrote: Almost everything points positively for Python. Thanks to all of you who have responded. But please also tell me the disadvantages of Python. If I start using Python, I should be aware of the price I am payin

Ohnoes significant whitespace (was: Considering migrating to Python from Visual Basic 6 for engineering applications)

2016-02-18 Thread Ben Finney
Chris Angelico writes: > I'm talking about how people, those bags of flesh and thoughts, are > bugged out by the notion that *whitespace* should matter (other than > the mere presence/absence of it). It's the price you pay for being > different - people will have trouble comprehending you. To be

Re: Python keyword args can be any string

2016-02-18 Thread Ben Finney
Steven D'Aprano writes: > A work colleague wanted to pass an argument starting with "-" to a > function. > > Apparently he didn't have a specific argument in mind. He just wanted > to test the function to breaking point by passing invalid argument > names. That seems a reasonable test. >>>

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Chris Angelico
On Fri, Feb 19, 2016 at 11:30 AM, Steven D'Aprano wrote: > On Thu, 18 Feb 2016 10:32 pm, Chris Angelico wrote: > >> The biggest disadvantage of Python is that, in a number of ways, it >> surprises people. Significant whitespace bugs a lot of experienced >> programmers > > This is why we cannot hav

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Steven D'Aprano
On Thu, 18 Feb 2016 10:32 pm, Chris Angelico wrote: > The biggest disadvantage of Python is that, in a number of ways, it > surprises people. Significant whitespace bugs a lot of experienced > programmers This is why we cannot have nice things. "But what if we pass the source code through a syst

Re: Python keyword args can be any string

2016-02-18 Thread Steven D'Aprano
On Thu, 18 Feb 2016 06:55 pm, Mark Lawrence wrote: > On 18/02/2016 05:42, Steven D'Aprano wrote: >> Today I learned that **kwargs style keyword arguments can be any string: >> >> py> def test(**kw): >> ... print(kw) >> ... >> py> kwargs = {'abc-def': 42, '': 23, '---': 999, '123': 17} >> py> t

Re: testfixtures 4.8.0 Released!

2016-02-18 Thread Mark Lawrence
On 18/02/2016 22:27, Chris Withers wrote: Hi All, I'm pleased to announce the release of testfixtures 4.9.0 featuring the following: 4.8.0 or 4.9.0, that is the question, or should it be just how good is your version control? :) -- My fellow Pythonistas, ask not what our language can do fo

testfixtures 4.8.0 Released!

2016-02-18 Thread Chris Withers
Hi All, I'm pleased to announce the release of testfixtures 4.9.0 featuring the following: - Suffixes and well as prefixes for compare() assertion errors. - Appropriate metadata to indicate official support for Python 3.5. Thanks for Felix Yan for the metadata patch. Thanks to Wim Glenn for

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Dietmar Schwertberger
On 18.02.2016 18:49, wrong.addres...@gmail.com wrote: What do I lose by using an external library? With using matplotlib for your plots, you can easily create many kinds of plots. On the other hand, if integration with MS Office is a concern, other options may be more suitable for you as matplo

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-18 Thread Chris Angelico
On Fri, Feb 19, 2016 at 8:14 AM, Christian Gollwitzer wrote: > Am 16.02.16 um 03:02 schrieb Rick Johnson: >> >> On Friday, February 12, 2016 at 1:51:35 AM UTC-6, John Ladasky wrote: >>> >>> I like lazy evaluation. >> >> >> Well, it is a "Pythonic feature" no doubt. > > > > ?? I'm confused. Does Py

Re: Guido on python3 for beginners

2016-02-18 Thread Sven R. Kunze
On 18.02.2016 07:59, Paul Rubin wrote: Steven D'Aprano writes: I suppose that it is objectively correct that it is harder to learn than Python 2. But I don't think the learning curve is any steeper. If anything, the learning curve is ever-so-slightly less steep. I think py3 has more learning c

Re: PythonTidy

2016-02-18 Thread cjcollier
Hello Sir! First, thank you for creating this tool. next, I would recommend perltidy as a program to emulate. I'll paste the output of perltidy --help below. http://perltidy.sourceforge.net/ I could probably write a wrapper script to do this if you'd like. Cheers, C.J. $ perltidy --help

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-18 Thread Christian Gollwitzer
Am 16.02.16 um 03:02 schrieb Rick Johnson: On Friday, February 12, 2016 at 1:51:35 AM UTC-6, John Ladasky wrote: I like lazy evaluation. Well, it is a "Pythonic feature" no doubt. ?? I'm confused. Does Python have lazy evaluation? I thought that Python does eager evaluation. At least this

Re: Guido on python3 for beginners

2016-02-18 Thread John Ladasky
On Wednesday, February 17, 2016 at 11:28:17 PM UTC-8, Chris Angelico wrote: > 5) print statement/function. Py3 forces you to put parentheses on it, > which is no different from C's printf() or Pike's write() or any > number of other languages where console I/O needs no language support. > Maybe a

Re: Question on keyword arguments

2016-02-18 Thread Tim Chase
On 2016-02-18 10:57, grsm...@atlanticbb.net wrote: > Tim, the 'crazy-other-result format' is the > result returned by the database, nothing > I can do about that :) then, much like converting byte-strings to unicode strings as early as possible and converting them back to byte-strings as late as p

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Tim Chase
On 2016-02-18 07:33, wrong.addres...@gmail.com wrote: > Another question I have is regarding reading numerical data from > text files. Is it necessary to read one character at a time, or can > one read like in Fortran and Basic (something like Input #5, X1, > X2, X3)? A lot of my work is extractin

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Tim Chase
On 2016-02-18 09:58, wrong.addres...@gmail.com wrote: > How long can I depend on VB? Are you talking the VB6-and-before, or VB.Net? Given that MS dropped support for the VB6 line a decade ago (2005-2008 depending on whether you had extended support) with little to no help in transitioning to VB.N

Re: Passing data across callbacks in ThreadPoolExecutor

2016-02-18 Thread Joseph L. Casale
On Thur, Feb 17, 2016 at 9:24 AM, Ian Kelly wrote: >> What is the pattern for chaining execution of tasks with ThreadPoolExecutor? >> Callbacks is not an adequate facility as each task I have will generate new >> output. > > Can you specify in more detail what your use case is? > > If you don't m

Re: Will file be closed automatically in a "for ... in open..." statement?

2016-02-18 Thread Jeremy Leonard
On Tuesday, February 16, 2016 at 3:39:34 AM UTC-5, jf...@ms4.hinet.net wrote: > I know > > with open('foo.txt') as f: > ...do something... > > will close the file automatically when the "with" block ends. > > I also saw codes in a book: > > for line in open('foo.txt'): >

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
On Thursday, 18 February 2016 18:24:55 UTC+2, Dan Strohl wrote: > I totally agree with Chris here, try it out, do some simpler things to get > your feet wet before committing to redoing hundreds of thousands of lines of > code in it. Find a few of the "deal breakers" and try to solve them in >

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
On Thursday, 18 February 2016 18:06:29 UTC+2, Chris Angelico wrote: > On Fri, Feb 19, 2016 at 2:49 AM, wrote: > > Thanks. You have guided me quite well, and I am almost ready to declare > > that I will use Python for the next few decades. > > > > Don't declare like that - just start using it,

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
On Thursday, 18 February 2016 18:01:17 UTC+2, Dan Strohl wrote: > Disadvantages of python... (compared to VB) > > That's a hard one, but here are my thoughts: (keep in mind that these kinds > of discussions are subjective and much is based on the background and > experience of the coder, these

Re: How to properly override the default factory of defaultdict?

2016-02-18 Thread Herman
d = dictutil.DefaultDictWithEnhancedFactory(lambda k: k) self.assertEqual("apple", d['apple']) From: Ben Finney > > you are using the inheritance hierarchy but thwarting it by not using > ‘super’. Instead:: > > super().__init__(self, default_factory, *a, **kw) > > and:: > > super(

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
On Thursday, 18 February 2016 17:59:59 UTC+2, William Ray Wing wrote: > > On Feb 18, 2016, at 10:33 AM, wrong.addres...@gmail.com wrote: > > > > torstai 18. helmikuuta 2016 17.21.32 UTC+2 Oscar Benjamin kirjoitti: > >> On 18 February 2016 at 11:32, Chris Angelico wrote: > >> > > [byte] > > >>

Re: extending PATH on Windows?

2016-02-18 Thread Ulli Horlacher
Ulli Horlacher wrote: > > but simpler still and more reliable to just call QueryValueEx. > > I find it more complicated. I have now (after long studying docs and examples):: def get_winreg(key,subkey): try: rkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER,key,0,winreg.KEY_READ) rvalue,

Re: extending PATH on Windows?

2016-02-18 Thread Ulli Horlacher
eryk sun wrote: > https://hg.python.org/cpython/file/v2.7.11/Tools/scripts/win_add2path.py > > But there are a few issues with this script. (... lot of flaws ...) > Here's a new version for Python 2. I generalized the shell-variable > replacement to a list of well-known folders. Great script

Re: Guido on python3 for beginners

2016-02-18 Thread Matt Wheeler
On Thu, 18 Feb 2016 11:07 Chris Angelico wrote: > By the way... For bash users, adding this to .bashrc may make venvs a > bit easier to keep straight: > > checkdir() { > [ -n "$VIRTUAL_ENV" ] && ! [[ `pwd` =~ `dirname $VIRTUAL_ENV`* ]] > && echo Deactivating venv $VIRTUAL_ENV... && deactivate

Re: extending PATH on Windows?

2016-02-18 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > >I have > >"Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC > >v.1500 32 bit (Intel)] on win32" > >and there is no "win_add2path.py" > > > C:\Python_x64\Python27\Tools\scripts\win_add2path.py Ok, It is here in C:\Python27\Tools\scripts\win_add2path.py

RE: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Dan Strohl
I totally agree with Chris here, try it out, do some simpler things to get your feet wet before committing to redoing hundreds of thousands of lines of code in it. Find a few of the "deal breakers" and try to solve them in Python (create a hello world app in python, then package it in an exe an

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Chris Angelico
On Fri, Feb 19, 2016 at 2:49 AM, wrote: > Thanks. You have guided me quite well, and I am almost ready to declare that > I will use Python for the next few decades. > Don't declare like that - just start using it, and see what you think :) But I would be very much surprised if Python doesn't ge

RE: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Dan Strohl
Disadvantages of python... (compared to VB) That's a hard one, but here are my thoughts: (keep in mind that these kinds of discussions are subjective and much is based on the background and experience of the coder, these are also assuming that 100% of your audience is on windows, as soon as yo

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread William Ray Wing
> On Feb 18, 2016, at 10:33 AM, wrong.addres...@gmail.com wrote: > > torstai 18. helmikuuta 2016 17.21.32 UTC+2 Oscar Benjamin kirjoitti: >> On 18 February 2016 at 11:32, Chris Angelico wrote: >> [byte] >> It sounds to me as if all of your needs can be solved in pure Python >> code possibly u

Re: Question on keyword arguments

2016-02-18 Thread grsmith
Thanks to all who responded, it is a big help. Tim, the 'crazy-other-result format' is the result returned by the database, nothing I can do about that :) Thanks again George -Original Message- From: Chris Angelico Sent: Thursday, February 18, 2016 10:45 AM Cc: python-list@python.or

Re: Guido on python3 for beginners

2016-02-18 Thread Random832
On Thu, Feb 18, 2016, at 07:25, Rustom Mody wrote: > My beef is somewhat different: viz that post 70s (Pascal) and 80s > (scheme) > programming pedagogy has deteriorated with general purpose languages > replacing > 'teaching-purpose language' for teaching. The flaw in this idea is right there in

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
On Thursday, 18 February 2016 13:32:58 UTC+2, Chris Angelico wrote: > On Thu, Feb 18, 2016 at 10:11 PM, wrote: > > Almost everything points positively for Python. Thanks to all of you who > > have responded. But please also tell me the disadvantages of Python. If I > > start using Python, I sh

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Oscar Benjamin
On 18 February 2016 at 15:33, wrote: >> It sounds to me as if all of your needs can be solved in pure Python >> code possibly using some of the popular extension modules from PyPI. >> In this case it's actually very easy to package/install. You can >> package your code simply by zipping it up wit

Re: Question on keyword arguments

2016-02-18 Thread Chris Angelico
On Fri, Feb 19, 2016 at 2:39 AM, Dan Strohl wrote: > So, define a return object like: > > from collections import UserList > class TestResponse(UserList): > def __str__(self): > return '\0xfe%s' % '\0xfe'.join(self.data) > > ...and return that object. Out of interest, why UserList rat

Re: TypeError: not all arguments converted during string formatting

2016-02-18 Thread Ganesh Pal
On Wed, Feb 17, 2016 at 7:32 PM, Chris Angelico wrote: > The print statement/function happily accepts multiple arguments, and > will join them according to a set of predefined rules. The logging > functions don't have those rules, so they take one message and some > optional parameters. Try this,

RE: Question on keyword arguments

2016-02-18 Thread Dan Strohl
I have approached this in a few different ways, depending on the use case. I have done the "return_type=list" before, though I don't really like it... it's too easy to forget or mistype the exact name used for the switch. If you do this, I also recommend setting some class or module variables t

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
torstai 18. helmikuuta 2016 16.08.05 UTC+2 William Ray Wing kirjoitti: > > On Feb 17, 2016, at 2:49 PM, wrong.addres...@gmail.com wrote: > > > > I am mostly getting positive feedback for Python. > > > > It seems Python is used more for web based applications. Is it equally fine > > for creating

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
torstai 18. helmikuuta 2016 17.21.32 UTC+2 Oscar Benjamin kirjoitti: > On 18 February 2016 at 11:32, Chris Angelico wrote: > > On Thu, Feb 18, 2016 at 10:11 PM, wrote: > >> Almost everything points positively for Python. Thanks to all of you who > >> have responded. But please also tell me the

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Oscar Benjamin
On 18 February 2016 at 11:32, Chris Angelico wrote: > On Thu, Feb 18, 2016 at 10:11 PM, wrote: >> Almost everything points positively for Python. Thanks to all of you who >> have responded. But please also tell me the disadvantages of Python. If I >> start using Python, I should be aware of th

Re: Question on keyword arguments

2016-02-18 Thread Tim Chase
On 2016-02-18 09:00, grsm...@atlanticbb.net wrote: > Would this be the correct way to return > a list as a default result. > > Also, would the list be the preferable result (to a python > programmer) ? > > def test(command, return_type='LIST'): > """ Go to database and return data""" > if

Re: Question on keyword arguments

2016-02-18 Thread Peter Otten
grsm...@atlanticbb.net wrote: > Would this be the correct way to return > a list as a default result. If it does what you want it to do it is "correct" as in "complies with specification". > Also, would the list be the preferable result (to a python programmer) ? A list as a return value is O

Question on keyword arguments

2016-02-18 Thread grsmith
Would this be the correct way to return a list as a default result. Also, would the list be the preferable result (to a python programmer) ? def test(command, return_type='LIST'): """ Go to database and return data""" if return_type == 'LIST': result = ['ONE', 'TWO', 'THREE']

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread William Ray Wing
> On Feb 17, 2016, at 2:49 PM, wrong.addres...@gmail.com wrote: > > I am mostly getting positive feedback for Python. > > It seems Python is used more for web based applications. Is it equally fine > for creating stand-alone *.exe's? Can the same code be compiled to run on > Linux or Android o

EuroPython 2016: Call for Proposals

2016-02-18 Thread M.-A. Lemburg
We’re looking for proposals on every aspect of Python: programming from novice to advanced levels, applications and frameworks, or how you have been involved in introducing Python into your organization. EuroPython is a community conference and we are eager to hear about your experience. Please al

Re: extending PATH on Windows?

2016-02-18 Thread eryk sun
On Wed, Feb 17, 2016 at 6:53 PM, Dennis Lee Bieber wrote: > On Wed, 17 Feb 2016 17:49:11 + (UTC), Ulli Horlacher > declaimed the following: > >>Thorsten Kampe wrote: >> >>> By the way: there is a script called `win_add2path.py` in your Python >>> distribution >> >>I have >>"Python 2.7.11 (v2

Re: pymysql question

2016-02-18 Thread MRAB
On 2016-02-18 12:08, tdspe...@gmail.com wrote: Hi All I have many mysql tables in a conversion I am doing - the table field names are a mixture of lower case and upper case - do I have to covert all to one case to over come Python not finding the field. rows ocur.fetchall() for row in rows:

Re: Guido on python3 for beginners

2016-02-18 Thread Rustom Mody
On Thursday, February 18, 2016 at 12:17:26 PM UTC+5:30, Steven D'Aprano wrote: > On Wednesday 17 February 2016 19:51, Rustom Mody wrote: > > > I hope someone can help me find this link: There is some record that Guido > > has said that python3 is probably a bit harder on noobs than python2. > > >

pymysql question

2016-02-18 Thread tdsperth
Hi All I have many mysql tables in a conversion I am doing - the table field names are a mixture of lower case and upper case - do I have to covert all to one case to over come Python not finding the field. rows ocur.fetchall() for row in rows: print(row['newname']) #which fails becaus

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Chris Angelico
On Thu, Feb 18, 2016 at 10:11 PM, wrote: > Almost everything points positively for Python. Thanks to all of you who have > responded. But please also tell me the disadvantages of Python. If I start > using Python, I should be aware of the price I am paying. Speed is not a big > problem for me,

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
Almost everything points positively for Python. Thanks to all of you who have responded. But please also tell me the disadvantages of Python. If I start using Python, I should be aware of the price I am paying. Speed is not a big problem for me, so an interpreted language is fine. Is packaging/

Re: Guido on python3 for beginners

2016-02-18 Thread Chris Angelico
On Thu, Feb 18, 2016 at 9:57 PM, Cem Karan wrote: > I agree with Chris on all his points. My personal feeling is that Py3 is the > way to go for teaching in the future; its just that little bit more > consistent across the board. And the things that are confusing are not > things that beginne

Re: Guido on python3 for beginners

2016-02-18 Thread Cem Karan
On Feb 18, 2016, at 4:57 AM, Chris Angelico wrote: > On Thu, Feb 18, 2016 at 7:40 PM, Terry Reedy wrote: >> To my mind, the numerous duplications and overlaps in 2.7 that are gone in >> 3.x make 2.7 the worse version ever for beginners. > > Hmm. I was teaching on 2.7 up until last year, and fo

Trying to build Python from Source on HPUX 11.23 IA fails

2016-02-18 Thread bthk55
I am trying to build python from source on HPUX 11.23 IA I am using the latest python version 3.5.1. I am getting the following error: Error 172: "Python/pytime.c", line 627 # Undeclared variable 'CLOCK_MONOTONIC'. const clockid_t clk_id = CLOCK_MONOTONIC; ^^^ *** Error

Re: Testing whether the VPN is running?

2016-02-18 Thread Adam Funk
On 2016-02-18, Ervin Hegedüs wrote: > Hi Adam, > > On Thu, Feb 18, 2016 at 09:26:58AM +, Adam Funk wrote: >> I'd like to test (inside a python 3 program) whether the VPN is >> running or not. The only thing I can think of so far is to use >> subprocess to run the 'ifconfig' command, then chec

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Chris Angelico
On Thu, Feb 18, 2016 at 7:17 PM, wrote: > Thanks to all of you who have responded. One point two of you ask me is why I > want to shift from Visual Basic. > > Most of my software is in VB6 (and VB3), and converting to VB.net is not very > pleasant. I have learnt enough VB.net to manage most of

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread Oscar Benjamin
On 18 February 2016 at 08:17, wrote: > Is it easy to create vector graphics files of plots in Python? Yes > In VB6, I wrote my own code to generate EPS files. Then people who demand jpg > and gif files could be given those by converting the EPS with the desired > resolution. That sounds a lo

Re: Guido on python3 for beginners

2016-02-18 Thread Chris Angelico
On Thu, Feb 18, 2016 at 7:40 PM, Terry Reedy wrote: > To my mind, the numerous duplications and overlaps in 2.7 that are gone in > 3.x make 2.7 the worse version ever for beginners. Hmm. I was teaching on 2.7 up until last year, and for the most part, we taught a "compatible with Py3" subset of t

Re: Testing whether the VPN is running?

2016-02-18 Thread Ervin Hegedüs
Hi Adam, On Thu, Feb 18, 2016 at 09:26:58AM +, Adam Funk wrote: > I'd like to test (inside a python 3 program) whether the VPN is > running or not. The only thing I can think of so far is to use > subprocess to run the 'ifconfig' command, then check its output for > 'tun0'. Is there a better

Testing whether the VPN is running?

2016-02-18 Thread Adam Funk
I'd like to test (inside a python 3 program) whether the VPN is running or not. The only thing I can think of so far is to use subprocess to run the 'ifconfig' command, then check its output for 'tun0'. Is there a better way? Thanks. -- Nam Sibbyllam quidem Cumis ego ipse oculis meis vidi in

Re: Guido on python3 for beginners

2016-02-18 Thread Terry Reedy
On 2/18/2016 2:27 AM, Chris Angelico wrote: On Thu, Feb 18, 2016 at 5:47 PM, Steven D'Aprano wrote: There are more features in Python 3, so in that trivial sense of "more to learn", I suppose that it is objectively correct that it is harder to learn than Python 2. But I don't think the learning

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-18 Thread wrong . address . 1
Thanks to all of you who have responded. One point two of you ask me is why I want to shift from Visual Basic. Most of my software is in VB6 (and VB3), and converting to VB.net is not very pleasant. I have learnt enough VB.net to manage most of the things I will need, but it always gives me a

Re: Guido on python3 for beginners

2016-02-18 Thread INADA Naoki
In Python 3, I don't required to teach followings to newbies. 1. Don't do `class Foo:`, do `class Foo(object):`. 2. Don't do `isinstance(x, int)`, do `isinstance(x, (int, long))`. 3. Don't return non-ASCII string from `__repr__`, otherwise UnicodeError happens in logging and you will lost your