[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Laura Creighton

New submission from Laura Creighton:

webmaster is hearing from children who have downloaded 3.5 but who
are still getting 2.7 when they click on desktop Python icons, and
type python at a console prompt.

a checkbox on the installer saying 'make this my default python' that
would then go off any do all that is necessary in this regard would
make their lives easier.

--
components: Installation, Windows
messages: 252595
nosy: lac, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add 'make this my default python' to windows installs for Python3.5 and 
later
versions: 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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2f3cbdc0f2d by Victor Stinner in branch 'default':
Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API
https://hg.python.org/cpython/rev/b2f3cbdc0f2d

--
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: change data in large excel file(more than 240 000 rows on sheet)

2015-10-09 Thread gall . pavgal . gall
Thanks Laura!
But i need to change existing excel file and if i use the optimised reader, i 
can read data only, but i can't change data.  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: reg multiple login python

2015-10-09 Thread harirammanohar159
On Thursday, 1 October 2015 12:35:01 UTC+5:30, hariramm...@gmail.com  wrote:
> Hi All,
> 
> Is there anyway i can login to remote servers at once and do the activity, i 
> can do one by one using for loop..
> 
> Thanks in advance.

any way is there ???
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

bench_bytes_format.py: micro-benchmark testing a few formats. Some tests are 
focused on the implementation of _PyBytesWriter to ensure that the optimization 
is efficient.

Except of a single test (which is not really revelant, it takes less than 500 
nanoseconds), all tests are faster.

The b"xx %s" % b"y" test confirms that the optimization disabling 
overallocation for the last write is effective.

Results:

Common platform:
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)
Python unicode implementation: PEP 393
CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Platform: Linux-4.1.6-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two
CFLAGS: -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes
Timer: time.perf_counter
Bits: int=32, long=64, long long=64, size_t=64, void*=64

