[issue14255] tempfile.gettempdir() didn't return the path with correct case.

2013-10-24 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file32328/issue14255.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14255

[issue14255] tempfile.gettempdir() didn't return the path with correct case.

2013-10-24 Thread Tim Golden
Tim Golden added the comment: Added, including a slightly surprising change needed to test_zipimport_support (which arguably should have been there from the start for robustness). -- assignee: - tim.golden Added file: http://bugs.python.org/file32338/issue14255.2.diff

[issue19273] Update PCbuild/readme.txt

2013-10-24 Thread Tim Golden
Tim Golden added the comment: Fine. I'll commit it later. (Probably tomorrow at this point) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19273

[issue15556] os.stat fails for file pending delete on Windows

2013-10-24 Thread Tim Golden
Tim Golden added the comment: Had a to-and-fro on IRC with RDM who highlighted that an inconsistency between os.listdir and os.path.exists (the case here) is, at least, undesirable. As it stands, our os.exists on os.stat mechanism will fail because any attempt to get any kind of handle via

Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Tim Golden
On 23/10/2013 14:05, Colin J. Williams wrote: On 23/10/2013 8:35 AM, Mark Lawrence wrote: On 23/10/2013 12:57, duf...@gmail.com wrote: Years have passed, and a LARGE number of Python programmers has not even bothered learning version 3.x. The changes aren't large enough to worry a Python

Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Tim Golden
On 23/10/2013 14:52, Skip Montanaro wrote: Thankfully I am. I confess I don't understand how *nix people endure having to compile code instead of having a binary install. To me it's like going to the garage to buy a new car, being shown the parts and the tool kit and being told to get on

Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Tim Golden
On 23/10/2013 15:34, Skip Montanaro wrote: Tim: Disregarding Mark's tongue-in-cheek rhetoric for now... perhaps you didn't realise that, on Windows, you can't pip install a binary Mark: Which on Windows often ends up telling you that it can't find vcvarsall.bat I am well aware that

[issue19356] Change argument _self in _io/textio.c

2013-10-23 Thread Tim Golden
Tim Golden added the comment: I don't feel strongly about this. However, ISTM that we work reasonably hard to work with the vagaries of *nix toolchains so I don't see why an unintrusive change like this shouldn't go in to support some corner cases on the Windows front

[issue17791] PC/pyconfig.h defines PREFIX macro

2013-10-23 Thread Tim Golden
Tim Golden added the comment: Ok by me: build and tests all ok. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17791 ___ ___ Python-bugs-list

[issue18314] Have os.unlink remove junction points

2013-10-23 Thread Tim Golden
Tim Golden added the comment: Just picking this up. Considering testing... My current proposal is to add junction point support to _winapi, initially for the sole purpose of testing this change, but with a view to possibly supporting it formally via the os module. Any better ideas

[issue18314] Have os.unlink remove junction points

2013-10-23 Thread Tim Golden
Tim Golden added the comment: Sounds like a decent plan to me. Good luck with the buffer sizing! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18314

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-10-22 Thread Tim Golden
Tim Golden added the comment: *cough* Somehow that didn't actually get pushed. Rebased against 2.7, 3.3 3.4 and pushed. -- assignee: - tim.golden resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: -Python 3.2

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread Tim Golden
On 14/10/2013 06:41, chandan kumar wrote: I'm working on a python project for protocol testing.I need to provide only python compiled source to our customer. Here are the steps followed to take python compiled from actual source. 1.There are 5 different test suites under the project 2..Run

Re: Query on Python Compiled source--Urgent

2013-10-14 Thread Tim Golden
[Please post your answer below the previous reply, not above] [... snip most of original traceback ...] File C:\Python27\lib\site-packages\pyExcelerator\CompoundDoc.py, line 554, in save f = file(filename, 'wb') IOError: [Errno 22] invalid mode ('wb') or filename:

Learning about HTTP [was: Cookie gets changed when hit comes from a referrer]

2013-10-10 Thread Tim Golden
On 10/10/2013 00:48, Steven D'Aprano wrote: So, for the benefit of anyone, not just Nikos, who wants to learn about how browsers connect to web sites and how to run a web server, does anyone have any recommendation for tutorials, mailing lists, web forums or books which are suitable?

