On 2010-12-05, Paul Rubin wrote:
> Tim Harig writes:
>> A friend was trying to derive a mathematical formula for determining
>> the possibly distribution of results from rolling arbitrariy numbers
>> of m n-sided dice
>
> http://en.wikipedia.org/wiki/Multinomial_distribution
I sure he redisc
On Sun, 05 Dec 2010 04:13:02 +, Tim Harig wrote:
> Anything it is an obvious
> error *should* throw an exception.
Well, maybe... there are good use-cases for returning a sentinel. E.g.
str.find, or the use of quiet NANs in IEEE floating point and decimal
maths.
NANs and INFs in floating po
Tim Harig writes:
> A friend was trying to derive a mathematical formula for determining
> the possibly distribution of results from rolling arbitrariy numbers
> of m n-sided dice
http://en.wikipedia.org/wiki/Multinomial_distribution
> To generate a listing of all (non-uniq) possible roles,
On 2010-12-05, Tim Harig wrote:
> Another, questionable but useful use, is to ignore the complex accounting
> of your position inside of a complex data structure. You can continue
> moving through the structure until an exception is raised indicating
> that you have reached a boundary of the stru
On 12/4/10 3:43 PM, Jorge Biquez wrote:
I do not see a good reason for not using Sqlite3 BUT if for some reason
would not be an option what plain schema of files would you use?
Would shelve work?
--
http://mail.python.org/mailman/listinfo/python-list
On 2010-12-05, Harishankar wrote:
>> Or consider this code:
>>
>> if y != 0:
>> result = x/y
>> else:
>> handle_division_by_zero()
>>
>>
>> This is also unsafe unless you know the type of y. Suppose y is an
>> interval quantity that straddles zero, then division by y may fail even
>> th
robos85 wrote:
>
>Hi, I try to enlarge original image.
>I have image in size: 100x100 and I want to make it 120x120.
>But resize() doesn't make it bigger. Is there any method for that?
"resize" does not change the image. Instead, it returns the resized image.
If you don't need the original any m
INVITATION TO AN INFORMATION FOR GROUP (...)
BUSINESS ADS (ANNOUNCEMENTS)
http://nettengelir.blogspot.com/
___
ONLINE NEWS
SYSTEMS
THAT'S REPLY ...
http://nettengelir.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 4, 4:49 pm, Barb Knox wrote:
> In article
> <46365e1d-42d8-4b3b-8e69-941472467...@u25g2000pra.googlegroups.com>,
> small Pox wrote:
>
> > Rules :
>
> No need to add any additional hurdles -- the code as presented is
> thoroughly unreadable by humans.
>
> > @1@ No execution of the functio
On Sun, 05 Dec 2010 01:59:27 +, Steven D'Aprano wrote:
> Of course, this is mainly of theoretical concern. In practice, "Look
> Before You Leap" (test first, then process) is often fine. But there are
> traps to look out for. For example, unless you are running a single-
> process machine, the
Hello all.
Understood perfectly.
Will forget other alternatives. Sqlite3 is the
best option. Thanks for the explanation and time.
Sqlite for single user and Postgresql will be the choice.
Thanks all.
Take care
Jorge Biquez
At 06:01 p.m. 04/12/2010, you wrote:
Jorge Biquez writes:
> I d
On Sat, 04 Dec 2010 17:07:45 +, Harishankar wrote:
> I find a bit cumbersome
> that exceptions are advocated for certain conditions which can be sanely
> worked around in the application's logic and even avoided, rather than
> waiting for them to get caught and providing an unsatisfactory resu
On 12/4/2010 12:07 PM, Harishankar wrote:
Of course not. But going by the replies here, it appears that Python has
made exceptions as the "norm" for error handling which is ironical
considering the meaning of the word "exception".
In communications parlance, 'exception' = out-of-band signal or
As a suggestion, you can auto-format your email link so that the email of
the user is sent as part of the URL GET argument.
Cheers,
Xav
On 5 December 2010 08:15, Zeynel wrote:
> Hello,
>
> I am working with Google App Engine python version. The app sends an
> email to the user with a link to a
In case you missed it, SunLisp is debuting on Pearl Harbor Day
(December 7th) at 7PM.
It's been added to the Lisp Meetings Calendar as well.
Who: His Kennyness, his CIO Dan (can you say "Lisp jobs"? Sher ya can)
and a notable group of Lispers doing a nice project in FL and anyone
who cares to joi
Hello,
I am working with Google App Engine python version. The app sends an
email to the user with a link to a page to upload an image as an
avatar. It would be nice to have the email so that I can associate the
avatar with that email. How can I do this? Thank you.
--
http://mail.python.org/mailm
Jorge Biquez writes:
> I do not see a good reason for not using Sqlite3 BUT if for some
> reason would not be an option what plain schema of files would you
> use? I am sorry to insist.
SQLite stores the entire database in a single file. Does that answer the
question? I'm not sure I understa
After many curse words I figured it out. A two-stage filter was
needed. The 5th line solves the problem of colliding domain cookies:
NowCookie=http.cookies.SimpleCookie() # Instantiate a SimpleCookie
object
savedCookie=os.environ.get('HTTP_COOKIE') # get the cookie string
if savedCookie: # Alread
On Dec 4, 6:43 pm, Jorge Biquez wrote:
> At 05:02 p.m. 04/12/2010, you wrote:
>
>
>
> >Jorge Biquez writes:
>
> > > Hello all.
>
> > > Newbie question. Sorry.
>
> > > As part of my process to learn python I am working on two personal
> > > applications. Both will do it fine with a simple structur
At 05:02 p.m. 04/12/2010, you wrote:
Jorge Biquez writes:
> Hello all.
>
> Newbie question. Sorry.
>
> As part of my process to learn python I am working on two personal
> applications. Both will do it fine with a simple structure of data
> stored in files. I now there are lot of databases arou
On Sat, Dec 4, 2010 at 5:42 PM, Jorge Biquez wrote:
> Newbie question. Sorry.
If it isn't you're on the wrong list :)
> training so no pressure on performance). One application will run as a
> desktop one,under Windows, Linux, Macintosh, being able to update data, not
> much, not complex, not ma
I use sqlite3, it is fairly simple, fast and not too strict.
-- Gnarlie
--
http://mail.python.org/mailman/listinfo/python-list
Jorge Biquez writes:
> Hello all.
>
> Newbie question. Sorry.
>
> As part of my process to learn python I am working on two personal
> applications. Both will do it fine with a simple structure of data
> stored in files. I now there are lot of databases around I can use but
> I would like to know
On Dec 4, 2010, at 2:32 PM, D'Arcy J.M. Cain wrote:
> On Sat, 4 Dec 2010 19:12:08 +
> starglider develop wrote:
>> I need to backup a postgresql database from python withour using pg_dump!
>> Is any way of doing that?
>
> Probably. I guess the first question is why can't you use pg_dump?
>
Hello all.
Newbie question. Sorry.
As part of my process to learn python I am working on two personal
applications. Both will do it fine with a simple structure of data
stored in files. I now there are lot of databases around I can use
but I would like to know yoor advice on what other option
Here’s the details of a job opportunity I may have for any of you or
someone you may know. Below is the job description. Please send me a
copy of your resume in word format and state the best time I can give
you a call. Please feel free to pass it on to anyone whom you think
may fit in the profile
In article
<46365e1d-42d8-4b3b-8e69-941472467...@u25g2000pra.googlegroups.com>,
small Pox wrote:
> Rules :
No need to add any additional hurdles -- the code as presented is
thoroughly unreadable by humans.
> @1@ No execution of the function, only checking syntax
What about "desk checking"
On 04/12/2010 21:13, Gnarlodious wrote:
What you posted doesn't work, I don't know why. All I get is a blank
page and no Apache error report.
There are two problems with this. I am really trying to figure out how
to trap an error on the server without exposing my innards to the
world, which impo
What you posted doesn't work, I don't know why. All I get is a blank
page and no Apache error report.
There are two problems with this. I am really trying to figure out how
to trap an error on the server without exposing my innards to the
world, which import cgitb; cgitb.enable() does. The other p
>
> Yeah, riiight. So it's a crime to have any fun in life, right? Go get
> a life.
>
> -- Benjamin L. Russell
+1
--
http://mail.python.org/mailman/listinfo/python-list
On 04/12/2010 18:33, Gnarlodious wrote:
I have a serious error that causes the process to crash. Apache
refuses to log the error and it only happens on the server, not on the
dev machine. Problem is, I can't figure out how to get the most recent
error. I can find all sorts of pages telling how to
I've sometimes got similar situations in CGI, that turned out to be
because of a syntax error that kept apache from being able to run the
script. What if you just run the script at the command line? It
should either error out due to lack of a CGI environment/arguments,
but hopefully it'll give yo
On Sat, 4 Dec 2010 19:12:08 +
starglider develop wrote:
> I need to backup a postgresql database from python withour using pg_dump!
> Is any way of doing that?
Probably. I guess the first question is why can't you use pg_dump?
That might give us a clue as to the requirements. Any other deta
Hi,
I need to backup a postgresql database from python withour using pg_dump!
Is any way of doing that?
Thank you in advance for your help.
Zorze
--
http://mail.python.org/mailman/listinfo/python-list
small Pox writes:
>> > Gábor wrote a blog about it
>> > herehttp://quotenil.com/Planet-Wars-Post-Mortem.html
>
> http://presstv.ir/detail/153770.html
>
> It is said in the protocols to corrupt the minds of the GOYIM by
>
> alcohol
> gambling
> games <-
> pornography
> adulteries
I have a serious error that causes the process to crash. Apache
refuses to log the error and it only happens on the server, not on the
dev machine. Problem is, I can't figure out how to get the most recent
error. I can find all sorts of pages telling how to print a specific
error, but how to get an
On Sat, 4 Dec 2010 17:07:45 + (UTC)
Harishankar wrote:
> Of course not. But going by the replies here, it appears that Python has
> made exceptions as the "norm" for error handling which is ironical
> considering the meaning of the word "exception". I find a bit cumbersome
> that exceptions
> You appear to be suffering from the delusion that all exceptions must be
> caught and handled. This is far from being the case. But still, better
> to have your top-level code "littered with exception handlers" than to
> have your functions "littered with if statements".
Of course not. But going
On 12/2/2010 11:42 PM, Harishankar wrote:
> One of the reasons why I feared to do this is because I need to know each
> and every exception that might be thrown by the function and litter my
> top-level code with too many exception handlers.
>
You appear to be suffering from the delusion that al
I am working on a tool that can create an application like that without
write server code, but the system is write in Python3.1
On Dec 4, 2010 9:32am, Virgil Stokes wrote:
I would like to design a web site that can be used to help
people to find a cat
that they can adopt. Note, this is
On Sat, 04 Dec 2010 15:00:43 +0100, Omar Abo-Namous wrote:
>>> I think this behaviour is totally wrong, since it seems
>>> A.__init__(self) is changing the value inside of A() not inside of the
>>> object variable 'self' (that should be x or y)!!
>> It's not wrong at all. You expect "mylist" to b
Am 03.12.2010 23:11, schrieb Arnaud Delobelle:
OAN writes:
Hi,
i was having a problem with class attributes initiated outside of
__init__. This code is a demonstration of what i mean:
class A():
mylist = []
def __init__(self):
self.mylist.append(1)
pass
class B(A
I would like to design a web site that can be used to help people to find a cat
that they can adopt. Note, this is a non-profit project, but one that I
believe to be quite important. Here are some of my initial thoughts on this
project.
/Site purpose:/
*To provide a web site for anyone to look
robos85 writes:
> Hi, I try to enlarge original image.
> I have image in size: 100x100 and I want to make it 120x120.
> But resize() doesn't make it bigger. Is there any method for that?
You have to use i.transform()
-- Alain.
--
http://mail.python.org/mailman/listinfo/python-list
goldtech wrote:
> I tried install a Python - would the word be "package"? - on Ubuntu
> 10.10. Could you tell me how to fix? I would be grateful, is it a path
> problem? Thanks. Lee
If you are talking about http://paul.giannaros.org/pykhtml/ , this package
requires kde3 while you are /probably/
Hi, I try to enlarge original image.
I have image in size: 100x100 and I want to make it 120x120.
But resize() doesn't make it bigger. Is there any method for that?
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 3, 5:05 pm, de...@web.de (Diez B. Roggisch) wrote:
> erikj writes:
> > If my understanding is correct, the sys.prefix variable holds the root
> > directory python uses to find related files, and eg its site-packages.
>
> > the value of sys.prefix is specified at compile time.
>
> > it seems
47 matches
Mail list logo