> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Antoon
Pardon
> Sent: Tuesday, April 24, 2007 7:40 AM
> To: python-list@python.org
> Subject: Re: Tutorial creates confusion about slices
>
> On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> w
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of gtb
> Sent: Thursday, April 26, 2007 1:50 PM
> To: python-list@python.org
> Subject: Re: Python keywords
>
> On Apr 26, 10:16 am, Larry Bates <[EMAIL PROTECTED]> wrote:
> > http://docs.python.or
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of spohle
> Sent: Monday, April 30, 2007 10:03 AM
> To: python-list@python.org
> Subject: Re: import structures
>
> On Apr 30, 8:00 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> > On Apr 30, 9:56 a
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of spohle
> Sent: Monday, April 30, 2007 10:25 AM
> To: python-list@python.org
> Subject: Re: import structures
>
> On Apr 30, 8:16 am, "Hamilton, William " <
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Robert
Rawlins -
> Think Blue
> Sent: Monday, April 30, 2007 6:09 AM
> To: 'Tim Golden'
> Cc: python-list@python.org
> Subject: RE: Dict Copy & Compare
>
> On quick question, how can I order a d
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of John Nagle
> Sent: Monday, April 30, 2007 7:32 PM
> To: python-list@python.org
> Subject: Re: re-importing modules
>
> [EMAIL PROTECTED] wrote:
>
> >>In addition to the warning that reload() do
> -Original Message-
> From: Steven D'Aprano
> Sent: Monday, April 30, 2007 10:14 PM
> To: python-list@python.org
> Subject: RE: Dict Copy & Compare
>
> On Mon, 30 Apr 2007 12:50:58 -0500, Hamilton, William wrote:
>
> >> On quick question, h
> -Original Message-
> From: Chris
> Subject: Re: Strange terminal behavior after quitting Tkinter
application
> Clicking 'Quit' or on the window's 'x' causes the application to quit
> without messing up the terminal. With root.mainloop() commented out,
> though, no combination of root.quit
> -Original Message-
> From: [EMAIL PROTECTED]
>
> On May 4, 5:02 am, Jaswant <[EMAIL PROTECTED]> wrote:
> > This is a simple way to do it i think
> >
> > s=hello
> >
> > >>> if(len(s)==0):
> >
> > ... print "Empty"
> > ... else:
> > ... print s
> > ...
> > hello
>
> But you are
> From: Chris
> > I'll admit to being surprised at seeing a claim that a
tkinter
> > application, started within an interactive session, without a
mainloop,
> > even runs... I could see it maybe happening from Idle, since Idle is
> > running a tkinter mainloop, so the application bindings m
> From: Bjoern Schliessmann
> Sounds more familiar than the analog approach. Maybe I misunderstood
> something ... but I can't transfer my problem to this way of
> thinking yet. My biggest problem is the fact that relays aren't
> really interested in voltage, but current.
>
> Also, I find it diffi
> From: Alan Isaac
>
> I'm sure my first pass will be flawed, but here goes:
>
> http://docs.python.org/lib/typesmapping.html:
> to footnote (3), add phrase "which may depend on the memory location of
> the
> keys" to get:
>
> Keys and values are listed in an arbitrary order,
> which may
> From: [EMAIL PROTECTED]
>
> Hi
>
> I try to check whether a given input is keyword or not. However this
> script won't identify keyword input as a keyword. How should I modify it
> to make it work?
>
> #!usr/bin/env python
> import keyword
>
> input = raw_input('Enter identifier to check >> '
> From: [EMAIL PROTECTED]
> F:\Ohjelmat\Python25\Lib\keyword.pyc
That's your problem. Rename keyword.py to keywordcheck.py, and delete
keyword.pyc in this directory, and it should work fine.
---
-Bill Hamilton
--
http://mail.python.org/mailman/listinfo/python-list
> From: Beliavsky
On May 15, 1:30 am, Anthony Irwin <[EMAIL PROTECTED]> wrote:
>
>
>
> > #5 someone said that they used to use python but stopped because the
> > language changed or made stuff depreciated (I can fully remember
> > which) and old code stopped working. Is code written today likely
> From: [EMAIL PROTECTED]
>
> Hi,
> When I call tkFileDialog.askopenfilename() , the dialog box opens with
> the current directory as the default directory. Is it possible to open
> the dialog box with a directory other than the current directory. Can
> we pass in a user defined starting director
> From: Eric Brunel
On Thu, 17 May 2007 09:30:57 +0200, Hendrik van Rooyen
> <[EMAIL PROTECTED]> wrote:
> > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> >> En Wed, 16 May 2007 03:22:17 -0300, Hendrik van Rooyen
> >>> I have never seen this working in Tkinter, unless the button was
> >>> presse
> From: Tartifola
> Hi,
> I have a list with probabilities as elements
>
> [p1,p2,p3]
>
> with of course p1+p2+p3=1. I'd like to draw a
> random element from this list, based on the probabilities contained in
> the list itself, and return its index.
>
> Any help on the best way to do that?
> Tha
> From: John Machin
> On 21/05/2007 11:30 PM, Konrad Hinsen wrote:
> > I am trying to install Python from sources in my home directory on a Mac
> > cluster (running MacOS X 10.4.8). The path to my home directory contains
> > a blank, and since the installation procedure insists on getting an
> > ab
> From: king kikapu
>
> Hi,
>
> i have a problem with the following piece of code that id just drive
> me nuts (from the morning...)
> I think is more Python specific than Qt, folks from Qt forum have
> already give me directions of how to do it but that Python error
> message is just impossible
william dy
christin de los santos
lynor laxina
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news,
photos & more. --
http://mail.python.org/mailman/listinfo/python-list
Is the different behavior between __repr__ and __str__ intentional
when it comes to printing lists? Basically I want to print out a list
with elements of my own class, but when I overwrite __str__, __str__
doesn't get called but if I overwrite __repr__, __repr__ will get
called. Is this a bug?
F
oh okay. thanks.
--
http://mail.python.org/mailman/listinfo/python-list
> From: Warren Stringer
> Hmmm, this is for neither programmer nor computer; this is for a user. If
> I
> wanted to write code for the benefit for the computer, I'd still be
> flipping
> switches on a PDP-8. ;-)
>
> This is inconsistent:
>
> why does c[:][0]() work but c[:]() does not?
> Why does
> From: Jim
> Hi,
> I'm looking at page 548 of Programming Python (3rd Edition) by Mark
> Lutz.
> The following GUI script works with no problem, i.e., the rows and
> columns expand:
> =
> # Gridded Widgets Expandable page 548
>
> fro
> From: Joshua J. Kugler
>
> I am getting results like these with the time module:
>
> >>> import time
> >>> int(time.mktime(time.strptime('2007-03-11 02:00:00', '%Y-%m-%d
%H:%M
> %S')))
> 1173610800
> >>> int(time.mktime(time.strptime('2007-03-11 03:00:00', '%Y-%m-%d
%H:%M
> %S')))
> 1173610800
> From: Lee Fleming
>
> On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> Because when the function is called, the line
>
>
> > if y is None: y = []
>
>
> is executed, binding a brand new empty list to y. This
> "rebinding" happens every time the function is called, unless you
> From: Lee Fleming
> On Aug 6, 12:30 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote:
> > When you call f(23), the variable y within it gets created and
points at
> > None. When f(23) exits, the y that it created gets destroyed.
(Well,
> > goes ou
> From: [EMAIL PROTECTED]
> >
> > How could it not be an exception, in the plain English sense of the
> > word? Most certainly you're asking for the index because you want to
do
> > something with the index. If the item is not found, you have no
index,
> > so that's a special case that must be hand
> From: imageguy
>
> We are trying to implement a system that checks the version of the
> application against a version number stored in the database. We don't
> want the app and the db don't become out of sync.
>
> We have tried setting a __version__ variable in the top most module,
> however,
> From: Chris
>
> I'm trying to create an excel file which will act as a log, however I
> want to overwrite the file if it exists.
>
> Looking at the SaveAs method I can't find anything that would allow
> it. I don't want the prompt to appear to ask whether to replace the
> file or not. I just wa
> From: Steve Holden
> Neil Cerutti wrote:
> > On 2007-09-10, Chris Mellon <[EMAIL PROTECTED]> wrote:
> >> On 9/10/07, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> >>> Agreed; but I prefer 'if y[0] == ""', absent more context and
> >>> better names.
> >> Probably should use u"" if you're going to take
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, September 11, 2007 8:26 AM
> To: python-list@python.org
> Subject: Re: newbie: stani's python editor if-else
>
> On Sep 10, 11:24 pm, madzientist <[EMAIL PRO
> From: Chris
>
> I have a python script that is driving Excel and using the win32com
> module. However, upon program completion there's still an Excel.exe
> process running in the background that I must terminate through Task
> Manager. Reading up on other threads indicate that maybe I still have
> From: madzientist
>
> Thanks, everybody, for the very very useful and kind responses.
>
> There is a second reason why I asked the question about automatic de-
> indenting. I am teaching myself Python partly so I can then help my
> technically astute, but blind friend learn programming. For the
> From: Michele Simionato
>
> On Sep 12, 3:54 pm, Mark Summerfield <[EMAIL PROTECTED]>
> wrote:
> > On 12 Sep, 13:46, Michele Simionato <[EMAIL PROTECTED]>
> >
> > Actually I meant by key order, so insertion order doesn't matter at
> > all. If you need a dictionary-like data structure that respect
On Saturday 03 March 2007, Ben Finney wrote:
> Bjoern Schliessmann <[EMAIL PROTECTED]> writes:
>
> if not recs.has_key(piid): # [1]
>
Why not
if piid not in recs:
That is shorter, simpler, easier to read and very slightly faster. Plus you
can change the data structure of recs later with
Hello,
I am needing to pass an argument to the Popen function of the Subprocess
module that includes a wildcard in the filename. It seems that Popen is
not able to expand wildcards, and treats a filename that includes a
wildcard as a literal.
EX.
var1="/path_to_files/filnames*.doc"
result=Popen
Hello Mike,
Thanks for responding. I need to pass multiple filenames to an
executable. The filenames are similar to one another, but differ only
slightly, hence the use of the wildcard. The executable works well from
the command line if I pass in a wildcard filename, but Popen can't
expand the wil
I apologize for bringing up something that's a month dead. But, I've
been reading through the recent archives and came across this
discussion, and want to make sure I understand a particular about the
interactive prompt.
"Martin Unsal" wrote:
> I'm perfectly well aware that I'm not going to be a
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, April 05, 2007 1:01 PM
To: python-list@python.org
Subject: Looping issues
What I am trying to do is compare two files to each other.
If the 2nd file contains the same line t
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Manuel Graune
Sent: Thursday, April 05, 2007 12:14 PM
To: python-list@python.org
Subject: Objects, lists and assigning values
Hello,
while trying to learn how to program using objects in python (up to now
s
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Steven
D'Aprano
> Sent: Wednesday, April 11, 2007 7:49 AM
> To: python-list@python.org
> Subject: Re: tuples, index method, Python's design
>
> (There is one other option: you care that 32 is so
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of wswilson
> Sent: Wednesday, April 11, 2007 9:24 AM
> To: python-list@python.org
> Subject: passing class by reference does not work??
>
> Here is my code:
>
> class A():
> val = 0
>
> de
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Scott
>
> I understand all that. What I don't understand is why all the
> documentation
> I see says, "When removing a specific element from a list using pop()
it
> must be in this format: list
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of Chris Mellon
> Sent: Wednesday, April 11, 2007 9:12 AM
> To: python-list@python.org
> Subject: Re: tuples, index method, Python's design
>
>
> So, when you have a) a third party module that you c
> -Original Message-
> From: [EMAIL PROTECTED]
[mailto:python-
> [EMAIL PROTECTED] On Behalf Of wswilson
> Sent: Wednesday, April 18, 2007 1:39 PM
> To: python-list@python.org
> Subject: Iterate through a dictionary of lists one "line" at a time
>
> Here is my code:
>
> listing = {'id': [
> From: Paul Hankin
>
>
> Here's a first go. Sorting occurs when the keys are iterated over,
> making it fast (almost as a dict) for construction, insertion, and
> deletion, but slow if you're iterating a lot. You should look at some
> use cases to decide if this approach is best, or if a sorted
On Sep 30, 8:53 am, [EMAIL PROTECTED] wrote:
> Hello everyone,
>
> OK, so I want to split a string c into words using several different
> separators from a list (dels).
>
> I can do this the following C-like way:
>
> >>> c=' abcde abc cba fdsa bcd '.split()
> >>> dels='ce '
> >>> for j in dels:
>
>
On Sep 30, 10:39 am, sophie_newbie <[EMAIL PROTECTED]> wrote:
> Hi, I'm wondering how i'd go about extracting a string array of all
> comments in a HTML file, HTML comments obviously taking the format
> "".
>
> I'm fairly stumped on how to do this? Maybe using regular expressions?
>
> Thanks.
E:\R
John Machin wrote:
> On Sep 29, 1:43 am, [EMAIL PROTECTED] wrote:
> > If I have a text file that is delimited by spaces, how do I import it
> > and get to comma delimited? Here is a row of data from the text file:
> >
> > 1110:55:14 265 8.5
> > 1.4+1.1 2.5
> From: thebjorn
> What's stabledict? I'm assuming that ordereddict is a mapping that
> maintains insertion order(?)
Yes, ordereddict is a dict that maintains insertion order. Stabledict
is probably a dict that maintains _an_ order, so that repr() and the
like return the same value when used on d
> -Original Message-
> From: Kevin Walzer
>
> See
http://www.codebykevin.com/blosxom/business/phynchronicity-new.png:
> this is an application I develop. The layout is all handled by "pack"
> and paned windows. Where you you use "grid" in a layout like this?
>
I'd use a three row grid, w
> From: Tommy Grav
>
> Hi everyone,
>
>I have a list of objects where I have want to do two loops.
> I want to loop over the list and inside this loop, work on all
> the elements of the list after the one being handled in the outer
> loop. I can of course do this with indexes:
>
> >>> alist
Hi:
I am new to this list and new to Python. I have a text file that looks like:
4 50
3 900
" or "]" sign.
For example:
4 50
3 900
7 400
...
9 70
How can I do this?
Thank you
William
__
Do You Yahoo!?
Tired of spam? Yaho
On Wednesday 10 January 2007 7:11 am, Felipe Almeida Lessa wrote:
> ---
> $ python test.py
> 50
> 100
> 150
> 200
> 250
> 300
> 350
> Exception raised: can't start new thread
>
> Biggest number of threads: 382
> ---
>
> The test.py script is attached.
So you know I tried this on ubuntu edgy 64bit
In David Waizer <[EMAIL PROTECTED]> wrote:
> Hello..
>
> I'm looking for a script (perl, python, sh...)or program (such as wget)
> that will help me get a list of ALL the links on a website.
lynx -dump (look at the bottom)
--
William Park <[EMAIL PROTECTED]&g
On Thursday 01 February 2007, billie wrote:
> Here's the traceback:
>
> Traceback (most recent call last):
> File "C:\Documents and Settings\root\Desktop\test.py", line 31, in ?
> asyncore.loop(timeout=1)
> File "C:\Python24\lib\asyncore.py", line 192, in loop
> poll_fun(timeout, map)
the Baviarian Illuminati do not exist.
- William
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 6, 6:56 pm, [EMAIL PROTECTED] wrote:
> Zionazi obviously tries to shift blame and confuse the picture.
One way to recognize a dupe of the Bavarian Illuminati is
their tendency to characterize everyone as Zionists.
- William Hughes
--
http://mail.python.org/mail
Hi all,
I'm pretty new to Python (a little over a month). I was wondering -- is
something like this:
s = re.compile('whatever')
def t(whatnot):
return s.search(whatnot)
for i in xrange(1000):
print t(something[i])
significantly faster than something like this:
def t(whatnot):
s =
Thanks for all the answers on this. (And, sorry the lousy Subject line; I
couldn't think of a better one.)
--
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 -- pass it on
--
http://mail.python.org/mailman/listinfo/python-list
Here are a couple of functions that I feel stupid for having written.
They work, and they're pretty straightforward; it's just that I feel like
I must be missing an easier way to do this...
def net_to_int(numstring):
"""Convert a big-endian binary number, in the form of a string of
arbit
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I used the embedding python guide to embed python in an application
to let me easily script the app. It's all working rather well, and
I've added a number of types which expose the internals to python.
However I've gotten to the point where I want
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On May 17, 2006, at 8:46 PM, Edward Elliott wrote:
> Dave Hansen wrote:
>
>> On Wed, 17 May 2006 17:28:26 GMT in comp.lang.python, Edward Elliott
>>> Just for the sake of completeness:
>>>
>>> cat file |sed 's/\t//g'
>>
>> That doesn't always work
On Wed, 26 Dec 2007 16:50:53 -0800, Dennis Lee Bieber wrote:
> your code might (I've not actually checked it) be incorrect if ported
> to another machine.
Nope. :-)
> If the problem is that you have the four bytes as a character string,
> use the struct module to interpret it as a binary integer
When I launch the file using IE I get the message:
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
This is a test for python scripts with IIS
How can I remove the CGI error?
Than
Thank you,
William
- Original Message
From: Rolf van de Krol <[EMAIL PROTECTED]>
To: python-list@python.org
Sent: Saturday, January 19, 2008 5:33:59 PM
Subject: Re: python scripts with IIS
Adding the following lines before your print statement should do the
trick. IIS complains
I've been away from Python for at least a year, and in the interim
have spent a little time looking at the XOTcl object framework for
Tcl. One of the interesting features of XOTcl is the ability for an
object to change class dynamically. The XOtcl documentation makes the
claim that this makes it
Look at this -- from Python 2.5.1:
>>> a = [1, 2, 3, 4, 5]
>>> for x in a:
... if x == 3:
... a.remove(x)
... print x
...
1
2
3
5
>>> a
[1, 2, 4, 5]
>>>
Sure, the resulting list is correct. But 4 is never printed during the
loop!
What I was really trying to do was this:
apps =
On Jan 24, 9:16 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
> 2008/1/24, William Pursell <[EMAIL PROTECTED]>:
>
> Can I do it in Python?
>
>
> class A(object): pass
> class B(object): pass
>
> a = A()
> a.__class__ = B
>
> That ? May
On Wed, 30 Jan 2008 06:07:45 -0800, cokofreedom wrote:
> Anyone else noticed that the OP has not actually replied to any of the
> suggestions...
Sorry. I was just fascinated at the turns it was taking. But the first
answer was fine for me:
for name in apps[:]:
etc.
Thanks all.
--
09 F9 11
7;C:\Python25'
version = '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bi...
*
Can someone explain what that "r" is doing and where I would find it in the
documentation?
Thank you in advance for your assistance.
William T. Schmidt
--
http://mail.python.org/mailman/listinfo/python-list
Thank you Guilherme
Solution below:
>>> "Guilherme Polo" <[EMAIL PROTECTED]> 2008-02-13 06:48 >>>
2008/2/13, WILLIAM SCHMIDT <[EMAIL PROTECTED]>:
> In several places in the Python documentation I have run across an extra "r"
> that I
How do I decode a string back to useful unicode that has xml numeric character
references in it?
Things like 占
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 14, 6:54 am, "W. Watson" <[EMAIL PROTECTED]> wrote:
> See Subject. It's a simple txt file, each line is a Python stmt, but I need
> up to four digits added to each line with a space between the number field
> and the text. Perhaps someone has already done this or there's a source on
> the we
This is proving to be a recurring problem for me.
First, I used the save() method of a Python Imaging Library "Image"
object to write directly to the "wfile" of a BaseHTTPRequestHandler-
derived class:
pic.save(self.wfile, 'JPEG')
Worked great in Linux, barfed in Windows. I had to do this
I want to parse my iTunes Library xml. All was well, until I unplugged
and left for the train (where I get most of my personal projects
done). All of a sudden, I discovered that apparently the presence of a
DOCTYPE in the iTunes XML makes xml.dom.minidom insist on accessing
the Internet... So sudde
André Thieme wrote:
> Xah Lee schrieb:
> > comp.lang.lisp,comp.lang.scheme,comp.lang.functional,comp.lang.pytho
> > n,comp.lang.ruby
> >
> > Here's a interesting toy problem posted by Drew Krause to
> > comp.lang.lisp:
> >
> >
> > On Jan 16, 2:29 pm, Drew Krause wrote [p
w_a_x_...@yahoo.com wrote:
> On Dec 25, 5:24 am, Xah Lee wrote:
>
> > The JavaScript example:
> >
> > // Javascript. By William James
> > function normalize( vec ) {
> > var div=Math.sqrt(vec.map(function(x) x*x).reduce(function(a,b)
> >
Ive been learning the C-API lately so I can write python extensions for some of
my c++ stuff.
I want to use the new and delete operators for creating and destroying my
objects.
The problem is python seems to break it into several stages. tp_new, tp_init
and tp_alloc for creation and tp_del, t
André Thieme wrote:
> (map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s")) (line-seq
> (reader "blob.txt")))
An error results:
java.lang.Exception: Unable to resolve symbol: reader in this context
This works:
(map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s"))
(.split (slurp "ju
On Fri, 05 Dec 2008 12:16:47 -0800, Fernando H. Sanches wrote:
> I agree that the tab/space thing should be changed. Would it be too hard
> to make the parser see if the indentation is consistent in the whole
> file?
*Something* has changed. I had a piece of code where, without realizing
it, I h
On Dec 5, 6:21 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> I'd like this new way of defining methods, what do you guys think?
> Anyone ready for writing a PEP?
I think it's an awesome proposal. It's about time! With this change,
defining methods uses the same special syntax hack that call
Jon Harrop wrote:
> Xah Lee wrote:
> > On Dec 10, 12:37 pm, [EMAIL PROTECTED] wrote:
> >> Ruby:
> > >
> >> def norm a
> >> s = Math.sqrt(a.map{|x|x*x}.inject{|x,y|x+y})
> >> a.map{|x| x/s}
> >> end
> >
> > I don't know ruby, but i tried to run it and it does not work.
> >
> > #ruby
> > def
John W Kennedy wrote:
> Xah Lee wrote:
> > In lisp, python, perl, etc, you'll have 10 or so lines. In C or
> > Java, you'll have 50 or hundreds lines.
>
> Java:
>
> static float[] normal(final float[] x) {
>float sum = 0.0f;
>for (int i = 0; i < x.length; ++i) sum += x[i] * x[i];
>f
William James wrote:
> John W Kennedy wrote:
>
> > Xah Lee wrote:
> > > In lisp, python, perl, etc, you'll have 10 or so lines. In C or
> > > Java, you'll have 50 or hundreds lines.
> >
>
> > Java:
> >
> > static float[] norma
William James wrote:
> John W Kennedy wrote:
>
> > Xah Lee wrote:
> > > In lisp, python, perl, etc, you'll have 10 or so lines. In C or
> > > Java, you'll have 50 or hundreds lines.
> >
>
> > Java:
> >
> > static float[] norma
On Sat, Oct 4, 2008 at 12:30 PM, Roger Upole <[EMAIL PROTECTED]> wrote:
> William Heath wrote:
> > Hi All,
> > I thought I sent an email to the list regarding a need I have to self
> sign
> > a
> > py2exe windows executable. Does anyone know how to do that?
I don't know, how can I tell, sorry I am new to this.
-Tim
On Mon, Oct 6, 2008 at 5:57 PM, Roger Upole <[EMAIL PROTECTED]> wrote:
>
> William Heath wrote:
> > Hi Roger,
> > I managed to get the dll and register it. I am now getting this error:
> >
&
6:37 PM, Roger Upole <[EMAIL PROTECTED]> wrote:
>
> William Heath wrote:
> >I don't know, how can I tell, sorry I am new to this.
> > -Tim
> >
>
> You can use the certificates snap in for MMC to view them.
>
> Start->Run and enter mmc.exe
> Fi
On Oct 13, 9:40 am, [EMAIL PROTECTED] wrote:
> I'm looking for a function which, given a regexp re and and a string
> str, returns whether re won't match any string starting with str. (so
> it would always return False if str is "" or if str itself matches re
> -- but that are only the easy cases)
I believe that
myDict['TestName'] = {'NewFileName': {}, }
should be
myDict['TestName']['NewFileName'] = {}
-Bill
On Thu, Oct 16, 2008 at 3:44 PM, Chris Rebert <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 16, 2008 at 12:19 PM, John Townsend <[EMAIL PROTECTED]>
> wrote:
> > I'm working with a Dictiona
,
William
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com --
http://mail.python.org/mailman/listinfo/python-list
Before I spend the next couple weeks researching and testing, can anyone
tell me if what I want to do is possible, and possibly point me in the
right direction to get started.
I want to forward any email addressed to [EMAIL PROTECTED] to a python
script that will forward it to all the other su
Hi All,
I am using py2exe to create a windows executable. I am curious if anyone
knows a way to automatically upgrade a py2exe windows executable while it is
running. Is that possible? If so how? If it isn't possible, what is the
next best thing? Also, if it is not available using py2exe is it
Haines Brown wrote:
> If we have studied a field obsessively for some
> years, it is natural that we end in a position where our knowledge will
> generally be superior. But this does not make us superior.
What does make us superior? Are you so dishonest or insane as
to assert that everyone is eq
act* which is a function that I want to access from python and is
declared in the interface file.
Is there any specific way in which user defined headers need to be declared
in the interface file? Should the user defined header be placed in the
/usr/include directory?
Any help on this is highly ap
act* which is a function that I want to access from python and is
declared in the interface file.
Is there any specific way in which user defined headers need to be declared
in the interface file? Should the user defined header be placed in the
/usr/include directory?
Any help on this is highly ap
>
> steve William wrote:
>
>> Hi All,
>>
>> I'm using SWIG for the first time and I am facing some problems with user
>> defined header files. I'm trying to use my own header file in a C program
>> which would be interfaced with python.
>>
>
201 - 300 of 564 matches
Mail list logo