[issue19191] os.path.splitext in windows , a little question

2013-10-08 Thread Tim Golden
Tim Golden added the comment: This was implemented after discussion in issue1115886: http://bugs.python.org/issue1115886 and python-dev: https://mail.python.org/pipermail/python-dev/2007-March/071557.html In short, it could have gone either way and it went this way. -- nosy

[issue19191] os.path.splitext in windows , a little question

2013-10-08 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - wont fix stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19191

[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Tim Golden
Tim Golden added the comment: I was surprised that GetVersionEx would lie. But sure enough. Here: http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c471de52-611f-435d-ab44-56064e5fd7d5/windows-81-preview-getversionex-reports-629200 (Including a heartfelt comment by long-time Python

[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Tim Golden
Tim Golden added the comment: I've just installed a Win 8.1 VM and can (unsurprisingly) confirm the report: The ver command shows 6.3.9600 while GetVersionEx and consequently sys.getwindowsversion report 6.2.9200 We do use GetVersionEx in a few other places (timemodule.c, unicodeobject.c

[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Tim Golden
Tim Golden added the comment: platform.platform platform.uname are also affected although they already use ver-parsing in some circumstances so could presumably fallback to that approach here as well. -- nosy: +lemburg ___ Python tracker rep

[issue13674] crash in datetime.strftime

2013-09-30 Thread Tim Golden
Tim Golden added the comment: In reality (as I'm sure you can guess) it's just that no-one's got to the point of fixing it. I did start off, but it's not a trivial fix and clearly it got sidelined (with no-one shouting). Sometimes that's just the way it is. I'll see if I can dig out whatever

[issue19130] PCbuild/readme.txt not up-to-date

2013-09-29 Thread Tim Golden
Tim Golden added the comment: Nope. Looks like a mistake. Confusingly, the header refers to VC++ 10.0 which is VS 2010 (I think). AFAICT a global s/2008/2010/ would be the thing to do. -- ___ Python tracker rep...@bugs.python.org http

[issue18314] Have os.unlink remove junction points

2013-09-29 Thread Tim Golden
Tim Golden added the comment: I'll try to pick this one up over the next few days. Feel free to ping me if it drops into silence! -- assignee: - tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18314

Re: Handling 3 operands in an expression without raising an exception

2013-09-26 Thread Tim Golden
On 26/09/2013 09:41, Chris Angelico wrote: On Thu, Sep 26, 2013 at 6:12 PM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: Do you know that you can ask for help({}.get) or help(dict.get) or even help(os.environ.get) during such an interactive Python session, and Python (unlike Macbeth's

[issue19089] Windows: Broken Ctrl-D shortcut on Python 3

2013-09-25 Thread Tim Golden
Tim Golden added the comment: It doesn't work on Python 2.x either as delivered. Usually means you have an external readline module installed. -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19089

[issue19089] Windows: Make Ctrl-D exit key combination cross-platform

2013-09-25 Thread Tim Golden
Tim Golden added the comment: I'm at best +0.25, but I don't have a problem with Ctrl-D exiting on Windows, as it doesn't do anything else! The thing is, though, that this is all handled within myreadline.c:my_fgets which is a call into the system fgets which errors out with Ctrl-Z

Re: removing BOM prepended by codecs?

2013-09-24 Thread Tim Golden
On 24/09/2013 14:01, J. Bagg wrote: I'm using: outputfile = codecs.open (fn, 'w+', 'utf-8', errors='strict') Well for the life of me I can't make that produce a BOM on 2.7 or 3.4. In other words: code import codecs with codecs.open(temp.txt, w+, utf-8, errors=strict) as f: f.write(abc)

[issue17777] Unrecognized string literal escape sequences give SyntaxErrors

2013-09-24 Thread Tim Golden
Tim Golden added the comment: Closing as Works for me in the absence of any clear proposal for docs improvement. -- resolution: - works for me stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue19050] crash while writing to a closed file descriptor

2013-09-21 Thread Tim Golden
Tim Golden added the comment: I can confirm that 2.7.2 hard-crashes as described on Windows. I'm not sure if I have the wherewithal to build 2.7 on this laptop to see if it's fixed in tip. 3.3 simply raises an IOError. -- ___ Python tracker rep

Re: can't find win32api from embedded pyrun call

2013-09-04 Thread Tim Golden
On 03/09/2013 21:50, David M. Cotter wrote: I find i'm having this problem, but the solution you found isn't quite specific enough for me to be able to follow it. I'm embedding Python27 in my app. I have users install ActivePython27 in order to take advantage of python in my app, so the

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-08-12 Thread Tim Golden
Tim Golden added the comment: Thanks for the review, Ben. Updated patches attached. 1 3) default_encoding -- Your two points appear to contradict each other slightly. What's in the updated patches is: 3.x has no encoding (because everything's unicode end-to-end); 2.7 attempts to apply

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-08-10 Thread Tim Golden
Tim Golden added the comment: I attach a patch against 3.3; this is substantially Dave Chambers' original patch with a trivial test added and a doc change. This means that HKCR is scanned to determine extensions and these will override anything in the mimetypes db. The doc change highlights

[issue2528] Change os.access to check ACLs under Windows

2013-08-05 Thread Tim Golden
Tim Golden added the comment: Here's an updated patch against trunk with tests doc changes -- status: languishing - open Added file: http://bugs.python.org/file31165/issue2528.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue2528] Change os.access to check ACLs under Windows

2013-08-05 Thread Tim Golden
Tim Golden added the comment: ... and to answer Amaury's question in msg109871 it creates a reasonable consistency between the results of os.access and the user's actual ability to read / write a file. eg, you might have no permissions whatsoever on the file but as long as it wasn't read-only

[issue2528] Change os.access to check ACLs under Windows

2013-08-05 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file9919/os_access-r62091.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2528

[issue18306] os.stat gives exception for Windows junctions in v3.3

2013-08-01 Thread Tim Golden
Tim Golden added the comment: I propose to close this one: using Python 3.3 on Win7 I can successfully stat NTFS Junctions. Is there any remaining issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18306

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-08-01 Thread Tim Golden
Tim Golden added the comment: Fixed. Thanks for the patch -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9035

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-31 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file31092/issue9035.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9035

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-31 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file31087/issue9035.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9035

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-31 Thread Tim Golden
Tim Golden added the comment: 4th and hopefully final patch. Added tests for byte paths. Reworked the ismount so it uses the original detection approach first (which is wholly lexical) and drops back to the volume path technique only if the path doesn't appear to be a drive or a share root

[issue4708] os.pipe should return inheritable descriptors (Windows)

2013-07-31 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- assignee: tim.golden - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4708 ___ ___ Python-bugs-list

[issue3099] On windows, import nul always succeed

2013-07-31 Thread Tim Golden
Tim Golden added the comment: This one seems to have been fixed by the importlib rebuild. I haven't bothered to trace the code path, but certainly import nul returns the expected ImportError: No module named 'nul' in both Debug Release builds. -- resolution: - works for me stage

[issue2889] curses for windows (alternative patch)

2013-07-31 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- assignee: tim.golden - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2889 ___ ___ Python-bugs-list

[issue16921] Docs of subprocess.CREATE_NEW_CONSOLE are wrong

2013-07-31 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16921

[issue7443] test.support.unlink issue on Windows platform

2013-07-31 Thread Tim Golden
Tim Golden added the comment: This has been covered off by work done with the test.support package including context managers for temporary files / directories, and a waitfor mechanism which waits some time if a file can't be accessed. -- resolution: - works for me status: open

[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly

2013-07-30 Thread Tim Golden
Tim Golden added the comment: The Ctrl-C handling in Python on Windows is a bit strange in places. I'll add this to my list of things to look at. If you'd care to walk through the code to produce a patch or at least to point to suspect code, that would make it more likely that it be fixed

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-30 Thread Tim Golden
Tim Golden added the comment: I put a bit of work in on this this morning, following Mark's suggestion (msg138197) since that's the canonical approach. Unfortunately, it completely fails to work for the most common case: the root folder of a drive! The documentation for FindFirstFile

[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly

2013-07-30 Thread Tim Golden
Tim Golden added the comment: Thanks for doing the investigation. Yes, that comment was added by me as part of the fix for issue1677. I'll try to have a look at the codepath you describe to see if we can add a similar workaround. The Ctrl-C / SIGINT handling on Windows is less than ideal, I

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-30 Thread Tim Golden
Tim Golden added the comment: issue9035.2.patch is an updated version of Atsuo's patch. Known issues: * I haven't reworked it for the new memory-management API * There's no test for a non-root mount point (which is really the basis for this issue). It's difficult to see how to do

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-30 Thread Tim Golden
Tim Golden added the comment: issue9035.3.patch has switched to the new memory management API and has tweaked the tests slightly for robustness. This approach does introduce a behavioural change: the root of a SUBSTed drive (essentially a symlink into the Dos namespace) will raise an OSError

Re: Python Script Hashplings

2013-07-26 Thread Tim Golden
On 26/07/2013 11:37, Devyn Collier Johnson wrote: On 07/25/2013 09:54 AM, MRAB wrote: On 25/07/2013 14:42, Devyn Collier Johnson wrote: If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2 is installed, would the script still

[issue18525] Shutil cannot import WindowsError on windows

2013-07-22 Thread Tim Golden
Tim Golden added the comment: Really this should be a wont-fix: the fact that it's possible to import WindowsError from shutil (on Linux) is an accident of its internal implementation. It's certainly not documented as such. Saurabh: WindowsError is a builtin on Windows. If you want to mimic

[issue18491] Add exe wrapper functionality to Windows launcher

2013-07-19 Thread Tim Golden
Tim Golden added the comment: Glancing back, it isn't perhaps clear to the casual reader what's being proposed here, and why. The idea is that a pip-style installer become part of core Python. For Windows users, any standalone scripts from an installed package would be placed in scripts

DOS or not? [was Re: How to tell Script to use pythonw.exe ?]

2013-07-03 Thread Tim Golden
On 03/07/2013 02:34, Andrew Berg wrote: DOS is long dead, and is much, much different under the hood from the console subsystem in modern versions of Windows. While this is clearly true, it's by no means unusual for people to refer to the DOS Box or talk about DOS commands etc. even when

Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?]

2013-07-03 Thread Tim Golden
On 03/07/2013 09:28, Andrew Berg wrote: On 2013.07.03 02:34, Tim Golden wrote: While this is clearly true, it's by no means unusual for people to refer to the DOS Box or talk about DOS commands etc. even when they're quite well aware of the history of Windows and its Console subsystem. It's

Re: DOS or not? [was Re: How to tell Script to use pythonw.exe ?]

2013-07-03 Thread Tim Golden
On 03/07/2013 13:50, Tim Chase wrote: On 2013-07-03 09:51, Tim Golden wrote: We can certainly agree on this. I can't count the number of emails I've deleted as too hot-headed in response to dismissive comments about Windows as a platform. Some of them, at least, appear to be from people who

Re: python.exe crash if opencv tries to access busy webcam

2013-07-03 Thread Tim Golden
On 03/07/2013 14:25, ifelset...@gmail.com wrote: Hello, I have a while loop taking images every 5 minutes from webcam. Unfortunately, if the camera is busy, python.exe crashes and there is no exception to catch. Is there a way to check if camera is busy to avoid the crash? If python.exe

Re: I just wrote my first Python program a guessing game and it exits with an error I get this.

2013-06-05 Thread Tim Golden
On 05/06/2013 16:14, Armando Montes De Oca wrote: On Wednesday, June 5, 2013 10:40:52 AM UTC-4, Armando Montes De Oca wrote: Traceback (most recent call last): File Guessing_Game.py, line 32, in module input (enter) File string, line 0 ^ SyntaxError: unexpected EOF while

[issue18040] SIGINT catching regression on windows in 2.7

2013-05-30 Thread Tim Golden
Tim Golden added the comment: Personally, I'm +0 at best on this change. It would achieve consistency with Linux but I'm not sure what you'd do with such functionality. Adding Richard Oudkerk who did the rework of the interrupt signal for 3.3. Richard, any opinion on this? -- nosy

[issue18040] SIGINT catching regression on windows in 2.7

2013-05-30 Thread Tim Golden
Tim Golden added the comment: Thanks for the feedback, David. Closing as won't fix. -- resolution: - wont fix stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18040

[issue18040] SIGINT catching regression on windows in 2.7

2013-05-26 Thread Tim Golden
Tim Golden added the comment: Correction: I see the desired behaviour in 3.3/3.4 which is where the overhaul to Ctrl-C handling on Windows was applied. I still can't see it in 2.6 or in 3.1/3.2 on Windows. The problem lies in the fact that PyOS_InterruptOccurred and PyErr_CheckSignals from

[issue18040] SIGINT catching regression on windows in 2.7

2013-05-25 Thread Tim Golden
Tim Golden added the comment: My initial reaction is that, whether the 2.7 behaviour is faulty or not, I can't reproduce the correct behaviour on any version of Windows going back to 2.4. Take the attached Python file issue18040.py and run c:\pythonxx\python.exe -i issue18040.py for any

Re: to a human - about 2to3

2013-05-01 Thread Tim Golden
On 01/05/2013 15:52, Jennifer Butler wrote: I will start teaching Python to my pupils shortly. I have been looking for materials and have gathered a collection of programs. The problem is they are written in v2 and I have v3 installed in my classroom. I read about the 2to3 conversion program,

[issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails

2013-04-24 Thread Tim Golden
Tim Golden added the comment: Essentially: no. The permissions system in Windows is very different from that of Unix. The CRT attempts to mimic it, but for things like read-onlyness, it does so by setting the (old-style DOS) attributes. These are only just meaningful for files

Re: python : how to Opens folder with specified items selected on Windows

2013-04-19 Thread Tim Golden
On 19/04/2013 16:54, iMath wrote: I want to Opens folder with specified items selected on Windows ,I looked up the The Windows Shell Reference found a function fit for this job SHOpenFolderAndSelectItems http://msdn.microsoft.com/en-us/library/windows/desktop/bb762232(v=vs.85).aspx but

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-04-17 Thread Tim Golden
Tim Golden added the comment: Attached is a qd script to produce the list of extension - mimetype maps for a version of the mimetypes module. -- Added file: http://bugs.python.org/file29900/mt.py ___ Python tracker rep...@bugs.python.org http

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-04-17 Thread Tim Golden
Tim Golden added the comment: Three outputs produced by mt.py: tip as-is; tip without registry; tip with new approach to registry. The results for 2.7 are near-enough identical. Likewise the results for an elevated prompt. -- Added file: http://bugs.python.org/file29901/mt-tip.txt Added

[issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings

2013-04-17 Thread Tim Golden
Tim Golden added the comment: There seems to be a consensus that the current behaviour is undesirable, indeed broken for any meaningful use. The critical argument against the current Registry approach is that it returns unexpected (or outright incorrect) mimetypes for very standard extensions

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Tim Golden
Tim Golden added the comment: That's because IDLE uses a completely different input loop from the console interpreter. I'll try to get to this but I'm chock-a-block with other work at the moment. If anyone else wants to dig, please do so. if the worst came to the worst we could back out my

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Tim Golden
Tim Golden added the comment: +1 Richard - are you in a position to commit / push? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17619

Re: MySQL database schema discovery

2013-03-22 Thread Tim Golden
On 22/03/2013 16:01, Roy Smith wrote: What are my options for MySQL schema discovery? I want to be able to find all the tables in a database, and discover the names and types of each column (i.e. the standard schema discovery stuff). PEP 249 doesn't seem to have any discovery methods. Nor

[issue17366] os.chdir win32

2013-03-07 Thread Tim Golden
Tim Golden added the comment: Dave, you seem to misunderstand what's happening here: the os.chdir function doesn't have access to the characters which are typed in the script or in the interpreter. It receives a Python string object. The parser etc. which constructs the string object determines

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-06 Thread Tim Golden
Tim Golden added the comment: IIRC Nick Coghlan had put a bit of work into this a few months ago as an external module with a view to seeing if it got traction before putting anything into the stdlib. Might be worth pinging him, or looking to see what he'd done. Can't remember the keywords

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-03-06 Thread Tim Golden
Tim Golden added the comment: OK, sorry for the noise then; I had the idea that it was doing something with iterators/generators. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11406

Re: simple GUI environment

2013-03-05 Thread Tim Golden
On 05/03/2013 14:55, Kevin Walzer wrote: On 3/5/13 9:20 AM, Eric Johansson wrote: The main reason I discount both of those is that they are effectively dead as I can see. Last updates in the 2010/2011 range. Why not give EasyGUI a try? or PyGUI:

Re: [Python-ideas] string.format() default variable assignment

2013-03-02 Thread Tim Golden
On 02/03/2013 14:53, Devin Jeanpierre wrote: On Sat, Mar 2, 2013 at 1:54 AM, Chris Angelico ros...@gmail.com wrote: Yes, but reply-all sends a copy to the poster as well as the list. What I want is reply-list, acknowledging the list headers... and Gmail simply doesn't have that. I've been

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: netrick: can you confirm that the same thing occurs when you explicitly run your code via the pyw command. ie when you do this: pyw myprog.pyw Also, what happens when you run: py myprog.pyw ie when you use the Console launcher to launch the .pyw

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: I can't reproduce this running Python 3.3 on Win7. I'll try WinXP later. I'll also add Mark Hammond Vinay as they implemented the PEP397 loader. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- nosy: +mhammond, vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17290 ___ ___ Python

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: Things may be a little more complicated, because one of two distinct mechanisms may be invoked to determine what to run when double-clicking: an Explorer-based mechanism, and a non-Explorer one. AFAICT, the former falls back to the latter. To check the latter

[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden
Tim Golden added the comment: I can't reproduce this on XP either. I've tried various combinations of .py / .pyw, command line, double-click, etc. and I've not had a single problem. Let's hope someone else can suggest something -- ___ Python

Re: What am I doing wrong installing Python 2.7.3?

2013-02-21 Thread Tim Golden
On 21/02/2013 14:39, Etherus wrote: I have downloaded the windows installer for a 32 bit installation of python 2.7.3 but it tells me that: The feature you are trying to use is on a network resource that is unavailable. Click OK to try again, or enter an alternative path to a folder

Re: Can someone tell me what kinds of questions should be asked in this list and what kinds in the tutor section?

2013-02-17 Thread Tim Golden
On 17/02/2013 00:19, Claira wrote: Can someone tell me what kinds of questions should be asked in this list and what kinds in the tutor section? There's no clear-cut distinction. The rule of thumb I usually apply is that questions about the *language* (its syntax, its usage, its idioms etc.)

Re: First attempt at a Python prog (Chess)

2013-02-15 Thread Tim Golden
On 15/02/2013 11:22, Oscar Benjamin wrote: Why not make board a list of lists. Then you can do: for row in board: for piece in row: rather than using range(). Or perhaps you could have a dict that maps position tuples to pieces, e.g.: {(1, 2): 'k', ...} I'm laughing slightly here

Re: First attempt at a Python prog (Chess)

2013-02-15 Thread Tim Golden
On 15/02/2013 13:11, Oscar Benjamin wrote: On 15 February 2013 11:36, Tim Golden m...@timgolden.me.uk wrote: And the how shall we represent the board? question is pretty much the first thing any team asks themselves. And you always get someone in favour of lists of lists, someone for one long

Re: First attempt at a Python prog (Chess)

2013-02-15 Thread Tim Golden
On Sat, Feb 16, 2013 at 2:36 AM, Tim Golden m...@timgolden.me.uk wrote: How true. This last time, my team split into two: one half to handle the display, the other working on the algorithm. We ended up having to draw a really simple diagram on the back of an envelope with the x,y pairs written

[issue17208] add note/warning about daemon threads

2013-02-15 Thread Tim Golden
Tim Golden added the comment: +1 This is essentially the answer to the naive user's question: Why would anyone *not* use daemon threads given that they're less hassle to manage? -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http

Re: Retrieving the full command line

2013-01-24 Thread Tim Golden
On 24/01/2013 10:06, Oscar Benjamin wrote: On 24 January 2013 04:49, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [SNIP] Contrariwise, I don't believe that there is currently *any* way to distinguish between running a script with or without -m. That should be fixed. As I

Re: Retrieving the full command line

2013-01-24 Thread Tim Golden
On 24/01/2013 10:56, Tim Golden wrote: if the package which is reconstructing the command line the package which was the target of the original command line. Sorry: if the package which is reconstructing the command line *is not* the package which was the target of the original command

Re: Retrieving the full command line

2013-01-24 Thread Tim Golden
On 24/01/2013 11:30, Oscar Benjamin wrote: I don't really understand what your spec is. Why do you need to inspect this information from sys.argv? Can you not just always use 'python -m pkg' as your entry point? Sorry about the confusion. I think my original point was simply one of surprise

Re: Retrieving the full command line

2013-01-24 Thread Tim Golden
On 24/01/2013 15:28, Oscar Benjamin wrote: On 24 January 2013 13:45, Tim Golden m...@timgolden.me.uk wrote: On 24/01/2013 11:30, Oscar Benjamin wrote: I don't really understand what your spec is. Why do you need to inspect this information from sys.argv? Can you not just always use 'python -m

Re: Retrieving the full command line

2013-01-24 Thread Tim Golden
On 24/01/2013 16:53, Oscar Benjamin wrote: Does it work if you use the -m option to run a module rather than a script? Sorry that was written incorrectly. I meant to say: does it work when a module is directly on sys.path rather than as a submodule of a package? In this case __package__ is

Re: Retrieving the full command line

2013-01-24 Thread Tim Golden
On 24/01/2013 20:01, Oscar Benjamin wrote: On 24 January 2013 17:13, Tim Golden m...@timgolden.me.uk wrote: A package-based module run via -m (python -m package.module) works as described (including the implicit __main__ module, my primary use-case). Does it work in the python -m

Re: Retrieving the full command line

2013-01-23 Thread Tim Golden
On 23/01/2013 03:58, Steven D'Aprano wrote: Currently, if I have a package __main__.py that prints sys.argv, I get results like this: steve@runes:~$ python3.3 /home/steve/python/testpackage/__main__.py ham spam eggs ['/home/steve/python/testpackage/__main__.py', 'ham', 'spam', 'eggs']

[issue14208] No way to recover original argv with python -m

2013-01-23 Thread Tim Golden
Tim Golden added the comment: My use case is the reloader or restarter. I've initially fallen foul of this when using the cherrypy reloader (which does an execv by building from sys.executable + sys.argv) but I also have web services running which I'd like to restart remotely by forcing them

Retrieving the full command line

2013-01-22 Thread Tim Golden
[Python 2.7/3.3 (and hg tip) running on Windows. Not Windows-specific, though]. I use the python -mpackage incantation to run a package which has a __main__.py module and which uses relative imports internally. I'm developing under cherrypy which includes a reloader for development. The reloader

Re: Retrieving the full command line

2013-01-22 Thread Tim Golden
On 22/01/2013 14:53, Terry Reedy wrote: On 1/22/2013 4:24 AM, Tim Golden wrote: [Python 2.7/3.3 (and hg tip) running on Windows. Not Windows-specific, though]. I use the python -mpackage incantation to run a package which has a __main__.py module and which uses relative imports internally

Re: Windows subprocess.call problem

2013-01-21 Thread Tim Golden
On 21/01/2013 11:25, Tom Borkin wrote: Hi; I have this code: #!/Python27/python import os, subprocess, sys lyrics_path = /Users/Tom/Documents/lyrics os.chdir(lyrics_path) songs = ['livin-la-vida-loca', 'whos-that-lady'] for song in songs: subprocess.call(['notepad.exe', '%s.txt' %

Re: Thought of the day

2013-01-15 Thread Tim Golden
On 15/01/2013 16:48, Antoine Pitrou wrote: Steven D'Aprano steve+comp.lang.python at pearwood.info writes: A programmer had a problem, and thought Now he has I know, I'll solve two it with threads! problems. Host: Last week the Royal Festival Hall saw the first performance of a new

Re: Query windows event log with python

2013-01-14 Thread Tim Golden
On 13/01/2013 05:55, robey.lawre...@gmail.com wrote: On Saturday, January 12, 2013 8:34:01 PM UTC+11, Tim Golden wrote: On 12/01/2013 06:09, email.addr...@gmail.com wrote: I am looking to write a short program to query the windows event log. It needs to ask the user for input

<    1   2   3   4   5   6   7   8   9   10   >