Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com  wrote:
> Some where i am missing simple logic :)
> 
> =
> child = pexpect.spawn('ssh hari@hostname')
> child.logfile = sys.stdout
> child.expect('hari\'s Password: ')
> =
> 
> getting error as follows:
> 
> child.expect('hari\'s Password: ')
> TypeError: must be str, not bytes
> ===
> 
> Thanks...

Hey All,

I am able to achieve this using pxssh.. thank you for help...
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24991] Define instance mutability explicitly on type objects

2015-09-09 Thread Nick Coghlan

Nick Coghlan added the comment:

Also adding Trent Nelson to the nosy list, as I believe this capability could 
potentially be relevant to PyParallel.

The reason I say that is that if instance mutability (or the lack thereof) 
becomes a first class language concept, then we may be able to adopt a Rust 
style model where mutability can be made *thread relative*.

Thread relative immutability would be trickier than global immutability, but 
hopefully still feasible.

--
nosy: +trent

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Paul Moore

Paul Moore added the comment:

> Maybe we can special-case pip uninstalling it from the site-packages folder? 
> *Paul* - any thoughts?

Sorry, I've been following this thread but it's been moving pretty fast, so I'm 
probably replying too late to be helpful now :-(

One alternative thought I had was to bundle vcruntime140.dll in a separate 
wheel, which other wheels can depend on. Then we get pip's usual dependency 
resolution to handle ensuring that the runtime is present.

It's possible to special-case vcruntime, what I'd do is modify distutils to 
omit vcruntime140.dll from the RECORD file - then nothing (pip, distlib, other 
install tools) views the vcruntime file as being "owned" by a particular 
package. I'm not overly keen on that solution, though, as it's clearly a hack 
and would be a maintainability issue going forward. But it does keep the code 
changes isolated to the core, rather than needing pip/setuptools changes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Here's an attempt at a What's New section for this change.  I expect it's 
wrong!   Maybe someone can fix it.  Maybe it's actually better than not having 
one at all.

Can we maybe get a round or two of edits on this and get something in for 3.5 
final?

--
Added file: 
http://bugs.python.org/file40420/larry.whatsnew35.ext.module.suffix.diff.1.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55b62e2c59f8 by Terry Jan Reedy in branch '2.7':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/55b62e2c59f8

New changeset c51514826126 by Terry Jan Reedy in branch '3.4':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/c51514826126

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Reply to author, reply to list, reply to all (was: Need Help w. PIP!)

2015-09-09 Thread Ben Finney
Terry Reedy  writes:

> On 9/8/2015 6:19 PM, Cody Piersall wrote:
> > On Sat, Sep 5, 2015 at 3:14 AM, Thomas 'PointedEars' Lahn
> > > wrote:
> >  >
> >  > Cody Piersall wrote:
> >  >
> >  > > Please respond to the list as well as the person you're
> >  > > actually talking to. It works out better for everyone that way.
> >  > > (You should just have to "reply all" instead of "reply").
>
> [Reply] should send the reply to the list.

The function named “reply” normally means “reply individually to the
author”, and that's how it needs to stay.

The “reply to the list” function is present in many mail clients, and
works fine for this mailing list; Google Mail seems to be a notable
exception that its users should ask to change.

> > Some people email the list, but aren't subscribed to it.

People who fit that description are not participants in the forum, so
excluding them from forum replies is the right thing to do.

> > So I guess a better rule is to just reply-to-all for the OP?
>
> Please no, not as a routine.

Agreed.

-- 
 \   “Anyone who puts a small gloss on [a] fundamental technology, |
  `\  calls it proprietary, and then tries to keep others from |
_o__)   building on it, is a thief.” —Tim O'Reilly, 2000-01-25 |
Ben Finney

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


[issue25038] test_os.TestSendfile.test_keywords() introduced a regression

2015-09-09 Thread STINNER Victor

New submission from STINNER Victor:

The change e42e2bd47168 introduced a regression, test_os started to fail on 
FreeBSD. What is the rationale of the change? For example, test_os pass in the 
previous build on the same buildbot.

I don't know if it makes sense to pass None to headers and/or trailers.

Please revert the change or fix the test. ((But we must continue to test 
headers=None and trailers=None, even if these parameters now raise a TypeError).

==
ERROR: test_keywords (test.test_os.TestSendfile)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_os.py", line 
2334, in test_keywords
headers=None, trailers=None, flags=0)
TypeError: sendfile() headers must be a sequence or None

--
messages: 250292
nosy: haypo, martin.panter
priority: normal
severity: normal
status: open
title: test_os.TestSendfile.test_keywords() introduced a regression
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Reply to author, reply to list, reply to all (was: Need Help w. PIP!)

2015-09-09 Thread Chris Angelico
On Wed, Sep 9, 2015 at 4:37 PM, Nick Sarbicki  wrote:
> My question then is do you reply to all (with a clean cc list but including
> an OP from outside the list) in response to a persons question, even if the
> question is relatively simple.
>
> For me it's appreciated so that you know someone is dealing with it. But
> then it can also result in flooding your inbox.

Personally, what I do (which I'm doing with this post) is to use
Gmail's "reply-all" feature, and then manually delete the individual
addresses. Sometimes, half way through writing up a post, I decide to
send it privately rather than to the list, and then I delete the list
rather than the author. (Not usually with this list, though; more
often with Savoynet, where private replies are more common, and
there's no newsgroup equivalence.)

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


Re: Reply to author, reply to list, reply to all

2015-09-09 Thread Ben Finney
Chris Angelico  writes:

> Personally, what I do (which I'm doing with this post) is to use
> Gmail's "reply-all" feature, and then manually delete the individual
> addresses.

That is testimony in support of the position that Google Mail is a
poorly-designed interface for discussion forums such as mailing lists.

Google Mail, like any other mail client, has full access to all the
technical information (specified in RFC 3696) needed to implement a
correct “reply to list” behaviour.

Users shouldn't need to do anything tediously manual like you describe,
they should be presented with an obvious “reply to the same place”
function, as implemented in many mail clients for over a decade.

That Google Mail continues to fail in this regard is something its users
need to apply pressure to fix, or choose better mail clients until it
improves.

-- 
 \  “Anyone who believes exponential growth can go on forever in a |
  `\finite world is either a madman or an economist.” —Kenneth |
_o__) Boulding |
Ben Finney

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


Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Tim Golden
On 09/09/2015 08:59, Laszlo Lebrun via Python-list wrote:
> On Tue, 08 Sep 2015 23:35:33 +0100, Mark Lawrence wrote:
> 
>> On 08/09/2015 20:14, Laszlo Lebrun via Python-list wrote:
>>>
>>> Dear group,
>>> I do use Windows 7 and have a user name with diacritics.
>>>
>>> Whenever I am querying an extension with pip, it will fail since it
>>> does not pass on the user folder correctly.
>>> I thought PIP deals well with unicode, doesn't it?

