the fuck?
On Sat, Oct 22, 2022 at 9:06 AM Peter J. Holzer wrote:
> On 2022-10-19 12:10:52 +1100, Chris Angelico wrote:
> > On Wed, 19 Oct 2022 at 12:01, Peter J. Holzer wrote:
> > > On 2022-10-17 09:25:00 +0200, Karsten Hilbert wrote:
> > > > http://literateprogramming.com/
> > >
> > > Right.
Drew Scholz added the comment:
I think you are right. I'll move this to the Django bug tracker.
Thank you.
--
___
Python tracker
<https://bugs.python.org/issue41
New submission from Drew Scholz :
After upgrading our Django 1.11 project from Python 2.7 to 3.7, our single
endpoint decorator to override django conf settings no longer works.
requests.py inside the virtual environment
/lib/python3.7/site-packages/django/http triggers the RequestDataTooBig
New submission from Drew DeVault :
A gzip file can have uncompressed data written to it, writing compressed data
to the underlying file. It can also have uncompressed data read from it,
reading compressed data from the underlying file.
However, it does not support reading compressed data
Change by Drew DeVault :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue39346>
___
___
Python-bugs-list mailing list
Unsubscrib
Drew DeVault added the comment:
Sorry for the delay, was travelling for the holidays. I'll check that this is
not an issue with 3.8.1. Thanks!
--
___
Python tracker
<https://bugs.python.org/issue39
New submission from Drew DeVault :
File "/usr/lib/python3.8/site-packages/emailthreads/threads.py", line 14, in
get_message_by_id
if msg["message-id"] == msg_id:
File "/usr/lib/python3.8/email/message.py", line 391, in __getitem__
return self.get(na
New submission from Drew Budwin :
Using Python 3.7, I am trying to catch an exception and re-raise it by
following an example I found on StackOverflow
(https://stackoverflow.com/a/6246394/1595510). While the example does work, it
doesn't seem to work for all situations. Below I have two
Were you able to solve this problem? I am also seeing this
On Thursday, March 20, 2014 at 2:22:19 PM UTC-4, lagu...@mail.com wrote:
> Portable Python 2.7 for Windows, the Python application have dependency on
> ssdeep-2.10, which is a binary exe.
>
> The ssdeep (libfuzzy) installation example
New submission from Drew:
$ pip-3.3 install humanhash
$ python3
Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
import uuid
import humanhash
Segmentation fault: 11
Hello folks,
I’m interested in digging up some Python mailing list archives from ages past.
Google Groups’ archive goes sporadically back to ’94, but clearly the list is
older.
Does any one have a lead on where I could get an archive of the very oldest
posts to this list?
Drew
--
https
On Sunday, November 25, 2012 7:11:29 AM UTC-5, ALeX inSide wrote:
How to statically type an instance of class that I pass to a method of
other instance?
I suppose there shall be some kind of method decorator to treat an argument
as an instance of class?
Generally it is needed so
New submission from Drew French rectangletan...@gmail.com:
In the BaseWidget._setup method, master is evaluated as a Boolean (when
Tkinter attempts to find a parent for the widget). I think it should really be
evaluated against None, seeing as that is the default master keyword
argument value
Drew French rectangletan...@gmail.com added the comment:
This is also true for some of the other dialogs (such as the file dialogs).
Does anyone know if this behavior can be changed in Tk itself?
--
nosy: +Drew.French
___
Python tracker rep
Philip Drew pwtd...@gmail.com added the comment:
Ok, python now works in command prompt, but IDLE still wont run.
Also, PYTHONHOME needs to be reset on every start up of command prompt.
--
___
Python tracker rep...@bugs.python.org
http
Philip Drew pwtd...@gmail.com added the comment:
Awesome. It's fixed- do you still want to know whether or not the game works.
In case it helps, I installed the game before python
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Philip Drew pwtd...@gmail.com added the comment:
Reinstalling makes no difference- have tried multiple times
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12140
Philip Drew pwtd...@gmail.com added the comment:
Gave it a go: the prompt appears, but none of the functions work thereafter
C:\Users\PWTDc:\Python27\python -S
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
print hello
LookupError: no codec search
Philip Drew pwtd...@gmail.com added the comment:
C:\Users\PWTDset PY
PYTHONHOME=c:\program files (x86)\steam\steamapps\common\alien
swarm\swarm\..\sdktools\python\2.5
C:\Users\PWTDchcp
Active code page: 850
C:\Users\PWTD
--
___
Python tracker rep
Philip Drew pwtd...@gmail.com added the comment:
The error message is:
ImportError: No module named site.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12140
Philip Drew pwtd...@gmail.com added the comment:
The site module is in the right place
This is what I got running the -v flag: (I don't know what you're looking for)
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\PWTDc:\Python27
New submission from Philip Drew pwtd...@gmail.com:
Upon execution of python.exe a command line box appears for a fraction of a
second, closes and is followed by nothing. On executing IDLE from the start
menu, nothing happens. I have installed python to C:\Python27 using the python
windows
to a server just to run
python code.
Matt.
There's a Pypad on SourceForge, but it is flagged as no longer under
active development. Dead or just sleeping? Is this Pypad distinct
from that old one on SourceForge? Or a revival? OpenSource?
Drew
--
http://mail.python.org/mailman/listinfo/python
New submission from Drew Hintz d...@overt.org:
Adds a mimetype entry for image/vnd.microsoft.icon
This mimetype is commonly used for favicon.ico files and is registered
with IANA.
--
components: Library (Lib)
files: mimetypes.py.diff
keywords: patch
messages: 82373
nosy: adhintz
such that you can tell from that which revision of the
source code to look at if you are tracking down a fix for a problem
they have encountered and reported to you.
Drew
--
http://mail.python.org/mailman/listinfo/python-list
TypeError: Asset object at 0x002B is not enumerable
Am I going about this totally wrong? Is there a better solution?
Thanks.
Drew Schaeffer
--
http://mail.python.org/mailman/listinfo/python-list
What do you mean when you say the menu doesn't kick in? Do you get an
exception, or does simply nothing happen?
Before the if statements, you should put print choice so you can see
what value is being returned by the input function. Also maybe print
type(choice) for a bit more inspection.
Microsoft's IIS server recently added native support for FastCGI. The
big roadblock to Python support seems to be that socket.fromfd()
doesn't work on Windows.
Are there any plans to add this or similar functionality to the
Windows build?
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo
You just need a one-character addition to your regex:
regex = re.compile(r'organisatie.*?/organisatie', re.S)
Note, there is now a question mark (?) after the .*
By default, regular expressions are greedy and will grab as much
text as possible when making a match. So your original expression
, duikboot [EMAIL PROTECTED] wrote:
Thank you very much, it works. I guess I didn't read it right.
Arjen
On Sep 17, 3:22 pm, Jason Drew [EMAIL PROTECTED] wrote:
You just need a one-character addition to your regex:
regex = re.compile(r'organisatie.*?/organisatie', re.S)
Note, there is now
Thanks for clearing up the other incorrect answers! In true Python
fashion, I would also remind everyone of the *documentation* - in
particular the Python tutorial. These are very elementary mistakes to
be making - even worse as part of attempted answers.
The Python tutorial is at
On Apr 24, 8:35 pm, John Machin [EMAIL PROTECTED] wrote:
On 25/04/2007 8:27 AM, Drew wrote:
Ok, I'm trying to do the simplest read/write from one csv file to
another. For some reason, every other row on the output file is a
blank row. What am I doing wrong?
import csv
reader
:
if row[3] == '0':
writer.writerow(row)
This is writing out the correct rows, however it is writing a blank
row between each of the rows written out. Any ideas?
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
:
if row[3] == '0':
writer.writerow(row)
This is writing out the correct rows, however it is writing a blank
row between each of the rows written out. Any ideas?
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
Ok, I'm trying to do the simplest read/write from one csv file to
another. For some reason, every other row on the output file is a
blank row. What am I doing wrong?
import csv
reader = csv.reader(open('current.csv'))
writer = csv.writer(open('new.csv','w'))
for line in reader:
On Apr 11, 11:27 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Drew wrote:
I recently saw this website:http://www.norvig.com/spell-correct.html
All the code makes sense to me save one line:
def known_edits2(word):
return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2
On Apr 12, 10:28 am, Steven Bethard [EMAIL PROTECTED] wrote:
Drew wrote:
On Apr 11, 11:27 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Drew wrote:
def known_edits2(word):
return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in
NWORDS)
This is the same as:
result
I recently saw this website: http://www.norvig.com/spell-correct.html
All the code makes sense to me save one line:
def known_edits2(word):
return set(e2 for e1 in edits1(word) for e2 in edits1(e1) if e2 in
NWORDS)
I understand (from seeing a ruby version of the code) that the goal
here is
() essentially gives you an iterator across a
range, so it should be used when iterating. Should you only use
range() when want to physically store the range as a list?
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
the original container in the loop.
A+
Laurent.
Laurent -
Extremely helpful, exactly what I was looking for.
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 14, 2:53 pm, [EMAIL PROTECTED] wrote:
When is it appropriate to use dict.items() vs dict.iteritems.
Laurent Both work, you may prefer xrange/iteritems for iteration on
Laurent large collections...
I find iteranything to be extremely ugly and hope to avoid using them
On Mar 14, 4:52 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
res_dict = dict((r.get_id(), r) for r in res_list)
I'm using Python2.5 and it seems that this only gives me a hash with
the first id and first record. Am I doing something wrong?
class Person():
... def __init__(self):
...
On Mar 14, 4:43 pm, Samuel [EMAIL PROTECTED] wrote:
What this does is it maps the id to the object. In your case, you only
have one id.
-Samuel
This is interesting behavior, but may not be what the original poster
intended. If I understand correctly, this means that if more than one
object
On Mar 14, 4:52 pm, Samuel [EMAIL PROTECTED] wrote:
On Mar 14, 9:48 pm, Drew [EMAIL PROTECTED] wrote:
This is interesting behavior, but may not be what the original poster
intended.
I am the original poster :).
If I understand correctly, this means that if more than one
object shares
All -
I'm currently writing a toy program as I learn python that acts as a
simple address book. I've run across a situation in my search function
where I want to iterate across a filtered list. My code is working
just fine, but I'm wondering if this is the most elegant way to do
this.
are are quite helpful.
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
easily?
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
an element, I could find
the difference between the size of the list and the desired index and
fill in the range between with values, however I just wanted to
see if there was a more natural way in the language.
Thanks,
Drew
--
http://mail.python.org/mailman/listinfo/python-list
Is there any way to produce this kind of behavior easily?Hints:
[None] * 5
[None, None, None, None, None]
[1, 2, 3, None] + [10]
[1, 2, 3, None, 10]
HTH
That is exactly what I was looking for. I'm actually working on some
problems at http://codgolf.com. I find it helps me to learn a
On Jan 19, 11:16 pm, Drew [EMAIL PROTECTED] wrote:
Hi all
I'm fairly new to python so please forgive my lack of comprehension of
the obvious.
I'm writing a script to ftp files to a server. This script will run
weekly. Part of the script first deletes the previous weeks files. The
problem
of the
files that need to be deleted. All the files start with the same string
but have different extensions (eg drew.1 drew.2 drew.tmp drew.hlp). So
I was wondering if anybody knows how to use a wild card similar to * in
UNIX to do the delete? Something like:
ftp.delete(drew.*)
Any help or suggestions
. (http://www.zenoss.org/
about/news_items/articles/nw-10towatch)
Zenoss is currently hiring talented Zope Python developers. Join
the team!
http://www.zenoss.org/jobs.
Enjoy,
Drew
Project Zenoss
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
You're welcome!
As usual, each of us is free to write the code whichever way works best
for the particular problem at hand. That's why the module documentation
often avoids advocating here-is-the-one-best-way-to-do-it. I just like
sticking all the option setup stuff in a single function because
As pointed out, the module documentation is helpful.
For your 'test' option, I don't think 'action=count' is the best
action. 'Test' is basically an on/off option, so why count it? I would
use:
parser.add_option(-t, --test, action=store_true,
dest=optparse_test, default=False, help=testing
Hi,
You can use the built-in function eval to return how Python evaluates
your string. For example:
eval( '(1,2,3,4)' )
(1, 2, 3, 4)
In other words, eval will take your string that looks like a tuple, and
return an actual tuple object.
Note that the 'u' prefix in your string will cause an
And I have around one year to wait for Ruby to get rid of the nasty
syntax copied from Perl and make it look as beautiful as Python
Then I'll consider switching. ;)
Ummm, I'm sorry, did you say clean reflective meta-model???
So this:
caller[0] =~ /in `([^']+)'/ ? $1 : '(anonymous)'
vs.
Both your code snippets above work should work OK. If it seems like a
file isn't being written, maybe you should specify its full path so you
are sure about where to check for it.
On the file-or-open question, the Python docs state, The intent is for
open() to continue to be preferred for use as
The standard pydoc module is very useful. A simple example of how you
could use it:
import pydoc
mymodule = pydoc.importfile(rC:\My Py\my_foo.py)
html = pydoc.html.page(pydoc.describe(mymodule),
pydoc.html.document(mymodule))
open(foo.html, w).write(html)
Then you have a nice foo.html
Roy Smith wrote: there's a system called Jython, which lets you
compile Java source to Python byte code.
Don't you have that the wrong way 'round? From the Jython website:
Jython is an implementation of the high-level, dynamic,
object-oriented language Python written in 100% Pure Java, and
Ah, good point, thanks. Must stop forgetting that C:\file.txt is bad.
The whole open()/file() clairification is useful too. The Python docs
for the file() constructor simply state that, File objects ... can be
created with the built-in constructor file() described in section 2.1,
'Built-in
Well, using the open function in Python doesn't launch any application
associated with the file (such as Media Player). It just makes the
contents of the file accessible to your Python code. Also, I think
using file(C:\file.txt) is now preferred to open(C:\file.txt).
To answer the specific
For a start, asking a better question will get better answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Googling for python odbc gives this as the first result:
http://www.python.org/windows/win32/odbc.html
In general, how you compare database tables will depend a lot on the
nature of
''.join((chr(e) for e in (0x73, 0x70, 0x61, 0x6D)))
--
http://mail.python.org/mailman/listinfo/python-list
SetConsoleWindowInfo looks like a better candidate. See
http://tinyurl.com/budzk
(I.e.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolewindowinfo.asp)
Haven't tried it though. Good luck!
--
http://mail.python.org/mailman/listinfo/python-list
ANNOUNCEMENT:
A RFD (REQUEST FOR DISCUSSION) has been posted for the creation of a
new Usenet newsgroup: comp.databases.mysql
The proposal and related discussion can be read in the Usenet group
news.groups ... feel free to weigh in and make any suggestions you
may have.
Message-ID:
Sorry, scratch that P.S.! The act of hitting Send seems to be a great
way of realising one's mistakes.
Of course you need colnr - m for those times when m is set to 26.
Remembered that when I wrote it, forgot it 2 paragraphs later!
--
http://mail.python.org/mailman/listinfo/python-list
Hey, that's good. Thanks Steve. Hadn't seen it before. One to use.
Funny that Pythonwin's argument-prompter (or whatever that feature is
called) doesn't seem to like it.
E.g. if I have
def f(tupl):
print tupl
Then at the Pythonwin prompt when I type
f(
I correctly get (tupl) in the argument
We weren't really backwards; just gave a full solution to a half-stated
problem.
Bill, you've forgotten the least-lines-of-code requirement :-)
Mine's still a one-liner (chopped up so line breaks don't break it):
z = lambda cp: (int(cp[min([i for \
i in xrange(0, len(cp)) if \
Oh yeah, oops, thanks. (I mean the line continuations, not the alleged
sin against man and nature, an accusation which I can only assume is
motivated by jealousy :-) Or fear? They threw sticks at Frankenstein's
monster too. And he turned out alright.
My elegant line of code started out without
I believe you're experiencing a bug that I also encountered, and for
which there is a patch. See:
http://sourceforge.net/tracker/?group_id=5470atid=105470func=detailaid=1110478
Fixing os.py as described in the patch fixed all my CGI-related
problems. Hope it does for you too!
Jason
--
Rainer Mansfeld wrote:
Jason Drew wrote:
I believe you're experiencing a bug that I also encountered, and
for
which there is a patch. See:
http://sourceforge.net/tracker/?group_id=5470atid=105470func=detailaid=1110478
Fixing os.py as described in the patch fixed all my CGI-related
71 matches
Mail list logo