Danny Lin added the comment:
It should be emphasized that it may happen on a **file operation**... So at
least be something like: "On some platforms, it may also be raised if a file
operation involves an attempt to open or traverse a non-directory file as if it
were a dire
Danny Lin added the comment:
@Andrei Kulakov: That statement is mainly for illustration that such behavior
may vary across platforms. I use a rather vague statement as I'm not totally
sure it applies if (and only if) running on POSIX. A more accurate statement is
welcome as long as it's
Danny Lin added the comment:
@Andrei Kulakov: I was commenting on the previous version. The revised version
(f2ae30b0de3c4ba1f16fc2a430cf22b447c062ed) seems ok to me.
Another question: would it be better if we add "on some platforms" for the part
that the error may raise on a file
Danny Lin added the comment:
> I've put up a PR that expands the docs for NotADirectoryError here:
> https://github.com/python/cpython/pull/27471/files
Thank you.
Wouldn't it be more clear if an example is provided? Like:
(e.g. `/path/to` does not exist when running `open('/path/t
Danny Lin added the comment:
> Really? It's not obvious that finding a file would involve directory
> operations?
Not in some senses, and that's possibly why Windows does not raise
NotADirectoryError in such case.
I agree that it's a platform-specific implementation detail. H
Danny Lin added the comment:
I don't think a general developer would expect that
open('/path/to/file/somename.txt') implies a directory operation, and it also
doesn't on Windows.
I suggest that a further notice be added to NotADirectoryError, such as:
Raised when a directory operation
Danny Lin added the comment:
By writing "except FileNotFoundError:", the intention is to catch an error when
the file being opened is not found, and don't catch an error for other cases,
such as an existing file without adequate permission. Writing "except OSError:"
c
Danny Lin added the comment:
It doesn't seem so... In Python 3.8.5 this code is still seen in mimetypes.py
(line 492-504):
'.bmp': 'image/bmp',
'.gif': 'image/gif',
'.ief': 'image/ief',
'.jpg': 'image/jpeg',
'.jpe': 'image/jpeg
Danny Lin added the comment:
I'm not so familiar about the spec. If such behavior is confirmed due to
implementation difference across OSes, and it's also not desirable to change
the mapping of the OS error to Python exception, we can simplify left it as-is.
However, this behavior
New submission from Danny Lin :
On Windows, command "python -m mimetypes foo.zip" outputs "type:
application/x-zip-compressed encoding: None", while it's "type: application/zip
encoding: None" on Linux.
According to the mimetype.py in CPython source
New submission from Danny Lin :
On Linux (tested on Ubuntu 16.04), if "/path/to/file" is an existing file, the
code:
open('/path/to/file/somename.txt')
raises NotADirectoryError: [Errno 20] Not a directory:
'/path/to/file/somename.txt'
On Windows, similar code:
open
Change by Danny Hermes :
--
pull_requests: +8809
___
Python tracker
<https://bugs.python.org/issue33649>
___
___
Python-bugs-list mailing list
Unsubscribe:
Thanks Stephane,
Kiwi PyCon 2017 will be in Auckland, New Zealand in September - exact
dates and location not yet determined. I'll submit it when they are.
Cheers,
Danny
On Mon, Jan 9, 2017 at 10:54 PM, Stephane Wirtel via PSF-Community
<psf-commun...@python.org> wrote:
> Dear
Danny Yoo added the comment:
Alternatively, change the representation of flag values from integers to some
class extension that supports the common bitwise operators.
As a very rough sketch:
>>> class FlagInt(int):
... def __or__(self, other):
... return FlagInt(int(se
Danny Yoo added the comment:
Ugh. I suddenly realize that this is complicated by the fact that flag values
are themselves represented as integers, and Python's type system isn't rich
enough to label flag values as a distinct type for the purposes.
It may be worthwhile to add a warning
New submission from Danny Yoo:
This comes from diagnosing a beginner's question on Python-tutor.
https://mail.python.org/pipermail/tutor/2016-December/110066.html
It appears that re.sub is not checking whether the count argument is integer or
not, and silently accepts a nonsensical argument
Danny Yoo added the comment:
Unfortunately, fixing just zlib.crc32 isn't quite enough for our purposes. We
still will see OverflowErrow in zipfile if compression is selected.
Demonstration code:
import zipfile
## Possible workaround: monkey
New submission from Danny Yoo:
Reproduction steps:
---
$ python2.7 -c import zlib;zlib.crc32('a'*(131))
Traceback (most recent call last):
File string, line 1, in module
OverflowError: size does not fit in an int
---
We ran into this bug in zlib.crc32 when using zipfile.writestr
Changes by Danny Yoo danny...@google.com:
--
title: zlib.crc32 raises OverflowError at argument-parsing time on large
strings - Within zipfile, use of zlib.crc32 raises OverflowError at
argument-parsing time on large strings
___
Python tracker rep
On Thu, Oct 16, 2014 at 8:21 AM, C@rlos cmfer...@estudiantes.uci.cu wrote:
I have been tryed to convert a Qstring text to string on python, in linux
that work fine but in windows when qstring contine á,é,í,ó,ú the converted
text is not correct, contine extranger characters,
this qstring text
first!
The deadline for proposal submission is Saturday 01 June 2013.
For more information please visit
http://nz.pycon.org/call-for-proposals/
Looking forward to seeing you in Auckland in September!
--
Danny W. Adair
Event Director
Kiwi PyCon 2013
--
http://mail.python.org/mailman/listinfo
Hi All,
If I get multiline standard output from a command. How can I
retrieve this part of the string (1006)
Example:
#Committing...
#Workspace: (1003) My OS_8.12.0 Work - (1004) OS_8.12.0
# Component: (1005) he-Group - (1004) OS_8.12.0
#Outgoing:
# Change sets:
#(1006)
Hi All,
I'm executing a command which I want to capture the
standard/stderr output into a file (which I have with the code below),
but I also want the standard output to go into a variable so I can
process the information for the next command. Any ideas? Thanks.
CMD_OUTPUT =
. Thanks again.
-Original Message-
From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert
Sent: Tuesday, August 16, 2011 12:26 AM
To: Danny Wong (dannwong)
Cc: python-list@python.org
Subject: Re: regular expression
On Tue, Aug 16, 2011 at 12:00 AM, Danny Wong
Hi All,
I'm trying to execute some external commands from multiple database.
I'm using threads and subprocess.Popen ( from docs, all the popen*
functions are deprecated and I was told to use subprocess.Popen) to
execute the external commands in parallel, but the commands seems to
hang.
My
:
print Error Executing %s % command + \n
-Original Message-
From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert
Sent: Tuesday, August 09, 2011 11:47 PM
To: Danny Wong (dannwong)
Cc: python-list@python.org
Subject: Re: subprocess.Popen and thread module
On Tue
[mailto:ch...@rebertia.com] On Behalf Of Chris Rebert
Sent: Tuesday, August 09, 2011 11:53 PM
To: Danny Wong (dannwong)
Cc: python-list@python.org
Subject: Re: subprocess.Popen and thread module
On Tue, Aug 9, 2011 at 11:38 PM, Danny Wong (dannwong)
dannw...@cisco.com wrote:
Hi All,
I'm trying
Hi all,
I have 5 server machines that are using to process
information. I would like to write a quick server python script that
determines which of the machines are not in use. Any recommendations on
which python module I should use to detect if a machine is not
performing idle
Hi Python experts,
I'm trying to use a dict structure to store and update information from
X number of threads. How do I share this dict structure between threads? I
heard of using a queue, but I'm not familiar with how it works. Does anyone
have an example of using a queue to store
\python.exe -c #!python
\\\Bootstra...sys.argv[1:])
c:\python27\lib\site...ols-0.6c11-py2.7.egg failed with error code 1
###
does anyone know what is going on?
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
some commercial 3rd party C extension code that is 64 bit. Am I
just out of luck or is there something that I can do?
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
process has some kind of communication(s) interface; eg:
* some kind of listening socket
* some kind of I/O (pipe, stdin/stdout)
It does have a stdin/stdout. How do I access it?
thanks,
D
--
http://mail.python.org/mailman/listinfo/python-list
Have a look at the SIMPL toolkit.
http://www.icanprogram.com/06py/lesson1/lesson1.html
This should be able to do exactly what you want.
bob
Does this work on Mac OS X?
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
Howdy,
Is there any way to attach to an already running process by pid? I want to send
commands from python to an application that is already running. I don't want to
give the command name to subprocess.Popen.
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
python code
and at some point later, repeat the process of attaching to the persistent
matlab pid...
I am familiar with subprocess.Popen, but I don't understand how to attach to a
pid, as opposed to creating a new matlab instance every time.
Any enlightenment would be appreciated.
thanks,
Danny
in the same directory as the egg when I do this. I am certainly doing
something stupid, but don't know what it is.
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
Does this describe the problem you are having?
http://bugs.python.org/issue5294
--
http://mail.python.org/mailman/listinfo/python-list
to
start again?
I mean, in Terminal it dies anyway, so I have to start it again by
hand, which is a pain as it dies so sporadically. Can I automate this
error, catch it and just get it to restart the loop?
Thanks for your time and energy,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
:
print IOError; Retrying...
pass
print Done
On Jul 12, 12:33 pm, MRAB pyt...@mrabarnett.plus.com wrote:
The Danny Bos wrote:
Heya,
I'm running a py script that simply grabs an image, creates a
thumbnail and uploads it to s3. I'm simply logging into ssh and
running
11, 2010 at 8:13 PM, The Danny Bos danny...@gmail.com wrote:
Thanks gang,
I'm gonna paste what I've put together, doesn't seem right. Am I way
off?
Here's my code.
- It goes through a table Item
- Matches that Item ID to an API call
- Grabs the data, saves it and creates
On Feb 24, 3:11 am, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Tue, 23 Feb 2010 10:39:21 -, DANNY danijel.gv...@gmail.com wrote:
@James I am thinkinhg about effect of errors that are within the
sequence of P frames. Where the P frames have only the information
about the changes
@James I am thinkinhg about effect of errors that are within the
sequence of P frames. Where the P frames have only the information
about the changes in previous frames, so that errors are present until
the next I frame. So I would like to see how is this seen in different
GoP sized clips.
@Tim
On Feb 21, 1:54 am, Tim Roberts t...@probo.com wrote:
DANNY danijel.gv...@gmail.com wrote:
If I want to have a MPEG-4/10 coded video and stream it through the
network and than have the same video on the client side, what should I
use and of course I don't want to have raw MPEG data, because
Danny Milosavljevic danny_m...@yahoo.com added the comment:
Usage example:
import hidraw
import os
hidraw.get_info(os.open(/dev/hidraw0, os.O_RDONLY))
hidraw.Info(3, 0x0E20, 0x0200)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
On Feb 16, 12:53 am, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Sun, 14 Feb 2010 10:07:35 -, DANNY danijel.gv...@gmail.com wrote:
Hy, first thanks for your response!
Well I am thinkin on coding in MPEG4/10, but I would just encode the
video in that encoding,
then stream
Hello!
I am currently developing a simple video player in python, and my
problem is that i can't find a module which has a function that can
determine if frame(image) is I or P coded (MPEG coding). I have been
using PIL but I couldnt find anything that could help me with that
problem.
Thanks for
.
Is there a pythonic way (some existing module) to convert PostGIS
MultiLineStrings to a KML file format?
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
)
fp.close()
print result = , result
'''
# create the new include_fun
include_fun = create_fun(code_text)
# run it
include_fun(file_name)
#
Can anyone enlighten me what I need to do to exec_pickle.py
to get this to work?
thanks,
Danny
--
http
Thanks All!
you've solved my problem.
D
--
http://mail.python.org/mailman/listinfo/python-list
, but I'm stuck just the same...
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
method?
thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
, paramList)
Any ideas?
TIA,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
http://www.onlamp.com/pub/a/python/2004/02/05/learn_python.html
Danny
--
http://mail.python.org/mailman/listinfo/python-list
/index.php
Great library !
Danny
using IEC Controller,
anybody knows how to capture the head part of an html page like this one?
html
head
script language='javascript'
Object=window.open('test.html','test1','name=test1');
Object.focus()
/script
head
body/body
/html
it seems IEC
the body part.
I need to parse the string inside the tag script
Actually, IEC return the ie.Document object, but
how do I know which methods and properties are available for it ?
Thank you
Danny
--
http://mail.python.org/mailman/listinfo/python-list
are generators used
that are clearly superior to alternatives?
Thanks in advance,
Danny
On Nov 16, 3:14 am, John Machin [EMAIL PROTECTED] wrote:
On 16/11/2006 7:00 PM, Fredrik Lundh wrote:
John Machin wrote:
I would like to thanks Fredrik for his contribution to improve that.
Call me crazy
Danny Colligan
On Nov 16, 10:49 am, Richard Brodie [EMAIL PROTECTED] wrote:
Danny Colligan [EMAIL PROTECTED] wrote in messagenews:[EMAIL PROTECTED]
Now that we're on the subject, what are the advantages of using
generators over, say, list comprehensions or for loops? It seems to me
I'm not able to get out of this ...
from xml.dom.minidom import getDOMImplementation
impl = getDOMImplementation() // default UTF-8
doc = impl.createDocument(None, test,None)
root = doc.documentElement
root.setAttribute('myattrib', '5')
print root.toxml()
I obtain
test myattrib=5/
to assign to a list in a for loop (with
as little code as used above) without using enumerate?
Thanks,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
I see. Thanks for the helpful response.
Danny
Duncan Booth wrote:
Danny Colligan [EMAIL PROTECTED] wrote:
In the following code snippet, I attempt to assign 10 to every index in
the list a and fail because when I try to assign number to 10, number
is a deep copy of the ith index
Hello,
How do we hide and
show windows in Macs ?
Regards,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
output.
I don't know TurboGears though.
cheers,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 25 May 2006, Thomas Thomas wrote:
I am trying to access a mapped network drive folder. everything works
fine normally. But when i run the application as service I am getting
the error
The error is on the line:
for filename in os.listdir(folder):#line 25
and I have to
Hello there.
I'm creating a little text changer in Python. In the program there is a
while loop. The problem is that a while loop will have 1 print statement
and it will loop until it gets to the end of the text.
Example:
num = 5 // Set num to 5
while num = 1: // loop 5 times.
print
I think I should paste some of the programs code a little more of what I
want...
var = 0
while var = 5:
print a[t[var]]
var = var +1
a is a dectionary (very big) and t is a string of text. (if that's
important right now).
I'm just trying to make the value of a[t[var]] print on one
Great! It's been solved.
The line, as Glaudio said has a , at the end and that makes it go onto
one line, thanks so much man!
var = 0
while = 5:
print a[t[var]],
var = var +1
prints perfectly, thanks so much guys.
--
http://mail.python.org/mailman/listinfo/python-list
C:/Documents and Settings/Danny/My
Documents/python/changetext.py, line 9, in ?
var = str(a[t[something]])
KeyError: '7704'
I've explained what is needed to happen in the comments. Also, if any of
you can think of a better way to do this can you possibly tell me this?
Thanks.
--
http
Advance notice: We need speakers for January and later. Please send
e-mail to [EMAIL PROTECTED] if you want to suggest an agenda (or
volunteer to give a presentation).
Correction: that email address should be '[EMAIL PROTECTED]'.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 14 Nov 2005, enas khalil wrote:
hello all
[program cut]
Hi Enas,
You may want to try talking with NTLK folks about this, as what you're
dealing with is a specialized subject. Also, have you gone through the
tokenization tutorial in:
Its been a while since I last coded in Python, so please make sure you test
it before trying it so you don't clobber your existing file. Although it may
not be more effecient than what you are doing now or has been suggested
already, it sure cuts down on the typing.
clean code.
Hope that helps
cheers,
Danny
--
http://mail.python.org/mailman/listinfo/python-list
the problems are reported.
My question is, is
our socket.listen(10) enough ? Should I increase it ? What is the maximum value
for our particular server operating system ?
Regards,Danny SinangBusiness Process
Reengineering
Tel: +632-855-8686 Fax: +632-855-8630www.spipublisherservices.com
CONFIDE
Does anyone know of a good python tutorial?
I was also looking for some non-trivial projects to do in python.
Basically I would like to claim on my resume, that I know python, with
out bad karma.
Danny
--
http://mail.python.org/mailman/listinfo/python-list
..
Patches to facilitate switching to an alternative msvcr*.dll could be submitted
to gcc.
Danny
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 6 Dec 2004, Alfred Canoy wrote:
Please help me out:(.. I've been trying to figure this out for 2 days
now.. I don't know what to use to print all the list of numbers. I hve
know idea how should I do this. I tried a lot of trial error for the
the def, dict, .list( ). have no luck.
75 matches
Mail list logo