[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Rich rauenzahn


Change by Rich rauenzahn :


--
nosy: +rrauenza

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



[issue41135] Suggested change to http.server.HTTPServer to prevent socket reuse in Windows

2020-06-26 Thread Michael Rich


New submission from Michael Rich :

Hi, a web server can be incorrectly bound to an already in-use socket when 
binding a HTTPServer on windows.  The issue is discussed here:  
https://stackoverflow.com/questions/51090637/running-a-python-web-server-twice-on-the-same-port-on-windows-no-port-already

This only happens on Windows.  In *nix the socketserver will throw an error, on 
Windows it will not.  However the most recently bound server will not receive 
the requests.

I suggest the following code (taken from stackoverflow) at the start of the 
server_bind method:

if hasattr(socket, 'SO_EXCLUSIVEADDRUSE'):
self.socket.setsockopt(socket.SOL_SOCKET, 
socket.SO_EXCLUSIVEADDRUSE, 1)
# Also need to change the value of allow_reuse_address (defined in 
http.server.HTTPServer)
HTTPServer.allow_reuse_address = 0


I have tested this and it will throw an error upon reuse in Windows and does 
not change *nix behavior.

Thanks,

Mike

--
components: Library (Lib)
messages: 372451
nosy: Michael Rich
priority: normal
severity: normal
status: open
title: Suggested change to http.server.HTTPServer to prevent socket reuse in 
Windows
type: behavior
versions: Python 3.8

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



[issue29657] os.symlink: FileExistsError shows wrong message

2018-11-30 Thread Rich Jones


Rich Jones  added the comment:

@Larry - that would be an acceptable solution!

I'm here because I encountered this error independently. I explain why the  
arrow is a problem here: https://bugs.python.org/issue35367

The issue is that the '->' notation is already used by the standard operating 
system utilities in this context, so for Python overload this semantically in 
this case is the source of all the confusion.

It would avoid the scare that we've all encountered if it just said 'src'/'dst' 
rather than '->'.

Thanks!
R

--
nosy: +miserlou

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



[issue35367] FileExistsError During os.symlink() Displays Arrow in the Wrong Direction

2018-11-30 Thread Rich Jones


New submission from Rich Jones :

If I try to create a symlink which already exists, I get a FileExistsError. In 
this error message, the explanatory arrow is pointing in the wrong direction. 
This gave us a big scare in our logs!

Example:

```
$ ls
HELLO.txt
$ python3
Python 3.7.0 (default, Jul 23 2018, 20:22:55)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.symlink('HELLO.txt', 'GOODBYE.txt')
$ ls -lah *
lrwxr-xr-x  1 rjones  staff 9B Nov 30 15:36 GOODBYE.txt -> HELLO.txt
-rw-r--r--  1 rjones  staff 4B Nov 30 15:34 HELLO.txt
$ python3
Python 3.7.0 (default, Jul 23 2018, 20:22:55)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.symlink('HELLO.txt', 'GOODBYE.txt')
Traceback (most recent call last):
  File "", line 1, in 
FileExistsError: [Errno 17] File exists: 'HELLO.txt' -> 'GOODBYE.txt'
```

Notice that the arrow in the error message is pointing from HELLO to GOODBYE, 
but if you if you look at the `ls` output, it is pointing from GOODBYE to 
HELLO, which is the correct behavior.

The Python3 error message should be changed to reflect the correct direction of 
the symlink. 

This is a Python3 only bug, as the paths aren't displayed in Python2.

I can PR if this is accepted as a bug.

Thanks!
Rich

--
components: Library (Lib)
messages: 330826
nosy: miserlou
priority: normal
severity: normal
status: open
title: FileExistsError During os.symlink() Displays Arrow in the Wrong Direction
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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



[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Rich

Rich <miserlou+pyth...@gmail.com> added the comment:

I think bitmath would be overkill to include in its entirety, but maybe there 
solution is a good one.

There is also:

https://pypi.python.org/pypi/byteformat/
https://pypi.python.org/pypi/datasize
https://pypi.python.org/pypi/hurry.filesize
https://pypi.python.org/pypi/hfilesize/
https://humanfriendly.readthedocs.io/en/latest/
https://pypi.python.org/pypi/humanize

and a bajillion other solutions here: 
https://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size
 and elsewhere - I think really the underscoring how common this problem is.

(Although I don't _particularly want_ this to expand beyond the scope of this 
single function, it does seem that given the amount of "Python for Humans" 
stuff out there, there could be an argument made for adding a "humanize" 
package into the standard library..)

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31749] Request: Human readable byte amounts in the standard library