> Yes, you are right, let me append the message.
> Just after a fresh install of Python with PIP on Windows. 
> Whenever I start PIP, I get:
> "Fatal error in launcher: Unable to create process using '"C:\Users
> \BürgerGegenFluglärm\AppData\Local\Programs\Python\Python35-32
> \python.exe"  "C:\Users\B³rgerGegenFluglõrm\AppData\Local\Programs\Python
> \Python35-32\Scripts\pip.exe" '"
> 
> Where the correct path is "C:\Users\BürgerGegenFluglärm\AppData..."
> 
> The funny thing is that the message mentions the path twice, with 
> different wrong codings.
> :-(
> 

What version of pip are you using? Since (from the path) I guess you
have a 32-bit version of Python 3.5, I assume it's the version which was
installed with that but just check:

pip --version

Hopefully someone here can help, but in fact pip is not part of core
Python: the ensurepip mechanism (which *is* part of core Python)
bootstraps a recent version of pip but it's maintained elsewhere.

So you may need to raise this as a bug on the Pip tracker:

https://github.com/pypa/pip/issues

TJG

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


[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-09 Thread Anthon van der Neut

Anthon van der Neut added the comment:

The problem lies in the recursive call to _vformat which might consume fields 
without name ({}) and increment auto_arg_index, but that
incremented value was not returned to the parent.

Since the line became longer than pep8 allowed I wrapped all of the method call 
arguments to the next line, hope that that's ok.

The patch is against the mercurial repository and works for 3.4.1 upwards.

--
keywords: +patch
Added file: http://bugs.python.org/file40419/25034.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Reply to author, reply to list, reply to all

2015-09-09 Thread Ben Finney
Nick Sarbicki  writes:

> My question then is do you reply to all (with a clean cc list but
> including an OP from outside the list) in response to a persons
> question

If the question was addressed to this forum, then answering the question
should also be addressed to this forum. So: reply to list.

> even if the question is relatively simple.

I don't think the simplicity of the question changes the above.

> For me it's appreciated so that you know someone is dealing with it.

If you're asking a question in a public discussion forum (such as this
one), then to see the ensuing dicussion you need to subscribe.

> But then it can also result in flooding your inbox.

If you don't want that, then don't have them delivered to your inbox.
You can, for example, filter messages that are part of this forum to a
separate mailbox; or you can subscribe using a non-email method such as
NNTP.

-- 
 \  “Courage is not the absence of fear, but the decision that |
  `\ something else is more important than fear.” —Ambrose Redmoon |
_o__)  |
Ben Finney

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


[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Given Victor's reluctance to get this in to 3.5.0, this can't even be marked as 
a "deferred blocker" anymore.  Demoting to normal priority.

--
priority: deferred blocker -> normal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Chris Angelico
On Wed, Sep 9, 2015 at 5:59 PM, Laszlo Lebrun via Python-list
 wrote:
> Whenever I start PIP, I get:
> "Fatal error in launcher: Unable to create process using '"C:\Users
> \BürgerGegenFluglärm\AppData\Local\Programs\Python\Python35-32
> \python.exe"  "C:\Users\B³rgerGegenFluglõrm\AppData\Local\Programs\Python
> \Python35-32\Scripts\pip.exe" '"
>
> Where the correct path is "C:\Users\BürgerGegenFluglärm\AppData..."
>
> The funny thing is that the message mentions the path twice, with
> different wrong codings.
> :-(

Peculiar. I don't know if it helps, but the first one seems to have
been encoded UTF-8 and then decoded CP437; and the second has been
encoded Latin-1 and decoded CP850.

>>> "BürgerGegenFluglärm".encode("utf-8").decode("437")
'BürgerGegenFluglärm'
>>> "BürgerGegenFluglärm".encode("iso-8859-1").decode("850")
'B³rgerGegenFluglõrm'

But why those particular encodings... weird.

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


From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-09 Thread Thomas Güttler
Up to now we use simple logging to files.

We don't use syslog or an other server based solution.

I am unsure which architecture works for our environment.

Our environment:

 - django based applications
 - a lot of batch/cron jobs (non web gui) processing
 - One linux server runs several systems. Each system has its own virtualenv.
 - servers are running in the intranet of our customers. 
 - We have access via VPN, but it is slow. And sometimes down for some minutes.
 - 40MByte logs per day per server.

Why we are unhappy with logging to files:

 - filtering: We don't want to get INFO messages over the VPN.
   Background: Sometimes a there is too much logging and we don't want 
   to pull gigabytes over the VPN.

 - Rotating: Rotating files is possible, but somehow cumbersome.

 - Support structured logging of values (json) in the future.

I have not locked at  Sentry or Logstash in detail.

Which solution could fit for our environment?

Please ask if you have question!

Regards,
  Thomas Güttler
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-09-09 Thread Camilla Montonen

New submission from Camilla Montonen:

The link to Stackless Python here 
https://docs.python.org/2/faq/design.html#can-t-you-emulate-threads-in-the-interpreter-instead-of-relying-on-an-os-specific-thread-implementation
is broken. 
I get an "Internal Server Error" when trying to access it.

--
assignee: docs@python
components: Documentation
messages: 250297
nosy: Winterflower, docs@python
priority: normal
severity: normal
status: open
title: Docs: Link to Stackless Python in Design and History FAQ section is 
broken
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Reply to author, reply to list, reply to all (was: Need Help w. PIP!)

2015-09-09 Thread Nick Sarbicki
On 9 Sep 2015 07:11, "Ben Finney"  wrote:
>
> Terry Reedy  writes:
>
> > On 9/8/2015 6:19 PM, Cody Piersall wrote:
> > > On Sat, Sep 5, 2015 at 3:14 AM, Thomas 'PointedEars' Lahn
> > > > wrote:
> > >  >
> > >  > Cody Piersall wrote:
> > >  >
> > >  > > Please respond to the list as well as the person you're
> > >  > > actually talking to. It works out better for everyone that way.
> > >  > > (You should just have to "reply all" instead of "reply").
> >
> > [Reply] should send the reply to the list.
>
> The function named “reply” normally means “reply individually to the
> author”, and that's how it needs to stay.
>
> The “reply to the list” function is present in many mail clients, and
> works fine for this mailing list; Google Mail seems to be a notable
> exception that its users should ask to change.
>
> > > Some people email the list, but aren't subscribed to it.
>
> People who fit that description are not participants in the forum, so
> excluding them from forum replies is the right thing to do.
>
> > > So I guess a better rule is to just reply-to-all for the OP?
> >
> > Please no, not as a routine.
>
> Agreed.
>
> --
>  \   “Anyone who puts a small gloss on [a] fundamental technology, |
>   `\  calls it proprietary, and then tries to keep others from |
> _o__)   building on it, is a thief.” —Tim O'Reilly, 2000-01-25 |
> Ben Finney
>
> --
> https://mail.python.org/mailman/listinfo/python-list

My question then is do you reply to all (with a clean cc list but including
an OP from outside the list) in response to a persons question, even if the
question is relatively simple.

For me it's appreciated so that you know someone is dealing with it. But
then it can also result in flooding your inbox.

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


[issue25038] test_os.TestSendfile.test_keywords() introduced a regression

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

I believe revision e42e2bd47168 is actually the cure, and test failure is 
actually caused by a new test I added in revision fdb5d84f9948. So hopefully 
things are fixed now, but I will keep an eye on the buildbots.

In fdb5d84f9948, I originally added the test_keywords() test to ensure the 
correct parameter name of “count” to sendfile().

Neither headers=None nor trailers=None were ever supported. It is just that the 
documentation and error messages which mislead me to write that test.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Laszlo Lebrun via Python-list
On Tue, 08 Sep 2015 23:35:33 +0100, Mark Lawrence wrote:

> On 08/09/2015 20:14, Laszlo Lebrun via Python-list wrote:
>>
>> Dear group,
>> I do use Windows 7 and have a user name with diacritics.
>>
>> Whenever I am querying an extension with pip, it will fail since it
>> does not pass on the user folder correctly.
>> I thought PIP deals well with unicode, doesn't it?
>>
>> Has anyone a clue how to fix it?
>> Thank you
>>
>>
> Can you please cut and paste exactly what you tried and the failure
> messages, as there's a lot of smart people around here but we're not
> mind readers :)  Which Python and pip version are you using?  Did you
> install pip yourself or did it come with your Python installation?

Yes, you are right, let me append the message.
Just after a fresh install of Python with PIP on Windows. 
Whenever I start PIP, I get:
"Fatal error in launcher: Unable to create process using '"C:\Users
\BürgerGegenFluglärm\AppData\Local\Programs\Python\Python35-32
\python.exe"  "C:\Users\B³rgerGegenFluglõrm\AppData\Local\Programs\Python
\Python35-32\Scripts\pip.exe" '"

Where the correct path is "C:\Users\BürgerGegenFluglärm\AppData..."

The funny thing is that the message mentions the path twice, with 
different wrong codings.
:-(

Thank you for your help.




-- 
Stand up against TTIP and ISDS !
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Reply to author, reply to list, reply to all

2015-09-09 Thread Terry Reedy

On 9/9/2015 2:09 AM, Ben Finney wrote:

Terry Reedy  writes:



[Reply] should send the reply to the list.


The function named “reply” normally means “reply individually to the
author”, and that's how it needs to stay.


Oh, right.  I was thinking of 'Followup' and that should go to the list, 
and does for me.


--
Terry Jan Reedy


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


Re: XML Binding

2015-09-09 Thread harirammanohar159
On Thursday, 3 September 2015 22:25:06 UTC+5:30, Palpandi  wrote:
> Hi All,
> 
> Is there any module available in python standard library for XML binding? If 
> not, any other suggestions.
> 
> Which is good for parsing large file?
> 1. XML binding
> 2. Creating our own classes
> 
> 
> Thanks,
> Palpandi

Hey you can use internal package itself, argparse will work good...even xmltree 
also...
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Steve Dower

Steve Dower added the comment:

FYI: we're making a new release (right now!) with the patch applied, that 
should go out tomorrow.

If anyone spots anything important in the patch, I still really want to hear 
about it, but hopefully having something installable means we'll get at least a 
few days of testing before locking it in.

All my apologies for waiting until the last minute before giving up on the 
crusade to avoid including the versioned files in Python. The timing is 
unfortunate, but I'm sure we're going to have the best compatibility story 
possible right now. So thanks for indulging me, and I hope I haven't put too 
many people through too much anguish.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com  wrote:
> Some where i am missing simple logic :)
> 
> =
> child = pexpect.spawn('ssh hari@hostname')
> child.logfile = sys.stdout
> child.expect('hari\'s Password: ')
> =
> 
> getting error as follows:
> 
> child.expect('hari\'s Password: ')
> TypeError: must be str, not bytes
> ===
> 
> Thanks...