Platform of campaign orig:
SCM: hg revision=1aae9b6a6929 tag=tip branch=default date="2015-10-09 01:34 
-0400"
Timer precision: 64 ns
Python version: 3.6.0a0 (default:1aae9b6a6929, Oct 9 2015, 11:33:56) [GCC 5.1.1 
20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 11:34:11

Platform of campaign writer:
SCM: hg revision=fc2c11a19ae1+ tag=tip branch=default date="2015-10-09 11:48 
+0200"
Timer precision: 61 ns
Python version: 3.6.0a0 (default:fc2c11a19ae1+, Oct 9 2015, 12:16:16) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 12:16:31

---++--
use smaller buffer |   orig |writer
---++--
b"hello %s" % b"world" |  13 ns (*) |   12 ns (-5%)
b"hello %-100s" % b"world" | 158 ns (*) |  98 ns (-38%)
b"x=%d" % 123  |  13 ns (*) | 12 ns
b"x=%f" % 1.2  |  13 ns (*) | 13 ns
b"x=%100d" % 123   | 156 ns (*) |  166 ns (+7%)
---++--
Total  | 353 ns (*) | 301 ns (-15%)
---++--

-+-+---
"hello %s" % long_string |orig | writer
-+-+---
fmt = b"hello %s"; arg = b"x" * 10; fmt % arg|   98 ns (*) |   86 ns (-12%)
fmt = b"hello %s"; arg = b"x" * 100; fmt % arg   |   85 ns (*) |  87 ns
fmt = b"hello %s"; arg = b"x" * 10**3; fmt % arg |  298 ns (*) |  208 ns (-30%)
fmt = b"hello %s"; arg = b"x" * 10**5; fmt % arg |  4.8 us (*) |  4.39 us (-9%)
-+-+---
Total| 5.28 us (*) | 4.77 us (-10%)
-+-+---

---+-+---
b"xx %s" % b"y"|orig | writer
---+-+---
fmt = b"x" * 10 + b"%s"; fmt % b"y"|   99 ns (*) |   81 ns (-18%)
fmt = b"x" * 100 + b"%s"; fmt % b"y"   |  189 ns (*) |   87 ns (-54%)
fmt = b"x" * 10**3 + b"%s"; fmt % b"y" | 1.12 us (*) |  209 ns (-81%)
fmt = b"x" * 10**5 + b"%s"; fmt % b"y" | 88.4 us (*) | 8.49 us (-90%)
---+-+---
Total  | 89.8 us (*) | 8.87 us (-90%)
---+-+---

--+-+---
%f|orig |   
  writer
--+-+---
n = 200; fmt = b"%f" * n; arg = tuple([1.2]*n); fmt % arg | 37.2 us (*) | 29.6 
us (-21%)
--+-+---

+-+---
%i  |orig | 
writer
+-+---
n = 200; fmt = b"%f" * n; arg = tuple([12345]*n); fmt % arg | 49.4 us (*) | 
42.8 us (-13%)
+-+---

-+-+---
Summary  |orig | writer
-+-+---
use smaller buffer   |  353 ns (*) |  301 ns (-15%)
"hello %s" % long_string | 5.28 us (*) | 4.77 us (-10%)
b"xx %s" % b"y"  | 89.8 us (*) | 8.87 us (-90%)
%f   | 37.2 us (*) | 29.6 us (-21%)
%i   | 49.4 us (*) | 42.8 us (-13%)

[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Gian Carlo Martinelli

Gian Carlo Martinelli added the comment:

Terry, first of all thanks for trying to solve this.

I usually start IDLE using Ubuntu's dash.

The problem is with more than just the three characters. Others that I have 
tested and that don't work include "ç", "`", umlauts... There work in others 
places in my system such as the console for example.

When I try ALT+M or CTRL+O, inside IDLE, these characters work.

This is a copy of my output. Seems OK
!  "  #  $  %  &  '  (  )  *  +  ,  -  .  /  
0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?  
@  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  
P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _  
`  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  
p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~  

--

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ad8a2d34d01 by Vinay Sajip in branch '2.7':
Closes #25344: Added cookbook recipe to show buffering of logging events.
https://hg.python.org/cpython/rev/3ad8a2d34d01

New changeset 7cc3a8141022 by Vinay Sajip in branch '3.4':
Closes #25344: Added cookbook recipe to show buffering of logging events.
https://hg.python.org/cpython/rev/7cc3a8141022

New changeset be13ea160b1a by Vinay Sajip in branch '3.5':
Closes #25344: Merged fix from 3.4.
https://hg.python.org/cpython/rev/be13ea160b1a

New changeset 6c183537b2fb by Vinay Sajip in branch 'default':
Closes #25344: Merged fix from 3.5.
https://hg.python.org/cpython/rev/6c183537b2fb

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 425d81d10b13 by Martin Panter in branch '3.4':
Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by Eryksun
https://hg.python.org/cpython/rev/425d81d10b13

New changeset e97d940a6543 by Martin Panter in branch '3.5':
Issue #24402: Merge input() fix from 3.4 into 3.5
https://hg.python.org/cpython/rev/e97d940a6543

New changeset bcc0f8eb6797 by Martin Panter in branch 'default':
Issue #24402: Merge input() fix from 3.5
https://hg.python.org/cpython/rev/bcc0f8eb6797

--
nosy: +python-dev

___
Python tracker 

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



[issue24978] Contributing to Python 2x and 3x Documentation. Translation to Russian.

2015-10-09 Thread Sebastian A. Brachi

Sebastian A. Brachi added the comment:

> I wrote a proposal to the board a while ago
I couldn't find that proposal, could you post a link to it? Thanks!

--
nosy: +Sebastian A. Brachi

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

Thanks for the feedback. Yeah, 2.7 is an independent branch, but I will try 
porting the changes there.

--
assignee: docs@python -> martin.panter
nosy: +berker.peksag
stage: patch review -> commit review

___
Python tracker 

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



Re: Recover data over the network

2015-10-09 Thread Arshpreet Singh
On Saturday, 10 October 2015 04:40:27 UTC+5:30, Steven D'Aprano  wrote:
 
> What do you mean, "recover data from a server"? What has happened to the
> server? Can it boot or is it in an unbootable state? Are the hard drives
> physically damaged? What sort of hard drives? (Solid state, or magnetic
> media?)

Server is booting up. We are using SSD. Disk is not physically Damaged. I can't 
reach to server Physically. 
 
 
> What makes you think this will be a "small" Python application? Do you have
> limits on the maximum size? (Does the application have to fit on a floppy
> disk?) Are you expecting a GUI? What OS do you want the application to run
> on? (Windows, Linux, Mac OS, Android, embedded systems, something else?)

>From the small I was meaning a simple Python command Line application. That I 
>will be able to execute from shell. Server is on Ubuntu Linux.

> > For the 2nd part I can use scp(secure copy), Please let me know if any
> > data-recovery library is available in Python to do 1st task.
> 
> Depends on what you mean by data recovery.

My main aim is to recover user accounts mostly data present in /home partition 
of the disk.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Recover data over the network

2015-10-09 Thread Arshpreet Singh
On Saturday, 10 October 2015 04:40:27 UTC+5:30, Steven D'Aprano  wrote:
 
> What do you mean, "recover data from a server"? What has happened to the
> server? Can it boot or is it in an unbootable state? Are the hard drives
> physically damaged? What sort of hard drives? (Solid state, or magnetic
> media?)

Server is booting up. We are using SSD. Disk is not physically Damaged. I can't 
reach to server Physically. 
 
 
> What makes you think this will be a "small" Python application? Do you have
> limits on the maximum size? (Does the application have to fit on a floppy
> disk?) Are you expecting a GUI? What OS do you want the application to run
> on? (Windows, Linux, Mac OS, Android, embedded systems, something else?)

>From the small I was meaning a simple Python command Line application. That I 
>will be able to execute from shell. Server is on Ubuntu Linux.

> > For the 2nd part I can use scp(secure copy), Please let me know if any
> > data-recovery library is available in Python to do 1st task.
> 
> Depends on what you mean by data recovery.

My main aim is to recover user accounts mostly data present in /home partition 
of the disk.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Recover data over the network

2015-10-09 Thread Emile van Sebille

On 10/9/2015 7:47 PM, Arshpreet Singh wrote:

On Friday, 9 October 2015 22:51:16 UTC+5:30, Emile van Sebille  wrote:


without extensive clues as to the nature of the data to be recovered
you're not going to get much further with this.


It is mostly /home partition data on disk. Those are user Configuration 
files.(user accounts, settings etc)


When I've had to
recover data from disks or damaged files is generally been a one-off
kind of recovery.


Please enlighten me about one-off kind of data recovery.



This isn't really on-topic for this forum, but if you haven't already, 
dd the drive to a file and work on that rather than on the drive 
directly to avoid degrading the situation further.  Then find a recovery 
utility that meets your needs and go forward from there.  You're not 
likely to find a command line python utility that'll do it for you.


Emile





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


Re: win32com.client .Cells

2015-10-09 Thread Irmen de Jong
On 9-10-2015 20:45, gall.pavgal.g...@gmail.com wrote:
> Hi Guys, 
> 
> i wrote small function :
> 
> Excel = win32com.client.Dispatch("Excel.Application")

[...]

> com_error: (-2147221008, 'CoInitialize has not been called.', None, None)
> 
> Please, help me! :)
> 

First hit on google when searching for "CoInitialize has not been called 
python":

http://stackoverflow.com/questions/26745617/win32com-client-dispatch-cherrypy-coinitialize-has-not-been-called

I.e. do what the error says, call CoInitialize from your threads.

Irmen


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


Re: Recover data over the network

2015-10-09 Thread Steven D'Aprano
On Sat, 10 Oct 2015 04:12 am, Arshpreet Singh wrote:

> Hello Python and People!
> 
> I want to write a small Python application which will be able to 1.recover
> data from server and 2.send it to another server.

What do you mean, "recover data from a server"? What has happened to the
server? Can it boot or is it in an unbootable state? Are the hard drives
physically damaged? What sort of hard drives? (Solid state, or magnetic
media?)

What makes you think this will be a "small" Python application? Do you have
limits on the maximum size? (Does the application have to fit on a floppy
disk?) Are you expecting a GUI? What OS do you want the application to run
on? (Windows, Linux, Mac OS, Android, embedded systems, something else?)

> For the 2nd part I can use scp(secure copy), Please let me know if any
> data-recovery library is available in Python to do 1st task.

Depends on what you mean by data recovery.




-- 
Steven

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


[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

Okay I plan to commit a modified version where I moved the input() test methods 
that use pseudo terminals to a new PtyTests class. The test_input() method 
stays in the original class, because it shares a helper method with other tests.

I am resisting dropping that decode() step, because it makes any error message 
from the forked child hard to read:

AssertionError: 256 != 0 : b'quux\r\nTraceback (most recent call last):\r\n  
File "/media/disk/home/proj/python/cpython/Lib/test/test_builtin.py", line 
1593, in test_input_no_stdout_fileno\r\ninput("prompt")\r\nTypeError: bad 
argument type for built-in operation\r\n'

--
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: Recover data over the network

2015-10-09 Thread Arshpreet Singh
On Friday, 9 October 2015 22:51:16 UTC+5:30, Emile van Sebille  wrote:
 
> without extensive clues as to the nature of the data to be recovered 
> you're not going to get much further with this.  

It is mostly /home partition data on disk. Those are user Configuration 
files.(user accounts, settings etc) 

>When I've had to 
> recover data from disks or damaged files is generally been a one-off 
> kind of recovery.

Please enlighten me about one-off kind of data recovery.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not surprised that non-ascii chars fail also. But, all? or just a few (all 
symbol? or only diacriticals)?

My first thought was that you have a european keyboard that is does not match 
your Ubuntu configuration.  Or that you had an older tcl/tk that did not work 
with such.

^O opens a dialog that IDLE is not involved with.  Alt-M open a different tk 
widget that IDLE in not involved with.

Do shell and editor have exactly the same problems?

Let's try two other things.  Alt-F3 opens Find in Files (grep).  Can you enter 
any of `'^~ on the first line?

Put anything on the first line and add a *fake* directory on the second (so you 
have something like zyx/*.py).  Search.  Try typing in the Output Window.  It 
is slightly different from shell and editor (no colors, for instance).

Ankit: I am trying to narrow possibilities using my knowledge of IDLE 
internals.  I wish I knew what *I* need to learn for this.

--

___
Python tracker 

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



[issue25347] assert_has_calls output is formatted inconsistently

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 2.7, Python 3.2, Python 3.3, 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



[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Maybe @shanmbic has a clock skew and _datetime.so does not get recompiled?

I would try to do make clean or even make distclean and rebuild everything.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think you are correct, and I wouldn't be surprised if there is some in the 
stdlib as well.

--

___
Python tracker 

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



[issue21264] test_compileall fails to build in the installed location

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

I consider this fixed by way of issue #25099. If that's wrong then feel free to 
open the issue again.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_compileall fails when run by unprivileged user on 
installed Python
versions: +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: Using pipe in a system call

2015-10-09 Thread Chris Angelico
On Fri, Oct 9, 2015 at 5:56 PM, Cecil Westerhof  wrote:
> My bad, I intended to mention that ORDER BY gives the wrong order (é
> comes after z and with sort it comes after e), so that is why I use
> the external sort command.

Can you configure SQLite's locale? That ought to resolve that. Failing
that, I'd be inclined to take the data into Python as Unicode strings,
and do a locale-based sort of those strings (or tuples of strings).

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


[issue25287] test_crypt fails on OpenBSD

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Hum, the test now fails differently :-(

==
FAIL: test_methods (test.test_crypt.CryptTestCase)
--
Traceback (most recent call last):
  File 
"/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 
29, in test_methods
self.assertTrue(len(crypt.methods) >= 1)
AssertionError: False is not true

--

___
Python tracker 

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



[issue25306] test_huntrleaks_fd_leak() of test_regrtest hangs on Windows

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, it looks like the issue was fixed.

--
keywords: +buildbot
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



Re: can't install Python 3.5 on windows

2015-10-09 Thread Oscar Benjamin
On Fri, 9 Oct 2015 08:48 Jay Brown  wrote:

Dear Python:

I have been trying to install Python on my Windows computer. I tried both
Python 2.7 and 3.5. No luck with either one. If I try to run Python I get a
message asking me if I want to repair Python. The program never runs. Can
you help?




Hi Jay,

You need to provide more information than that!

What version of Windows are you using? Is your computer 32 bit or 64 bit?
Which Python installer did you use (please give a link to where you
downloaded it and say what the exact filename is)? Did the install complete
without errors? How are you trying to run Python?

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


IPython Notebooks to Learn Python

2015-10-09 Thread Rajath Kumar
Greetings,

I have written IPython Notebooks to learn Python interactively. I have
covered all the basic concepts and it is everything one needs to get
started with the language.

Do check it out : https://github.com/rajathkumarmp/Python-Lectures

- Rajath Kumar M.P
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

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


[issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

The bug was reproduced with faulthandler:

FAIL: test_all (test.test_eintr.EINTRTests)
Timeout (0:10:00)!
Thread 0x000802006400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 402 in test_sigwaitinfo
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", 
line 600 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", 
line 648 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/runner.py", 
line 176 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1775 in _run_suite
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1809 in run_unittest
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 470 in test_main
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 474 in 

The same error occurred multiple times on buildbots FreeBSD 10.0 and 9.x.

--
title: test_eintr hangs on randomly on "AMD64 FreeBSD 9.x 3.x" -> 
test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2015-10-09 Thread s-wakaba

New submission from s-wakaba:

When writing bash shellscripts, I always set options "set -ueC" for strict 
error checking. However, loading pyvenv's activate and deactivate scripts from 
bash with "-u" option, they are failure because they may refer undefined shell 
variables.

I hope activate script and deactivate function are enclosed like following block

_OLD_BASH_OPTIONS="$-"
set +u

### script body ##

set -$_OLD_BASH_OPTIONS
unset _OLD_BASH_OPTIONS


Another option, all shell-variables in the script change like

$SPAM -> ${SPAM:-}

--
components: Library (Lib)
messages: 252593
nosy: s-wakaba
priority: normal
severity: normal
status: open
title: pyvenv activate script failure with specific bash option
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



can't install Python 3.5 on windows

2015-10-09 Thread Jay Brown
Dear Python:

I have been trying to install Python on my Windows computer. I tried both
Python 2.7 and 3.5. No luck with either one. If I try to run Python I get a
message asking me if I want to repair Python. The program never runs. Can
you help?

   -Jay Brown

 

Jay C. Brown

Department of Microbiology, Immunology and Cancer Biology

University of Virginia Health System

Charlottesville, VA  22908

 

Email: jc...@virginia.edu

Phone: 434-924-1814

 

 

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


Re: Is there a Windows Python SIG?

2015-10-09 Thread Tim Golden
On 09/10/2015 03:41, Christopher Reimer wrote:
> On 10/7/2015 10:49 PM, Chris Angelico wrote:
>> Awesome! Contributors are always welcome.
> 
> On a YouTube video from PyCon 2015, I think someone mentioned the need
> for more people to look at Python on Windows. Does this mean that Python
> on Linux and/or Mac get more love than Python on Windows?

It absolutely does.

> 
> I went looking at the bug database. A lot of the reports are way over my
> head, but some of the comments made for fascinating reading. I found one
> report of an installer error on Windows 10 Educational version. I wasn't
> aware that there was an educational version of Windows 10. My first
> thought of the bug was a bad download, which was the first comment
> someone posted in response. Being so vague in details, no one else will
> probably look at it again. This one looks doable.
> 
> How many bugs do I have to poke and prod to put Python contributor on my
> resume?

Can I suggest a read through this article, written more than 5 years ago
(!) but still fairly relevant. The situation's changed a little -- in
particular, Steve Dower of Microsoft has taken a very active part in the
3.5 release, bringing our build & install process up to the very latest.
But we're still very short of Windows-based people.

http://ramblings.timgolden.me.uk/2010/08/16/im-a-windows-person-how-can-i-contribute-to-python-part-i/

A lot of what we're seeing right at the moment is down to the new
installer and its interaction with the different flavours of Windows out
there. Windows 10 is very new: I'm not running it on any machine and I
don't know if any Windows dev is. I don't know if we have any buildbots
running it either. But people out there *are* using it, so we're seeing
bug reports which might well be specific to that.

Please dive in and help: even if it's just lending a hand explaining or
diagnosing without ever writing code, that's helpful. If you can also
contribute *and review* patches, better still.

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


[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-09 Thread Xiang Zhang

Xiang Zhang added the comment:

I think this is a typo. The raise is left out.

In test_smtpd.py, it only tests the raise condition in SMTPServer but
not STMPChannel.

I add the raise and a corresponding test in SMTPDChannelTest.

--
keywords: +patch
nosy: +xiang.zhang
Added file: http://bugs.python.org/file40725/SMTPChannel_raise_ValueError.patch

___
Python tracker 

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



Re: Is there a Windows Python SIG?

2015-10-09 Thread Christopher Reimer

On 10/7/2015 10:49 PM, Chris Angelico wrote:

Awesome! Contributors are always welcome.


On a YouTube video from PyCon 2015, I think someone mentioned the need 
for more people to look at Python on Windows. Does this mean that Python 
on Linux and/or Mac get more love than Python on Windows?


I went looking at the bug database. A lot of the reports are way over my 
head, but some of the comments made for fascinating reading. I found one 
report of an installer error on Windows 10 Educational version. I wasn't 
aware that there was an educational version of Windows 10. My first 
thought of the bug was a bad download, which was the first comment 
someone posted in response. Being so vague in details, no one else will 
probably look at it again. This one looks doable.


How many bugs do I have to poke and prod to put Python contributor on my 
resume?


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


Re: can't install Python 3.5 on windows

2015-10-09 Thread alister
On Thu, 08 Oct 2015 13:01:24 -0400, Jay Brown wrote:

> Dear Python:
> 
> I have been trying to install Python on my Windows computer. I tried
> both Python 2.7 and 3.5. No luck with either one. If I try to run Python
> I get a message asking me if I want to repair Python. The program never
> runs. Can you help?
> 
>-Jay Brown
> 
> 
>  
> Jay C. Brown
> 
> Department of Microbiology, Immunology and Cancer Biology
> 
> University of Virginia Health System
> 
> Charlottesville, VA  22908
> 
> 
Install python correctly.

That is as good an answer as anyone can give based on the quality of the 
question which considering the source cited in you signature is seriously 
worrying.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25350] Stronger type enforcement (feature request)

2015-10-09 Thread John Michael Lafayette

New submission from John Michael Lafayette:

With a lot of languages, I can tell
that the type I am getting is an instance of the declared type I'm assigning it 
to.

Example:
Cat c = Factory.make("cat"
Animal d = Factory.make("dog")

Python:
val c = Factory.make("cat")

Problem with this is that it is not necessarily obvious to the reader what the 
type of c is. I suggest that you provide an option to strengthen python's type 
checking by allowing users to replace val with the expected type of the object 
and then allow the interpreter to check that the real type being assigned is an 
instance of the expected type. An option like -strong for strong typing.

--
messages: 252588
nosy: John Michael Lafayette
priority: normal
severity: normal
status: open
title: Stronger type enforcement (feature request)
type: enhancement

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-09 Thread Vinay Sajip

Vinay Sajip added the comment:

This is already supported. There is a logging.handlers.MemoryHandler which 
allows you to buffer logging events and then pass the buffered events to 
another handler when some condition is met, such as e.g. buffer full or some 
severity threshold is exceeded. Flushing the buffer to the other handler can be 
customised by subclassing and overriding shouldFlush() and perhaps flush() 
methods.

https://docs.python.org/2/library/logging.handlers.html#memoryhandler

I can perhaps add a cookbook recipe to illustrate, so I'll leave this issue 
open for now, as a reminder.

--

___
Python tracker 

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



Re: Is there a Windows Python SIG?

2015-10-09 Thread Chris Angelico
On Fri, Oct 9, 2015 at 1:41 PM, Christopher Reimer
 wrote:
> On 10/7/2015 10:49 PM, Chris Angelico wrote:
>>
>> Awesome! Contributors are always welcome.
>
>
> On a YouTube video from PyCon 2015, I think someone mentioned the need for
> more people to look at Python on Windows. Does this mean that Python on
> Linux and/or Mac get more love than Python on Windows?

The ease of compiling CPython on Linux compared to Windows means the
bar for contributions involving C code is a lot higher on Windows. So
I suspect that, yes, Linux would see a lot more people dabbling in
development, testing patches, etc.

With Python-only patches, it shouldn't be too hard to fiddle around on
Windows, but I suspect that tinkerers generally prefer Linux anyway,
so there'll still be less patch testing on Windows.

So if you're willing to grab patches and test them out, yes, it's well
worth doing.

> I went looking at the bug database. A lot of the reports are way over my
> head, but some of the comments made for fascinating reading. I found one
> report of an installer error on Windows 10 Educational version. I wasn't
> aware that there was an educational version of Windows 10. My first thought
> of the bug was a bad download, which was the first comment someone posted in
> response. Being so vague in details, no one else will probably look at it
> again. This one looks doable.
>
> How many bugs do I have to poke and prod to put Python contributor on my
> resume?

One :) Any work on the bug tracker is a contribution. If you sign the
copyright agreement, submit a patch, and get it committed, then you'll
be a "contributor" in a fuller sense, but a simple post of "Confirmed
on Windows 7" is a contribution too (and doesn't require any sort of
compiler or anything).

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


Karlsruhe (Germany) Python User Group, October 16th 2015, 7pm

2015-10-09 Thread Jürgen A . Erhard
The Karlsruhe Python User Group (KaPy) meets again.

Friday, 2015-10-16 (October 16th) at 19:00 (7pm) in the rooms of Entropia eV
(the local affiliate of the CCC).  See http://entropia.de/wiki/Anfahrt
on how to get there.

For your calendars: meetings are held monthly, on the 3rd Friday.

There's also a mailing list at
https://lists.bl0rg.net/cgi-bin/mailman/listinfo/kapy.
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

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


Re: Using pipe in a system call

2015-10-09 Thread Cecil Westerhof
On Friday  9 Oct 2015 02:11 CEST, Dennis Lee Bieber wrote:

> On Fri, 09 Oct 2015 00:03:36 +0200, Cecil Westerhof
>  declaimed the following:
>
>> I want to do the following Bash command in Python: sqlite3
>> spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" |
>> sort > spreekwoorden2.txt
>>
>> The following does this in Python:
>> sqlite_pipe = Popen(
>> (
>> 'sqlite3',
>> 'spreekwoorden.sqlite',
>> 'SELECT spreekwoord FROM spreekwoorden;'
>> ),
>> stdout = PIPE
>> )
>> Popen(
>> (
>> 'sort',
>> '--output=spreekwoorden2.txt',
>> ),
>> stdin = sqlite_pipe.stdout
>> )
>>
>> Is this the correct way, or is there a better way?
>>
>
>   Use the standard db-api interface for SQLite3 provided with
> Python and avoid creating external processes?
>
>   Heck, why rely on an external sort command when you can add
> "ORDER BY spreekwoord" to the SQL statement.

My bad, I intended to mention that ORDER BY gives the wrong order (é
comes after z and with sort it comes after e), so that is why I use
the external sort command.


>   Test data (out of habit, I always create an autonumber primary
> key) (this is shown as CSV):

I am using that also, but when I add things to the database I just
want to have a sorted file with all the proverbs (that is the meaning
of spreekwoord) so I can use it to import everything again if need to
be.

The create statement:
CREATE TABLE spreekwoorden (
spreekwoordID   INTEGER PRIMARY KEY AUTOINCREMENT,
spreekwoord TEXTUNIQUE  NOT NULL,
gebruiktTEXTDEFAULT CURRENT_DATENOT NULL
)


> fout = open("wordlist.txt", "w")

Fout means wrong in Dutch. ;-)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Using pipe in a system call

2015-10-09 Thread Cecil Westerhof
On Friday  9 Oct 2015 00:26 CEST, Ian Kelly wrote:

> On Thu, Oct 8, 2015 at 4:03 PM, Cecil Westerhof  wrote:
>> I want to do the following Bash command in Python: sqlite3
>> spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" |
>> sort > spreekwoorden2.txt
>>
>> The following does this in Python:
>> sqlite_pipe = Popen(
>> (
>> 'sqlite3',
>> 'spreekwoorden.sqlite',
>> 'SELECT spreekwoord FROM spreekwoorden;'
>> ),
>> stdout = PIPE
>> )
>> Popen(
>> (
>> 'sort',
>> '--output=spreekwoorden2.txt',
>> ),
>> stdin = sqlite_pipe.stdout
>> )
>>
>> Is this the correct way, or is there a better way?
>
> That seems fine to me. Alternatively you could pass shell=True to
> Popen and then the original command should work verbatim (but see
> the warnings about using shell=True).

I know about that, but because of the warnings I decided to never use
it.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This question has been asked multiple times before.  I think it should be 
documented that as far as the language goes, there is no answer.  Raymond's 
answer is a start.  Dima, where would you expect to find such a disclaimer 
(other than in the FAQ)?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy: +@nkit

___
Python tracker 

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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

INADA Naoki: "I want to Python 3.4 and Python 3.5 solve this issue since it's 
critical problem for some people."

On microbenchmarks, the optimization that I just implemented in Python 3.6 are 
impressive. The problem is that the implementation is quite complex. If I 
understood correctly, you are asking to optimize decoders and encoders for 
ASCII and UTF-8 (modify 4 functions) for the surrogateescape error handler. Is 
that right? Would UTF-8 be enough or not?

I don't like backporting optimizations which are not well tested right now. To 
optimize encoders, I wrote a full new _PyBytesWriter API. We cannot backport 
this new API, even if it's private. So the backport may be more complex than 
the code in the default branch.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yes, I was asking where to put the disclaimer.  The thread docs would be 
approriate if there is nothing already.

Guido has been very reluctant to put any performance guarantees in the language 
reference.  I believe he said that O(f(n)) info even for CPython should be in 
the wiki -- and taken as a guideline, not a iron guarantee.

Further discussion might be better directed to python-ideas, after a search of 
the pydev and python-ideas archives (most easily done with the gmane mirrors, I 
believe).

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There used to be such a checkbox, but apparently it had problems.  But there is 
still something with that effect, at least in part.  When I installed 3.5.0, 
'python' was switched from 3.4 to 3.5.  That did not happen with the 
preliminary releases, because I did somethng different.  Sorry, I don't 
remember what.

I don't like using the start menu over and over either.  So I pin frequently 
used programs to the taskbar -- always visible.  The 2.7 IDLE icon just says 
Python GUI.  In 3.4, it is Python 3.4 GUI.  Ditto for 3.5 and the future.

Steve: when Firefox and some other programs upgrade, the pinned icon remains.  
When Python upgrades, the pinned IDLE icon disappears.  When, as is normal, the 
upgrade is in the same directory, is there any way to leave the icon, since it 
still points to the right directory and filename?  Or is this icon binary 
specific?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread shanmbic

shanmbic added the comment:

make distclean worked. I guess too many reverts in hg caused some issue. :)

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

Thanks to Serhiy for all of the reviews!

--
resolution:  -> fixed
stage: commit review -> resolved

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 34bbd537b3e6 by Brett Cannon in branch '3.5':
Issue #25099: Skip relevant tests in test_compileall when an entry on
https://hg.python.org/cpython/rev/34bbd537b3e6

New changeset 21f3a92e0c6d by Brett Cannon in branch 'default':
Merge for issue #25099
https://hg.python.org/cpython/rev/21f3a92e0c6d

--
nosy: +python-dev

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Yes, I find that if there's something that might be a compilation problem, 
doing a make distclean and a build from scratch is a good idea to confirm it.

--

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Pavel Roskin

Pavel Roskin added the comment:

That's what I have now:

check:
$(PYTHON) -m py_compile $(SOURCES)
rm -f $(addsuffix c, $(SOURCES))

make check
python -m py_compile redacted-build redacted-git-diff redacted-git-gc 
redacted-git-status redacted-init redacted-server
redactedbuilder.py
rm -f redacted-buildc redacted-git-diffc redacted-git-gcc redacted-git-statusc 
redacted-initc redacted-serverc redactedb
uilder.pyc

That's what David is suggesting:

check:
for file in $(SOURCES); do \
python -c "compile(open('$$file').read(), '', 'exec')" || exit 1; \
done

make check
for file in redacted-build redacted-git-diff redacted-git-gc 
redacted-git-status redacted-init redacted-server redactedb
uilder.py; do \
python -c "compile(open('$file').read(), '', 'exec')" || exit 1; \
done

That's what I could have if I live long enough to see Python 3.6 on my 
development machine.

check:
$(PYTHON) -m py_compile --no-output $(SOURCES)

make check
python -m py_compile --no-output redacted-build redacted-git-diff 
redacted-git-gc redacted-git-status redacted-init redacted-server
redactedbuilder.py

If that does not seem like an important improvement, then I can live with what 
I have.

--

___
Python tracker 

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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Short summary.

Ok, I optimized ASCII, Latin1 and UTF-8 codecs (encoders and decoders) for the 
most common error handlers.

* ASCII and Latin1 encoders: surrogateescape, replace, ignore, 
backslashreplace, xmlcharrefreplace
* ASCII decoder: surrogateescape, replace, ignore
* (Latin1 decoder cannot fail)
* UTF-8 encoder: surrogateescape, surrogatepass, replace, ignore, 
backslashreplace, xmlcharrefreplace
* UTF-8 decoder: surrogateescape, replace, ignore

The code to handle other error handlers in encoders has also be optimized.

Surrogateescape has now an efficent implementation for ASCII, Latin1 and UTF-8 
encoders and decoders.

--

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy: +@nkit

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Gian Carlo Martinelli

Gian Carlo Martinelli added the comment:

1) Do the keys work in the Ubuntu console?
Yes.

2) Do the keys work in interactive python (not IDLE), started with 'python' at 
the console prompt.
Yes.

3) In IDLE, go to Help->About IDLE.  What is the Tk version.
  Best if 8.6.x, if before 8.5.18, upgrade.
8.6.1

4) Try typing in the text box, including the problem chars.  What happens?
Ran the program, all characters work perfectly.

--

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Yes same answers as Gian characters worked perfectly

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Tim Peters

Changes by Tim Peters :


--
components: +Library (Lib) -Extension Modules, ctypes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On the side issue: While the example given, which uses the py_compile.compile 
defaults via the command line interface, is useless, I disagree that writing a 
.pyc file for a file without .py is a bug.

Python will run python code with any filename as main module (and not write 
.pyc).  It will only import the *same code* (and normally write .pyc) if the 
filename ends with .py (or .pyw on windows).  However, 'import script' will 
import script.pyc (on the search path) without a script.py file existing.  
Using py_compile.compile('script', 'script.pyc') makes that possible.  (I just 
tried it.)

.

--

___
Python tracker 

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



[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-09 Thread L

Changes by L :


--
components: IO
files: io.openBugEx.py
nosy: sentinel
priority: normal
severity: normal
status: open
title: io.open() fails to open ascii file if LANG env not set
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file40737/io.openBugEx.py

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ankit: the issue is where do they fail, why, and how to fix.  Are you running 
Ubuntu also?

G.C. How do you start IDLE? Is the problem with exactly those three chars? Do 
they fail in the Shell? an editor? search box? other entry box such as you get 
with Alt-M? Open file dialog (control-O)?

Does this have expected output?

for m in range(32, 128, 16):
for n in range(16):
print(chr(m + n), ' ', end='')
print()
# should print
   !  "  #  $  %  &  '  (  )  *  +  ,  -  .  /  
0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?  
@  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  
P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _  
`  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  
p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~    
>>>

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think what Terry was asking was, where would you expect to see the disclaimer 
that *no* operations are guaranteed to be atomic?  That's what we're inclining 
toward (though we'll probably need a signoff from Guido).

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I implemented all optimizations which were already implemented in str % 
args. I close the issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Hello, i am totally new.I went through Pythons Developers guide and would like 
to learn so please tell me what i should learn to resolve this issue.

--
nosy: +@nkit

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new comments.

--

___
Python tracker 

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



Re: Errors installing xmiparser with Python 3.4 and windows - any help?

2015-10-09 Thread Mark Lawrence

On 09/10/2015 18:24, Gary Hanyzewski wrote:

I am trying to install xmiparser-1.5.dev-r124826 into python 3.4.0 on a windows 
machine.
When I try and install (either with pip or setup.py install) I get a number of 
syntax errors in the code ( below)

Has anyone managed to install and use the xmiparser module in python 3.4? If so 
what's the trick? if not any pointers on what I can do to get it to go. Are 
there any other xmi parsers or tools?

Thanks

Gary



[mega snip]

Try running the code through 2to3, then have the usual fun and games 
getting anything to compile on Windows, although I'd have thought it was 
blatantly obvious what the following meant.



  File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
  File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in 
initialize

vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in 
query_vcvarsal

l
raise ValueError(str(list(result.keys(
ValueError: ['path']


**NOT**

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


Re: Script To Remove Files Made Either By Python Or Git

2015-10-09 Thread Mark Lawrence

On 09/10/2015 16:44, Jason Swails wrote:



On Fri, Oct 9, 2015 at 6:08 AM, Joshua Stokes > wrote:

Hi

Is there an available script to remove file created by either using
the Python module or by using git?


​There's always this nugget:

git clean -fxd

This will get rid of *all* untracked files in the current directory of a
git repo (and recursively all subdirectories).  You can optionally
specify a directory at the end of that command.

Careful with this sledgehammer, though, as it will also trash any
untracked source code files as well (and you may never get them back).

HTH,
Jason



Well as this thread appears to be pretty useless I'll simply point out 
that you are known to me as "The Outlaw" Jason Swails, there's either 
"Tell Laura, I love her," Creighton OR Laura "Red Dwarf" Creighton, Dr 
Brett "Loose" Cannon but even I have to feel sorry for poor old Donald 
Stufft.


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


[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

Seems my test hangs the Free BSD 9 buildbot, although Free BSD 10 apparently 
passed.

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/1128/steps/test/logs/stdio

[390/390] test_builtin
Timeout (1:00:00)!
Thread 0x000801407400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/test_builtin.py", 
line 1585 in test_input_no_stdout_fileno
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/unittest/case.py", line 
580 in run
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/unittest/case.py", line 
628 in __call__

--
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: Recover data over the network

2015-10-09 Thread William Ray Wing

> On Oct 9, 2015, at 10:44 PM, Arshpreet Singh  wrote:
> 
>> On Saturday, 10 October 2015 04:40:27 UTC+5:30, Steven D'Aprano  wrote:
>> 
>> What do you mean, "recover data from a server"? What has happened to the
>> server? Can it boot or is it in an unbootable state? Are the hard drives
>> physically damaged? What sort of hard drives? (Solid state, or magnetic
>> media?)
> 
> Server is booting up. We are using SSD. Disk is not physically Damaged. I 
> can't reach to server Physically. 
> 
> 
>> What makes you think this will be a "small" Python application? Do you have
>> limits on the maximum size? (Does the application have to fit on a floppy
>> disk?) Are you expecting a GUI? What OS do you want the application to run
>> on? (Windows, Linux, Mac OS, Android, embedded systems, something else?)
> 
> From the small I was meaning a simple Python command Line application. That I 
> will be able to execute from shell. Server is on Ubuntu Linux.
> 
>>> For the 2nd part I can use scp(secure copy), Please let me know if any
>>> data-recovery library is available in Python to do 1st task.
>> 
>> Depends on what you mean by data recovery.
> 
> My main aim is to recover user accounts mostly data present in /home 
> partition of the disk.
> -- 
> https://mail.python.org/mailman/listinfo/python-list

I hesitate to mention this, but there _may_ be a communication problem here. 
When American-English speakers refer to data recovery, they usually are 
discussing reading data from a disk that has suffered some catastrophic event, 
say a head crash or an inadvertent wholesale data deletion. In either case 
physical access to the hardware is assumed (and required). Based on what you've 
said so far, you don't have physical access, the disk (SSD) is operating 
normally, and you simply want remote read access to the /home directory tree. 
Is this correct?  If the answer is yes, then the discussion will head off in an 
entirely different direction. 

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


[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

I wrote this on Arch Linux, so I doubt your Ubuntu failure is valid. The error 
you see is what I would expect if the bug were not actually fixed. I suspect 
you need to recompile /Python/bltinmodule.c, which contains the bug fix.

However, the test also hangs OS X buildbots. I can only guess at why it is 
hanging, either at the waitpid() line or the os.read() line. I am looking at 
refactoring my test to use the existing check_input_tty() infrastructure. It 
seems over the top by adding a separate pipe back to the parent process, but 
presumably will workaround whatever is causing the hang.

--

___
Python tracker 

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



[issue25360] pyw should search for pythonw to implement #!/usr/bin/env python

2015-10-09 Thread eryksun

New submission from eryksun:

The Windows launcher searches PATH to implement the shebang "#!/usr/bin/env". 
Given "#!/usr/bin/env python", it always searches for L"python" (see issue 
17903), even in pyw.exe. maybe_handle_shebang in PC/launcher.c should instead 
use a macro that's conditionally defined as L"pythonw" when building pyw.exe 
and L"python" when building py.exe. This parallels the existing 
PYTHON_EXECUTABLE macro.

--
components: Windows
messages: 252681
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: pyw should search for pythonw to implement #!/usr/bin/env  python
type: behavior
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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

The “newline” name seems as good as any. The patch looks good in general. I 
left a few comments.

I agree with not bothering for the UU encoder. That encoding has an embedded 
line length byte at the start of each line, so it makes less sense to omit 
newlines. Base-64 is used in places such as URLs where multiline output is not 
relevant, but I don’t know of a similar case for the UU encoding.

If I was doing it, I wouldn’t bother with a test case for keyword-only-ness, 
but suit yourself.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25360] pyw should search for pythonw to implement #!/usr/bin/env python

2015-10-09 Thread eryksun

Changes by eryksun :


--
nosy: +vinay.sajip

___
Python tracker 

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



Re: Recover data over the network

2015-10-09 Thread Michael Torrie
On 10/09/2015 08:47 PM, Arshpreet Singh wrote:
> On Friday, 9 October 2015 22:51:16 UTC+5:30, Emile van Sebille  wrote:
>  
>> without extensive clues as to the nature of the data to be recovered 
>> you're not going to get much further with this.  
> 
> It is mostly /home partition data on disk. Those are user Configuration 
> files.(user accounts, settings etc) 
> 
>> When I've had to 
>> recover data from disks or damaged files is generally been a one-off 
>> kind of recovery.
> 
> Please enlighten me about one-off kind of data recovery.

So you're not trying to "recover" data as in the server failed and the
file system won't mount, but rather just copy off files.  Correct?

If so, then what you're really trying to do is just copy data off.  This
is what rsync was invented for.  Sure you could hack a script with
Python to run this kind of thing, but really either a one-liner from the
command prompt with rsync, or a simple bash script is all you need.

If you need to recover data from unmountable disks, you'll have to look
into file recovery software.

Good luck.  As Emile says, this isn't really a Python thing.


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


[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Yes,i am using ubuntu.


Thank you Terry for guiding me really appreciate your help. 
Sorry for not replying fell asleep.

--

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Xiang Zhang

Xiang Zhang added the comment:

It's my fault. I forget to recompile. Now it works.

--

___
Python tracker 

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



Strong typing implementation for Python

2015-10-09 Thread John Michael Lafayette
I would like Python to have a strong typing feature that can co-exist with
the current dynamic typing system. Currently Python is like this:

var animal = Factory.make("dog") #okay
var dog = Factory.make("dog") #okay
-- 
https://mail.python.org/mailman/listinfo/python-list


Strong typing implementation for Python

2015-10-09 Thread John Michael Lafayette
I would like Python to have a strong typing feature that can co-exist with
the current dynamic typing system. Currently Python is like this:

var animal = Factory.make("dog")  # okay.
var dog = Factory.make("dog")   # okay.
var cat = Factory.make("dog")# are you sure?

I would like Python to also be able to also do this:

Animal a = Factory.make("dog")# okay. Dog is Animal.
Dog d = Factory.make("dog") # okay. Dog is Dog.
Cat c = Factory.make("cat")   # Runtime error. Dog is not Cat.

With a strong typing option that performs runtime type checking, the reader
can be certain that the program is running the type they expect. Also, the
IDE can be more helpful. Example:

var dog = Factory.make("dog")  # okay
dog. (Ctr+Space)   # Auto-complete lists only
Animal methods.

Dog d = Factory.make("dog") # okay. Dog is dog.
d. (Ctr+Space)# Auto-complete lists methods
for Dog and Animal.

In C++, this could be implemented by using dynamic_cast or typeinfo /
typeid. The interpreter look for an uppercase word followed by a lowercase
word followed by "=" and then it check the type on the right side of the
"=" at runtime and see if it is an instance of the (uppercase) type on the
left side of the "=". If not, the interpreter throws a runtime error that
says something like "Type Dog is not instance of type Cat. Line: 45".

This feature can be completely optional and could be integrated without
anyone noticing. If it is integrated, only the people who want this type
safety would have to use it. If there is a performance penalty, it would
mainly affect the people who use this feature. Given that a lot of people
transition from C/C++/Java to Python, I think that this feature would be
intuitive to many users and a good addition for people who like type safety.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-09 Thread Nick Coghlan

Nick Coghlan added the comment:

The attached "Final draft" patch is the version I plan to commit tomorrow. 
Major differences from the previous draft:

* accepted MAL's suggestion of using alphabetical order
* as RDM suggested, explained the rationale for the cases where we encourage 
people to participate
* after fighting with ReST trying to get it to let me have an indented 
paragraph following a bulleted list, I eventually hit on the idea of using the 
"topic" directive to separate entries from each other without introducing an 
ever expanding list of TOC entries on the main page
* there are now more extensive guidelines inline in the doc as a ReST comment
* three cases of "acceptable links to include" are covered: personal sites, 
commercial contact details, and crowdfunding
* questions and suggestions (including for new categories of acceptable links) 
are explicitly directed to the python-committers list

Given the useful feedback from MAL & RDM, I'll hold off on pinging 
python-committers again until this initial version of the page is live.

Does anyone else want to provide an entry for me to include in the initial 
commit? It would be good to have a couple more initial entries to help folks 
generalise from the available examples.

--
stage: patch review -> commit review
Added file: http://bugs.python.org/file40738/issue25194-motives.diff

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Xiang Zhang

Xiang Zhang added the comment:

This test also fails on Ubuntu.

[1/1] test_builtin
test test_builtin failed -- Traceback (most recent call last):
  File "/home/angwer/my-cpython/Lib/test/test_builtin.py", line 1588, in 
test_input_no_stdout_fileno
self.assertEqual(status, 0, output)
AssertionError: 256 != 0 : quux
Traceback (most recent call last):
  File "/home/angwer/my-cpython/Lib/test/test_builtin.py", line 1593, in 
test_input_no_stdout_fileno
input("prompt")
TypeError: bad argument type for built-in operation


1 test failed:
test_builtin

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Find in Files (grep)
Yes can type `'^~.

Output Window 
Yes seems to work can type `'^~ and other characters.

--

___
Python tracker 

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



Re: Recover data over the network

2015-10-09 Thread Michael Torrie
On 10/09/2015 09:44 PM, William Ray Wing wrote:
> I hesitate to mention this, but there _may_ be a communication
> problem here. When American-English speakers refer to data recovery,
> they usually are discussing reading data from a disk that has
> suffered some catastrophic event, say a head crash or an inadvertent
> wholesale data deletion. In either case physical access to the
> hardware is assumed (and required). Based on what you've said so far,
> you don't have physical access, the disk (SSD) is operating normally,
> and you simply want remote read access to the /home directory tree.
> Is this correct?  If the answer is yes, then the discussion will head
> off in an entirely different direction.

Good point.  rsync over ssh is his answer.  That's what it was designed
for.  And maybe a bit of bash scripting. I don't see Python as a good
fit for this task.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8dd9015b086 by Martin Panter in branch '3.4':
Issue #24402: Factor out PtyTests.run_child() in input() tests
https://hg.python.org/cpython/rev/d8dd9015b086

New changeset 6a8f96b46dce by Martin Panter in branch '3.5':
Issue #24402: Merge potential test fix from 3.4 into 3.5
https://hg.python.org/cpython/rev/6a8f96b46dce

New changeset cb574ee7231e by Martin Panter in branch 'default':
Issue #24402: Merge potential test fix from 3.5
https://hg.python.org/cpython/rev/cb574ee7231e

--

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

IDLE uses tkinter which wraps the tcl/tk GUI framework.  Tk handles key 
presses.  So this is almost certainly not an IDLE bug, or even a tkinter bug. 
Unless you can demonstrate otherwise, I will closing this as a CPython issue.

Since this is the first report I know of reporting a problem with ascii chars, 
there is almost certainly something peculiar about your system.  You should 
probably ask for help on python-list (or use the gmane.comp.python.general 
mirror as news.gmane.org).  Here are some preliminary questions.

Do the keys work in the Ubuntu console?
Do the keys work in interactive python (not IDLE), started with 'python' at the 
console prompt.
In IDLE, go to Help->About IDLE.  What is the Tk version.
  Best if 8.6.x, if before 8.5.18, upgrade.

Run the following program (IDLE editor is fine).

from tkinter import *
root = Tk()
text = Text(root)
text.pack()
text.focus_set()  # required to work
root.mainloop()

Try typing in the text box, including the problem chars.  What happens?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

I have addressed Serhiy's comments again.

--
Added file: http://bugs.python.org/file40736/issue25099.diff

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread CM

CM added the comment:

I understood what Ned meant, and I did seek advice from the third party 
software creator, it was the first thing I did because like you stated I 
thought it was an issue with the third party software and not python. Coming to 
this bug website was my last resort but I can see that it doesn't make sense

--

___
Python tracker 

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



Re: Script To Remove Files Made Either By Python Or Git

2015-10-09 Thread Laura Creighton
In a message of Fri, 09 Oct 2015 21:08:22 +1100, Joshua Stokes writes:
>Hi
>
>Is there an available script to remove file created by either using the Python 
>module or by using git?
>
>Thanks
>
>>From Joshua P Stokes

No.  A file is a file.  It doesn't know which program created it.
I can use python to create a file named anything_I_like and place it
anywhere I have write permission in the filesystem.  There is no
way to get it to identify itself as 'made by python', so there is
no way to write such a script.  

Now, python itself makes .pyc files whenever it runs, so if you want 
to clean those up, finding them and removing them is easy.  But we
need to know what OS you are running.

If you want to delete a git repository, that is also fairly easy to do.
If you want to do something else -- for instance, find out if you have
any git repositories on this machine -- explain more about what you want to 
accomplish, and why.

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


[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

New submission from STINNER Victor:

The base64.b64encode() function calls binascii.b2a_base64() and then strips the 
newline. It would be more efficient to directly not add a newline.

Attached patch adds an optional newline parameter to binascii.b2a_base64(). It 
also modifies base64.b64encode() to call binascii.b2a_base64() with 
newline=False.

--
files: binascii_b2a_base64_newline.patch
keywords: patch
messages: 252625
nosy: haypo
priority: normal
severity: normal
status: open
title: Add an optional newline parameter to binascii.b2a_base64() to not add a 
newline
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40731/binascii_b2a_base64_newline.patch

___
Python tracker 

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



Re: Script To Remove Files Made Either By Python Or Git

2015-10-09 Thread Jason Swails
On Fri, Oct 9, 2015 at 6:08 AM, Joshua Stokes 
wrote:

> Hi
>
> Is there an available script to remove file created by either using the
> Python module or by using git?
>

​There's always this nugget:

git clean -fxd

This will get rid of *all* untracked files in the current directory of a
git repo (and recursively all subdirectories).  You can optionally specify
a directory at the end of that command.

Careful with this sledgehammer, though, as it will also trash any untracked
source code files as well (and you may never get them back).

HTH,
Jason
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think Ned meant "it is *not* likely to be in the python interpreter or 
standard library", and that you should seek help from the third party people 
trying to track down the problem.  *If* it turns out to be python or the 
stdlib, which means you've managed to find a reproducer that does *not* involve 
the third party packages, *then* come back and reopen the issue.

Like Ned said, good luck, but we really can't provide you any more help here 
until the third party packages are eliminated from the equation.

--
nosy: +r.david.murray
status: open -> closed

___
Python tracker 

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



Re: Script To Remove Files Made Either By Python Or Git

2015-10-09 Thread Grant Edwards
On 2015-10-09, Marko Rauhamaa  wrote:

>>> $ rm $(find . )
>
> This is not safe since find might return pathnames with spaces in
> them.

Good point.

> Also, the command fails if find should produce no matches.

I just tried, it with a pattern that produced no matches, and it
removed no files.  That's what one would expect it to do. I admit the
message from rm is undesirable.  :)

>> Or if you're using GNU find:
>>
>> $ find  -delete
>
> This is safe.

Agreed, that is a better answer. I've known for years that gnu find
has a -delete option, but I always forget to _use_ it.

-- 
Grant Edwards   grant.b.edwardsYow! I'm having a
  at   tax-deductible experience!
  gmail.comI need an energy crunch!!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Laura Creighton

Laura Creighton added the comment:

checking, these kids are using computers where, at some point, somebody moved 
the idle shortcut from their 2.7 folder to the desktop.  Which was probably a 
very bad idea.

But what should I tell them to do to get 3.5 there instead?

(adding IDLE to 'Type')

--
components: +IDLE

___
Python tracker 

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



[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B

2015-10-09 Thread Éric Araujo

Éric Araujo added the comment:

I had the same reasoning as RDM when I worked on byte-compilation in 
distutils2: https://hg.python.org/distutils2/rev/7c0a88497b5c

Using py_compile or compileall means that you want to create pyc or pyo files.
Defining PYTHONDONTWRITEBYTECODE or -B means that you don’t want the Python 
interpreter to byte-compile module as a side-effect of importing them.
These two things seem orthogonal to me.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

+1. Not sure about the parameter name, but if no one suggests better, it LGTM. 
Added comments on Rietveld.

What about adding the same parameter to binascii.b2a_uu()?

--
nosy: +ncoghlan, pitrou, serhiy.storchaka

___
Python tracker 

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



Re: change data in large excel file(more than 240 000 rows on sheet)

2015-10-09 Thread alister
On Fri, 09 Oct 2015 01:21:37 -0700, gall.pavgal.gall wrote:

> Thanks Laura!
> But i need to change existing excel file and if i use the optimised
> reader, i can read data only, but i can't change data.

I know it does not help but if you have this amount of data being stored 
in a spreadsheet you are probably using the wrong technology.

This sounds like a typical example of miss-using a spreadsheet as a 
database.

once your current issue is resolved you may want to investigate moving 
the data to a more sensible format.




-- 
 _
/ We Klingons believe as you do -- the\
| sick should die. Only the strong should |
| live.   |
| |
| -- Kras, "Friday's Child", stardate |
\ 3497.2  /
 -
   \
\
.--.
   |o_o |
   |:_/ |
  //   \ \
 (| | )
/'\_   _/`\
\___)=(___/

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


[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

A few more encoders should be updated to use _PyBytesWriter API:

* Code Page (Windows only)
* Charmap
* UTF-7
* UTF-16
* UTF-32

--

___
Python tracker 

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

The _PyBytesWriter API was added in the issue #25318. See also the issue #25349 
which optimized bytes % args.

--

___
Python tracker 

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



Re: change data in large excel file(more than 240 000 rows on sheet)

2015-10-09 Thread harirammanohar159
On Wednesday, 7 October 2015 19:44:12 UTC+5:30, gall.pav...@gmail.com  wrote:
> Hi Guys,
> I need to change data in large excel file(more than 240 000 rows on sheet), 
> it's possible through win32com.client, but i need use Linux OS ...
> Please, could you advise some-thing suitable!
> 
> best regards, Pavel.

Hi Pavel,

is there is no possibility to write a definition or macro in excel itself to 
change the rows which makes bit easier than the script.. :)
-- 
https://mail.python.org/mailman/listinfo/python-list


Script To Remove Files Made Either By Python Or Git

2015-10-09 Thread Joshua Stokes
Hi

Is there an available script to remove file created by either using the Python 
module or by using git?

Thanks

>From Joshua P Stokes
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots still like this new API :-) (no test failure recently)

I reworked the API a little bit to make its usage simpler in Unicode encoders. 
I started to open new issues to using this new API in more functions producing 
byte strings.

I consider that this issue can now be closed. I'm happy, the API looks good to 
me and the modified code is faster.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



Re: change data in large excel file(more than 240 000 rows on sheet)

2015-10-09 Thread Laura Creighton
In a message of Fri, 09 Oct 2015 01:21:37 -0700, gall.pavgal.g...@gmail.com wri
tes:
>Thanks Laura!
>But i need to change existing excel file and if i use the optimised reader, i 
>can read data only, but i can't change data.  

Hmmm.  When I have this problem I have other problems as well,
and they can pretty well all be sumarised as 'I never wanted 
an excel file anyway'. 

So first I convert the xlsx to a CVS.

import openpyxl
import csv

workbook = openpyxl.load_workbook('my_big_file.xlsx', read_only=True)
sheet = workbook['big_data']

with open('my_big_file.csv', 'wb') as f:
c = csv.writer(f)
for r in sh.rows:
c.writerow([cell.value for cell in r])

This may be enough for you, and you may be able to use the Python
csv module to make the changes you want.
https://docs.python.org/3.5/library/csv.html
This may be all you need, if you can process your problem one line
at a time.  Reading it all into memory will give you the same problem.

But I have never actually done this.  Instead I convert the cvs to a 
postgresql database, and then make my changes there, and then
export it again as a csv, and then reverse the process to get an
xlsx again (if I need one).  I don't know any way to get postgresql
to take the xlsx directly, which is why I have the two step process
with the csv in the middle.

If you are more comfortable with MySQL or SQLite or some other database,
by all means use that.  They might even have a way to import xlsx directly.
I only do this because it is what I am used to.

The other thing to consider is pandas.
https://pypi.python.org/pypi/pandas

It uses openpyxl under the hood, but is set up for big data.  It accepts
xlxs files and also connects to databases.  It may be exactly what
you are looking for -- but I haven't tried this myself for such large
datasets, so  I don't know for sure.

Laura


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


[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch modifies unicode escape and raw unicode escape encoders to use 
the new _PyBytesWriter API.

The patch is optimized to encode Latin1 characters: encoding Latin1 characters 
when no character is escaped should not have to call _PyByte_Resize() at all.

When characters are escaped or a BMP or non-BMP string is encoded, 
overallocation is used to reduce the number of _PyByte_Resize(). It uses 
_PyBytesWriter overallocation strategy instead of always overallocate for the 
worst case.

_PyBytesWriter also embeds a small buffer allocated on the stack which also 
avoids calls to _PyBytes_Resize() when the output fits into 512 bytes.

--
files: unicode_escape.patch
keywords: patch
messages: 252599
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use _PyBytesWriter for unicode escape and raw unicode escape encoders
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40727/unicode_escape.patch

___
Python tracker 

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



  1   2   >