2017-10-10 Thread Rich

Rich <miserlou+pyth...@gmail.com> added the comment:

Yep, as I mentioned, it should be configurable to use either format. 
Localization is an excellent point as well, so, all in all, the optional 
arguments to the function are format, significant digits, and delimiter. That's 
not an unreasonable amount of configurability.

It's not a complex problem, the solutions are fairly simple, but there are many 
ways to shoot yourself in the foot when rolling your own. There are already 
many packages which attempt this, most of which aren't used by any serious 
projects, who instead use their own implementations. There are just as many 
snippets of partial solutions floating around the internet as well. There is no 
canonical way to solve this common problem.

This is exactly why this common functionality should be added to the standard 
library, so that this extremely common function doesn't have to be imported 
from some-random-jamook's-untrustworthy-project-on-PyPI or rewritten from 
scratch for every project.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31749] Request: Human readable byte amounts in the standard library

2017-10-10 Thread Rich

New submission from Rich <miserlou+pyth...@gmail.com>:

This problem is an _extremely_ common one, a problem that almost any Python 
project of a reasonable size will encounter.

Given a number of bytes, say 123901842, format this as '123.9MB'.

The reason I strongly think that this should be included in the standard 
library is that if you look for how to do this through a Google search, there 
are an incredible amount of different solutions on StackOverflow, blog posts, 
forum posts, and various different libraries which provide this functionality - 
with varying levels of functionality and safety. You can also find different 
implementations of solutions to this problem inside of pretty much every major 
Python project (Django, etc.). In fact, I don't think I can think of any other 
function that gets copy-pasted into a project's 'util.py' file more commonly.

I think this should functionality should be provided in the standard math 
package, with arguments which allow to specific SI/NIST formatting and the 
number of significant digits to display. Implementing this would strongly cut 
down on the amount of cargo-cult Python programming in the world.

I'm willing to implement this if there's a consensus that it should be included.

Thanks!,
Rich Jones

--
messages: 304061
nosy: miserlou2
priority: normal
severity: normal
status: open
title: Request: Human readable byte amounts in the standard library
type: enhancement
versions: Python 3.8

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27351] Unexpected ConfigParser.read() behavior when passed fileobject

2016-06-20 Thread Rich Rauenzahn

Rich Rauenzahn added the comment:

Thank you, lukasz.  That's the answer I anticipated -- I can appreciate the 
backwards compatibility aspect very much.

Regarding the docs, the docs say:

"Attempt to read and parse a list of filenames, returning a list of filenames 
which were successfully parsed."  

I don't know if the convention in the docs is that list always means *list*, 
but it could be changed to be iterable since that is the implementation.  

That fileobjects are also iterables could be pointed out here, but I think 
anyone making this mistake isn't going to make the mistake from misreading the 
docs, it's from skipping the docs and assuming read() is consistent with 
write().

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27351] Unexpected ConfigParser.read() behavior when passed fileobject

2016-06-18 Thread Rich Rauenzahn

Rich Rauenzahn added the comment:

Given that write() accepts a fileobject, but read() accepts a list of strings 
or a string (and readfp() is the one that accepts a fileobject instead), this 
seems like it could be a common enough error that just iterating over the 
fileobject could be undesirable and an exception might be thrown instead.

I'm throwing this out here to see if the library maintainers were aware of this 
odd edge case.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27351] Unexpected ConfigParser.read() behavior when passed fileobject

2016-06-18 Thread Rich Rauenzahn

New submission from Rich Rauenzahn:

This came up on StackOverflow: http://stackoverflow.com/a/37903779/2077386

I wanted to bring it to your attention in case it hasn't been notice before.

It turns out that if you pass a fileobject (i.e., 
ConfigParser().read(open("foo"))) ConfigParser.read() will look at the 
argument, see it isn't a basestring, and then will iterate over it.  
fileobjects are iterables.

This results in iterating over the contents of the file 'foo'.  It then 
attempts to open a file named after every line read from 'foo'.

For example, I made a file foo and filled it with a-g, each letter per line.  

strace shows:

open("foo", O_RDONLY) = 3
open("a\n", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("b\n", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("c\n", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("d\n", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("e\n", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("f\n", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("g\n", O_RDONLY)   = -1 ENOENT (No such file or directory)

...and since the API is designed to ignore files it can't open, it just ignores 
the open errors.

I wonder if this fileobject case ought to be checked for when checking the 
arguments passed into ConfigParser.read().  

Thank you.

--
components: Library (Lib)
messages: 268838
nosy: Rich.Rauenzahn
priority: normal
severity: normal
status: open
title: Unexpected ConfigParser.read() behavior when passed fileobject
type: behavior
versions: Python 2.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27351>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2012-02-28 Thread Rich Rauenzahn

Rich Rauenzahn rraue...@gmail.com added the comment:

Yes, the source box was checkmarked.

Not the first one to encounter this as well:

http://python.6.n6.nabble.com/IDLE-not-highlighting-current-line-while-debugging-on-Win-td2113345.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14146
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2012-02-27 Thread Rich Rauenzahn

New submission from Rich Rauenzahn rraue...@gmail.com:

Using 64bit python for windows downloaded from python.org on 64bit windows 7.

Python Version 3.2.2
Tk version 8.5
IDLE version 3.2.2

When stepping through code the corresponding line in the editor does not 
highlight with the code steps.  The windows does update the contents, so it 
appears to be tracking, but just fails to highlight the line.

Double clicking on the line in the debugger will go ahead and highlight it.  My 
settings are all default, and I've double checked the color schemes in the 
highlighting dialog.

--
components: IDLE
messages: 154533
nosy: Rich.Rauenzahn
priority: normal
severity: normal
status: open
title: IDLE: source line in editor doesn't highlight when debugging
type: behavior
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14146
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-11-18 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

I looked into it a bit further.

With some trial and error I narrowed the source of the problem to be the 
'KernelModeDriverInstall' option under compatibility. I believe this 
isn't a problem, because python shouldn't be trying to install drivers, 
and even if it needed to presumably that would be nested in something 
loaded dynamically, rather than the original image so it could catch the 
issue and deal with it.

I will try to reproduce this on another machine to double check my 
logic. Thanks again for all your help Martin.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-11-17 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

I've done some more fiddling with the debugger, once I discovered the 
Windows symbol servers, and a tool called application verifier some 
things started to fall into place.

LuaPriv takes care of user privelidges, the program runs fine when I run 
it as administrator. I believe that disabling UAC has caused the issue.

I will attempt 2 things
a) Create a new user account on this machine to see if the issue is 
ongoing.
b) Try to fiddle more with the debugger to find the last python call in 
the stack.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-11-17 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

I have an apology to make for wasting your time.

Further investigation demonstrates that it was evidently fiddling with 
the Application Verifier that broke everything (although I installed it 
during my debugging attempts- I'm guessing that something else in VS has 
the same capabilities).

By disabling all tests the application runs, by reenabling them it stops 
again.

I now have a few questions

1) How can the verifier add the flags to the loading mechanism to add 
the breaks? In that when I installed different versions/clean reinstall 
of the same version it was still broken. Clearly it doesn't patch the 
binary, but leaves a flag somewhere (???) about the binary?

2) OK by the looks of it I only had one question ;)

thanks for all your help!

--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-11-04 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

Download the debugging suite from
http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx#

Open windbg
Press Ctrl + E to load an executable
Select your python binary
Step through by typing g in the text box at the bottom of the Command
window.

The application will fail to crash completely as windbg will catch the
exception, however you should notice that it's spitting out duplicate
errors after a few breaks.

Paste up your log :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-11-03 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

Carey I can send you the steps I used to create the dump if you like so we 
can check if it's the same issue?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-26 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

By running the python.exe (either by double clicking it, typing it's
path into a cmd shell or by opening it in a debugger).

I tried to create a 64 bit build of the source tree which DID start, but
the hoops I had to jump through to build it with VC++ Express Edition
were so convoluted that I'm not convinced it's meaning.

I've tried this with 2.6.3 and 3.1.1 from the amd64 .msi's at
http://www.python.org/download/

(2.6.3 was the current release when I tried. I will install 2.6.4 and
let you know- although I'm not convinced it will help).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-26 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

Nope- 2.6.4 fails in the same way.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-26 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

They did at first for me, and then something changed.

They now don't start. I don't have the skills to properly diagnose why,
all I can get out of my debuggers is that something is happening in
ntdll.dll

Not necessarily pointing fault at Python per se, but as it's the only
application I can find this bug in, and it's present in every amd64
version of Dolphin I try this is my first port of call.

What other info can I provide to help? I can set up a remote desktop to
this machine for a developer if they would like.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-25 Thread Rich Healey

New submission from Rich Healey ri...@psych0tik.net:

64 bit pythons fail on 64 bit Windows 7.

The crash happens with python 2.6 and 3.1 in 64 bit mode. 3.1 was a
clean install after the issue presented itself.

I'm not 100% sure how best to help with the problem, I've attached the
dump from windows debugger, please let me know if there's anything else
I can do to help.

It used to work but I'm not sure what changed, as near as I can tell
nothing system wide did, except perhaps the installation of new
compilers, my thought is that it could alter some dll search path?

Thanks in advance

richo

--
components: Interpreter Core
files: failedPython.log
messages: 94467
nosy: richo
severity: normal
status: open
title: 64 bit python fails on Windows 7
type: crash
versions: Python 2.6, Python 3.1
Added file: http://bugs.python.org/file15197/failedPython.log

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-25 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

I'm not 100% sure.

I have a x64 machine running Windows 2008. I will check if it's in the
log now.

I will also check if it's in the debug trace for x86 python (which works).

RESULTS:

I get the LuaPriv initialised line on x86 python on my win7 machine
(which works).
I don't get that line on any python builds on x64 windows server 2008.

I did some googling on what it is- it's a mechanism for restricting
access. It seems that it could be causing the crash because it thinks
the application is overflowing the stack (ie, it's a DEP related issue?).
http://msdn.microsoft.com/en-us/library/dd371695(VS.85).aspx
That is a M$ link about it.

I'm fully willing to help but don't know how, I am quite novice.

Thanks


richo

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-25 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

I think that dump may be incorrect because it does not have all the
symbols. I will checkout source for latest 3.x trunk and attempt to
build 64 bit binaries.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7206] 64 bit python fails on Windows 7

2009-10-25 Thread Rich Healey

Rich Healey ri...@psych0tik.net added the comment:

No action- the interpreter fails to start.

Or do you mean what changed to make it break? I'm not sure. It used to
work but I don't believe I changed anything on my system.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7206
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1862] Error on Save As in IDLE (Vista 32-bit)

2008-01-17 Thread Rich

New submission from Rich:

Issue 1743 might be related to this.

Using Save As... in IDLE does work, but if breakpoints.lst is hidden 
(which it is when Python generates it) it also generates this error in 
the Shell:

Exception in Tkinter callback
Traceback (most recent call last):
  File C:\Program Files\Python25\lib\lib-tk\Tkinter.py, line 1403, in 
__call__
return self.func(*args)
  File C:\Program Files\Python25\lib\idlelib\IOBinding.py, line 357, 
in save_as
self.editwin.store_file_breaks()
  File C:\Program Files\Python25\lib\idlelib\PyShell.py, line 209, in 
store_file_breaks
new_file = open(self.breakpointPath,w)
IOError: [Errno 13] Permission 
denied: 'C:\\Users\\Rich\\.idlerc\\breakpoints.lst'

The error is not generated if I manually unhide the breakpoints file.
The issue is unaffected by the hidden (or not) status of the .idlerc 
folder.

--
components: IDLE
messages: 60034
nosy: Piffen, kbk, loewis, richjtd, tiran
severity: normal
status: open
title: Error on Save As in IDLE (Vista 32-bit)
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1862
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-14 Thread Rich

Rich added the comment:

Aha! There is no difference in Permissions, but the working recent-
files file isn't hidden but the one generated originally by IDLE was.
If I make the one I made hidden then IDLE stops working again. 
The .idlerc folder has been hidden all along though - that doesn't 
affect it.
If anyone's changing the way IDLE writes these files, would it be worth 
me saying that aesthetically, I'm not a fan of it putting them in a 
hidden folder in my top level User folder. What about putting them down 
inside Users/AppData like other applications do? Just a thought.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-11 Thread Rich

Rich added the comment:

I can't get it to do it again.  Unless someone else is still 
experiencing the problem, perhaps it was fixed (deliberately or 
otherwise) by this month's Vista hotfixes that came down automatically 
a couple of days ago.
Thanks for your help everyone.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1544] IDLE installation problems and no message errors

