[issue44705] Support Windows file open modes for `open` built-in function

2021-07-22 Thread Eryk Sun
Eryk Sun added the comment: Currently you can use os.open() if you need platform-specific open flags such as Windows O_RANDOM, O_SEQUENTIAL, O_SHORT_LIVED, and O_TEMPORARY. The file descriptor can be passed to builtin open() to get a file object that owns the fd. It might be more

[issue44705] Support Windows file open modes for `open` built-in function

2021-07-21 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44705] Support Windows file open modes for `open` built-in function

2021-07-21 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue44705] Support Windows file open modes for `open` built-in function

2021-07-21 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +methane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44705] Support Windows file open modes for `open` built-in function

2021-07-21 Thread Luke Deller
New submission from Luke Deller : Microsoft Windows supports some extra file open modes including: "S"Specifies that caching is optimized for, but not restricted to, sequential access from disk. "T"Specifies a file as temporary. If possible, it is not

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-14 Thread Vinay Sajip
Vinay Sajip added the comment: There *is* a race condition with WatchedFileHandler - see #14632 - but there is not much that can be done about it (see the various comments in that issue). BTW, I wasn't able to reproduce the threading problem from your script: there were no errors and the file

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb8b0c7fefd0 by Vinay Sajip in branch '2.7': Issue #21742: Set stream to None after closing. http://hg.python.org/cpython/rev/bb8b0c7fefd0 New changeset 6f1f38775991 by Vinay Sajip in branch '3.4': Issue #21742: Set stream to None after closing.

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya
can fail due to race conditions or file open issues. versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21742

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya
Vishvananda Ishaya added the comment: The attached file illustrates the error when attempting to call handler.emit() from multiple threads at the same time. -- Added file: http://bugs.python.org/file35604/log.py ___ Python tracker

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya
Vishvananda Ishaya added the comment: The attached file illustrates the error when attempting to call handler.emit() when the file cannot be opened. Even if this situation is later remedied all future emit() calls will fail since stream.flush() is called on a fd that has already been closed.

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Vishvananda Ishaya
Vishvananda Ishaya added the comment: Example diff against python 2.7.6 that fixes the issues -- keywords: +patch Added file: http://bugs.python.org/file35606/log.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21742

[issue21742] WatchedFileHandler can fail due to race conditions or file open issues.

