o point in that! :-)
It could of course be a problem in the GTK DLLs and I haven't yet had time to
test with older GTK versions. Hopefully I can try that tomorrow.
cheers,
--Tim
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stefan Behnel
Sent: We
-Original Message-
From: [EMAIL PROTECTED] on behalf of John Machin
Sent: Thu 2/3/2005 12:03 AM
To: [email protected]
Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4,
2.3.5rc1,2.4.0)
> Leeuw van der, Tim TOP-POSTED:
> > Hi all,
> >
[...]
> &
>
>
> -Original Message-
> From: [EMAIL PROTECTED] on behalf of John Machin
> Sent: Thu 2/3/2005 12:00 PM
> To: [email protected]
> Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4,
> 2.3.5rc1,2.4.0)
>
>
> Leeuw van der, Ti
Hi Tim,
Thanks a lot! That sounds like quite a
useful routine, that I can use without going through extra documentation and
adding extra libraries!
Cheers,
--Tim J
From: Tim Williams
(gmail) [mailto:[EMAIL PROTECTED]
Sent: donderdag 22 december 2005
16:38
To: Leeuw
Hi Tim,
-Original Message-
From: Tim Parkin [mailto:[EMAIL PROTECTED]
Sent: woensdag 18 januari 2006 13:45
>
> That sounds fine.. I think having a link to a high profile user of
> python would be very useful though. I agree the XP link is a bit
shite.
> Hopefully we'
"Gallagher, Tim (NE)" wrote :
> import win32com.client
> import time
> import datetime
>
> outlook = win32com.client.Dispatch("Outlook.Application")
> namespace = outlook.GetNamespace("MAPI")
> appointments = namespace.GetDefaultFolder(9).Items
sure.
Can this be done? Using the Win32-all extensions perhaps? Or perhaps with
the CTypes module?
Any pointers are appreciated!
Kind regards,
--Tim van der Leeuw
--
http://mail.python.org/mailman/listinfo/python-list
in the django save methods.
>
Well -- you escape them in the save() method only when they contain XML
charachters like <, > ? How about that, wouldn't that work?
--Tim
>
> I suggested he could use a subclass of str to represent escaped strings
> and an
> escap
On Fri, Feb 22, 2008 at 6:41 PM, Robin Becker <[EMAIL PROTECTED]> wrote:
> Tim van der Leeuw wrote:
> > On Fri, Feb 22, 2008 at 5:17 PM, Robin Becker <[EMAIL PROTECTED]>
> wrote:
> >
> [...]
> >
> > Well -- you escape them in the save() method on
Hi,
I'm trying to create a regular expression for matching some particular XML
strings. I want to extract the contents of a particular XML tag, only if it
follows one tag, but not follows another tag. Complicating this, is that
there can be any number of other tags in between.
So basically, my re
On 9/5/22 21:22, Meredith Montgomery wrote:
I never read a book on Python. I'm looking for a good one now. I just
searched the web for names such as Charles Petzold, but it looks like he
never wrote a book on Python. I also searched for Peter Seibel, but he
also never did. I also tried to sea
On 4/24/23 09:14, Stefan Ram wrote:
Grant Edwards writes:
The other big advantage of an ncurses program is that since curses
support is in the std library, a curses app is simpler to distribute.
IIRC curses is not in the standard library /on Windows/. I miss
a platform independent (well
On 4/24/23 11:32, Grant Edwards wrote:
On 2023-04-24, Grant Edwards wrote:
The other big advantage of an ncurses program is that since curses
support is in the std library, a curses app is simpler to
distribute. Right now, the application is a single .py file you
just copy to the destination
[Marco Sulla ]
> Excuse me, Tim Peters, what do you think about my (probably heretical)
> proposal of simply raising an exception instead of return a NaN, like
> Python already do for division by zero?
Sorry, I'm missing context. I don't see any other message(s) from you
in th
On Sat, Apr 13, 2024 at 1:10 PM Mats Wichmann via Python-list <
[email protected]> wrote:
> On 4/13/24 07:00, jak via Python-list wrote:
>
> doesn't Pandas have a "where" method that can do this kind of thing? Or
> doesn't it match what you are looking for? Pretty sure numpy does, but
> that
mory usage will be too big.
I don't know if perhaps other string-matching techniques can be used
btw; you don't need the full power of regexes I guess to match DNA
string patterns.
Perhaps you should investigate that a bit, and do some performance
tests?
cheers,
--Tim
--
http://mail.py
s?
Or something, some option, that perhaps changes the way that Python
recognizes globals?
If you declare another global variable, then try to use it in your
function, then what's the result?
What Python version do you use?
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
u need to do
with it?
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
What you could do is to create a class for this; fill it's __dict__
instance; and use custom getattr() / setattr() methods for accessing
a0, a1, a2 etc.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
is problem?
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
ove, the exact same file compiles just
fine under Python2.3.5.
(And crashes the 2.4.0 interpreter)
regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
;t spot
it.
regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
an be for 2.4.2 or a later time.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
). Hope to find time soon.
thanks,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
forge-page.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the answer... I subscribed, but meanwhile found the answer
to my problem via the MS-Word documentation already.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
d if there's no smarter way, then which of these two options would
give best performance?
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Hiya,
That's certainly possible, it's standard practice.
(It might be cleaner to pass filenames using parameters though)
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
generator expressions in principle, but I do feel that
here they clutter up the intent of the code)
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Hi Klaus,
I think I like the looks of your version the best, so far. Readable and
clear, to me.
cheers and thanks,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
vious way to do it." that it's not so.
Fortunately, this is easy to write as: list("mystring").
Actually for me it's not so counter-intuitive that "mystring".split('')
doesn't work; what are you trying to split on?
Anyways, I usually need to split on something more complicated so I
split with regexes, usually.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
od... (It's called only when the attribute cannot be looked up via
normal means)
If you are seeing recursive calls to __getattr__, perhaps you can
highlight the problem with some sample-code?
regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
l2.append(v)
...
>>> l2
[3, 1, 'a', '@', -4, 'z', 'r']
I have no idea whether or not this is more efficient than the other
method; try it on big lists if you want to know. (But I like the idea
that I'm not looking up indexes in the old list all the time, which
just feels slow to me)
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
lling LiteStep.
Don't have a working URL at hand so try googling for it...
But a direct solution for your problem, no I don't have that.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
hat I want to get is some sort of sortable date; either as a number or
(if nothing else) as a string in ISO8601 format.
(But I want to avoid doing too many string manipulations on my input
dates; and changing the dateformat of the input-source will be hard if
at all justifiable.)
Any help i
You need to use result.append(...) instead of result.extend(...)
(Been stumped with that myself too, several times, when I was still a
newby... Except was using the operator '+=' I think)
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
I downloaded the tar.bz2 file, extracted it, and had no problem
building it and creating a windows installer using 'python ./setup.py
bdist_wininst'
This windows installer I then used to install it via the 'official
windows' way :)
luck,
--Tim
--
http://mail.python.org/mai
. Uncommon on
unix/linux, but very common on windows. Put some double-quotes around
the filenames in your zip_command:
zip_command = 'zip -qr "%s" "%s"' % (target, ' '.join(source))
AFAIK there are built-in zip modules available in Python? They mi
os.walk('compressthisdir'):
for f in riles:
fullname = os.join(root, f)
zf.write(fullname)
zf.close()
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
inzip-compatible archive that puts all files directly into 1
compressed archive.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
haps urllib or urllib2 already has the functionality that you
need -- didn't look it up)
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Should the dict flag when the dict itself has been updated? Or also
when any of the items in the dict has been updated?
Say you have a dict consisting of lists...
The dict should be flagged as modified when an item is added; or when
an item is replaced (you call dict.__setitem__ with a key that a
via JMS
interfaces.
I wouldn't know what Python frameworks exist that would combine
web-based applications with tradional GUI client/server applications
and I have no idea how to listen to a queue using Python...
So what are your requirements for 'J2EE' applications? And which Python
ion which runs inside Word? Or is
it OK if it's an external application (with or without GUI) which does
manipulations with MS Word documents using COM objects?
(I frequently do the latter, but don't know about doing the former)
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
xploration at the command prompt,
although not everything is very obvious (in part due to the way the
word object model is structured).
BTW, if you are new to Python, why not use VBA for the program?
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Wasn't this the example given in the Python manuals? Recursively
deleting files and directories?
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
mind some sleek pictures there if they weren't desperatly
trying to advertise success-stories but instead would link to real
content!)
I do like to overall look-and-feel of the beta site but I hope the bad
bits get fixed before launch!
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
> Checkins to subversion cause an automated update in the site content.
Good :) What's the subversion URL where I can fetch the site? ;)
regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
that links to Python Web Development
including things like Zope, Django, etc; another picture that links to
a page giving overview of major IDEs for Python; and 3d picture that
links to page with Python Event calender... Something along those
lines. But I don't have any graphics for you.)
I need to supply a username/password before I can look at the SVN
repository in my webbrowser; I tried username/pwd 'anonymous' but that
don't work.
cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Does the Python.org website have a problem? I only get a directory
index, and clicking on any of the HTML files in there shows a page
without any CSS makeup.
Anyone noticed this too?
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'd like to know if there's a way to check if an object is a sequence,
or an iterable. Something like issequence() or isiterable().
Does something like that exist? (Something which, in case of iterable,
doesn't consume the first element of the iterable)
Regards,
Tim N. van der Leeuw wrote:
> Hi,
>
> Does the Python.org website have a problem? I only get a directory
> index, and clicking on any of the HTML files in there shows a page
> without any CSS makeup.
>
> Anyone noticed this too?
>
> --Tim
Well, it seems fixe
Bruno Desthuilliers wrote:
> Tim N. van der Leeuw a écrit :
> > Hi,
> >
> > I'd like to know if there's a way to check if an object is a sequence,
> > or an iterable. Something like issequence() or isiterable().
> >
> > Does something like
ownload py2exe, you'll find a number of examples of how to use
py2exe to create installers using InnoSetup.
On the wiki, you'll also find examples of how to do this -- even with
pygtk applications.
However, it's not platform independant -- it'll be for windows only.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
la, simple and easy, no installer required.
Works for me; dunno if it's good enough for your needs as well. (Oh,
and creating the SEA-exe you can probably automate if from the setup.py
but I haven't bothered yet)
Cheers and good luck,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
+ collegue of mine to comment, and he strongly suspects that
you're actually running it in the .Net runtime (your C++ code contains
some C#-isms, such as omitting the '.h' in the include <> statements).
Luck,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
ferences shouldn't lead to drastic
performance differences.
> Ciao,
> Marc 'BlackJack' Rintsch
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Tim N. van der
> Leeuw wrote:
>
> > (your C++ code contains some C#-isms, such as omitting the '.h' in the
> > include <> statements).
>
> That's no C#-ism, that's C++
g very much like this proxy-class:
class RequestCalculations(object):
def __init__(self, request):
self.serviceType, self.facade =
makeMessageFacadeInstance(request)
return
def __getattr__(self, name):
return getattr(self.facade, name)
(rest of the code omitted)
nstead create the string-objects ahead of time, outside of
the loop.
Regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Tim N. van der Leeuw wrote:
> Ray wrote:
> > Fredrik Lundh wrote:
> > > in the Python example, the four strings in your example are shared, so
> > > you're basically copying 4 pointers to the list.
> > >
> > > in the C++ example, you're
Ray wrote:
> Tim N. van der Leeuw wrote:
> > > In which case, Licheng, you should try using the /GF switch. This will
> > > tell Microsoft C++ compiler to pool identical string literals together.
> > >
> > >
> > > :)
> >
> > The code
ptimizations for the first 2
compiles anyways: two -O options with different values. Doesn't that
mean the 2nd -O takes preference, and the compilation is at -O2 instead
of -O3?
Why both -O3 and -O2 at the command-line?
Cheers,
--Tim
> --
> blog: http://www.akropolix.net/
PROTECTED] ~/My Documents/Python
$ ./SpeedTest.exe
Begin Test
What do you know?
chicken crosses road
fool
so long...
What do you know?
chicken crosses road
fool
so long...
Fast - Elapsed: 2.089 seconds
Slow - Elapsed: 6.303 seconds
[EMAIL PROTECTED] ~/My Documents/Python
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Mc Osten wrote:
> Tim N. van der Leeuw <[EMAIL PROTECTED]> wrote:
>
> > Oh boy; yes indeed the slow python is faster than the fast C++
> > version... Must be something really awful happening in the STL
> > implementation that comes with GCC 3.4!
>
> And t
Tim N. van der Leeuw wrote:
> Mc Osten wrote:
> > Tim N. van der Leeuw <[EMAIL PROTECTED]> wrote:
> >
> > > Oh boy; yes indeed the slow python is faster than the fast C++
> > > version... Must be something really awful happening in the STL
> > > imp
[EMAIL PROTECTED] wrote:
> Tim> But beware! For Python2.5 I had to change the code slightly,
> Tim> because it already realized that the expression
>
> Tim> '%s' % 'something'
>
> Tim> will be a constant expression, and evaluates
kidding here of course)
NB: Your code now tests for address-equality. Does it also still test
for string-equality? It looks to me that it does, but it's not quite
clear to me.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
t disadvantage here. Printing the number of strings still
didn't help me catch the off-by-ten errors though.
I included a Java version of the program, and it looks like it performs
quite well compared to C++ both with jdk1.5 and jdk1.6.
I humbly apologize for my misinformation yesterday.
Regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Hi Isaac,
Isaac Rodriguez wrote:
> Hi,
>
> I am looking for feedback from people that has used or still uses
> Py2Exe. I love to program in python, and I would like to use it to
> write support tools for our development team, but I cannot require
> everyone to install python in their machines, so
oo. I
think you're quite right that it would be good if str() becomes a
proper constructor.
In practice, the short-term fix would be to add a __str__ method to the
'reversed' object, and perhaps to all iterators too (so that trying to
build a string from an iterator would do the obvious thing).
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Tim N. van der Leeuw wrote:
>
> > In practice, the short-term fix would be to add a __str__ method to the
> > 'reversed' object
>
> so what should
>
> str(reversed(range(10)))
>
> do ?
>
My idea was that reversed.__
one...
>
> I wander what a speling fanatic is?
>
Someone who fanatically installs mod_speling every time he/she installs
Apache httpd anywhere
> - Hendrik
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
possible to say this.
There's definately no rules in Python that allow you to 'abbreviate'
variable names.
Cheers,
--Tim
mateus wrote:
> print "hello world"
>
> I have a nested loop where the outer loop iterates over key value pairs
> of a dictionary and the inner l
Since your question is so much about Django, you might want to ask on
Django groups.
Oops, you're not welcome there anymore, almost forgot.
But if merely reading the subject of a posting I already know who's the
poster, it's perhaps a bad sign.
Further readers of this thread might be interested
-dimensional array does it have a length of 3? :-)
>
> --
> Greg
Against all zero of them... ;-)
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Anyone who can help? Are there any samples -- there's
supposed to be a 'Demo' directory but I can't find it in my (windows)
Python installation.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
I'm a bit more familiar already and
which I know has a multi-column tree good enough for me (and I found it
easy to add inline-editing too).
I don't know how good PyQT is on windows; other than that, in my
opinion PyGTK gives the best / most complete GUI for Python with
reasonable ease-o
I tried to create a windows executable of a pygtk program. My first
attempt worked, kinda, except that no themes were applied and no
readable fonts were found by pango; so all letters where just empty
squares. But the program worked.
I looked up some docs, found the following recipe on the PyGTK W
[EMAIL PROTECTED] wrote:
> Tim N. van der Leeuw ha scritto:
>
> > I tried to create a windows executable of a pygtk program. My first
> > attempt worked, kinda, except that no themes were applied and no
> > readable fonts were found by pango; so all letters where just em
inally' suite is totally defeating
the point of exceptions that you want thrown to the caller, yes. So
don't put your 'return' statement there.)
Clearer?
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
referenced before
assignment
>>>
This is entirely counter-intuitive to me, and searching the manual for
nested scoping rules and for augmented assignment rules, I still feel
that I couldn't have predicted this from the docs.
Is this an implementation artifact, bug, or should it real
it (which is what I do, following advice found on this list).
Good luck,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
replace the default-constructor of a particular so that custom
objects are created for that type.
OTOH, there are probably many more cases where doing so would be a very
bad idea, not a good idea, and we would begin seeing an overwhelming
number of cases of mis-use of such feature.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
omponents.
Anyways, modifiying SOAPpy might not be a bad idea: submit your changes
to the project, and you can write on your CV that you have contributed
to open-source projects! ;-)
I do hope for you that you will find something better to do than
pushing template-instances down a socket-hole.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
n a list only; if it enters
your program in the form of a string somehow then basically such
obfuscations seem very meaningless to me.
Perhaps the Python interpreter should be extended with a new C Type,
'secure_string', which clears all it's bytes before being freed. (Just
phantasiz
API 2.0), it is always
> zero.
>
> Anyone figured this out?
>
Hi,
It's of course strictly a PostgreSQL question, but have you tried
select lastval();
?
According to my reading of the postgress manuals, that should do the
trick.
Cheers,
--Tim
> Thanks.
ut you have to fiddle a bit with it (ask for details on this
list if you ever need to do that)
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
ble library. I believe some projects exist to
enable the latter, although I don't know of a URL.
Cheers,
--Tim
>
>
> Thanks & Regards,
> Sandip Desale
>
>
> --
>
> Search for products and services at:
> http://search.mail.com
--
http://mail.python.org/mailman/listinfo/python-list
that it fits very well what you and I would need: integration
of Java libraries into Python projects.
It does not, however, allow subclassing of Java classes in Python or
the other way round, and it does not allow calling of arbitrary Python
code from the JVM.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
s to behave like one...
It could for instance be a sub-class of Image, JpegImage, if that
better suits the class library designers.
In general, factory-functions allow greater uncoupling between
interface and implementation.
Regards,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
then I'll worry about porting it
later, if and when this program will ever have a need to run on a
Unix-like environment)
Many thanks in advance,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
Hi Magnus,
I get the filename from a URL, which probably is not in any kind of
unicode-string but just a plain ASCII string. It should be possible to
cast this to an ASCII string -- I'll try it right away to see if this
works.
Thanks!
--Tim
--
http://mail.python.org/mailman/listinfo/p
,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
ntion declarations on
the web.
Your gAllSupported can be a set(); you can then create the intersection
between gAllSupported and the function-names found by your regex.
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
ar", "baz"])
>>> found = wanted.intersection(name for name in r.findall(file_content))
>>> print found
set(['baz', 'foo', 'bar'])
>>>
Anyone who has an idea what is faster? (This dataset is so limited that
it doesn't make sense to do any performance-tests with it)
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
'A' Web Browser? Meaning: any random web-browser? Or specifically and
*only* Internet Explorer?
If you want it to work only and ever only in Internet Explorer, then
you can create a Python ActiveX object and embed that in your page;
using the pythonwin extensions.
Cheers,
--Tim
;, '>FGDG': 'sdfsdgffdgfdg', '>REWR': 'sfsdf'}
(I didn't try to time any of these solutions so I have no real idea
which is more efficient, but using iterators from the itertools-module
should in theory mean you create less temporary objects; especially
with large lists this can be a win)
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
ction that does sorting for anything iterable...
Cheers,
--Tim
--
http://mail.python.org/mailman/listinfo/python-list
7601 - 7700 of 7730 matches
Mail list logo