Hey Laura,

spawnu worked for handling the unicode, thank you for that, yes i have already 
tried paramiko, it didnt worked for the same purpose (tried both sftp client 
and ssh client of paramiko module; finally while doing su getting the error as 
expecting tty terminal...)

fabric will work but it is up to only python 2.7

so just i am trying to work out with pexpect whether it will be of any use or 
not.

(my goal is to login to remote server then do su then execute commands...)

Thank you for spawnu, now i got stuck with freezing issue similar to it is not 
returing to the shell prompt...its on waiting...i had to press ctrl+c

===
child.sendline(password)
child.expect('-bash-4.1$')
child.sendline('ls')
print(child.before)
child.sendline('su - user1')
child.expect('-bash-4.1$')
child.sendline('pwd; hostname')
print(child.before)
child.close()
=
output:


hari's Password: 
ls

WARNING. You have accessed a private computer system.
Unauthorized access,use,connection,or entry is not permitted
and constitutes a crime punishable by law. We reserve the
right to fully pursue criminal and civil legal penalties.
All individuals using this computer system with or without proper
authority are subject to having all their activities monitored
and recorded. Anyone using this system implicitly consents to
this monitoring. Any evidence of suspected criminal activity
revealed by such monitoring may be provided to law enforcement officials.


su - user1

lsTotal users logged in under your name (via BoKS): 3 (2 on this host)
Total users logged in (via BoKS): 8324 (2 on this host)



#
#   For Authorized Use Only #
#   #
#   Activities on this system are subject to being monitored#
#   or recorded for all users, authorized or unauthorized.  #
#   Use of the system is considered consent to such monitoring. #
#   Any evidence of possible criminal activity may be provided  #
#   to law enforcement. #
#   #
#



-bash-4.1$ ls
-bash-4.1$ su - user1
-bash-4.1$


^CTraceback (most recent call last):
  File "./rmcomments.py", line 16, in 
child.expect('-bash-4.1$')
  File 
"/ceopt/utils/python/3.4.3/custommodules/lib/python3.4/site-packages/pexpect/__init__.py",
 line 1451, in expect
timeout, searchwindowsize)
  File 
"/ceopt/utils/python/3.4.3/custommodules/lib/python3.4/site-packages/pexpect/__init__.py",
 line 1466, in expect_list
timeout, searchwindowsize)
  File 
"/ceopt/utils/python/3.4.3/custommodules/lib/python3.4/site-packages/pexpect/__init__.py",
 line 1535, in expect_loop
c = self.read_nonblocking(self.maxread, timeout)
  File 
"/ceopt/utils/python/3.4.3/custommodules/lib/python3.4/site-packages/pexpect/__init__.py",
 line 958, in read_nonblocking
r, w, e = self.__select([self.child_fd], [], [], timeout)
  File 
"/ceopt/utils/python/3.4.3/custommodules/lib/python3.4/site-packages/pexpect/__init__.py",
 line 1717, in __select
return select.select(iwtd, owtd, ewtd, timeout)
KeyboardInterrupt



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


[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks, Brett. Since I am not wrapping the warning, the default stacklevel 
seems to work on all versions.

Still to do: 1. Something in the docs (all branches), but with an eye toward 
other deprecations coming later.

2. Actually remove file in 3.6 branch, but only after ImportError does not 
crash Python when running without a console (ie, with sys.stderr == None)).  An 
future issue to fix this will be a dependency.

--
versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset da9b26670e44 by Martin Panter  in branch '3.4':
Issue #24984: Document AF_BLUETOOTH socket address formats
https://hg.python.org/cpython/rev/da9b26670e44

New changeset 4ce8450da22d by Martin Panter  in branch '3.5':
Issue #24984: Merge 3.4 into 3.5
https://hg.python.org/cpython/rev/4ce8450da22d

New changeset ec4ba0cb1ce0 by Martin Panter  in branch 'default':
Issue #24984: Merge 3.5 into 3.6
https://hg.python.org/cpython/rev/ec4ba0cb1ce0

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: XML Binding

2015-09-09 Thread dieter
Palpandi  writes:

> Is it better to use pyxb than lxml?
>
> What are the advantages of lxml and pyxb?

"pyxb" has a different aim than "lxml".

"lxml" is a general purpose library to process XML documents.
It gives you an interface to the document's resources (elements,
attributes, comments, processing instructions) on a low level
independ from the document type.

"pyxb" is different: there, you start with an XML schema description.
You use "pyxb" to generate Python bindings for this schema.
With such a binding generated, "pyxb" can parse XML documents
following a known XML schema into the corresponding binding.
The binding objects expose child (XML) elements and (XML) attributes as
attributes of the binding object. Thus, the Python interface
(as defined by the binding) is highly dependent on the type (aka XML schema)
of the document.


I use "lxml" for either simple XML processing or when the XML documents
are not described by an XML schema. I use "pyxb" when the XML documents
has an associated complex schema and the processing is rather complex.

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


[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Tim. I think we can also create separate issues for 
AF_PACKET and AF_CAN and mark them as "easy".

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
>Hey All,
>
>I am able to achieve this using pxssh.. thank you for help...

Great to hear it.  Good luck with the crazies.
Laura
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Adding Yury since he and Elvis are working on Doc/whatsnew/3.5.rst and they 
might want to take a look at the latest patch.

--
nosy: +berker.peksag, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, Camilla. This could be a temporary problem with the 
Stackless website. Can you ask on 
http://www.stackless.com/mailman/listinfo/stackless?

--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: XML Binding

2015-09-09 Thread Stefan Behnel
dieter schrieb am 09.09.2015 um 10:20:
> Palpandi writes:
>> Is it better to use pyxb than lxml?
>>
>> What are the advantages of lxml and pyxb?
> 
> "pyxb" has a different aim than "lxml".
> 
> "lxml" is a general purpose library to process XML documents.
> It gives you an interface to the document's resources (elements,
> attributes, comments, processing instructions) on a low level
> independ from the document type.

lxml's toolbox is actually larger than that. There's also lxml.objectify
which provides a Python object interface to the XML tree, similar to what
data binding would give you. And you can stick your own Element object
implementations into it if you feel a need to simplify the API itself
and/or adapt it to a given document format.

http://lxml.de/objectify.html

Stefan


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


Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Laszlo Lebrun via Python-list
On Wed, 09 Sep 2015 09:13:41 +0100, Tim Golden wrote:

> On 09/09/2015 08:59, Laszlo Lebrun via Python-list wrote:
>> On Tue, 08 Sep 2015 23:35:33 +0100, Mark Lawrence wrote:
>> 
>>> On 08/09/2015 20:14, Laszlo Lebrun via Python-list wrote:

 Dear group,
 I do use Windows 7 and have a user name with diacritics.

 Whenever I am querying an extension with pip, it will fail since it
 does not pass on the user folder correctly.
 I thought PIP deals well with unicode, doesn't it?
