I just noticed an old issue that relate to this:
http://bugs.python.org/issue3445
This dates back to 2008 and is marked as fixed, but my copies of
Python 2.5.4 and 2.7.1 don't seem to implement it. I'll try to dig
further.
--
http://mail.python.org/mailman/listinfo/python-list
I noticed a behavior in Jython 2.5.2 that's arguably an implementation
bug, but I'm wondering if it's something to be fixed for all versions
of Python. I was wanting to decorate a Java instance method, and
discovered that it didn't have a __module__ attribute. This caused
the following message:
On Dec 9, 6:12 pm, Vinay Sajip wrote:
> Some changes are being proposed to how logging works in default
> configurations.
>
> Briefly - when a logging event occurs which needs to be output to some
> log, the behaviour of the logging package when no explicit logging
> configuration is provided will
Has anyone ever built some sort of optparse/argparse module for cgi/
wsgi programs? I can see why a straight port wouldn't work, but a
module that can organize parameter handling for web pages seems like a
good idea, especially if it provided a standard collection of both
client- and server-side v
On Aug 5, 4:32 am, Jean-Michel Pichavant
wrote:
> samwyse wrote:
> > On Aug 3, 1:20 am, Steven D'Aprano > t...@cybersource.com.au> wrote:
>
> >> On Mon, 02 Aug 2010 17:19:46 -0700, samwyse wrote:
>
> >>> Fortunately, I don't need the functiona
On Aug 3, 1:20 am, Steven D'Aprano wrote:
> On Mon, 02 Aug 2010 17:19:46 -0700, samwyse wrote:
> > Fortunately, I don't need the functionality of the object, I just want
> > something that won't generate an error when I use it. So, what is the
> > quic
On Aug 2, 12:34 pm, John Nagle wrote:
> The regular expression "split" behaves slightly differently than string
> split:
I'm going to argue that it's the string split that's behaving oddly.
To see why, let's first look at some simple CSV values:
cat,dog
,missing,,values,
How many fields are on e
On Aug 2, 6:52 pm, Andreas Pfrengle wrote:
> I'm trying to define a subclass of int called int1. An int1-object
> shall behave exactly like an int-object, with the only difference that
> the displayed value shall be value + 1 (it will be used to display
> array indices starting at 1 instead of 0).
I'm writing for the Google app engine and have stubbed my toe yet
again on a simple obstacle. Non-trivial app engines programs require
the import of several modules that aren't normally in my PYTHONPATH.
I'd like to be able to test my code outside of the app engine
framework. I've tried several s
On Jan 18, 6:52 am, "kak...@gmail.com" wrote:
> Hello to all!
> I want to parse a log file with the following format for
> example:
> TIMESTAMPE Operation FileName
> Bytes
> 12/Jan/2010:16:04:59 +0200 EXISTS sample3.3gp 37151
> 12/Jan/2010:16:04:59 +0200 EXI
e
App Engine, which is stuck at 2.5. :( (Curiously, no matter how I
order my PATH, the wrong version seems to appear first more than half
the time! I'm seriously considering renaming all my Python 3 code to
use a .py3 file extension.)
> samwyse wrote:
> > As a side note, wouldn
On Jan 17, 8:30 pm, Jive Dadson wrote:
> Okay, with your help I've figured it out. Instructions are below, but
> read the caveat by Ben Fenny in this thread. All this stuff is good for
> one default version of Python only. The PYTHONPATH described below, for
> example, cannot specify a version
On Jan 17, 11:30 pm, Asun Friere wrote:
> On Jan 18, 9:37 am, samwyse wrote:
>
> > Consider this a wish list. I know I'm unlikely to get any of these in
> > time for for my birthday, but still I felt the need to toss it out and
> > see what happens.
>
> >
On Jan 18, 3:06 am, Peter Otten <__pete...@web.de> wrote:
> samwyse wrote:
> > Lately, I've slinging around a lot of lists, and there are some simple
> > things I'd like to do that just aren't there.
>
> > s.count(x[, cmp[, key]])
> > - return nu
On Jan 18, 1:56 am, Terry Reedy wrote:
> On 1/17/2010 5:37 PM, samwyse wrote:
>
>
>
>
>
> > Consider this a wish list. I know I'm unlikely to get any of these in
> > time for for my birthday, but still I felt the need to toss it out and
> > see what happ
Consider this a wish list. I know I'm unlikely to get any of these in
time for for my birthday, but still I felt the need to toss it out and
see what happens.
Lately, I've slinging around a lot of lists, and there are some simple
things I'd like to do that just aren't there.
s.count(x[, cmp[, ke
On Dec 30, 10:00 am, Brian D wrote:
> What I don't understand is how to test for a valid URL request, and
> then jump out of the "while True" loop to proceed to another line of
> code below the loop. There's probably faulty logic in this approach. I
> imagine I should wrap the URL request in a fu
On Dec 30, 7:23 am, Jean-Michel Pichavant
wrote:
> Rule N°2:
> dont use BARE EXCEPT, or you'll piss off MRAB for good :o). Beside from
> kidding, don't use bare except.
I inherited some code that used bare excepts *everywhere*. There were
about 4K lines of code, IIRC, and I think that they were
On Dec 29, 5:18 am, Dave Angel wrote:
> samwyse wrote:
> > Is there any way to get the global namespace of the module in which a
> > class was defined? Answers for both Python 2.x and 3.x will be
> > cheerfully accepted.
>
> I don't know if it's the same i
Is there any way to get the global namespace of the module in which a
class was defined? Answers for both Python 2.x and 3.x will be
cheerfully accepted.
--
http://mail.python.org/mailman/listinfo/python-list
I've got an app that's creating Open Office docs; if you don't know,
these are actually ZIP files with a different extension. In my case,
like many other people, I generating from boilerplate, so only one
component (content.xml) of my ZIP file will ever change. Instead of
creating the entire ZIP
On Nov 24, 4:43 pm, Steven D'Aprano wrote:
> Oh yes, and people using Windows can't use maildir because (1) it doesn't
> allow colons in names, and (2) it doesn't have atomic renames. Neither of
> these are insurmountable problems: an implementation could substitute
> another character for the co
On Nov 11, 3:57 am, "Robert P. J. Day" wrote:
> http://groups.google.com/group/unladen-swallow/browse_thread/thread/4...
>
> thoughts?
Google's already given us its thoughts:
http://developers.slashdot.org/story/09/11/11/0210212/Go-Googles-New-Open-Source-Programming-Language
--
http://mail.py
On Nov 10, 1:09 pm, "lallous" wrote:
> Hello
>
> I have 3 questions, hope someone can help:
>
> 1)
> How can I create an instance class in Python, currently I do:
>
> class empty:
> pass
>
> Then anytime I want that class (which I treat like a dictionary):
>
> o = empty()
> o.myattr = 1
> etc...
On Nov 10, 1:23 pm, r wrote:
> Forgive me if i don't properly explain the problem but i think the
> following syntax would be quite beneficial to replace some redundant
> "if's" in python code.
>
> if something_that_returns_value() as value:
> #do something with value
>
> # Which can replace t
On Oct 13, 9:13 pm, Peng Yu wrote:
> Bash is easy to use on manipulating files and directories (like change
> name or create links, etc) and on calling external programs. For
> simple functions, bash along is enough. However, bash does not support
> the complex functions. Python has a richer libra
I have Python program that lets me interact with a bunch of files.
Unfortunately, the program assumes that the bunch is fairly small, and
I have thousands of files on relatively slow storage. Just creating a
list of the file names takes several minutes, so I'm planning to
replace the list with an
### I've tried this under both Python 2.5.1 and 3.1.1, and it isn't
working with either one. Here is my program:
class Plugin(object):
"""This is the base object for a plug-in."""
pass
def load_plugins(plugin_subdir='plugins'):
import sys, pkgutil, imp, os.path
try:
# Us
;
> I don't think it will work on ms-windows, but it could be ported.
>
> Or you use mirage:http://mirageiv.berlios.de/index.html
>
> It is a pygtk image viewer. You can define shortcuts that execute user defined
> commands.
>
> Thomas
>
> samwyse schrieb:
&g
I have several thousand photographs that I need to quickly classify,
all by myself. After extensive searches, I have been unable to find
anything to my liking, so desire to write something myself. I'm
thinking about displaying a photo and waiting for keystrokes to tag
it; 'i' for interior, 'e' fo
On Aug 9, 9:41 am, Steven D'Aprano wrote:
> On Sun, 09 Aug 2009 06:13:38 -0700,samwysewrote:
> > Here's what I have so far:
>
> > import urllib
>
> > class AppURLopener(urllib.FancyURLopener):
> > version = "App/1.7"
> > referrer = None
> > def __init__(self, *args):
> > urllib
Here's what I have so far:
import urllib
class AppURLopener(urllib.FancyURLopener):
version = "App/1.7"
referrer = None
def __init__(self, *args):
urllib.FancyURLopener.__init__(self, *args)
if self.referrer:
addheader('Referer', self.referrer)
urllib._url
>>> int('1010100110', 2)
678
On Jun 25, 7:06 am, krishna wrote:
> Hi Guys,
>
> I need to convert 1010100110 boolean value to some think like 2345, if
> its possible then post me your comment on this
>
> Advanced thanks for all
>
> Narayana perumal.G
--
http://mail.python.org/mailman/listinfo/py
I need a dict-like object that, if it doesn't contain a key, will
return the value from a "parent" object. Is there an easy way to do
this so I don't have to define __getitem__ and __contains__ and others
that I haven't even thought of yet? Here's a use case, if you're
confused:
en_GB=mydict()
e
I just started with web2py (http://www.web2py.com/) for an internal-
use-only app that doesn't need to be very pretty. Been using it for
about a week and after re-watching the tutorial, I've decided that I'm
making things way too complicated. So today I'm going to replace a
lot of my code with so
I use an @trace decorator. This (http://wordaligned.org/articles/
echo) will get you started but there are lots of others available. My
personal preference is a decorator that catches, displays and re-
raises exceptions as well as displaying both calling parameters and
returned values.
btw, here
On Jun 9, 12:30 am, Emile van Sebille wrote:
> On 6/8/2009 8:43 PM Ben Finney said...
> > The fact that literal set syntax is a relative newcomer is the primary
> > reason for that, I'd wager.
>
> Well, no. It really is more, "that's odd... why use set?"
Until I ran some timing tests this morni
On Jun 8, 8:57 pm, samwyse wrote:
> I conclude that using constructors is generally a bad idea, since the
> compiler doesn't know if you're calling the builtin or something with
> an overloaded name. I presume that the compiler will eventually
> optimize the second example
On Jun 8, 10:06 pm, Chris Rebert wrote:
> On Mon, Jun 8, 2009 at 6:57 PM, samwyse wrote:
> > On Jun 8, 7:37 pm, Carl Banks wrote:
> >> On Jun 8, 4:43 pm, Ben Finney wrote:
> >> > m...@pixar.com writes:
> >> > > Is there any reason t
On Jun 8, 7:37 pm, Carl Banks wrote:
> On Jun 8, 4:43 pm, Ben Finney wrote:
> > m...@pixar.com writes:
> > > Is there any reason to prefer one or the other of these statements?
>
> > > if e.message.code in [25401,25402,25408]:
> > > if e.message.code in (25401,25402,25408):
>
> If
On Jun 6, 7:58 am, Carl Banks wrote:
> On Jun 6, 5:28 am, samwyse wrote:
> > Always saying "print(','.join(x))" gets tiresome in a hurry.
>
> What about print(list(x))
Yeah, I like that. Or, to save some typing:
prnt = lambda x: print(list(x))
> Int
The one thing that's killing me in Python 3000 is that every time I
try to print something, it seems like I get at 0x01BAF508>. Googling only found one reference, a
posting elsewhere by one Carl Johnson (aka carlj7,
http://www.artima.com/forums/flat.jsp?forum=106&thread=211200#275387),
which appa
I have a Python 2.6 program (a code generator, actually) that tries
several methods of compressing a string and chooses the most compact.
It then writes out something like this:
{ encoding='bz2_codec', data = '...'}
I'm having two problems converting this to Py3. First is the absence
of the bz2
On May 30, 6:16 pm, Gabriel wrote:
> I have something like this:
>
> @render(format="a")
> @render(format="b")
> @
> def view(format, data):
> return data
> In my understanding this equivalent to:
>
> render('a',
> render('b',
> view(***)))
Not quite. 'render' is a function of one arg
I'm processing some potentially large datasets stored as HTML. I've
subclassed HTMLParser so that handle_endtag() accumulates data into a
list, which I can then fetch when everything's done. I'd prefer,
however, to have handle_endtag() somehow yield values while the input
data is still streaming
On Apr 16, 2:02 pm, samwyse wrote:
> In the Windows version of Python 2.5, pressing F1 brought up the
> python.chm file. I've just installed 2.6, and the same action
> openshttp://www.python.org/doc/current/. I'd prefer the former behavior.
> I know how to change the
On May 11, 9:01 pm, Carl Banks wrote:
> On May 11, 11:16 am, samwyse wrote:
>
> > Should I use a class decorator, or a metaclass?
>
> Here's the thing: unless you have advance knowledge of the methods
> defined by self.blog, you can't get the attr_list at class
On May 11, 1:16 pm, samwyse wrote:
> I'm writing a class that derives it's functionality from mix-ins.
While waiting, I gave a try at using class decorators. Here's what I
came up with:
def add_methods(*m_list, **kwds):
def wrapper(klass):
for m_name in m_lis
I'm writing a class that derives it's functionality from mix-ins.
Here's the code:
def boilerplate(what): # This used to be a decorator, but all of
the
##what = f.__name__ # function bodies turned out to be
'pass'.
'Validate the user, then call the appropriate plug-in.'
In the Windows version of Python 2.5, pressing F1 brought up the
python.chm file. I've just installed 2.6, and the same action opens
http://www.python.org/doc/current/. I'd prefer the former behavior.
I know how to change the key bindings in config-keys.def, but I think
I want to change the actio
On Apr 15, 8:56 am, Aaron Brady wrote:
>
> The randomizing solution isn't quite suitable for 16 teams. With 5
> teams/1 court, and 5 teams/2 courts, 6 teams/2 courts, the solution
> comes within seconds. For 7 teams/3 courts, the solution takes a few
> minutes.
7 teams/3 courts is the same as 8
On Apr 15, 8:13 am, Aaron Brady wrote:
> On Apr 15, 6:57 am, samwyse wrote:
>
> > Here's my idea: generate all possible pairs:
>
> > >>> import itertools
> > >>> players = [chr(c) for c in xrange(ord('a'),ord('z')+1)]
>
On Apr 14, 7:01 pm, Aaron Brady wrote:
> Here is an idea. Create a list of all possible pairs, using
> itertools.combinations. You'll notice everyone gets equal play time
> and equal time against each other on a pair-by-pair basis. Then, call
> random.shuffle until one player isn't playing on t
On Jul 11, 3:46 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> As Guy Davidson has already pointed out, this is a problem in the meter
> TCP implementation, and you should ask the vendor to fix it.
That would have been me, not Guy.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 10, 4:10 pm, Guy Davidson <[EMAIL PROTECTED]> wrote:
> I try to send the following message, using the socket.send() command:
>
> 'HTTP/1.1 200 OK\r\nDate: Thu, 10 July 2008 14:07:50 GMT\r\nServer:
> Apache/2.2.8 (Fedora)\r\nX-Powered-By: PHP/5.2.4\r\nContent-Length: 4\r
> \nConnection: clos
On Jul 10, 1:50 pm, Guy Davidson <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> I'm having some issues with an small socket based server I'm writing,
> and I was hoping I could get some help.
>
> My code (attached below) us supposed to read an HTTP Post message
> coming from a power meter, parse it, an
On Jul 10, 9:45 am, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote:
> I am trying to create a utility module that only loads functions when
> they are first called rather than loading everything. I have a bunch
> of files in my utility directory with individual methods and for each I
> have lines li
On Jul 8, 11:01 am, Kris Kennaway <[EMAIL PROTECTED]> wrote:
> samwyse wrote:
> > You might want to look at Plex.
> >http://www.cosc.canterbury.ac.nz/greg.ewing/python/Plex/
>
> > "Another advantage of Plex is that it compiles all of the regular
> > expres
On Jul 8, 4:56 pm, Joseph Barillari <[EMAIL PROTECTED]> wrote:
> My question is: did something about the way the special method names are
> implemented change for new-style classes?
Just off the top of my head, I'd guess that it's due to classes
already having a default __call__ method, used when
On Jul 8, 3:01 pm, Rob Wolfe <[EMAIL PROTECTED]> wrote:
> samwyse <[EMAIL PROTECTED]> writes:
> > P.S. I tried researching this further by myself, but the logging
> > module doesn't come with source (apparently it's written in C?) and I
> > don't
On Jul 8, 12:34 pm, Ethan Furman <[EMAIL PROTECTED]> wrote:
> Anybody have an example of when the unary + actually does something?
> Besides the below Decimal example. I'm curious under what circumstances
> it would be useful for more than just completeness (although
> completeness for it's own s
On Jul 7, 6:12 pm, Ethan Furman <[EMAIL PROTECTED]> wrote:
> Greetings, List!
>
> I'm working on a numeric data type for measured values that will keep
> track of and limit results to the number of significant digits
> originally defined for the values in question.
>
> I am doing this primarily bec
On Jul 4, 6:43 am, Henning_Thornblad <[EMAIL PROTECTED]>
wrote:
> What can be the cause of the large difference between re.search and
> grep?
> While doing a simple grep:
> grep '[^ "=]*/' input (input contains 156.000 a in
> one row)
> doesn't even take a second.
>
> Is this a bu
In the Python 2.5 Library Reference, section 14.5.3 (Logging to
multiple destinations), an example is given of logging to both a file
and the console. This is done by using logging.basicConfig() to
configure a log file, and then calling
logging.getLogger('').addHandler(console) to add the console.
[EMAIL PROTECTED] wrote:
> My apologies if any attributions are messed up.
>
> On Feb 3, 1:28 am, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>
>>If you want an explicit name, try a variation of "dontcare". Assuming
>>that you're an English speaker.
I'm with Steven here. I t
nerates boilerplate for a Python script. It accepts a
single argument consisting of a string of option letters that you
wish the script to recognize, with options that require an argument
followed by a colon (i.e., the same format that Unix getopt() uses).
Written by samwyse
Created on Feb 02, 2
Ben Finney wrote:
> George Sakkis <[EMAIL PROTECTED]> writes:
>
>
>>On Jan 23, 8:14 pm, [EMAIL PROTECTED] wrote:
>>
>>>The annual Linux Journal survey is online now for any Linux users
>>>who want to vote for Python.
>>>http://www.linuxjournal.com/node/1006101
>>
>>...
>>18. What is your favorite
On Dec 6, 1:12 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> samwyse schrieb:
>
> > For whatever reason, I need an inproved integer. Sounds easy, let's
> > just subclass int:
>
> >>>> class test(int):
> >pass
>
On Nov 24, 6:38 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> samwyse <[EMAIL PROTECTED]> writes:
> > create a hash that maps your keys to themselves, then use the values
> > of that hash as your keys.
>
> The "atom" function you describe already exist
For whatever reason, I need an inproved integer. Sounds easy, let's
just subclass int:
>>> class test(int):
pass
Now let's test it:
>>> zed=test(0)
>>> zed.__class__
>>> zed
0
So far, so good. Now let's try incrementing:
>>> zed+=1
>>> zed
1
>>> zed.__class__
WTF??!
Is this a bug
On Nov 24, 1:10 pm, "Patrick Mullen" <[EMAIL PROTECTED]> wrote:
> If there were a "using" or if the with statement would handle
> something like this, I wouldn't use it. "s." is only 2 characters. I
> saw chained dots mentioned. Chained dots are 2 characters. Why are
> we still discussing this?
On Nov 24, 5:44 am, Licheng Fang <[EMAIL PROTECTED]> wrote:
> Yes, millions. In my natural language processing tasks, I almost
> always need to define patterns, identify their occurrences in a huge
> data, and count them. Say, I have a big text file, consisting of
> millions of words, and I want to
On Nov 24, 10:35 am, Licheng Fang <[EMAIL PROTECTED]> wrote:
> Thanks. Then, is there a way to make python treat all strings this
> way, or any other kind of immutable objects?
The word generally used is 'atom' when referring to strings that are
set up such that 'a == b' implies 'a is b'. This is
On Nov 24, 10:07 am, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> Ton van Vliet <[EMAIL PROTECTED]> wrote:
>
> > It would boil down to choice: explicit/speed vs implicit/readability
>
> No, it would boil down to explicit+speed+readability+maintainability vs
> implicit+error prone.
>
> It would mean th
On Nov 24, 7:50 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sat, 24 Nov 2007 02:54:27 -0800, samwyse wrote:
> > On Nov 24, 4:07 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> >> On Sat, 24 Nov 2007 01:55:38 -0800, samw
On Nov 24, 5:44 am, Licheng Fang <[EMAIL PROTECTED]> wrote:
> Yes, millions. In my natural language processing tasks, I almost
> always need to define patterns, identify their occurrences in a huge
> data, and count them. [...] So I end up with unnecessary
> duplicates of keys. And this can be a gr
On Nov 24, 4:07 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Sat, 24 Nov 2007 01:55:38 -0800, samwyse wrote:
> > I've had the same thought, along with another. You see, on of my pet
> > peeves about all OO languages that that when creatin
On Nov 23, 2:06 am, greg <[EMAIL PROTECTED]> wrote:
> There's a fair amount of overhead associated with providing
> the ability to set arbitrary attributes on an object, which
> is almost never wanted for built-in types, so it's not
> provided by default.
>
> You can easily get it if you want it by
On Nov 23, 7:16 pm, "Patrick Mullen" <[EMAIL PROTECTED]> wrote:
> Most of the time self doesn't bother me in the slightest. The one
> time it does bother me however, is when I am turning a function into a
> method. In this case, often I have many local variables which I
> actually want to be inst
I've just now submitted two issues to the issue tracker:
1491BaseHTTPServer incorrectly implements response code 100
RFC 2616 sec 8.2.3 states, "An origin server that sends a 100
(Continue) response MUST ultimately send a final status code, once the
request body is received and processed, u
On Sep 9, 10:05 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message <[EMAIL PROTECTED]>,samwysewrote:
>
> > A hard-link, OTOH, allows
> > direct access to the contents of a file, as long as it is on the same
> > filesystem. No extra steps are required, so the pr
mosscliffe wrote:
> On 22 Aug, 00:05, Ian Clark <[EMAIL PROTECTED]> wrote:
>>
>>>On Aug 19, 4:29 pm,mosscliffe<[EMAIL PROTECTED]> wrote:
>>>
The source file is in an area which python can see, but not the
browser. I am trying to make a link in a browser friendly area so I
can use it to
Andy wrote:
> Hi guys,
>
> I'm sorry, I'm not sure this is the correct group to be asking this
> kind of question...
>
> I'm going to develop a software package that includes a web server
> (and PHP code) , a database, and some Python code of course. I am
> being strongly suggested to make it to
mosscliffe wrote:
> I am trying to create a back link, equivalent to the browser back
> action and I can not use java script. The target user does not allow
> java script.
>
> I am using HTTP_REFERER.
>
> I need to add the original Query String values.
>
> Is there a way to get the QueryString e
michael maver wrote:
> Hello, I was just wondering if anyone knew of a way to search the screen
> for a certain color in Python.
I know of lots of ways to do this...
> I know it is possible to do this in other languages, but I'm not sure
> how I'd go about doing this in Python. Just to let you
Jack wrote:
> Thanks for all the replies!
>
> SPARK looks promising. Its doc doesn't say if it handles unicode
> (CJK in particular) encoding though.
>
> Yapps also looks powerful: http://theory.stanford.edu/~amitp/yapps/
>
> There's also PyGgy http://lava.net/~newsham/pyggy/
>
> I may also giv
mosscliffe wrote:
> I am trying to create a link to a file, which I can then use in an
> HTML page.
>
> The system is Linux on a hosted web service, running python 2.3.
> Other than that I have no knowledge of the system.
>
> The link is created OK, but when I try to use it as filename for the
>
Alex Martelli wrote:
> Of course, hoisting the unbound method out of the loops can afford the
> usual small optimization. But my point is that, in Python, these
> operations (like, say, the concatenation of a sequence of lists, etc)
> are best performed "in place" via loops calling mutator method
samwyse wrote:
> Scott David Daniels wrote:
>
>> lefts = set()
>> rights = set()
>> with open('sheet1', 'r') as fh:
>> for line in fh:
>> trimmed = line.strip()
>> if trimmed: # Skip blanks (file end of
[EMAIL PROTECTED] wrote:
> Some rather unexpected behavior in the set_default/set_defaults
> methods for OptionParser that I noticed recently:
[...]
> Why does set_default not raise an exception when passed a key that it
> doesn't recognize?
>
> Bad typysts bewaer.
>
> The only reason I can think
Scott David Daniels wrote:
> lefts = set()
> rights = set()
> with open('sheet1', 'r') as fh:
> for line in fh:
> trimmed = line.strip()
> if trimmed: # Skip blanks (file end often looks like that)
> left, right = line.strip().split('\t')
>
Chris Mellon wrote:
> On 8/9/07, Heikki Toivonen <[EMAIL PROTECTED]> wrote:
>
>>[david] wrote:
>>
>>>I'd like to refresh the display before I start the main loop.
If your window isn't able to interact with the user, then I'd consider
it a splash screen, no matter if it does look exactly like you
On Jul 28, 12:14 pm, Jay Loden <[EMAIL PROTECTED]> wrote:
> samwyse wrote:
> > Interestingly enough, this works:
>
> > C:\Python25>path=%path%;C:\Python25\Lib\site-packages\pywin32-210-
> > py2.5-win32.eg
> > g\pywin32_system32
>
> > C:\Python25>p
On Jul 28, 8:16 am, samwyse <[EMAIL PROTECTED]> wrote:
> I just upgraded from 2.4.something to 2.5.1. I get the stuff below.
> I tried easy-installing pywin32; same results. Anyone know what's
> going on?
>
Interestingly enough, this works:
C:\Python25>path=%path%;C:\
On Jul 28, 7:46 am, fynali iladijas <[EMAIL PROTECTED]> wrote:
> On Jul 24, 4:36 pm, fynali iladijas <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi, this query is regarding automating page insertions in Microsoft
> > Document Imaging.
>
[...]
>
> > All help and advice will be most appreciated.
>
> > Thank
I just upgraded from 2.4.something to 2.5.1. I get the stuff below.
I tried easy-installing pywin32; same results. Anyone know what's
going on?
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
On Jul 13, 1:05 pm, Chris Carlen <[EMAIL PROTECTED]>
wrote:
> John Nagle wrote:
> > Chris Carlen wrote:[edit]
> >> Hence, being a hardware designer rather than a computer scientist, I
> >> am conditioned to think like a machine. I think this is the main
> >> reason why OOP has always repelled me.
On Jul 13, 12:45 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> samwyse wrote:
> > TypeError: __class__ must be set to a class
>
> > Excpt ceratinly appears to be a class. Does anyone smarter than me
> > know what's going on here?
>
> Not that
(Yes, I probably should have said CPython in my subject, not Python.
Sorry.)
On Jul 13, 12:56 am, samwyse <[EMAIL PROTECTED]> wrote:
> OK, in classobject.h, we find this:
>
> #define PyClass_Check(op) ((op)->ob_type == &PyClass_Type)
>
> That seems straightforwa
On Jul 12, 11:48 am, samwyse <[EMAIL PROTECTED]> wrote:
> On Jul 12, 6:31 am,samwyse<[EMAIL PROTECTED]> wrote:
>
> > On Jul 8, 8:50 am, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> > > With Py 2.5 I get:
>
> > > new.__class__ = old
1 - 100 of 117 matches
Mail list logo