2008-01-11 Thread Rich

Rich added the comment:

If you are using Vista, then we discovered that there might be a 
problem associated with the recent-files.lst file (usually found 
in .idle in the C:\Users\Yourname directory). That's all written down 
in Issue 1743.
If that doesn't apply to you then if you specify what version of 
Windows you are using, and what ways you have tried of opening IDLE, 
and hopefully someone cleverer than me will get back to you...

--
nosy: +richjtd

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1544
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-08 Thread Rich

Rich added the comment:

I've been away for a couple of days, but can replicate everything 
Joakim has reported in my abscence. Deleting/renaming recent-files.lst 
allows me to launch IDLE (from cmd or Start Menu).
Oddly though, if I close IDLE, copy/paste the contents of the old 
recent-files into the new one, and then restart IDLE, it still works.
Another thing I noticed, after launching IDLE from the Command Prompt, 
is that I get this error (while IDLE is still running and I haven't 
done anything with it yet):
Traceback (most recent call last): File [...]\idlelib\run.py, line 
82, in main exit()
File [...]\idlelib\run.py, line 208, in exit del sys.exitfunc
AttributeError: exitfunc

Is that normal?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-06 Thread Rich

New submission from Rich:

Launching IDLE from the start menu has no effect, no windows open.
Command line Python still works. Reinstalling Python does not fix the 
problem.
I haven't changed my system configuration since everything was working.
Any ideas for things to check to fix this on my system would be much 
appreciated!

