Peter Otten wrote:
Maybe it's about access rights?
$ mkdir alpha
$ touch alpha/beta
$ python -c"import os; print os.path.exists('alpha/beta')"
True
$ chmod u-x alpha
$ python -c"import os; print os.path.exists('alpha/beta')"
False
$
I Don't know how this is handled on Windows...
Here's one w
On 2009-02-25, Diez B. Roggisch wrote:
> Don't waste time coding for a future you can't even pretend to
> know. Do what is needed to solve the actual problem.
Premature obfuscation is even worse than premature optimization.
--
Grant Edwards grante Yow! Well, O.K.
May a écrit :
On Feb 24, 10:36 am, "Diez B. Roggisch" wrote:
Thanks for all your suggestions. From what I've experienced in Django
and now that I know a little more about how Python functions, I will
probably use a combination of PHP and Django, instead of trying to get
Python to do the web po
On 24 fév, 18:34, Dario Traverso wrote:
> I've been trying to install the Python Image Library (PIL) on my Mac
> OSX Leopard laptop, but have been running into some difficulties.
>
> I've built the library, using the included setup.py script. The build
> summary checks out ok, and sounds the
i found the solution
This is my first attempt at memcaching html page using cheetah
since cheetah render needs locals() i use getCallerInfo() to get the
locals() and send to memcached
let me know if it is possible to better do this
*notice getCallerInfo
*
*utils.py*
@log_time_func
def renderpage(k
On Wed, 25 Feb 2009 15:54:46 -0500, Shawn Milochik wrote:
On Wed, Feb 25, 2009 at 3:15 PM, Diez B. Roggisch wrote:
Not really. The point about properties is that you *can* make attribute
access trigger getter or setter code.
But not that you do unless there is an actual reason for that. The
Tim Chase wrote:
> As an aside, as of the last time I read the PEP[1] on this, I
> believe it exhausts (or attempts to exhaust) any iterator. IMHO,
> I think this exhausting is a bad idea because it prevents things like
>
>def numbers(start=0):
> i = start
> while True:
>yi
I think Django is fabulous for the admin-interface, a simple text
search and template inheritance. I will use Django for all of those.
What I'm not getting an answer to and cannot find an example of is a
complex search, where I have to retrieve data from multiple tables,
combine the data, remove
for a introduction to the multitude of query-options. I doubt that your
rather simple m:n-relationship is covered there.
s/is/isn't/
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Feb 25, 2009 at 05:05:28PM -0200, Gabriel Genellina wrote:
> I'd try to move all the global stuff in that module into a function,
> "init". Importing the module will always succeed - you have to manually
> call init() after importing it.
i normally do that anyway and would also have do
Hello,
I created a QTextEdit where I wanted to display log messages.
A logging.Handler should do this job.
It worked with one thread well, but when I start a QThread the text on all
widgets is removed and I get many errors in my konsole:
X Error: RenderBadGlyphSet (invalid GlyphSet parameter) 1
On 26/02/2009 4:51 AM, Lorenzo wrote:
PS: Mark, this could be added to a kind of "Deployment" entry in
py2exe wiki, it would be useful.
IIRC, I've never edited the py2exe wiki (despite appearances to the
contrary sometimes, I don't formally maintain that package!).
But that is the cool thin
On Feb 25, 2009, at 3:20 PM, Vincent Davis wrote:
I have looked around for a good howto setup PYTHONPATH on Mac os x
10.5 Although I get many results I am not sure which is correct. I
am not
sure if it is different for 10.5 over previous versions. Does anyone
know of
a well documented set
On Feb 25, 10:18 am, Xah Lee wrote:
> On Feb 25, 3:34 am, nick_keighley_nos...@hotmail.com wrote:
>
> > the nasty cons then only appears in a single function which
> > you can hide in a library
>
> I think the following answers that.
>
> Q: If you don't like cons, lisp has arrays and hashmaps, too
On Wed, 25 Feb 2009 08:48:27 -, Bruno Desthuilliers
wrote:
Ben Finney a écrit :
(snip - about using ALL_CAPS for pseudo-constants)
Perhaps I'd even
argue for an update to PEP 8 that endorses this as conventional.
+1
I've been a bit surprised last time I checked PEP8 to find out this
En Wed, 25 Feb 2009 21:24:33 -0200, escribió:
On Wed, Feb 25, 2009 at 05:05:28PM -0200, Gabriel Genellina wrote:
I'd try to move all the global stuff in that module into a function,
"init". Importing the module will always succeed - you have to manually
call init() after importing it.
i nor
On Feb 24, 9:34 am, Dario Traverso wrote:
I've been trying to install the Python Image Library (PIL) on my Mac
OSX Leopard laptop, but have been running into some difficulties.
...
I've followed all of the installation instructions exactly. The build
summary reported everything was "ok". What c
On Feb 25, 2009, at 3:54 PM, Shawn Milochik wrote:
It is true that it would be fewer lines of code with the same
functionality, but it's better practice to have that framework in
place so that any changes made in the future wouldn't break any of the
code accessing my class. Obviously this is a fa
#
class MyError(Exception):
def __init__(self):
self.message = u'Some Chinese:中文'
def __str__(self):
return self.message.encode('utf8')
#
This is an exception that I defined.
Dictionaries just store references to objects, right? So is it thread
safe to lock a specific key/val pair on a dictionary and modify its
val and release the lock?
example snippet:
# assuming d_lock was initialized long ago in a thread-safe manner
d_lock.acquire()
d = {}
d[1] = (threading.Lock()
Thanks! All fixed!
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 26, 2:35 am, Emile van Sebille wrote:
> Peter Otten wrote:
> > Maybe it's about access rights?
>
> > $ mkdir alpha
> > $ touch alpha/beta
> > $ python -c"import os; print os.path.exists('alpha/beta')"
> > True
> > $ chmod u-x alpha
> > $ python -c"import os; print os.path.exists('alpha/beta
music24...@gmail.com wrote:
> On Feb 26, 2:35 am, Emile van Sebille wrote:
>> Peter Otten wrote:
>>> Maybe it's about access rights?
>>> $ mkdir alpha
>>> $ touch alpha/beta
>>> $ python -c"import os; print os.path.exists('alpha/beta')"
>>> True
>>> $ chmod u-x alpha
>>> $ python -c"import os; pri
I have to make some queries for 4 tables I have. The following
relations are:
Classes(class, type, country, numGuns, bore, displacement)
Ships (name, class, launched)
Battles (name, date)
Outcomes (ship, battle, result)
The three queries I'm stuck on are the following:
1. Find the classes that
On Feb 26, 9:03 am, Steve Holden wrote:
> music24...@gmail.com wrote:
> > On Feb 26, 2:35 am, Emile van Sebille wrote:
> >> Peter Otten wrote:
> >>> Maybe it's about access rights?
> >>> $ mkdir alpha
> >>> $ touch alpha/beta
> >>> $ python -c"import os; print os.path.exists('alpha/beta')"
> >>>
On Feb 26, 3:16 pm, music24...@gmail.com wrote:
> On Feb 26, 9:03 am, Steve Holden wrote:
>
>
>
> > music24...@gmail.com wrote:
> > > On Feb 26, 2:35 am, Emile van Sebille wrote:
> > >> Peter Otten wrote:
> > >>> Maybe it's about access rights?
> > >>> $ mkdir alpha
> > >>> $ touch alpha/beta
> >
Ha the guru himself responding :-)
--- On Wed, 25/2/09, Paul McGuire wrote:
> From: Paul McGuire
> Subject: Re: XML Parsing
> To: python-list@python.org
> Date: Wednesday, 25 February, 2009, 2:04 PM
> On Feb 25, 1:17 am, hrishy
> wrote:
> > Hi
> >
> > Something like this
> >
>
> >
> > Note i
Hi Cliff
Thanks so using elementree is the right way to handle this problem
regards
Hrishy
--- On Wed, 25/2/09, J. Clifford Dyer wrote:
> From: J. Clifford Dyer
> Subject: Re: XML Parsing
> To: hris...@yahoo.co.uk
> Cc: python-list@python.org, "Lie Ryan"
> Date: Wednesday, 25 February, 2009
mmcclaf wrote:
I have to make some queries for 4 tables I have. The following
relations are:
Classes(class, type, country, numGuns, bore, displacement)
Ships (name, class, launched)
Battles (name, date)
Outcomes (ship, battle, result)
The three queries I'm stuck on are the following:
1. Find
+1 for site packages and standard shebang, still lets you launch with
python first followed by .py file or followed by .py file
also for some clues, just open up a terminal in your Mac OS X computer
and check out your exports your PATH will be different depending on
all the software and developme
Hi,
I have a problem with setting a property to a class instance, in
python 2.5.1. The property is defined through get and set methods, but
when I set it, the setter doesn't get called. Instead, I believe the
property in the instance gets replaced with a new object (string).
I have the following
Dan Barbus schrieb:
> Hi,
>
> I have a problem with setting a property to a class instance, in
> python 2.5.1. The property is defined through get and set methods, but
> when I set it, the setter doesn't get called. Instead, I believe the
> property in the instance gets replaced with a new object
101 - 132 of 132 matches
Mail list logo