--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I am trying to convert a dictionary to a unicode string and it fails
with an exception. I am awfully surprised but searching the web has
not turned up anything useful. I understand why the exception ocurrs,
but am not sure why this is the default behaviour of python and if
there is anythin
"i had once considered you one of the foremost intelligent minds
within this group. However, after your display within this thread i am
beginning to doubt my original beliefs of you."
"Oh ... grow a spine already, really. I can't help but thinking of the
spineless Robert Ford every time you open y
On 19 February 2010 08:07, Mark Lawrence wrote:
> Muhammad Alkarouri wrote:
>>
>> Your question is borderline if not out of topic in this group. I will
>> make a few comments though.
>
> This might be a Python group, but threads often drift way off topic, which
> added to the language itself make
>
> Anyway, for simple web programming, frameworks are not worth the
> hassle. Just use the cgi module.
>
>
I can vouch for what Paul says. I started in Python 3 years ago, and I did
so with a web application (still working on it!). I'm using the cgi
approach, and it certainly teaches you the conc
Speaking of itch, that's exactly the phrase Eric Steven Raymond uses
for the same purpose in his famous essay: "Cathedral and the Bazaar"
(http://www.catb.org/~esr/writings/cathedral-bazaar/). Someone
Something, you should read this essay first, before anything else.
Cheers,
Brend
>
>
> The interface really should be configurable by the user according to their
> needs. The code doesn't need to *know* the position or dimensions of
> a widget, or its label or colour or spacing, let alone dictate them.
>
Perhaps...but the user needs a framework in order to understand the
funct
ot;1234"
cookies['test']['expires'] = 3600
#Save cookie:
print cookies['test']
#Now print HTML:
printHeader()
print "Cookie created."
print ""
<<<<<<<<<<<<<<<<<<&l
> On IDE's, I'm afraid I'm not going to be much help because I don't use
> them. I prefer to use a decent editor (Emacs in my case, others have
> their own preferences) and run my scripts from the command line. That
> said, IDLE (which comes packaged with Python) is a perfectly decent
> little ID
ferent. You will most likely need a
firm understanding of HL7 v2 and 3, XML, XSL (and probably web
services) etc.
In terms of cross platform, in the health context it's pointless being
anything other than a web application (IMHO).
Cheers,
Brendon
2009/4/15 Deep_Feelings :
> I wan
Since when should a machine (that's what a computer is after all), be
forced to contort itself into something that is capable of reflecting
the laws of physical matter?
Better perhaps to look at it from another angle - it's
counter-intuitive to think that the digital should mirror the
analogue. Th
nt *backupfile* I will get
the expected result, but when I'm going through CGI (the script, called from
a web browser, is supposed to capture the output into the variable) nothing
is being returned by communicate().
Is this possible? Or am I barking up the wrong tree?
Cheers,
Brendon
--
http
expected result, but when I'm going through CGI nothing is being
returned by communicate().
Is this possible? Or am I barking up the wrong tree?
Cheers,
Brendon
--
http://mail.python.org/mailman/listinfo/python-list
> If only the main thread can receive KeyboardInterrupt, is there any
> reason why you couldn't move the functionality of the Read thread into
> the main thread? It looks like it's not doing any work, just waiting
> for the Proc thread to finish.
>
> You could start the Proc thread, do the current
I tested this a bit more. My windows example was incorrect. It should
have used CTRL_C_EVENT. But even then, the problem is that the process
will also close the console window from which it was called because of
the 0. Also this requires that the process actually have a console and
is not a GUI app
I tested this a bit more. My windows example was incorrect. It should
have used CTRL_C_EVENT. But even then, the problem is that the process
will also close the console window from which it was called because of
the 0. Also this requires that the process actually have a console and
is not a GUI app
> I don't know the "standard" way, but perhaps you can get some ideas from
> this recent
> thread:http://groups.google.com/group/comp.lang.python/browse_thread/thread/...
>
I had a quick read through that thread. I think i will need some more
time to think about what they are saying in there thou
s to only be recieved by the main
thread. Is this ALWAYS the case across all UNIX + windows platforms
(not so worried about others)?
* Can i somehow get the Proc thread to force the Read thread to
generate a KeyboardInterrupt or somehow exit its blocking "for line in
fin:" call?
Th
Gabriel Genellina wrote:
> En Sun, 01 Apr 2007 01:35:59 -0300, Brendon Costa <[EMAIL PROTECTED]>
> escribió:
>
>> How do i convert a _node* object returned from:
>> PyParser_SimpleParseStringFlagsFilename()
>>
>> into a code obje
gsFilename()
into a code object i can use as a module to import with:
PyImport_ExecCodeModule()
I cant seem to find any documentation about this. If you are wondering
why i want to do this, then you can read on and maybe there is a much
better way to achieve what i am after.
Thanks,
Brendon
at certain files? At the
moment I'm trying to get it to avoid the ones that contain 'import wx'.
Thanks,
Brendon
--
http://mail.python.org/mailman/listinfo/python-list
s of the "Why don't destructive sequence operations
return the sequence?" thread.)
I think I'd probably prefer:
def cons(a,b):
res = [a]
res.extend(b)
return res
because cons is supposed to leave its second argument untouched.
B.
--
Brendon Towle, PhD
Cog
On 28 Sep 2006, at 8:05 AM, [EMAIL PROTECTED] wrote:
> From: Bruno Desthuilliers <[EMAIL PROTECTED]>
> Subject: Re: Questions on Using Python to Teach Data Structures and
> Algorithms
> To: python-list@python.org
>
> Brendon Towle wrote:
>> Some of your Li
return structure[1]
should be:
return structure[1:]
B.
--
Brendon Towle, Ph.D. <[EMAIL PROTECTED]> +1-412-362-1530
“Debugging is twice as hard as writing the code in the first place.
Therefore,
if you write the code as cleverly as possible, you are, by
definition, not
smart
Essentially, I'm looking for a Python equivalent to the ObjectiveC stuff that
can be found at:
http://developer.apple.com/documentation/UserExperience/Conceptual/AddressBook/index.html
Google got me that far, but was not particularly helpful past that.
Anyone have any pointers?
B.
--
http:
vals is a sequence of probabilities that should sum to 1
> (however, the
> last element is always assumed to account for the remaining
> probability
> as long as sum(pvals[:-1]) <= 1).
Here, I'm torn. I do want the code to be accessible to non-stats
people
On 12 Sep 2006, at 6:33 PM, [EMAIL PROTECTED] wrote:
> Date: 12 Sep 2006 15:23:51 -0700
> From: "Simon Forman" <[EMAIL PROTECTED]>
> Subject: Re: Random Drawing Simulation -- performance issue
>
> Brendon Towle wrote:
>> I need to simulate scenarios like th
"""
res = [[0, item[1]] for item in population]
mapping = []
for i in xrange(len(population)):
mapping.extend([i]*population[i][0])
for i in xrange(count):
index = random.choice(mapping)
res[index][0] += 1
return res
lib.SMTP(host)
if auth:
server.login('username', 'password')
outMessage = 'From: %s\rTo: %s\rSubject: %s\r%s' %
(FROM_HEADER, TO_HEADER, subject, body)
server.sendmail(fromAddr, toAddr, outMessage)
If this doesn't wo
Message: 3 Date: Fri, 25 Aug 2006 15:28:46 +0200 From: "Fredrik Lundh" <[EMAIL PROTECTED]> Subject: Re: Consistency in Python Brendon Towle wrote: So, my question is: Someone obviously thought that it was wise and proper to require the longer versions that I write above. Why? a
lst.append(INVARIANT) lst.sort() return lst[:n]So, my question is: Someone obviously thought that it was wise and proper to require the longer versions that I write above. Why?B. -- Brendon Towle, PhDCognitive Scientist+1-412-690-2442x127Carnegie Learning, Inc.The Cognitive Tutor Company
... temp.append(t[3*y+x])... outlist.append(temp)>>>outlist[['a', 'n', 't'], ['b', 'a', 't'], ['c', 'a', 't']] -- Brendon Towle, PhDCognitive Scientist+1-412-690-2442x127Carnegie Learning, Inc.The Cognitive Tutor Company ®Helping over 375,000 students in 1000 school districts succeed in math. --
http://mail.python.org/mailman/listinfo/python-list
On 10 Aug 2006, at 10:46 AM, [EMAIL PROTECTED] wrote: Brendon> A shortcut occurs to me; maybe someone can tell me what's wrong Brendon> with my reasoning here. It seems that any string that is unsafe Brendon> to pass to eval() must involve a function call, and thus m
Oops -- I missed the subject line on my last post.On 10 Aug 2006, at 9:41 AM, [EMAIL PROTECTED] wrote: Brendon> Seems that parsing negative numbers is outside of the scope of Brendon> this routine. Here's the source (which is Frederik's source Brendon> with one minor
Date: Thu, 10 Aug 2006 08:51:12 -0400From: Brendon Towle <[EMAIL PROTECTED]>Subject: Re: Eval (was Re: Question about using python as a scripting language) Date: 9 Aug 2006 14:12:01 -0700From: "Simon Forman" <[EMAIL PROTECTED]>Subject: Re: Eval (was Re: Question about using
posted a great piece of code to parse a subset of pythonsafely:http://groups.google.ca/group/comp.lang.python/browse_frm/thread/8e427c5e6da35c/a34397ba74892b4eThis, as it turns out, was the most helpful pointer of them all -- thanks!B. -- Brendon Towle, PhDCognitive Scientist+1-412-690-2442x127Carn
On 9 Aug 2006, at 12:03 PM, [EMAIL PROTECTED] wrote: Brendon> I could do that, or I could do something like the re.* trick Brendon> mentioned by another poster. But, doesn't it offend anyone else Brendon> that the only clean way to access functionality that's already
ke the re.* trick mentioned by another poster. But, doesn't it offend anyone else that the only clean way to access functionality that's already in Python is to write long complicated Python code? Python already knows how to extract a list object from a string; why should I have to rewr
this is from memory, and the code actually works.)My question is: what's the safe way to do this?B. -- Brendon Towle, PhDCognitive Scientist+1-412-690-2442x127Carnegie Learning, Inc.The Cognitive Tutor Company ®Helping over 375,000 students in 1000 school districts succeed in math. --
http://mail.python.org/mailman/listinfo/python-list
39 matches
Mail list logo