> 
>> Yes, you are right, let me append the message.
>> Just after a fresh install of Python with PIP on Windows.
>> Whenever I start PIP, I get:
>> "Fatal error in launcher: Unable to create process using '"C:\Users
>> \BürgerGegenFluglärm\AppData\Local\Programs\Python\Python35-32
>> \python.exe" 
>> "C:\Users\B³rgerGegenFluglõrm\AppData\Local\Programs\Python
>> \Python35-32\Scripts\pip.exe" '"
>> 
>> Where the correct path is "C:\Users\BürgerGegenFluglärm\AppData..."
>> 
>> The funny thing is that the message mentions the path twice, with
>> different wrong codings.
>> :-(
>> 
>> 
> What version of pip are you using? Since (from the path) I guess you
> have a 32-bit version of Python 3.5, I assume it's the version which was
> installed with that but just check:
> 
> pip --version
> 
Sorry I can't even execute that one.
I keep getting the weird error message.
But I just downloaded it 3 days ago, so it should be the current one.

> Hopefully someone here can help, but in fact pip is not part of core
> Python: the ensurepip mechanism (which *is* part of core Python)
> bootstraps a recent version of pip but it's maintained elsewhere.
> 
> So you may need to raise this as a bug on the Pip tracker:
> 
> https://github.com/pypa/pip/issues
> 
done. Thank you.





-- 
Stand up against TTIP and ISDS !
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python handles globals badly.

2015-09-09 Thread Antoon Pardon
Op 09-09-15 om 01:55 schreef Michael Torrie:
> In any case, 0-based indexing in Python makes a lot of sense when you
> bring in the slicing syntax. Especially if you think of slicing as
> operating on the boundaries between cells as it were.

Then you have never used slices with a negative step.

If slicing would operate on the boundaries between cells
then the reverse of lst[2:7] would be lst[7:2:-1] instead
it is lst[6:1:-1]

This gets you in trouble when you want to reverse through
lst[0:8] which would be lst[7:-1:-1] but now the special
meaning of negative indexes kicks in and you are screwed.

-- 
Antoon Pardon

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


Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com  wrote:
> Some where i am missing simple logic :)
> 
> =
> child = pexpect.spawn('ssh hari@hostname')
> child.logfile = sys.stdout
> child.expect('hari\'s Password: ')
> =
> 
> getting error as follows:
> 
> child.expect('hari\'s Password: ')
> TypeError: must be str, not bytes
> ===
> 
> Thanks...

Hi Laura,

Basically its the same, no difference if i keep su user1...
i am getting the desired output with a single host, but if i keep for loop for 
multiple hosts, remaining are skipped saying as below:

pexpect.TIMEOUT: Timeout exceeded.

During handling of the above exception, another exception occurred:

pexpect.TIMEOUT: Timeout exceeded.


only 1st host is getting executed. how to control child.logout() and make for 
loop continue...
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-09-09 Thread Laura Creighton

Laura Creighton added the comment:

I do not think that asking there will help right now because the problem is 
that the whole site is down, and mailman isn't running either ...

--
nosy: +lac

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Getting response over logging socket

2015-09-09 Thread Larry Martell
I have an app that uses the logging package with a SocketHandler to
send messages. Now I've been asked to change it so that it can receive
a response for each log message sent. It appears there is no way to do
this with logging package. Is that true? Can I not receive data over a
socket used in a logging handler?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
In a message of Wed, 09 Sep 2015 01:58:30 -0700, harirammanohar...@gmail.com wr
ites:

>Thank you for spawnu, now i got stuck with freezing issue similar to it is not 
>returing to the shell prompt...its on waiting...i had to press ctrl+c
>
>===
>child.sendline(password)
>child.expect('-bash-4.1$')
>child.sendline('ls')
>print(child.before)
>child.sendline('su - user1')
>child.expect('-bash-4.1$')
>child.sendline('pwd; hostname')
>print(child.before)
>child.close()

>WARNING. You have accessed a private computer system.


Any doubts we had about whether the computer policy authorities
as this place are 'nuttier than 2 trees full of squirrels' are
now put to rest.  I just hope I am not helping you do things that
is going to end up with them trying to put you in jail.  Poor you.

>su - user1
>
>lsTotal users logged in under your name (via BoKS): 3 (2 on this host)
>Total users logged in (via BoKS): 8324 (2 on this host)
>-bash-4.1$ ls
>-bash-4.1$ su - user1
>-bash-4.1$

Okay.
Instead of waiting for that bash-4.1 prompt
after you issue your su, issue whoami
and wait to see if it returns user1.

That way we can see if the problem is with expect waiting for the prompt
which for some reason it is not seeing, or whether it is just lost, lost,
lost.

Also, for informational purposes try your su without the '-'
just "su user1", and see if it is some part of the 'provide an environment
similar to what the user would get if the user logged in directly'
ability of su that is confusing things.

Laura


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


Re: Hi am new to python

2015-09-09 Thread alister
On Tue, 08 Sep 2015 17:44:26 -0500, Nassim Gannoun wrote:

> Hi I'm also new to Python but would like to reply.
> Like others have stated there is a built in function (sum) that can give
> the sum of the elements of a list, but if what you are trying to do is
> learn how to use the while command here is some code that will work.
> Your question:
> My question is in a while loop; how do l sum all the numbers in the
> given list (list_a)?
> 
> list_a = [8, 5, 2, 4]
> sum_a = 0 # for storing the sum of list_a i = 0 # for looping through
> the list_a# Use a while loop to sum all numbers in list_a# If you store
> the sums into sum_a print(sum_a) # should print 19 My answer:
> list_a = [8, 5, 2, 4]
> 
> 
> 
> sum_a = 0 i = 0 while i < (len(list_a)):
> sum_a += list_a[i]
> i += 1
> 
> 
> print(sum_a)
> 
This is OK a a learning excise but it is just about the worst way to 
achieve the result in python.

It should be considered as an example of how NOT to perform the task.

I do hope this is NOT a homework question set by a teacher as it would 
get the student into bad habits.

 



-- 
It's spelled Linux, but it's pronounced `Not Windows'
It's spelled Windows, but it's pronounced `Ai!'

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


Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Laszlo Lebrun via Python-list
On Wed, 09 Sep 2015 00:22:31 -0700, wxjmfauth wrote:

> Yes, I know how to fix all these problems.

I know as well: have a user, which name is just plain ASCII. 
But it sucks to rebuild everything...



-- 
Stand up against TTIP and ISDS !
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25041] document AF_PACKET socket address format

2015-09-09 Thread Tim Tisdall

New submission from Tim Tisdall:

As mentioned in #24984, I'm making another issue to document the address format 
for AF_PACKET.  In this case there's already documentation in 
Modules/socketmodule.c that says:

- an AF_PACKET socket address is a tuple containing a string
  specifying the ethernet interface and an integer specifying
  the Ethernet protocol number to be received. For example:
  ("eth0",0x1234).  Optional 3rd,4th,5th elements in the tuple
  specify packet-type and ha-type/addr.

But nothing has been added to Doc/library/socket.rst .

The documentation needs to be confirmed with the code.  (It probably should be 
altered somewhat to state how you "specify packet-type and ha-type/addr"...  
and maybe what a "ha-type/addr" is...  A quick Google search found this very 
useful reference: 
https://books.google.ca/books?id=Chr1NDlUcI8C=PA472=OCEwyjdXJo=PuNG72WIvv4-A924f9MvzPtgQDc=en=X=0CE8Q6AEwCGoVChMI6IiTyoDqxwIVCTs-Ch3bCAXy#v=onepage=false
 )

--
assignee: docs@python
components: Documentation
messages: 250306
nosy: Tim.Tisdall, docs@python
priority: normal
severity: normal
status: open
title: document AF_PACKET socket address format
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[RELEASED] Python 3.5.0rc4 is now available!

2015-09-09 Thread Larry Hastings



On behalf of the Python development community and the Python 3.5 release 
team, I'm surprised to announce the availability of Python 3.5.0rc4, 
also known as Python 3.5.0 Release Candidate 4.


Python 3.5.0 Release Candidate 3 was only released about a day ago.  
However: during testing, a major regression was discovered, reported on 
the issue tracker as #25027:


   http://bugs.python.org/issue25027

Python 3.5 includes some big changes on how Python is built on Windows.  
One of those changes resulted in Python processes on Windows exceeding 
the maximum number of loadable shared libraries.  As a result Windows 
builds of Python could no longer run major Python software stacks like 
Pandas and Jupyter. Fixing this required non-trivial last-minute changes 
to the Windows build--and those changes need testing.  We therefore 
elected to insert an extra release candidate before the final release, 
to get these changes into your hands as soon as possible, so that 
Windows users could test these changes.


As with all other Python 3.5 releases to date, this is a preview 
release, and its use is not recommended for production settings.  
However, users are encouraged to test with Python 3.5.0rc4, /especially/ 
Windows users who build or make use of numerous external packages.  
(Non-Windows users will find little difference between Python 3.5.0rc3 
and Python 3.5.0rc4.)



You can find Python 3.5.0rc4 here:

https://www.python.org/downloads/release/python-350rc4/

Windows and Mac users: please read the important platform-specific 
"Notes on this release" section near the end of that page.



Please kick the tires,


//arry/

p.s.  Special thanks from the Python 3.5 release team to Christoph 
Gohlke for the bug report!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