--
components: IDLE
messages: 59364
nosy: richjtd
severity: normal
status: open
title: IDLE fails to launch
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1743] IDLE fails to launch

2008-01-06 Thread Rich

Rich added the comment:

I'm on 32-bit Windows Vista, and I installed with the Python 2.5 msi.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1743
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1704] possible bug in randint

2007-12-29 Thread Rich Marinaccio

Rich Marinaccio added the comment:

To be clear, I am not using multi-threading in my particular module. I 
can't explain this behavior with my code alone. The issue is 
complicated by the fact that my module is called by Civ IV, and I have 
no idea what the game is doing behind the scenes. I also don't know 
exactly what happens when 'del myList[index]' is called. You would 
think that len(preshuffle) would have the same value for the randint 
call that it does for the print statement. I have an idea for another 
test I would like to try.

This is my first issue that I've reported in Python. Would it help for 
me to attach the whole file?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1704] possible bug in randint

2007-12-29 Thread Rich Marinaccio

Rich Marinaccio added the comment:

What was happening before was I was getting an index out of range error 
every so often, so then I put in the ValueError catch to see what was 
going on. I was surprised to see that randIndex was the same as len
(preshuffle). I have some further catches in place now that might tell 
me more. It must have to do with deleting items from the list in the 
loop and not getting the right length from len immediately after, but 
then again I use this algorithm in several places in my module with no 
trouble, though with smaller lists. Go ahead and close this, and when I 
have more information I can open it some other time. This bug I'm 
seeing is extremely intermittant.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1704] possible bug in randint

2007-12-28 Thread Rich Marinaccio

Rich Marinaccio added the comment:

I've done some more testing and I can't get this to repeat with randint 
alone. It must be an issue with combination of the len() function used 
as a parameter to randint. The above code is in a loop that further 
down will del preshuffle[randIndex]. Could this be a threading issue 
where len(preshuffle) takes time to update when the list is shortened?

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1704] possible bug in randint

2007-12-27 Thread Rich Marinaccio

New submission from Rich Marinaccio:

I have been using python for Civilization IV map scripting, and I 
believe I have found a small problem with the randint function. Once in 
a blue moon, randint(a,b) returns b + 1, rather than a = N = b. I 
have seen this behavior a few times. Here is the code I used to 
determine this.

randIndex = PWRand.randint(0,len(preshuffle)-1)#PWRand calls randint 
directly with these parameters
if randIndex  0 or randIndex = len(preshuffle):
raise ValueError,  bad index shuffling plot list randIndex=%(r)d 
listLength=%(l)d, mapSize=%(s)d % {r:randIndex,l:len
(preshuffle),s:hm.mapWidth*hm.mapHeight}

#output is
ValueError:  bad index shuffling plot list randIndex=1453 
listLength=1453, mapSize=13824

according to the docs, the max randIndex should be listLength - 1

--
components: None
messages: 59012
nosy: cephalo
severity: normal
status: open
title: possible bug in randint
type: behavior
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1704] possible bug in randint

2007-12-27 Thread Rich Marinaccio

Rich Marinaccio added the comment:

I have been using python for Civilization IV map scripting, and I 
believe I have found a small problem with the randint function. Once in 
a blue moon, randint(a,b) returns b + 1, rather than a = N = b. I 
have seen this behavior a few times. Here is the code I used to 
determine this.

randIndex = PWRand.randint(0,len(preshuffle)-1)#PWRand calls randint 
directly with these parameters
if randIndex  0 or randIndex = len(preshuffle):
raise ValueError,  bad index shuffling plot list randIndex=%(r)d 
listLength=%(l)d, mapSize=%(s)d % {r:randIndex,l:len
(preshuffle),s:hm.mapWidth*hm.mapHeight}

#output is
ValueError:  bad index shuffling plot list randIndex=1453 
listLength=1453, mapSize=13824

according to the docs, the max randIndex should be listLength - 1

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1704
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com