2014-06-12 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21742 ___ ___ Python-bugs-list mailing list

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2013-02-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: It seems like a logic error to try to remove something that is not there. But it is not obvious from the traceback that your problem has anything to do with *opening* a file. Unbinding should only happen when *closing* a file. So I suspect this is a different

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2013-02-04 Thread Roger Serwy
Roger Serwy added the comment: Patrick, see Issue8900. It described your problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___ ___

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2013-02-04 Thread Patrick
Patrick added the comment: Thanks for the pointer to the other issue. It looks spot on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2013-02-03 Thread Patrick
Patrick added the comment: Forgive me if I'm not following the correct process. But I believe I have seen this issue again in 3.3. Not sure I captured exactly what is needed from the command line. The file being openeed is from the Python Hands On Class Examples

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-06-02 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5b267381eea0 by Terry Jan Reedy in branch '2.7': Issue 10365: Add and replace comments; condense defaulted attribute access. http://hg.python.org/cpython/rev/5b267381eea0 New changeset 4f3d4ce8ac9f by Terry Jan

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-06-02 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-27 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: (I need to write an extension to auto-apply strip-trailing-whitespace on save.) Terry, I agree that the comment needs improvement. The self.editwin reference to the window needs to be available so that .get_saved() doesn't fail. In

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-27 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The only substantive change I see is replacing the four lines setting 'interp' with a defaulted getattr call. You seem to have missed my point that 'Otherwise, open a new window' is false. It must be that flist.open(filename) first checks to

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-27 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: You're right. I missed your point about flist.open shifting focus to the already opened file. FileList.py contains the open method. -- ___ Python tracker rep...@bugs.python.org

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-27 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- assignee: - terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___ ___

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-26 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a2877fbabf95 by Terry Jan Reedy in branch '3.2': Issue #10365: File open dialog now works instead of crashing http://hg.python.org/cpython/rev/a2877fbabf95 New changeset 21862628a013 by Terry Jan Reedy in branch

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-26 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I verified problem in 3.3 and when opening dialog from shell. Patch fixes problem, including open idle, open dialog, close shell, select file, and now file is opened. Thanks Roger. I went ahead and applied fix. (But note: your patch had a

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2012-05-26 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___ ___

[issue14575] IDLE crashes after file open in OS X

2012-04-20 Thread Hugh Gibbons
Hugh Gibbons hg13...@gmail.com added the comment: thanks. That eliminated the crashiness. On Apr 17, 2012, at 6:26 PM, Ned Deily wrote: Ned Deily n...@acm.org added the comment: The crash dump confirms that the buggy Apple Tcl/Tk 8.5 frameworks are being used

[issue14575] IDLE crashes after file open in OS X

2012-04-18 Thread Hugh Gibbons
Hugh Gibbons hg13...@gmail.com added the comment: Thanks. I will try that and see if everything is OK with the updated Tcl/Tk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14575 ___

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Hugh Gibbons
Hugh Gibbons hg13...@gmail.com added the comment: There were no errors when opening the file that way. On Apr 14, 2012, at 3:30 PM, Roger Serwy wrote: Roger Serwy roger.se...@gmail.com added the comment: Hugh, Can you launch IDLE from the terminal and report the error message you

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Hugh Gibbons
Hugh Gibbons hg13...@gmail.com added the comment: No errors when opening the file that way. However, when I then go to the IDLE file menu and open a file using the file browser ( File - Open.. click on file ) IDLE terminates with a segmentation fault a few seconds after opening the file

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The crash dump confirms that the buggy Apple Tcl/Tk 8.5 frameworks are being used (/System/Library/Frameworks/Tk.framework/Versions/8.5/Tk). As I mentioned, the easiest solution is to install the most recent ActiveState Tcl/Tk 8.5. The python.org

[issue14575] IDLE crashes after file open in OS X

2012-04-17 Thread Ned Deily
Ned Deily n...@acm.org added the comment: By the way, you should have been seeing a warning message in the IDLE shell window when using 2.7.3 with the buggy Apple Tcl/TK 8.5, telling you to check the information at http://www.python.org/download/mac/tcltk/. --

[issue14575] IDLE crashes after file open in OS X

2012-04-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Hugh, Can you launch IDLE from the terminal and report the error message you receive? From a regular Terminal, enter: python -m idlelib.idle FILE_TO_OPEN.py -- nosy: +serwy ___ Python tracker

[issue14575] IDLE crashes after file open in OS X

2012-04-14 Thread Ned Deily
Ned Deily n...@acm.org added the comment: This is almost certainly due to using the Apple-supplied Tcl/Tk 8.5 in Mac OS X 10.6. The Apple-suppied version of Tcl/Tk is buggy to the point of being unusable with Tkinter applications, in particular IDLE. There are many duplicate issues on

[issue14575] IDLE crashes after file open in OS X

2012-04-13 Thread Hugh Gibbons
: normal severity: normal status: open title: IDLE crashes after file open in OS X type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14575

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2011-12-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: William's explanation in msg123203 for the cause of the error and the solution for keeping a reference to flist is good. IDLE has only one instance of FileList while running anyways. Attached is a patch that behaves like William's

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Unexpected exception is not a crash. Changing the type to behavior. -- nosy: +belopolsky type: crash - behavior ___ Python tracker rep...@bugs.python.org

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-12-03 Thread William Barr
William Barr webmaster...@gmail.com added the comment: Ok, attached is a patch that should make IDLE silently ignore this happening; upon looking into this, it was a rather trivial fix. The open function was waiting on the return input from the askopenfile call, during which the calling

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-12-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The indentation of the patch 'looks' wrong. That appears to be because you used tabs instead of spaces (as in the lines removed and I presume elsewhere in the file -- and because FireFox interprets tabs as 8 spaces. Please redo with spaces. I

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-11-12 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: That suggests that the last statement needs to be guarded somehow. I re-versioned to 3.2 because 3.1.final will be out very soon. I expect 3.2 and 2.7 should have same problem. -- nosy: +terry.reedy versions: +Python 3.2 -Python 3.1

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-11-12 Thread William Barr
William Barr webmaster...@gmail.com added the comment: Ok. I'll see if I can get some protection around that then. I did test the issue with 2.7, and I didn't find it. The window didn't open, but it didn't generate an exception that would kill the IDLE process. --

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-11-08 Thread William Barr
: IDLE, Windows messages: 120793 nosy: william.barr priority: normal severity: normal status: open title: IDLE Crashes on File Open Dialog when code window closed before other file opened type: crash versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2010-11-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Reproduced in a console window: C:\c:\python31\python.exe -m idlelib.idle Exception in Tkinter callback Traceback (most recent call last): File c:\python31\lib\tkinter\__init__.py, line 1399, in __call__ return self.func(*args)

Re: iPython help, Docstring [source file open failed]

2009-04-15 Thread P. Kaminski
On 15 Kwi, 03:27, alex23 wuwe...@gmail.com wrote: On Apr 15, 5:35 am, Przemyslaw Kaminski cge...@gmail.com wrote: You may want to try: import pydoc b = pydoc.render_doc(timedelta) print b Isn't this exactly the same output you get from typing 'help (timedelta)' though? Well, from

iPython help, Docstring [source file open failed]

2009-04-14 Thread Kegan
/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5/lib-dynload/datetime.so Docstring [source file open failed]: Difference between two datetime values. Lets say I want more information about timedelta right at the shell (as oppose lookup at Python Doc). Can I somehow link

Re: iPython help, Docstring [source file open failed]

2009-04-14 Thread Przemyslaw Kaminski
File: /opt/local/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5/lib-dynload/datetime.so Docstring [source file open failed]: Difference between two datetime values. Lets say I want more information about timedelta right at the shell (as oppose lookup at Python

iPython help, Docstring [source file open failed]

2009-04-14 Thread R. David Murray
: Interactive File: /opt/local/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5/lib-dynload/datetime.so Docstring [source file open failed]: Difference between two datetime values. Lets say I want more information about timedelta right at the shell (as oppose

Re: iPython help, Docstring [source file open failed]

2009-04-14 Thread alex23
On Apr 15, 5:35 am, Przemyslaw Kaminski cge...@gmail.com wrote: You may want to try: import pydoc b = pydoc.render_doc(timedelta) print b Isn't this exactly the same output you get from typing 'help (timedelta)' though? -- http://mail.python.org/mailman/listinfo/python-list

[issue4241] zipfile.py - is_zipfile leaves file open when error

2008-12-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Fixed by Gabriel's patch (just committed in trunk and py3k). -- nosy: +pitrou resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4241

[issue4241] zipfile.py - is_zipfile leaves file open when error

2008-12-26 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: The patch for issue4756 fixes this too. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4241 ___

[issue4241] zipfile.py - is_zipfile leaves file open when error

2008-10-30 Thread Eino Mäkitalo
New submission from Eino Mäkitalo [EMAIL PROTECTED]: Very simple error. If is_zipfile crashes when checking is_zipfile if zipfile is corrupted or not at all zip. It leaves file open and prevents later to remove file etc... Maybe it's corrected in next versions Old code: zipfile... line 86

Re: pyserial and file open conflict?

2008-05-23 Thread Peter
On 15 Maj, 19:37, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-05-15, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a small but rather annoying problem withpyserial. I want to open a file on disk for reading and then open a com-port, write lines from the file to the port and then

Re: pyserial and file open conflict?

2008-05-23 Thread Diez B. Roggisch
Do you have to much time? Maybe you have enough time to read this: http://www.catb.org/~esr/faqs/smart-questions.html Diez -- http://mail.python.org/mailman/listinfo/python-list

pyserial and file open conflict?

2008-05-15 Thread p . wallstedt
Hi all! I have a small but rather annoying problem with pyserial. I want to open a file on disk for reading and then open a com-port, write lines from the file to the port and then read something back and compare it to the next line in the file. Should be simple. And it is, apart from the fact

Re: pyserial and file open conflict?

2008-05-15 Thread Henrique Dante de Almeida
Em Thu, 15 May 2008 08:03:40 -0700, p.wallstedt escreveu: Hi all! I have a small but rather annoying problem with pyserial. I want to open a file on disk for reading and then open a com-port, write lines from the file to the port and then read something back and compare it to the next line

Re: pyserial and file open conflict?

2008-05-15 Thread Grant Edwards
On 2008-05-15, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a small but rather annoying problem with pyserial. I want to open a file on disk for reading and then open a com-port, write lines from the file to the port and then read something back and compare it to the next line in the

Re: is file open in system ? - other than lsof

2008-04-19 Thread paul
bvidinli schrieb: is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof if slow for me. i need a faster way. i deal with thousands of files... so, i need a faster / python way for this. thanks. I think you can do this with inotify

Fwd: is file open in system ? - other than lsof

2008-04-18 Thread bvidinli
the idea of eg does not work for me because, what i do: get list of files, check 1st file open ? process 1st file, (this may take several seconds... ) check 2nd file open? i have to check it here, because 2nd file may be opened while i process file 1 process 2nd file, (this may take several

Re: Fwd: is file open in system ? - other than lsof

2008-04-18 Thread A.T.Hofkamp
On 2008-04-17, bvidinli [EMAIL PROTECTED] wrote: is there another way, any python command sequence that i can check if a file is open at the time of before i process file i am not interested in the file may be written after i access it.. the important point is the time at i first access it.

Fwd: is file open in system ? - other than lsof

2008-04-17 Thread bvidinli
routine is something like: for i in listoffiles: checkfileopen(i) processfile() thats it... i hope this will clear my question.. thank you a lot. -- Forwarded message -- From: Chris McAloney [EMAIL PROTECTED] Date: 16.Nis.2008 17:00 Subject: Re: is file open in system ? - other than

Re: is file open in system ? - other than lsof

2008-04-17 Thread Thomas Guettler
bvidinli schrieb: is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof if slow for me. i need a faster way. i deal with thousands of files... so, i need a faster / python way for this. thanks. On Linux there are symlinks from

Re: is file open in system ? - other than lsof

2008-04-17 Thread Nick Craig-Wood
Thomas Guettler [EMAIL PROTECTED] wrote: bvidinli schrieb: is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof if slow for me. i need a faster way. i deal with thousands of files... so, i need a faster / python way

Re: is file open in system ? - other than lsof

2008-04-16 Thread A.T.Hofkamp
On 2008-04-16, bvidinli [EMAIL PROTECTED] wrote: is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof if slow for me. i need a faster way. i deal with thousands of files... so, i need a faster / python way for this. thanks

Re: is file open in system ? - other than lsof

2008-04-16 Thread Chris McAloney
On 16-Apr-08, at 9:20 AM, A.T.Hofkamp wrote: On 2008-04-16, bvidinli [EMAIL PROTECTED] wrote: is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof if slow for me. i need a faster way. i deal with thousands of files... so, i

Re: is file open in system ? - other than lsof

2008-04-16 Thread Brian
On Wed, Apr 16, 2008 at 10:00 AM, Chris McAloney [EMAIL PROTECTED] wrote: On 16-Apr-08, at 9:20 AM, A.T.Hofkamp wrote: On 2008-04-16, bvidinli [EMAIL PROTECTED] wrote: is there a way to find out if file open in system ? - please write if you know a way other than lsof. because lsof

Unable to handle File Open dialog (using Pamie)

2008-03-12 Thread Oltmans
Hi all, I'm new to Python and am automating few tasks using Pamie. Everything worked well until I had to handle the File Open Dialog. I mean I'm trying to automate the file upload process using Pamie. Basically I just want to automate the process of file upload. I want to automatically hit

[issue1510] help for file/open should state which is prefered.

2007-12-08 Thread Skip Montanaro
Skip Montanaro added the comment: updated docstrings for file and open (r59417). -- nosy: +skip.montanaro resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1510 __

[issue1510] help for file/open should state which is prefered.

2007-11-28 Thread Christian Heimes
Christian Heimes added the comment: I agree! Can you provide a patch please? -- assignee: - tiran nosy: +tiran priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1510 __

[issue1510] help for file/open should state which is prefered.

2007-11-27 Thread cfk
think that should be mentioned in the current file() docstring, and swap the help for file/open. -- components: Documentation messages: 57901 nosy: carlfk severity: minor status: open title: help for file/open should state which is prefered. versions: Python 2.6

Re: How would I go about making a file open. Not the way you might think.

2007-08-24 Thread Tim Golden
[... snip extended discussion on opening text files ...] Lamonte Harris wrote: I've completed this request and I got the answer already. Yes, but discussions here never simply end when the answer is found! :) TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread Hendrik van Rooyen
Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a txt open so that notepad opens w/ the content in it by using just python. I asked this

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread kyosohma
On Aug 23, 2:09 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a txt open so that notepad

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread Larry Bates
Hendrik van Rooyen wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a txt open so that notepad opens w/ the content in it by using

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread kyosohma
On Aug 23, 3:45 pm, Larry Bates [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a

Re: How would I go about making a file open. Not the way you might think.

2007-08-23 Thread Lamonte Harris
I've completed this request and I got the answer already. On 8/23/07, Larry Bates [EMAIL PROTECTED] wrote: Hendrik van Rooyen wrote: Lamonte Harris wrote: Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most

How would I go about making a file open. Not the way you might think.

2007-08-22 Thread Lamonte Harris
Basically you can open a file by double clicking, and by default it would open w/ what every program you have it set to. Most text files would open in notepad. How can I make a txt open so that notepad opens w/ the content in it by using just python. --

[ python-Bugs-1732686 ] Built-in open function fail. Too many file open

2007-06-08 Thread SourceForge.net
file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However, when

[ python-Bugs-1732686 ] Built-in open function fail. Too many file open

2007-06-08 Thread SourceForge.net
file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However, when

[ python-Bugs-1732629 ] Built-in open function fail. Too many file open

2007-06-07 Thread SourceForge.net
. Too many file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However

[ python-Bugs-1732629 ] Built-in open function fail. Too many file open

2007-06-07 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Python 2.3 Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Alex (alexteo21) Assigned to: Nobody/Anonymous (nobody) Summary: Built-in open function fail. Too many file

[ python-Bugs-1732686 ] Built-in open function fail. Too many file open

2007-06-07 Thread SourceForge.net
. Too many file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However

[ python-Bugs-1732686 ] Built-in open function fail. Too many file open

2007-06-07 Thread SourceForge.net
file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However, when

[ python-Bugs-1732686 ] Built-in open function fail. Too many file open

2007-06-07 Thread SourceForge.net
file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However, when

[ python-Bugs-1732686 ] Built-in open function fail. Too many file open

2007-06-07 Thread SourceForge.net
file open Initial Comment: Hi, I have created a cron script using python. Every hour it will batch process certain files e.g. t=open(filename,'rb') data=t.read() #processing data... t.close() The script is working fine on the day of execution. It is able to process the files. However, when

[ python-Bugs-1569057 ] Using .next() on file open in write mode writes junk to file

2007-04-07 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Python 2.5 Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: andrei kulakov (rainy) Assigned to: Brett Cannon (bcannon) Summary: Using .next() on file open

[ python-Bugs-1569057 ] Using .next() on file open in write mode writes junk to file

2007-03-20 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: andrei kulakov (rainy) Assigned to: Brett Cannon (bcannon) Summary: Using .next() on file open

Re: Hooking file open

2006-11-01 Thread Dale Strickland-Clark
regular file open calls. I did a little test by modifying __builtins__.open to point to a custom function that forwards the call to the original open function and saves the filename to a list. It seemed to work for simple test cases. Here is the code: def open_hook(*args,**kwargs): r

Re: Hooking file open

2006-11-01 Thread Farshid Lashkari
Dale Strickland-Clark wrote: You might consider trapping calls to file() too, which is an alias for open(). Thanks, I didn't know about that. Also, I think I'd do my logging before calling the real function. It depends how you want to deal with exceptions. I placed the logging after the

Re: Hooking file open

2006-11-01 Thread Carl Banks
Dale Strickland-Clark wrote: You might consider trapping calls to file() too, which is an alias for open(). Also, I think I'd do my logging before calling the real function. It depends how you want to deal with exceptions. OP should hook into os.open as well. Plus, I don't think the

[ python-Bugs-1569057 ] Using .next() on file open in write mode writes junk to file

2006-10-07 Thread SourceForge.net
, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: andrei kulakov (rainy) Assigned to: Nobody/Anonymous (nobody) Summary: Using .next() on file open in write mode

[ python-Bugs-1569057 ] Using .next() on file open in write mode writes junk to file

2006-10-03 Thread SourceForge.net
, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: andrei kulakov (rainy) Assigned to: Nobody/Anonymous (nobody) Summary: Using .next() on file open in write mode

[ python-Bugs-1569057 ] Using .next() on file open in write mode writes junk to file

2006-10-01 Thread SourceForge.net
of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: andrei kulakov (rainy) Assigned to: Nobody/Anonymous (nobody) Summary: Using .next() on file

Re: is a file open ?

2005-07-21 Thread luis
John Machin wrote: Daniel Dittmar wrote: luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by running

Re: is a file open ?

2005-07-21 Thread luis
John Machin wrote: Daniel Dittmar wrote: luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by running

Re: is a file open ?

2005-07-21 Thread John Machin
luis wrote: John Machin wrote: Daniel Dittmar wrote: luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by

is a file open ?

2005-07-20 Thread luis
for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? Best regards Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: is a file open ?

2005-07-20 Thread John Machin
luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? ¡ rtfm ! files is a list of fileNAMEs -- i.e. strings. ¿ How could you possibly imagine that your sample code would open a file? What a design-nonsense that would be: instant complaints from folk

Re: is a file open ?

2005-07-20 Thread Daniel Dittmar
luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by running handle.exe

Re: is a file open ?

2005-07-20 Thread John Machin
Daniel Dittmar wrote: luis wrote: for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? On Linux and some other Unixes, you can probably read the /proc filesystem. On Windows, you'll probably get the quickest result by running handle.exe