(self, now=None):
if not now:
import datetime
now = datetime.datetime.now()
.
That way you can feed it values when testing to validate the calculations
but leave it up to the datetime module to fill in the used value in
production.
--
Erik Jones
[EMAIL PROTECTED
grep
through
the folder to get a clue, which shows how poor the index is (to me)!
Then use one of the quick references here: http://rgruet.free.fr/.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere
)
is not asking if x is between 1 and 20 but, rather, if x is a member
of the values genereated by the range function with params 1 and 20.
So, yes, using range()
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere
to
accomplish what I'm going for?
Read up on the docs for the subprocess module.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
that and be glad to get a
hint.
Thanks in advance
That's when it stops being simple. You'll need to spawn threads or
fork off separate processes to do that.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere
think this is the
problem or am I going astray somewhere else?
Thank you very much in advance for any assistance,
James.
You shouldn't be using psycopg, it's not supported anymore. Use
psycopg2 which is in active development and has no dependecies on any
of the mx libraries.
Erik Jones
,
you should join one of the postgres mailing lists.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org
... print x
... noglobal(x) # ???
... x = 0# now this is local x
foo()
12345
print x
12345
Why would you need to do that? It would be confusing. Just use a
different variable name for the local.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401
or standard (as with a lot of MySQL).
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo/python
On Oct 25, 2007, at 10:12 AM, Jean-Paul Calderone wrote:
On Thu, 25 Oct 2007 09:46:54 -0500, Erik Jones [EMAIL PROTECTED]
wrote:
[snip]
Fortunately, in his case, that's not necessarily true. If they do
all their work with the same connection then, yes, but there are
other problems
If you're not Scott Daniels, beware that this conversation has gone
horribly off topic and, unless you have an interest in PostreSQL, you
may not want to bother reading on...
On Oct 25, 2007, at 9:46 PM, Scott David Daniels wrote:
Erik Jones wrote:
On Oct 25, 2007, at 7:28 AM, Scott David
there
since if
they didn't enter any input, the length of the list should just be
zero.
The exception is because you're not ensure that nums is ever
initialized.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations
/db.py, line 265, in
connect
import pgdb as db
ImportError: No module named pgdb
any thoughts would be greatly appreciated.
thanks,
doug
Apparently you don't have pgdb installed or it's path isn't in your
PYTHONPATH environment variable.
Erik Jones
Software Developer | Emma®
[EMAIL
condition of your update
query did not, in fact, match any existing rows in your table.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
be the same, but the
result is different.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo
On Oct 15, 2007, at 6:07 PM, Steven D'Aprano wrote:
On Mon, 15 Oct 2007 14:11:27 -0700, John Machin wrote:
On Oct 16, 12:47 am, Erik Jones [EMAIL PROTECTED] wrote:
Not between two consecutive reads, no. However, after any
resizing of
a dict the result of Python's hash function for any
window
manager is not X11-based. Fink can also install GTK+, etc. for you.
Other than that, most things should work as on Linux, more or less.
He doesn't need Fink for up to date Python version as os x binaries
are available from the www.python.org.
Erik Jones
Software Developer | Emma®
[EMAIL
On Oct 12, 2007, at 12:10 PM, Jean-Paul Calderone wrote:
On Fri, 12 Oct 2007 11:33:11 -0500, Erik Jones [EMAIL PROTECTED]
wrote:
[snip]
This got me thinking about building a module that could be included
by projects that creates a socket and responds to messages on that
socket
module in Paste to see what he does.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo
) of the failure(s) are printed to
stdout
(why not stderr? because stderr is a lame hack 0.2 wink), and the
final
line of output is Test failed..
What does he mean by stderr being a lame hack?
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma
that the database has way more tables
than you'd actually want to manually maintain model classes/files for.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http
On Oct 11, 2007, at 1:36 AM, Andreas Kraemer wrote:
On Oct 10, 9:00 pm, Erik Jones [EMAIL PROTECTED] wrote:
If you're sure that 1. this use case won't grow and 2. that you'll
only be the only person ever using code, then it's your choice of
preference. Both of those points are equally
On Oct 11, 2007, at 2:25 PM, Andreas Kraemer wrote:
On Oct 11, 10:17 am, Erik Jones [EMAIL PROTECTED] wrote:
No, duck typing and inheritance are two different things. Duck
typing is when you implement the same operations as another object or
class, whereas with inheritance you get the same
]
# make a list containing 11 - 99 odds only
big_odds = [x for x in list(xrange(100)) if x % 2 != 0 and x 9]
big_odds = range(11, 100, 2)
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market
'
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 10, 2007, at 6:40 PM, Andreas Kraemer wrote:
On Oct 9, 9:18 pm, Erik Jones [EMAIL PROTECTED] wrote:
So, do you not keep references to your nodes anywhere but the actual
graph dict? I kind of agree with Chris here in that two dicts will
work. One for the nodes, indexed
a . in a sentence as a form of address would be as
unintelligible as it has been in these two sentences.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online
object at 0x76c50: 'whatever for node
blah', __main__.Node object at 0x76d30: 'whatever for node foo'}
graph[nodes['foo']]'whatever for node foo'
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere
in the
context of graph algorithms etc., and it has always been a
delightful coding experience!
I can definitely see how this would be useful for the real world
example you mentioned for pruning trees and what-not.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401
' situation?
Because i *really* want to keep the FROM PACKAGE import B syntax.
http://www.python.org/doc/current/tut/
node8.html#SECTION00840
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere
and a method is called on it before it is bound which results in the
exception.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http
? These
things matter... :)
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo/python-list
. So, please,
quit. I'd prefer you didn't leave and, instead, decided to actually,
actively get along with the others here. I think some of the
question you've begun threads with have been both good and valid.
It's just that you need some work on your e-people skills, man.
Erik Jones
'exceptions.TypeError': argument of type 'bool' is not iterable
What's going on there?
That is weird. Given 270, what's happening in 268.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market
On Sep 27, 2007, at 12:29 PM, Erik Jones wrote:
On Sep 27, 2007, at 11:47 AM, Marc 'BlackJack' Rintsch wrote:
On Thu, 27 Sep 2007 09:33:34 -0700, koutoo wrote:
I tried writing a true and false If statement and didn't get
anything? I read some previous posts, but I must be missing
Utilities package: http://
pypi.python.org/pypi/Gnosis_Utils/1.2.1-a
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http
]
del l[1]
l
[1, 3]
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo/python-list
')
m2 == None
True
So, it matches 'def' but only if it is immediately preceded by 'abc'.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http
number strings with or without
a decimal point, try '\d*\.?\d*'
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http
.
What they are saying here is that they have built a highly optimizing
custom web server in C++ that services web requests for services of
applications written in any of the three listed languages. So, yes,
in this case it is what is often Apache in other installations.
Erik Jones
Software
On Sep 19, 2007, at 4:01 PM, TheFlyingDutchman wrote:
On Sep 19, 1:02 pm, Erik Jones [EMAIL PROTECTED] wrote:
is usually Apache at most sites?
No an http server and application server are two different things.
An http server services requests of a web server those requests can
be for static
if you step out of this particular
box, you'll realize that it really is a pointless one. Saying,
because that's how Python does it may be the only valid reason, but
that argument is about on par with a six year old's just because
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED
On Sep 15, 2007, at 8:56 AM, Arnau Sanchez wrote:
js escribió:
On 9/15/07, Summercool [EMAIL PROTECTED] wrote:
in Python... is the method to use ,.join() ? but then it must
take
a list of strings... not integers...
any fast method?
print ''.join([str(i) for i in [1,2,3]])
It's
'
IIRC, map's status as a builtin is going away.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman
where *some* defaulting behavior makes sense, but that's what
frameworks and DSLs are for.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http
):
head, tail = l[0], l[1:]
or,
front, last = l[:len(l) - 1], l[len(l) - 1]
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
you
could do something like (using the reverse iteration solution
mentioned in another reply):
for i in range(len(memlist) -1, -1, -1):
if memlist[[i].toHash() not in dblist:
del memlist[i]
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401
On Aug 12, 2007, at 7:44 AM, Viewer T. wrote:
and Yes, Python
has awesome database support and can satisfy almost all database
needs.
Wow. Nobody ever told me Python was *that* kind of language :)
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
the condition a max is not longer true in
the fibonacci function at which point the function will return
without yielding a value and the main loop (for n in ...) will
terminate.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma
Me! Did you just move here?
On Jul 20, 2007, at 10:22 PM, Patrick Altman wrote:
Anyone on this group writing Python code in Nashville, TN?
--
http://mail.python.org/mailman/listinfo/python-list
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
On Jul 16, 2007, at 1:31 AM, Erik Jones wrote:
On Jul 16, 2007, at 12:53 AM, Michele Simionato wrote:
On Jul 16, 7:18 am, Erik Jones [EMAIL PROTECTED] wrote:
On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote:
On Jul 16, 5:51 am, Erik Jones [EMAIL PROTECTED] wrote:
Say you're given
On Jul 16, 2007, at 12:53 AM, Michele Simionato wrote:
On Jul 16, 7:18 am, Erik Jones [EMAIL PROTECTED] wrote:
On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote:
On Jul 16, 5:51 am, Erik Jones [EMAIL PROTECTED] wrote:
Say you're given a call event frame for a method call. How can you
On Jul 16, 2007, at 3:37 AM, Gabriel Genellina wrote:
En Mon, 16 Jul 2007 03:56:18 -0300, Erik Jones [EMAIL PROTECTED]
escribió:
Perhaps an even better example of what I'm trying to do would be in
order (this is minus any exception handling):
import sys
def mytrace(frame, event, arg
On Jul 16, 2007, at 10:35 AM, Chris Mellon wrote:
On 7/16/07, Erik Jones [EMAIL PROTECTED] wrote:
On Jul 16, 2007, at 3:37 AM, Gabriel Genellina wrote:
En Mon, 16 Jul 2007 03:56:18 -0300, Erik Jones [EMAIL PROTECTED]
escribió:
Perhaps an even better example of what I'm trying to do would
on filesystem level
permissions.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps organizations everywhere communicate market in style.
Visit us online at http://www.myemma.com
--
http://mail.python.org/mailman/listinfo/python-list
Say you're given a call event frame for a method call. How can you
tell if the code being executed came from a super class of the object
or class the method was called on?
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.292.5888
615.292.0777 (fax)
Emma helps
On Jul 15, 2007, at 11:23 PM, Michele Simionato wrote:
On Jul 16, 5:51 am, Erik Jones [EMAIL PROTECTED] wrote:
Say you're given a call event frame for a method call. How can you
tell if the code being executed came from a super class of the object
or class the method was called on?
Erik
57 matches
Mail list logo