The Misc/NEWS entry for this was added under Python 3.5.0rc3.  But, since no 
pull request has been made for this change, this change hasn't been merged into 
3.5.0.  It will ship as part of Python 3.5.1.  I've moved the Misc/NEWS entry 
accordingly.

--
nosy: +larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Given Victor's reluctance to get this in to 3.5.0, this can't even be marked as 
a "deferred blocker" anymore.  Demoting to normal priority.

--
priority: deferred blocker -> normal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread R. David Murray

R. David Murray added the comment:

Can you provide some specific use cases, please?

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread Tim Tisdall

Tim Tisdall added the comment:

Right now the docs say "Certain other address families (:const:`AF_PACKET`, 
:const:`AF_CAN`) support specific representations.".

I was going to create a separate issue for AF_CAN, but it seems that it's 
already documented...  When documentation is added for AF_PACKET, please remove 
the above mentioned line entirely as AF_CAN is already documented.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Steve Dower

Steve Dower added the comment:

Only thing I'd add is that the extra tag is optional (on Windows at least), and 
Python will happily import extensions without it. But extensions with a 
mismatched tag won't be loaded.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Tim Tisdall

Tim Tisdall added the comment:

I created #25041 to handle AF_PACKET.  It seems AF_CAN is already in the docs, 
so the person making the change for AF_PACKET can just remove that mention of 
AF_CAN farther down.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25029] MemoryError in test_strptime

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd7aed300a1b by Steve Dower in branch '3.5':
Issue #25029: MemoryError in test_strptime
https://hg.python.org/cpython/rev/bd7aed300a1b

New changeset 706b9eaba734 by Steve Dower in branch '3.5':
Merge fix for #25029
https://hg.python.org/cpython/rev/706b9eaba734

New changeset cceaccb6ec5a by Steve Dower in branch '3.5':
Adds Mics/NEWS entry for issue #25029.
https://hg.python.org/cpython/rev/cceaccb6ec5a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25040] xml.sax.make_parser makes bad use of parser_list argument default value

2015-09-09 Thread Gautier Portet

New submission from Gautier Portet:

When using xml.sax.make_parser(), there is a potential problem with
the parser_list default value. 
If another module used a default value, like the problematic parser from PyXML, 
your module will also use it as default parser.

You should change this:
   def make_parser(parser_list = []):

by this :
   def make_parser(parser_list = None):

And change the following code accordingly.

BTW, I fixed by problem by simply using xml.sax.make_parser([])

--
components: XML
messages: 250303
nosy: Gautier Portet
priority: normal
severity: normal
status: open
title: xml.sax.make_parser makes bad use of parser_list argument default value
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Chris Angelico
On Wed, Sep 9, 2015 at 9:07 PM, Laszlo Lebrun via Python-list
 wrote:
> On Wed, 09 Sep 2015 00:22:31 -0700, wxjmfauth wrote:
>
>> Yes, I know how to fix all these problems.
>
> I know as well: have a user, which name is just plain ASCII.
> But it sucks to rebuild everything...

Don't bother responding to jmf - he's our resident Unicode troll. His
posts don't get through to me any more, except when someone responds
:) Not sure where they're getting blocked; probably at the news<->list
boundary.

You shouldn't have to restrict your username to ASCII. It's 2015, and
non-ASCII names should work everywhere. Anywhere they don't is a bug
to be fixed, and I'm confident the pip folks will treat this with the
respect it deserves.

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


[issue25042] Create an "embedding SDK" distribution?

2015-09-09 Thread Paul Moore

New submission from Paul Moore:

At the moment, building an application that embeds Python requires the user to 
have a full install of Python on the build machine, to get access to the 
include and library files.

Now that we provide an embeddable build of Python on Windows, would it be worth 
also having an "embedding SDK" which consisted of a zipfile distribution of the 
include and lib files?

This may be pointless, as it's not that hard to install Python onto a 
development system, and even if it is, you'd just need to grab the "include" 
and "libs" directories from an existing installation, so creating your own SDK 
is pretty trivial. It's also extra work in the release process to provide the 
extra distribution file. So I'm OK if this is viewed as not worth it.

The main advantage of having such an "SDK" would be strengthening the message 
that embedding is a well-supported scenario.

--
assignee: steve.dower
components: Windows
messages: 250310
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: low
severity: normal
status: open
title: Create an "embedding SDK" distribution?
type: enhancement
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8374472c6a6e by Steve Dower in branch '3.5':
Issue #25027: Reverts partial-static build options and adds vcruntime140.dll to 
Windows installation.
https://hg.python.org/cpython/rev/8374472c6a6e

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[RELEASED] Python 3.5.0rc4 is now available!

2015-09-09 Thread Larry Hastings



On behalf of the Python development community and the Python 3.5 release 
team, I'm surprised to announce the availability of Python 3.5.0rc4, 
also known as Python 3.5.0 Release Candidate 4.


Python 3.5.0 Release Candidate 3 was only released about a day ago.  
However: during testing, a major regression was discovered, reported on 
the issue tracker as #25027:


   http://bugs.python.org/issue25027

Python 3.5 includes some big changes on how Python is built on Windows.  
One of those changes resulted in Python processes on Windows exceeding 
the maximum number of loadable shared libraries.  As a result Windows 
builds of Python could no longer run major Python software stacks like 
Pandas and Jupyter. Fixing this required non-trivial last-minute changes 
to the Windows build--and those changes need testing.  We therefore 
elected to insert an extra release candidate before the final release, 
to get these changes into your hands as soon as possible, so that 
Windows users could test these changes.


As with all other Python 3.5 releases to date, this is a preview 
release, and its use is not recommended for production settings.  
However, users are encouraged to test with Python 3.5.0rc4, /especially/ 
Windows users who build or make use of numerous external packages.  
(Non-Windows users will find little difference between Python 3.5.0rc3 
and Python 3.5.0rc4.)



You can find Python 3.5.0rc4 here:

https://www.python.org/downloads/release/python-350rc4/

Windows and Mac users: please read the important platform-specific 
"Notes on this release" section near the end of that page.



Please kick the tires,


//arry/

p.s.  Special thanks from the Python 3.5 release team to Christoph 
Gohlke for the bug report!

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

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


[issue23447] Import fails when doing a circular import involving an `import *`

2015-09-09 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Tim Golden
On 09/09/2015 14:10, Chris Angelico wrote:
> Don't bother responding to jmf - he's our resident Unicode troll. His
> posts don't get through to me any more, except when someone responds
> :) Not sure where they're getting blocked; probably at the news<->list
> boundary.

They're held for mailing list moderation. If they're the usual rant I
discard them.

> You shouldn't have to restrict your username to ASCII. It's 2015, and
> non-ASCII names should work everywhere. Anywhere they don't is a bug
> to be fixed, and I'm confident the pip folks will treat this with the
> respect it deserves.

Definitely. I'll try to reproduce this at home (when I have access to a
machine on which I can create a suitably unicode-y username).

TJG

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


[issue25043] document socket constants for Bluetooth

2015-09-09 Thread Tim Tisdall

New submission from Tim Tisdall:

further to #24984, I noticed there are constants that aren't mentioned in the 
docs.  Also BDADDR_ALL is missing (which is defined in Bluez's bluetooth.h) so 
I added it.

Now, I'm not totally clear on supplying multi-version patches...  I know 3.5 is 
in "freeze" so I'm guessing adding the BDADDR_ALL constant is a no-no.  I guess 
I checkout out the different version branches, make the changes, and then 
create a patch labelled for which version it's for?  (I see the patch has the 
hash for which commit it's to be applied to, but not which branch)

The repo is down right now, so I'll include a patch once I can update my local 
copy...  :(

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 250314
nosy: Tim.Tisdall, docs@python
priority: normal
severity: normal
status: open
title: document socket constants for Bluetooth
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python handles globals badly.

2015-09-09 Thread Antoon Pardon
Op 09-09-15 om 05:27 schreef Steven D'Aprano:
>
>> Were those polls, like the poll he once did for the condtional expression?
>> There the poll indicated no specific proposal had a majority, so for each
>> specific proposal one could say it didn't have popular support, but the
>> majority still prefered to have a conditional expression. But at that
>> time Guido used that poll as an indication there was not enough support.
> In the case of conditional expression, there is *no good alternative*.

Yet there were people who passionatly argued against introducing one.
Even when list comprehensions were introduced where they really would
be useful some people still fought it.

Just to show that people fighting something is not a strong argument.

> Using if...then statement is too heavyweight, and cannot be used in an
> expression. Using "flag and true_value or false_value" is buggy -- it fails
> if true_value is itself false. Refactoring it to a function uses eager
> rather than lazy evaluation. So there was no existing alternative to a
> ternary if expression that worked correctly.

Yes there was. There were even two. One was packing your values into
a one element list, the other was packing them in a lambda. It was ugly
but it was what people came up with for lack of better.

> In the case of case/switch, there is no consensus on what the statement
> should do, how it should work, what purpose it has, or what syntax it
> should use. Rather than "there's no alternative to a case statement", the
> situation was more like "there are many good alternatives to the various
> different case statements people want".

Since when does Guido need a consensus? Look the developers have only limited
time, and they get to choose what they consider a priority and what they don't.
And if they think other things have higher priority, fine by me. But don't
come with, no support/consensus with the users, because if the dev-team thinks
something is a good idea, they'll implement it without much consideration for
support/consensus among the users.

-- 
Antoon Pardon 

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


[issue25044] bring BTPROTO_SCO inline with other Bluetooth protocols

2015-09-09 Thread Tim Tisdall

Changes by Tim Tisdall :


--
components: +Extension Modules

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25045] smtplib throws exception TypeError: readline()

2015-09-09 Thread Philippe Lambotte

New submission from Philippe Lambotte:

smtplib  smtpserver.ehlo() will throw exception.
The error message : 
Traceback (most recent call last):
  File "snippet.email.sendmail.py", line 34, in 
smtpserver.ehlo()
  File "/usr/lib/python3.2/smtplib.py", line 421, in ehlo
(code, msg) = self.getreply()
  File "/usr/lib/python3.2/smtplib.py", line 367, in getreply
line = self.file.readline(_MAXLINE + 1)
TypeError: readline() takes exactly 1 positional argument (2 given)

smtplib works with python 2.7, but not  with 3.2

If I remove the passed parameter, it works in 3.2 :
 line = self.file.readline()

--
components: email
messages: 250317
nosy: barry, phlambotte, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib throws exception TypeError: readline()
type: behavior
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-09 Thread John Beck

John Beck added the comment:

Yes, the syscall was failing with EINVAL.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The question is: are ioctl codes outside of the unsigned int range used on BSD 
family or Mac OS X?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Wolfgang Maier

On 09.09.2015 10:23, Chris Angelico wrote:

On Wed, Sep 9, 2015 at 5:59 PM, Laszlo Lebrun via Python-list
 wrote:

Whenever I start PIP, I get:
"Fatal error in launcher: Unable to create process using '"C:\Users
\BürgerGegenFluglärm\AppData\Local\Programs\Python\Python35-32
\python.exe"  "C:\Users\B³rgerGegenFluglõrm\AppData\Local\Programs\Python
\Python35-32\Scripts\pip.exe" '"

Where the correct path is "C:\Users\BürgerGegenFluglärm\AppData..."

The funny thing is that the message mentions the path twice, with
different wrong codings.
:-(




I may be wrong, but isn't the error message suggesting that this is a 
bug in the py launcher instead of in pip?
If I remember a post from a recent thread correctly, then pip.exe is 
just a script using the launcher.

If that's true, shouldn't the recommended:

python -m pip

be a workaround?

I might be wrong, but it's worth a try.
Best,
Wolfgang


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


[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-09 Thread STINNER Victor

STINNER Victor added the comment:

> Prior to applying this patch, I had needed to tweak py_getrandom() to 
> recognize EINVAL in addition to ENOSYS as sufficient reason to turn off 
> getrandom_works.

In which case getrandom() fails with EINVAL?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-09 Thread John Beck

John Beck added the comment:

@haypo: Yes, that patch works (applied to 3.5.0rc3; proxy problems are 
preventing me from updating my clone of the default branch at the moment) i.e., 
pyconfig.h shows:

#define HAVE_GETRANDOM_SYSCALL 1

To answer your other questions:
* Calling syscall(SYS_getrandom, buffer, size, 0) does work on Solaris.
* Our  does declare syscall().
* Solaris does not use the GNU C library, but our own libc, which does
  support getrandom(3) as of Solaris 11.3 (which will be released in
  the near future) and Solaris 12 (which is in Beta but has a release
  date in the more distant future).

Prior to applying this patch, I had needed to tweak py_getrandom() to recognize 
EINVAL in addition to ENOSYS as sufficient reason to turn off getrandom_works.  
I still have that tweak in place, but have not yet tried backing it out to see 
if things still behave with your patch.

Let me know if there is any more information I can provide, and thanks for your 
attention to this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25044] bring BTPROTO_SCO inline with other Bluetooth protocols

2015-09-09 Thread Tim Tisdall

New submission from Tim Tisdall:

All of the BTPROTO_ protocols accept tuples with Bluetooth addresses as regular 
strings.  SCO accepts a byte-string which represents a Bluetooth address.  The 
change was made at 23ab586c427a 

With the current implementation we get this error:

>>> import socket
>>> x = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_SEQPACKET, 
>>> socket.BTPROTO_SCO)
>>> x.bind(socket.BDADDR_ANY)
Traceback (most recent call last):
  File "", line 1, in 
OSError: getsockaddrarg: wrong format

This is because socket.BDADDR_ANY is a string while the bind() is expecting a 
binary string.  So the workaround would be to call 
x.bind(socket.BDADDR_ANY.encode()) .

Is it acceptable to change it to accept a regular string to match the other 
address methods and constants?  This would be essentially a breaking change, 
however on something that wasn't really documented prior to #24984 .

I'll submit a patch when the repo is back up...

--
messages: 250316
nosy: Tim.Tisdall
priority: normal
severity: normal
status: open
title: bring BTPROTO_SCO inline with other Bluetooth protocols
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25046] ImportError: No module named Multiprocessing

2015-09-09 Thread Julio

New submission from Julio:

Hi!,

I have a problem to import a multiprocessing module. I am using Python 2.7 and 
Windows 8. The program (.py) is executed since MS-DOS console.

If I run the program the output is "ImportError: No module named 
multiprocessing".

If I execute "import multiprocessing" on Python Command Line I don't have 
problems, but It isn't useful for my program, because I need to import since my 
own file .py

What do you recommend me?. I need to get benefit from the process-based 
parallelism and to use several processors. 

Thank you so much!

--
components: Library (Lib)
messages: 250318
nosy: jlmora
priority: normal
severity: normal
status: open
title: ImportError: No module named Multiprocessing
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python handles globals badly.

2015-09-09 Thread Christian Gollwitzer

Am 09.09.15 um 05:23 schrieb Steven D'Aprano:

And yes, the fellow Joe who completely missed the point of the blog post,
and made the comment "You don’t think you’re wrong and that’s part of a
much larger problem, but you’re still wrong" completely deserved to be
called out on his lack of reading comprehension and smugness.


This sentence is a very arrogant one, yes, but it is quoted from the 
article. Overall I have the feeling that the point he wants to make is a 
very subtle one.


Christian

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


[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-09 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, I've contacted Robert.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25042] Create an "embedding SDK" distribution?

2015-09-09 Thread Steve Dower

Steve Dower added the comment:

It may be worth it. What I'd rather have people do is to install using the 
regular installer and include both debug symbols and debug binaries. This will 
put it in a registered location that can be auto detected (I have written a 
template for Visual Studio that does just that for extensions - will be 
released soon), and also gives a pretty solid debugging experience.

Probably we just need to get word out that it's a valuable scenario and do some 
walkthroughs/tutorials (good PyCon topic?). In my paid-work life doing 
developer tools for Python developers, it's certainly something that we as 
Microsoft are willing to offer (with VS tie-ins, obviously - when you're paid 
you are also owned :) ), but I've got no opposition to supporting this.

To do an extra package, I'd need to hear that:
* people aren't able to install a full Python distro in these contexts
* people *are* able/willing to extract and configure a ZIP distro of the same 
things
* people aren't confident building against a full distro and releasing with the 
embedded distro

>From a Visual Studio POV, making a NuGet package containing the embedded 
>Python distro and the build headers would be pretty cool, simply for the IDE 
>integration. Doesn't really help other IDEs, but since they're all different I 
>think they'll all need specific solutions anyway.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PIP does not appear to handle diacritics correctly.

