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

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

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 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

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: 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

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

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 >

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

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

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: 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

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

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

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

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

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. > >

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: 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

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

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

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: 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

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""" >

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

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 >

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: 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

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

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

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

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

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: 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:

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

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

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

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

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

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

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

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 =

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: > >>

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,

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,

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

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: 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: 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

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

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

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

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: [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: 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: 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

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

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

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

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

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>

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

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 > >

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

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

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

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: 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'

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

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

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: 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

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

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

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.

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: 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

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-18 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: python current -- Added file: http://bugs.python.org/file41950/md5-sess_not_implem_cur_v2.diff ___ Python tracker ___

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-18 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: python 2.7 -- Added file: http://bugs.python.org/file41949/md5-sess_not_implem_27_v2.diff ___ Python tracker ___

[issue26378] Typo in regex documentation

2016-02-18 Thread Georg Brandl
Georg Brandl added the comment: Thanks for the report! -- nosy: +georg.brandl ___ Python tracker ___ ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-18 Thread Aymeric Augustin
Aymeric Augustin added the comment: martin.panter: of course, I'm fine with integrating that code into Python. deronnax: could you create a ticket on https://code.djangoproject.com/ highlighting the differences between Django's original implementation and the improved version that you worked

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-18 Thread SilentGhost
SilentGhost added the comment: Mathieu, nothing was attached. The penalty's worth only a few if statements, I wouldn't worry too much about it. Besides, a C version is going to be provided as well, right? Perhaps the following approach might solve the subclasses problem: regex =

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-18 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: crap, here is the attachment. Yeah, but I really would like to use regex in the C version (unless you strongly disadvise), so we will have the same logic and the same problem. And I never made a patch for the C interpreter itself, so the C equivalent is not

[issue26302] cookies module allows commas in keys

2016-02-18 Thread Jason R. Coombs
Jason R. Coombs added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26049] Poor performance when reading large xmlrpc data

2016-02-18 Thread Cédric Krier
Cédric Krier added the comment: ping -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-18 Thread SilentGhost
SilentGhost added the comment: Probably only other solution that I see is to add the third argument, an actual class, e.g.: _parse_isodatetime(cls, string, datetime) -- ___ Python tracker

[issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9

2016-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Ned. I tried with: ./configure --with-pydebug MACOSX_DEPLOYMENT_TARGET=10.9 && make I'm still able to reproduce. I plan to find some time this weekend to dig into the source and see if I can narrow down the cause (or at least make the hang easier

[issue26379] zlib decompress as_bytearray flag

2016-02-18 Thread Martin Panter
Martin Panter added the comment: This is an unusual technique. I can’t think of any other standard library routine that returns a new bytearray instead of a bytes object. Normally there are sister functions with an -into() suffix that accept a pre-allocated buffer. Examples are

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-02-18 Thread Martin Panter
Martin Panter added the comment: I do wonder if NotImplementedError is the right exception. According to the documentation it is derived from RuntimeError and is meant for abstract methods, i.e. it is a programmer error. Other cases in urllib.request raise ValueError (e.g.

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-18 Thread Martin Panter
Martin Panter added the comment: Did you see my class attributes suggestion a couple messages back? That might solve your dispatch problem: def _parse_isodatetime(cls, string): match = cls._iso_regex.match(...) class time: _iso_regex = re.compile(...) # or time._iso_regex =

[issue26309] socketserver.BaseServer._handle_request_noblock() doesn't shutdown request if verify_request is False

2016-02-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 651a6d47bc78 by Martin Panter in branch '3.5': Issue #26309: Shut down socketserver request if verify_request() is false https://hg.python.org/cpython/rev/651a6d47bc78 New changeset 0768edf5878d by Martin Panter in branch 'default': Issue #26309:

[issue26323] Add a assert_called() method for mock objects

2016-02-18 Thread STINNER Victor
STINNER Victor added the comment: I reviewed your patch. -- ___ Python tracker ___ ___ Python-bugs-list

[issue26309] socketserver.BaseServer._handle_request_noblock() doesn't shutdown request if verify_request is False

2016-02-18 Thread Martin Panter
Martin Panter added the comment: For the Python 2 version I had to make some small changes to the test. I used indirection instead of “nonlocal”, and replaced the super() call because the classes are apparently the wrong kind for super(). -- resolution: -> fixed stage: patch review

[issue26323] Add a assert_called() method for mock objects

2016-02-18 Thread Amit Saha
Amit Saha added the comment: Thanks for the review. Updated patch addressing the comments. -- ___ Python tracker ___

[issue26381] Add 'geo' URI scheme (RFC 5870) to urllib.parse.uses_params

2016-02-18 Thread Serhiy Int
Changes by Serhiy Int : -- components: Library (Lib) nosy: Serhiy Int priority: normal severity: normal status: open title: Add 'geo' URI scheme (RFC 5870) to urllib.parse.uses_params versions: Python 3.6 ___ Python tracker

[issue26323] Add a assert_called() method for mock objects

2016-02-18 Thread Amit Saha
Amit Saha added the comment: Updated patch -- Added file: http://bugs.python.org/file41952/issue26323.patch ___ Python tracker ___

[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-18 Thread Amit Saha
Changes by Amit Saha : -- title: Add a assert_called() method for mock objects -> Add assert_called() and assert_called_once() methods for mock objects ___ Python tracker

[issue1731717] race condition in subprocess module

2016-02-18 Thread Krishna Oza
Krishna Oza added the comment: Hi, Could anyone help here to identify in which Python release the bug is fixed. I am unable to deduce from the bug tracker interface in which release this issue is fixed. Regards. -- nosy: +Krishna Oza ___ Python

[issue26382] List object memory allocator

2016-02-18 Thread Catalin Gabriel Manciu
New submission from Catalin Gabriel Manciu: Hi All, This is Catalin from the Server Scripting Languages Optimization Team at Intel Corporation. I would like to submit a patch that replaces the 'malloc' allocator used by the list object (Objects/listobject.c) with the small object allocator

[issue26382] List object memory allocator

2016-02-18 Thread Catalin Gabriel Manciu
Changes by Catalin Gabriel Manciu : Added file: http://bugs.python.org/file41954/listobject_CPython2.patch ___ Python tracker

  1   2   >