und like just what you've been looking for?
--
Martin Sand Christensen
IT Services, Dept. of Electronic Systems
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
I'm toying around with Pyramid and am using Mongo via MongoEngine for
storage. I'm new to both Pyramid and MongoEngine. For every test case in
the part of my suite that tests the data access layer I want to reload
the database from scratch, but it feels like there should be a better
and faster
breamore...@gmail.com writes:
> I was going to suggest mocking. I'm no expert so I suggest that you
> search for "python test mock database" and go from there. Try to run
> tests with a real db and you're likely to be at it until domesday.
Mocking is definitely the order of the day for most tests,
Nagy László Zsolt writes:
> We have a system where we have to create an exact copy of the original
> database for testing. The database size is over 800GB. [...]
That all sounds pretty cool, but it's precisely the opposite of what I'm
trying to acheive: keeping things as simple as possible. Snap
> But I can't figure out how I would solve the following:
>
> 1 Alice asks Sam for "foobar.iso"
> 2 Sam can't find "foobar.iso" in "cachedir"
> 3 Sam requests "foobar.iso" from uplink
> 4 Sam saves and forwards to Alice
> 5 At about 30 % of the download Bob asks Sam for "foobar.iso"
> 6 How do I se
> "gert" == gert <[EMAIL PROTECTED]> writes:
gert> Why doesn't this new style class work in python 2.5.1 ?
Whether you declare your class as a new style class or an old style
class, your code is completely and utterly broken. Calling non-existing
methods has never been a good way of getting t
> "Abandoned" == Abandoned <[EMAIL PROTECTED]> writes:
Abandoned> Yes i understand thank you. Now i find that maybe help the
Abandoned> other users.
Abandoned> import os
Abandoned> os.system("su postgres")
Abandoned> ...
I get the distinct impression that you're trying to replace simple shel
> "Abandoned" == Abandoned <[EMAIL PROTECTED]> writes:
Abandoned> I want to copy my database but python give me error when i
Abandoned> use this command. cursor.execute("pg_dump mydata > old.dump")
Abandoned> What is the problem ?
cursor.execute() is for executing SQL commands, and this is no
> "Grant" == Grant Edwards <[EMAIL PROTECTED]> writes:
Grant> Has anybody figured out how to do code folding of Python source
Grant> files in emacs?
I use outline-minor-mode with the following home baked configuration:
;; Python stuff for outline mode.
(defvar py-outline-regexp "^\\([
\t]*\\
> "inhahe" == inhahe <[EMAIL PROTECTED]> writes:
inhahe> Btw, use float() to convert a textual GPA to a number.
It would be much better to use Decimal() instead of float(). A GPA of
3.6001 probably doesn't make much sense; this problem
doesn't arise when using the Decimal type.
M
r project, the best thing to
do is generally to get something working on your own and then open up
for others when there's actually something to work on. And that means
that you should have a reasonably clear idea where you're going before
setting out.
Anyway, the best of luck to you!
--
Martin Sand Christensen
IT Services, Dept. of Electronic Systems
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
First a bit of context.
Yesterday I spent a lot of time debugging the following method in a
rather slim database abstraction layer we've developed:
,
| def selectColumn(self, table, column, where={}, order_by=[], group_by=[]):
| """Performs a SQL select query returning a single colum
> "Ian" == Ian Kelly <[EMAIL PROTECTED]> writes:
Ian> Isn't lazy evaluation sort of the whole point of replacing a list
Ian> with an iterator? Besides which, running up to the first yield when
Ian> instantiated would make the generator's first iteration
Ian> inconsistent with the remaining iter
> "Duncan" == Duncan Booth <[EMAIL PROTECTED]> writes:
[...]
Duncan> Now try:
Duncan>
Duncan>for command in getCommandsFromUser():
Duncan>print "the result of that command was", execute(command)
Duncan>
Duncan> where getCommandsFromUser is a greedy generator that reads from stdin,
around to releasing some code. :-)
As a slight aside, allow me to recommend Meld3 as a good templating
library. It's basically ElementTree with a lot of practical templating
stuff on top, so it's not a mini-language unto itself, and you don't
embed your code in the pag
e very little
experience with other frameworks than CherryPy, so I do not want to draw
any general conclusions. My programmer's instincts say that it's true,
though.
--
Martin Sand Christensen
IT Services, Dept. of Electronic Systems
--
http://mail.python.org/mailman/listinfo/python-list
16 matches
Mail list logo