2015-09-09 Thread Tim Golden
On 09/09/2015 17:16, Wolfgang Maier wrote:
> On 09.09.2015 10:23, Chris Angelico wrote:
>> On Wed, Sep 9, 2015 at 5:59 PM, Laszlo Lebrun via Python-list
>>  wrote:
>>> Whenever I start PIP, I get:
>>> "Fatal error in launcher: Unable to create process using '"C:\Users
>>> \BürgerGegenFluglärm\AppData\Local\Programs\Python\Python35-32
>>> \python.exe" 
>>> "C:\Users\B³rgerGegenFluglõrm\AppData\Local\Programs\Python
>>> \Python35-32\Scripts\pip.exe" '"
>>>
>>> Where the correct path is "C:\Users\BürgerGegenFluglärm\AppData..."
>>>
>>> The funny thing is that the message mentions the path twice, with
>>> different wrong codings.
>>> :-(
>>
> 
> I may be wrong, but isn't the error message suggesting that this is a
> bug in the py launcher instead of in pip?
> If I remember a post from a recent thread correctly, then pip.exe is
> just a script using the launcher.
> If that's true, shouldn't the recommended:
> 
> python -m pip
> 
> be a workaround?
> 
> I might be wrong, but it's worth a try.

Actually, that's a good point. Especially given the start of the error
message...

TJG

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


[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Matthias Klose

Matthias Klose added the comment:

thanks for the draft!

I'm not sure how to describe this properly. The extension names are derived 
from https://wiki.debian.org/Multiarch/Tuples

and this again is derived from the GNU triplets/quadruplets.

there is no "cpu" and "os" part, depending on the architecture some ABI parts 
are either encoded in the "cpu" part or the "os" part.

So what about just enumerating the most common cases (i386-linux-gnu, 
x86_64-linux-gnu, arm-linux-gnueabi (still used for the old Raspberry Pi), 
arm-linux-gnueabihf), and then point to the "spec"? The above examples have 
some irregular cases, most other cases just follow the triplets.

I wouldn't mention x86_64-linux-gnux32 explicitly. Until now there are only 
unreleased or experimental distros.

Not sure if it is worth mentioning that this would allow distributing "fat" 
wheels.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15347] IDLE - does not close if the debugger was active

2015-09-09 Thread Mark Roseman

Mark Roseman added the comment:

Debugger.py has a nested call to mainloop() ... which is almost always a bad 
idea. I'm betting the close is being handled in this mainloop, and there are no 
more events being generated, meaning the real mainloop towards the bottom of 
PyShell (which checks if we've got open windows) is never being reentered. 

Will try to look at this closer, but in case anyone has a chance in the 
interim...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25044] bring BTPROTO_SCO inline with other Bluetooth protocols

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

Perhaps making it accept both bytes and text strings is a sensible option. 
Similar to how AF_INET can bind to both "localhost" and b"localhost".

--
nosy: +martin.panter
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25043] document socket constants for Bluetooth

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

The new constant would probably have to go into 3.6 only. I suggest make two 
patches: your documentation patch to be applied to 3.4+, and the new constant, 
against 3.6 only. Also, it would be good to get a unit test for the new 
constant.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Hi am new to python

2015-09-09 Thread Denis McMahon
On Tue, 08 Sep 2015 17:44:26 -0500, Nassim Gannoun wrote:

> My question is in a while loop; how do l sum all the numbers in the
> given list (list_a)?

You don't normally use a while loop or a counter to iterate over a list. 
Such a question should only be used as a precursor to discussing better 
methods of achieving the required result.

While loop:

> sum_a = 0 
> i = 0 
> while i < (len(list_a)):
> sum_a += list_a[i]
> i += 1
> print(sum_a)

Better, use a for loop:

s = 0
for i in list_a:
s += i
print (s)

Even better, use sum():

s = sum(list_a)
print (s)

And if you only want to display the answer:

print (sum(list_a))

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Lesson 39 of Learning Python the Hard Way hangs (Fixed?)

2015-09-09 Thread Gary Roach

On 09/09/2015 01:45 PM, John Gordon wrote:

In  Gary Roach 
 writes:


Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in 
  hashmap.set(states, 'Oregon', 'OR')
File "/root/mystuff/mystuff/hashmap.py", line 50, in set
  i, k, v = get_slot(aMap, key)
TypeError: 'NoneType' object is not iterable
Execution Successful!

Where does the message "Execution Successful!" come from?  It seems like
you have other code that you haven't shown us.

In any case, I saved your code and ran it, and did not get an error.

No other code. Ninja-IDE tacked the "Execution Successful" at the end if 
the error message. Dont know why.


Interesting that you ran the code successfully. I have tried to run the 
code in both Ninja and at the command line and got the  exact same error 
message.


A note: If you could, please post your replies to the list. If you 
don't, it either breaks the thread or ends up sending a copy to my 
personal email address. I am assuming that your email client gives you 
that choice. If not, I'm not sure how you would assure that the proper 
way happens. I use the icedove (thunderbird) mail client and the choice 
is a drop down list at the top of the mail editor page.


Thanks for your reply.
Still confused

Gary R.

PS I copied over my code with the one from the lesson and all of a 
sudden it works. I then used the code I copied to the email. It also 
worked. Now I can't duplicate the problem. The problems fixed but 

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


[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

Hello again. The patch I committed says BTPROTO_SCO accepts a bytes-like 
object. However I suspect it is actually restricted to bytes only:

>>> s = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)
>>> s.bind(bytearray(b"12:23:34:45:56:67"))
Traceback (most recent call last):
  File "", line 1, in 
OSError: getsockaddrarg: wrong format
>>> s.bind(b"12:23:34:45:56:67")

If you can confirm this, I will update the documentation.

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Hi am new to python

2015-09-09 Thread Emile van Sebille

On 9/9/2015 3:35 PM, Denis McMahon wrote:

On Tue, 08 Sep 2015 17:44:26 -0500, Nassim Gannoun wrote:


My question is in a while loop; how do l sum all the numbers in the
given list (list_a)?


You don't normally use a while loop or a counter to iterate over a list.
Such a question should only be used as a precursor to discussing better
methods of achieving the required result.


As I understand it, the OP was given the homework assignment to sum up a 
list of numbers using while.  Too bad he didn't also specify using 
binary operators along with while.  :)


Emile





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


[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Changes by Eric V. Smith :


Removed file: http://bugs.python.org/file40302/pep-498.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Changes by Eric V. Smith :


Removed file: http://bugs.python.org/file40316/pep-498-1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Changes by Eric V. Smith :


Removed file: http://bugs.python.org/file40317/pep-498-2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Can't use Python Launcher on Windows after update to 3.5

2015-09-09 Thread Mark Lawrence

I've installed 3.5 for all users so it's in C:\Program Files

From 
https://docs.python.org/3.5/using/windows.html#from-the-command-line it 
says "System-wide installations of Python 3.3 and later will put the 
launcher on your PATH. The launcher is compatible with all available 
versions of Python, so it does not matter which version is installed. To 
check that the launcher is available, execute the following command in 
Command Prompt:", but:-


C:\Users\Mark\Documents\MyPython>py -3.4
'py' is not recognized as an internal or external command,
operable program or batch file.

Further running ftype shows nothing for Python, assoc just gives this 
.pyproj=VisualStudio.Launcher.pyproj.14.0.  Surely this is wrong?


Before I go to the bug tracker to raise an issue could somebody please 
confirm what I'm seeing, thanks.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

This implements the accepted PEP 498. The only other real change I plan on 
making is to do dynamic memory allocation when building the expressions that 
make up a JoinedStr AST node. The code has all of the places to do that already 
laid out, it's just a matter of hooking it up.

There's one nit where I accept 'f' and 'F', but the PEP just says 'f'. I'm not 
sure if we should accept the upper case version. I'd think not, but all of the 
other ones (b, r, and u) do.

I need to do one more scan for memory leaks. I've rearranged some code since 
the last time I checked for leaks, and that's always a recipe for some sneaking 
in.

And I need to write some more tests, mostly for syntax errors, but also for a 
few edge conditions.

Comments welcome.

--
Added file: http://bugs.python.org/file40421/pep-498-3.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

I agree that Python should not be converting the supplied encoding name to 
lowercase, although I guess reverting this has the potential to upset people’s 
output (e.g. if they depend on the checksum or something).

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 09, 2015, at 11:57 PM, Eric V. Smith wrote:

>There's one nit where I accept 'f' and 'F', but the PEP just says 'f'. I'm
>not sure if we should accept the upper case version. I'd think not, but all
>of the other ones (b, r, and u) do.

I think it should be consistent with the other prefixes.  Shouldn't be a big
deal to amend the PEP to describe this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread paul j3

paul j3 added the comment:

`get_default` and `set_defaults` are parser methods, and do more than set or 
get a particular Action attribute.  'Set' for example changes both the 
'parser._defaults' attribute, and a 'action.default' attribute.  Defaults are 
complex and can be defined in at least 3 different ways.

'choices' (and other things like 'required', 'nargs', even 'default') is an 
attribute of a specific Action (argument object).  You normally only set these 
in one way, as parameters of the `add_argument` method.

'action.default' and 'action.choices' are 'public' attributes.  
'parser._defaults' is a 'private' attribute.  A setter method is the right way 
to change a 'private' attribute (if needed).  It usually isn't need for a 
'public' one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: setenv

2015-09-09 Thread Chris Angelico
On Thu, Sep 10, 2015 at 1:58 PM, chenc...@inhand.com.cn
 wrote:
> hi:
>This is not a question about python. It is a shell question. I'm sorry to
> bother you. But I really want to know it. As follow:
>I want to set a shell environment variable:PYTHONPATH. When i execute
> echo $PYTHONPATH, it is
> value:/usr/lib/python/Lib:/usr/lib/python/lib/python27.zip:/var/app/python/libs/pip-lib.zip.
> Now, I want to add value to it. The value is all files in a folder with
> the.zip end. For install, directory(/var/app/python/libs/) include gpio.zip,
> a.zip, b.zip and so on. So I want to add
> value:/var/app/python/libs/gpio.zip, /var/app/python/libs/a.zip,
> /var/app/python/libs/b.zip to environment variable:PYTHONPATH. I execute
> cmd: export PYTHONPATH='/var/app/python/libs/*zip':$PYTHONPATH, but its
> value is not correct. So, how can i do this? My program use setenv to set
> environment variable.

Sounds to me like you want something like this:

http://stackoverflow.com/questions/3430569/globbing-pathname-expansion-with-colon-as-separator

If that's not the case, can you elaborate a bit on what you're trying
to do, preferably in pure text rather than relying on HTML?

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


Re: Lesson 39 of Learning Python the Hard Way hangs

2015-09-09 Thread Chris Angelico
On Thu, Sep 10, 2015 at 3:27 AM, Gary Roach  wrote:
>
> Python 2.7 (It's going to be a while before 2,7 goes away. There is just too
> much code out there.

2.7 isn't going to go away, but that doesn't mean you should learn on
it. Unless you have a particular reason for learning 2.7, I would
recommend picking up 3.4 (or 3.5, which is about to be released).

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


Re: Lesson 39 of Learning Python the Hard Way hangs

2015-09-09 Thread Ben Finney
Gary Roach  writes:

> Python 2.7 (It's going to be a while before 2,7 goes away. There is
> just too much code out there.

The time since Python 2 got any improvements is long in the past, and it
will never get any more.

It is rapidly becoming the case that new libraries just don't support
Python 2, for the same reason.

Rather than learning the dead-end Python 2, you should be using the time
better by learning Python 3 which is actively-developed and will serve
you much longer.

-- 
 \   “Remember: every member of your ‘target audience’ also owns a |
  `\   broadcasting station. These ‘targets’ can shoot back.” —Michael |
_o__)   Rathbun to advertisers, news.admin.net-abuse.email |
Ben Finney

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


Re: Lesson 39 of Learning Python the Hard Way hangs (Fixed?)

2015-09-09 Thread Gary Roach

On 09/09/2015 01:45 PM, John Gordon wrote:

In  Gary Roach 
 writes:


Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in 
  hashmap.set(states, 'Oregon', 'OR')
File "/root/mystuff/mystuff/hashmap.py", line 50, in set
  i, k, v = get_slot(aMap, key)
TypeError: 'NoneType' object is not iterable
Execution Successful!

Where does the message "Execution Successful!" come from?  It seems like
you have other code that you haven't shown us.

In any case, I saved your code and ran it, and did not get an error.

No other code. Ninja-IDE tacked the "Execution Successful" at the end if 
the error message. Dont know why.


Interesting that you ran the code successfully. I have tried to run the 
code in both Ninja and at the command line and got the  exact same error 
message.


A note: If you could, please post your replies to the list. If you 
don't, it either breaks the thread or ends up sending a copy to my 
personal email address. I am assuming that your email client gives you 
that choice. If not, I'm not sure how you would assure that the proper 
way happens. I use the icedove (thunderbird) mail client and the choice 
is a drop down list at the top of the mail editor page.


Thanks for your reply.
Still confused

Gary R.

PS I copied over my code with the one from the lesson and all of a 
sudden it works. I then used the code I copied to the email. It also 
worked. Now I can't duplicate the problem. The problems fixed but 

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


Re: Lesson 39 of Learning Python the Hard Way hangs

2015-09-09 Thread Gary Roach

On 09/09/2015 01:45 PM, John Gordon wrote:

In  Gary Roach 
 writes:


Traceback (most recent call last):
File "/root/mystuff/mystuff/ex39_test.py", line 6, in 
  hashmap.set(states, 'Oregon', 'OR')
File "/root/mystuff/mystuff/hashmap.py", line 50, in set
  i, k, v = get_slot(aMap, key)
TypeError: 'NoneType' object is not iterable
Execution Successful!

Where does the message "Execution Successful!" come from?  It seems like
you have other code that you haven't shown us.

In any case, I saved your code and ran it, and did not get an error.

No other code. Ninja-IDE tacked the "Execution Successful" at the end if 
the error message. Dont know why.


Interesting that you ran the code successfully. I have tried to run the 
code in both Ninja and at the command line and got the  exact same error 
message.


A note: If you could, please post your replies to the list. If you 
don't, it either breaks the thread or ends up sending a copy to my 
personal email address. I am assuming that your email client gives you 
that choice. If not, I'm not sure how you would assure that the proper 
way happens. I use the icedove (thunderbird) mail client and the choice 
is a drop down list at the top of the mail editor page.


Thanks for your reply.
Still confused

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


Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com  wrote:
> Some where i am missing simple logic :)
> 
> =
> child = pexpect.spawn('ssh hari@hostname')
> child.logfile = sys.stdout
> child.expect('hari\'s Password: ')
> =
> 
> getting error as follows:
> 
> child.expect('hari\'s Password: ')
> TypeError: must be str, not bytes
> ===
> 
> Thanks...

Hi,

can you check it and let me know the way...

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


[issue24272] PEP 484 docs

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Pull request accepted!  Please forward-merge, thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22622] ElementTree only writes declaration when passed encoding

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

As far as I can tell this was already working, even in 3.4.0a1 (the first 
pre-release of 3.4):

>>> tree.write('/dev/stdout', xml_declaration=True)



But it is not working in Python 2:

>>> tree.write('/dev/stdout', xml_declaration=True)


Looking at the history, I am confused because a 3.2.3 revision (df8609f1854d) 
comes up in the history of 2.7’s /Doc/library/xml.etree.elementtree.rst. 
Perhaps it is just that the documentation has inherited some wording from 
Python 3. Possibly also relevant: revision 57e631f 
 and Issue 8047.

--
nosy: +martin.panter
stage:  -> needs patch
versions: +Python 2.7 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread Sworddragon

Sworddragon added the comment:

I'm actually not fully sure why you are telling me this all, especially in this 
specific way.

But I would also go the other way, by removing ArgumentParser.get_default and 
ArgumentParser.set_defaults if we think the current ways of getting/setting are 
enough. Mainly I think consistence is the important here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



setenv

2015-09-09 Thread chenc...@inhand.com.cn

hi:
   This is not a question about python. It is a shell question. I'm 
sorry to bother you. But I really want to know it. As follow:
   I want to set a shell environment variable:PYTHONPATH. When i 
executeecho $PYTHONPATH, it is 
value:/usr/lib/python/Lib:/usr/lib/python/lib/python27.zip:/var/app/python/libs/pip-lib.zip. 
Now, I want to add value to it. The value is all files in a folder with 
the.zip end. For install, directory(/var/app/python/libs/) include 
gpio.zip, a.zip, b.zip and so on. So I want to add 
value:/var/app/python/libs/gpio.zip, /var/app/python/libs/a.zip,
/var/app/python/libs/b.zip to environment variable:PYTHONPATH. I execute 
cmd: export PYTHONPATH='/var/app/python/libs/*zip':$PYTHONPATH, but its 
value is not correct. So, how can i do this? My program use setenv to 
set environment variable.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24272] PEP 484 docs

2015-09-09 Thread Guido van Rossum

Guido van Rossum added the comment:

Merged and pushed. Let's please use a new issue for any further patches.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >