"bahoo" <[EMAIL PROTECTED]> wrote:
> On Apr 3, 2:31 pm, "Matimus" <[EMAIL PROTECTED]> wrote:
> > It depends on your application, but a 'set' might really be what you
> > want, as opposed to a list.
> >
> > >>> s = set(["0024","haha","0024"])
> > >>> s
> >
> > set(["0024","haha"])>>> s.remove("002
On 3 Apr 2007 11:20:33 -0700, bahoo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
To remove all items with multiple occurances in myList:
list
"erikcw" <[EMAIL PROTECTED]> wrote:
>
>What do I need to do to extract the intergers from these unicode
>strings (or better yet, parse them as intergers in the first place.).
>I'm using the SAX method attrs.get('cls1',"") to parse the xml. Can I
>"cast" the string into an interger?
When I see a t
"flit" <[EMAIL PROTECTED]> wrote:
>
>Using poplib in python I can extract only the headers using the .top,
>there is a way to extract only the message text without the headers?
Only by using Python code. The other responses gave you good pointers
toward that path, but I thought I would point out
Xah Lee написав:
> REQUIREMENTS FOR A VISUALIZATION SOFTWARE SYSTEM FOR 2010
>
> Xah Lee, 2007-03-16
>
> In this essay, i give a list of requirements that i think is necessary
> for a software system for creating scientific visualization for the
> next decade (2007-2017).
>
> (for a HTML version w
Hi everybody,
I am planning to build a web portal, which is mainly a discussion
forum for our corporate environment. I want to implement it with
Python. Because this project is very new to me and I have no idea
about how to go about this. I searched in google for getting some tuts/
guidelines abou
Nice going
way to help!
gb
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 3, 11:00 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the following code which spawn a number of thread and do
> something (in the run method of MyThread).
> how can I record how much time does EACH thread takes to complete the
> 'run'?
>
> for j in range(threadCount
Hi everybody,
I am planning to build a web portal, which is mainly a discussion
forum for our corporate environment. I want to implement it with
Python. Because this project is very new to me and I have no idea
about how to go about this. I searched in google for getting some tuts/
guidelines abou
hi
suppose i have 2 lists, a, b then have different number of elements,
say len(a) = 5, len(b) = 3
>>> a = range(5)
>>> b = range(3)
>>> zip(b,a)
[(0, 0), (1, 1), (2, 2)]
>>> zip(a,b)
[(0, 0), (1, 1), (2, 2)]
I want the results to be
[(0, 0), (1, 1), (2, 2) , (3) , (4) ]
can it be done?
thanks
--
On Apr 3, 3:53 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> > target = "0024"
> > l = ["0024", "haha", "0024"]
>
>
> > for index, val in enumerate(l):
> > if val==target:
> > del l[index]
>
> > print l
>
> This latter suggestion (with the for loop) seems to be buggy: if there
> are multiple
"bahoo" <[EMAIL PROTECTED]> wrote:
> I don't see where the "str" came from, so perhaps the output of
> "open('source.txt').readlines()" is defaulted to "str?
Apart from Grant's explanation that str is the type of a string, what you
perhaps haven't yet grasped is that if you have a type and an in
I'm going to Amsterdam friday the 6. and would like to grab a beer
with anyone interested in Python and possible Django development.
My company is looking into building a CMS based on Django.
Mail me at martinskou [at] gmail [dot] com.
--
http://mail.python.org/mailman/listinfo/python-list
John McMonagle wrote:
> [EMAIL PROTECTED] wrote:
>> I am new to Tkinter. Following an example, I executed the following:
>>
>> window = Tk()
>> b = Button(window)
>> b.configure(bg = '#FF00FF')
>> b.grid(row = 0, column = 0)
>>
>> how can I later get the value of this button's background color?
>>
On 2007-04-03, Aahz <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Larry Bates <[EMAIL PROTECTED]> wrote:
>>Aahz wrote:
>>> In article <[EMAIL PROTECTED]>,
>>> Larry Bates <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
>
> I create a dictionary like this
> my
On Apr 4, 4:53 pm, [EMAIL PROTECTED] wrote:
> elements, say len(a) = 5, len(b) = 3
> >>> a = range(5)
> >>> b = range(3)
...
> I want the results to be
> [(0, 0), (1, 1), (2, 2) , (3) , (4) ]
> can it be done?
A bit cumbersome, but at least shows it's possible:
>>> def superZip( a, b ):
c
Check out pymol.
James
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
Brutal, not exact answer, but:
a = range(5)
b = range(3)
print zip(a+[None]*(len(b)-len(a)),b+[None]*(len(a)-len(b)))
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> suppose i have 2 lists, a, b then have different number of elements,
> say len(a) = 5, len(b) = 3
a = range(5)
b = range(3)
zip(b,a)
> [(0, 0), (1, 1), (2, 2)]
zip(a,b)
> [(0, 0), (1, 1), (2, 2)]
>
> I want the results to be
> [(0, 0), (1, 1), (2, 2)
On Apr 3, 10:30 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> |
> |>> My book says that in a heap, a value at position i will be smaller
> |>> than the values at positions 2*i and 2*i + 1.
>
> I am sure your book either uses
We've integrated python into a legacy application. Everything works fine (of
course because its python;). There's only one small problem: the
application reads the commandline and consumes all arguments prefixed with
a '-' sign. Thus its not possible to call a python module from the
commandline wit
Bruno Desthuilliers:
> result = [line.strip() for line in f.readlines()]
Probably better, lazily:
result = [line.strip() for line in infile]
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Michael Castleton a écrit :
>
>
> Bruno Desthuilliers wrote:
>> Michael Castleton a écrit :
>>> When I open a csv or txt file with:
>>>
>>> infile = open(sys.argv[1],'rb').readlines()
>>> or
>>> infile = open(sys.argv[1],'rb').read()
>>>
>>> and then look at the first few lines of the file there
[EMAIL PROTECTED] writes:
C> hi
> suppose i have 2 lists, a, b then have different number of elements,
> say len(a) = 5, len(b) = 3
> >>> a = range(5)
> >>> b = range(3)
> >>> zip(b,a)
> [(0, 0), (1, 1), (2, 2)]
> >>> zip(a,b)
> [(0, 0), (1, 1), (2, 2)]
>
> I want the results to be
> [(0, 0), (1,
On Wed, 04 Apr 2007 00:59:23 -0700, 7stud wrote:
> On Apr 3, 3:53 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
>> > target = "0024"
>> > l = ["0024", "haha", "0024"]
>>
>>
>> > for index, val in enumerate(l):
>> > if val==target:
>> > del l[index]
>>
>> > print l
>>
>> This latter suggestion
MC <[EMAIL PROTECTED]> writes:
> Hi!
>
> Brutal, not exact answer, but:
>
> a = range(5)
> b = range(3)
> print zip(a+[None]*(len(b)-len(a)),b+[None]*(len(a)-len(b)))
You reinvented map(None,a,b).
'as
--
http://mail.python.org/mailman/listinfo/python-list
7stud wrote:
> On Apr 3, 3:53 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> > > target = "0024"
> > > l = ["0024", "haha", "0024"]
> >
> >
> > > for index, val in enumerate(l):
> > > if val==target:
> > > del l[index]
> >
> > > print l
> >
> > This latter suggestion (with the for loop) seem
On Apr 4, 2:20 am, "bahoo" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
>
> It seems like regular expressions is the rescue, but I couldn't fin
On Wed, 04 Apr 2007 08:52:48 +, Mathias Waack wrote:
> We've integrated python into a legacy application. Everything works fine (of
> course because its python;). There's only one small problem: the
> application reads the commandline and consumes all arguments prefixed with
> a '-' sign. Thus
Hi,
for the fun I try operator overloading experiences and I didn't
exactly understand how it works.
Here is my try:
>>> class myint(int):
def __pow__(self, value):
return self.__add__(value)
>>> a = myint(3)
>>> a ** 3
6
OK, it works. Now I try different way to achieve t
Hi,
I have a Python app and i would like to add some SNMP agent
functionality to it.
I know it's possible to write a sub-agent with netsnmp but it is in C
and quite complicated.
I know of YAPSNMP (a wrapper around NETSNMP) but it doesn't seem to
support agent writing.
Any suggestion ?
Thanks to a
such as:
>>>b = False
>>>id(b)
Traceback (most recent call last):
File "", line 1, in ?
TypeError: 'bool' object is not callable
---
how to desc it?
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 4, 12:36 pm, "autin" <[EMAIL PROTECTED]> wrote:
> such as:>>>b = False
> >>>id(b)
>
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: 'bool' object is not callable
>
> ---
> how to desc it?
>>> b = False
>>> id(b)
135311308
>>>
python 2.4, FreeBSD 6.2
--
http://
Jakub Stolarski wrote:
> On Apr 4, 12:36 pm, "autin" <[EMAIL PROTECTED]> wrote:
>> such as:>>>b = False
> id(b)
>> Traceback (most recent call last):
>> File "", line 1, in ?
>> TypeError: 'bool' object is not callable
>>
>> ---
>> how to desc it?
>
b = False
id(b)
> 135311308
>
>
How about:
list(frozenset(['0024', 'haha', '0024']))
[EMAIL PROTECTED] schrieb:
> On Apr 4, 2:20 am, "bahoo" <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I have a list like ['0024', 'haha', '0024']
>> and as output I want ['haha']
>>
>> If I
>> myList.remove('0024')
>>
>> then only the first instance
[EMAIL PROTECTED] wrote:
> On Apr 2, 10:20 pm, Florian Lindner <[EMAIL PROTECTED]> wrote:
>> Some of the question I have but found answered nowhere:
>>
>> I have a feedparser object that was created from a string. How can I
>> trigger a update (from a new string) but the feedparser should treat th
autin a écrit :
> such as:
b = False
id(b)
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: 'bool' object is not callable
>
IMVHO, you shadowed the builtin id() function with a boolean somewhere
else...
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 2
Python 2.4.4 Linux debian 2.6.8-3-386
any wrong?
> > ---
> > how to desc it?
> >>> b = False
> >>> id(b)
> 135311308
>
> python 2.4, FreeBSD 6.2
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> Bruno Desthuilliers:
>> result = [line.strip() for line in f.readlines()]
>
> Probably better, lazily:
> result = [line.strip() for line in infile]
This is of course better in the general case, but I wanted to stay
consistant with the other examples...
--
http://m
>
> (3) Create a filter module that reads sys.argv, replaces leading "+" signs
> with "-" signs, and then stuffs it back into sys.argv before optparse gets
> to see it.
That's not even necessary, the optparser will work on a passed argument
list. No need to alter sys.argv.
Diez
--
http://mail.p
There are several different web frameworks in which a forum can be
implemented. Try to take a look at Django and Turbogear. You will need
to put some time into learning the framework.
But, if you want an easy "copy-paste" forum solution, I guess you will
be better of with one of the PHP open sourc
and test on
Python 2.3.5
2.4.32 debian
is ok!maybe its bug for unstable debian version!
--
http://mail.python.org/mailman/listinfo/python-list
My false!uh,i didnot understand it clearly.
On Apr 4, 6:46 am, Bruno Desthuilliers wrote:
> autin a écrit :
>
> > such as:
> b = False
> id(b)
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > TypeError: 'bool' object is not callable
>
> IMVHO, you shadowed the bui
bahoo a écrit :
> Hi,
>
> I have a list like ['0024', 'haha', '0024']
> and as output I want ['haha']
>
> If I
> myList.remove('0024')
>
> then only the first instance of '0024' is removed.
>
> It seems like regular expressions is the rescue,
Nope. re wouldn't help here - it works on strings,
Robert,
Thanks for your prompt response. I think I got a lot closer but no
cigar yet.
This is the output
C:\fortrandll>f2py -c -m sample sample.pyf sample.for
numpy_info:
FOUND:
define_macros = [('NUMERIC_VERSION', '"\\"24.2\\""')]
include_dirs = ['C:\\Python24\\include']
running bui
Hi,
I'm trying to run a script over unix on a remote machine.
In order to automate it, the procedure requests the following:
1. Using SSH connection.
2. Operating a command on the remote machine.
3. Expecting password or (yes/no) request and authorize it.
I get an error (I thing that it occures a
http://code.google.com/p/diamanda/
--
http://mail.python.org/mailman/listinfo/python-list
alain wrote:
> Hi,
>
> I have a Python app and i would like to add some SNMP agent
> functionality to it.
> I know it's possible to write a sub-agent with netsnmp but it is in C
> and quite complicated.
> I know of YAPSNMP (a wrapper around NETSNMP) but it doesn't seem to
> support agent writing.
On Apr 4, 1:30 pm, alf <[EMAIL PROTECTED]> wrote:
> twistedmatrix.org?
I already took a look at it but the agent functionality is somewhat
primitive. I need something production-ready.
Alain
--
http://mail.python.org/mailman/listinfo/python-list
kath wrote:
> Hi everybody,
>
> I am planning to build a web portal, which is mainly a discussion
> forum for our corporate environment. I want to implement it with
> Python. Because this project is very new to me and I have no idea
> about how to go about this. I searched in google for getting so
There may be a way to finish this without having to deal with
distutils.
F2py created three files so far
samplemodule.c
fortranobject.h
fortranobject.c
Is there a way to create the sample.pyd from these files?
--
http://mail.python.org/mailman/listinfo/python-list
> "Gil" == Gil H <[EMAIL PROTECTED]> writes:
> class SSH:
> def __init__(self, user, password, host):
> self.child = pexpect.spawn("ssh [EMAIL PROTECTED]"%(user,
> host))
Try adding the following line here
self.child.logfile = sys.stdout
That should give you som
Diez B. Roggisch wrote:
>> (3) Create a filter module that reads sys.argv, replaces leading "+"
>> signs with "-" signs, and then stuffs it back into sys.argv before
>> optparse gets to see it.
>
> That's not even necessary, the optparser will work on a passed argument
> list. No need to alter sys
skip> Check the heapq docs for the constraints the Python heapq module
skip> maintains:
s/constraints/invariants/
Skip
--
http://mail.python.org/mailman/listinfo/python-list
On 4 Apr, 15:14, Ganesan Rajagopal <[EMAIL PROTECTED]> wrote:
> > "Gil" == Gil H <[EMAIL PROTECTED]> writes:
> > classSSH:
> > def __init__(self, user, password, host):
> > self.child =pexpect.spawn("[EMAIL PROTECTED]"%(user, host))
>
> Try adding the following line here
My book says that in a heap, a value at position i will be than the
values at positions 2*i and 2*i + 1.
>> I am sure your book either uses 1-based arrays or a 0-based arrays
>> with the first not used. The need to keep these alternatives in mind
>> is an unfortunat
Hi dear all,
I am using Python2.4.2+NumPy1.0.1 to deal with a parameter
estimation problem with the least square methods. During the
calculations, I use NumPy package to deal with matrix operations,
mostly matrix inversion and trasposition. The dimentions of the
matrices used are about 29x
Hi dear all,
I am using Python2.4.2+NumPy1.0.1 to deal with a parameter
estimation problem with the least square methods. During the
calculations, I use NumPy package to deal with matrix operations,
mostly matrix inversion and trasposition. The dimentions of the
matrices used are about 29x
On 4 Apr 2007 06:15:18 -0700, lancered <[EMAIL PROTECTED]> wrote:
> During the calculation, I noticed an apparent error of
> inverion of a 19x19 matrix. Denote this matrix as KK, U=KK^ -1, I
> found the product of U and KK is not equivalent to unit matrix! This
> apparently violate the defi
Here below is the matrix KK I used:
[[ 1939.33617572 -146.94170404 0. 0. 0.
0. 0. 0. 0.
-1172.61032101
0. 0. -193.69962687 -426.08452381 0.
0. 0. 0.
"Kushal Kumaran" <[EMAIL PROTECTED]> writes:
[...]
> If, at any time, an error response fails to reach your machine, the
> code will have to wait for a timeout. It should not have to wait
> forever.
[...]
...but it might have to wait a long time. Even if you use
socket.setdefaulttimeout(), DNS l
In article <[EMAIL PROTECTED]>,
"lancered" <[EMAIL PROTECTED]> wrote:
> Hi dear all,
> I am using Python2.4.2+NumPy1.0.1 to deal with a parameter
> estimation problem with the least square methods. During the
> calculations, I use NumPy package to deal with matrix operations,
> mostly ma
lancered wrote:
> Hi dear all,
..
> matrices are correct.
>
>So, can you tell me what goes wrong? Is this a bug in
> Numpy.linalg? How to deal with this situation? If you need, I can
> post the matrix I used below, but it is so long,so not at the moment.
...
presumably the
On Apr 3, 11:41 pm, "ginstrom" <[EMAIL PROTECTED]> wrote:
> > On Behalf Of Kevin Walzer
> > What's the best way to do this? Can anyone point me in the
> > right direction? How could, for instance, the top snippet be
> > rewritten to separate the Tkinter parts from the generic stuff?
>
> I like to u
Robin Becker wrote:
> lancered wrote:
h. If
> your matrix is symmetric then you should certainly be using
a qr decomposition I meant to say :)
--
Robin Becker
--
http://mail.python.org/mailman/listinfo/python-list
-
(Apologies for cross-posting)
Symposium "Computational Methods in Image Analysis"
National Congress on Computational Mechanics (USNCCM IX)
San Francisco,
[EMAIL PROTECTED] wrote:
> On Apr 3, 11:41 pm, "ginstrom" <[EMAIL PROTECTED]> wrote:
>>> On Behalf Of Kevin Walzer
>>> What's the best way to do this? Can anyone point me in the
>>> right direction? How could, for instance, the top snippet be
>>> rewritten to separate the Tkinter parts from the gen
Here is the eigenvalues of KK I obtained:
>>> linalg.eigvals(KK)
array([ 1.11748411e+05, 3.67154458e+04, 3.41580846e+04,
2.75272440e+04, 2.09790868e+04, 1.86242332e+04,
8.68628325e+03, 6.66127732e+03, 6.15547187e+03,
4.68626197e+03, 3.17838339e+03, 2.8
Hi all!
I have a file in which there are some expressions such as "kindest
regard" and "yours sincerely". I must create a phyton script that
checks if a text contains one or more of these expressions and, in
this case, replaces the spaces in the expression with the character
"_". For example, the
All the code is untested, but should give you the idea.
[EMAIL PROTECTED] writes:
> Hi all!
>
> I have a file in which there are some expressions such as "kindest
> regard" and "yours sincerely". I must create a phyton script that
> checks if a text contains one or more of these expressions an
Mathias Waack wrote:
> We've integrated python into a legacy application. Everything works fine (of
> course because its python;). There's only one small problem: the
> application reads the commandline and consumes all arguments prefixed with
> a '-' sign. Thus its not possible to call a python mo
Hello,
I have a win32 service written in Python that starts a plain
application, written in Python.
The win32 service tries to launch the application in a while loop and
logs the return value of the os.system call. That's all.
The application is a simple Python program that connects to an ht
lancered wrote:
> Here is the eigenvalues of KK I obtained:
>
> >>> linalg.eigvals(KK)
> array([ 1.11748411e+05, 3.67154458e+04, 3.41580846e+04,
> 2.75272440e+04, 2.09790868e+04, 1.86242332e+04,
> 8.68628325e+03, 6.66127732e+03, 6.15547187e+03,
> 4.6862619
Alexander Schmolck <[EMAIL PROTECTED]> writes:
> That doesn't work. What about "kindest\nregard"? I think you're best of
> reading the whole file in (don't forget to close the files, BTW).
I should have written "that may not always work, depending of whether the set
phrases you're interested in c
For any list x, x.index(item) returns the index of the FIRST
occurrence of the item in x. Is there a simple way to identify the
LAST occurrence of an item in a list? My solution feels complex -
reverse the list, look for the first occurence of the item in the
reversed list, and then subtract its in
On 4 Apr, 17:39, Alexander Schmolck <[EMAIL PROTECTED]> wrote:
> All the code is untested, but should give you the idea.
>
>
>
>
>
> [EMAIL PROTECTED] writes:
> > Hi all!
>
> > I have a file in which there are some expressions such as "kindest
> > regard" and "yours sincerely". I must create a phyt
now,I want to insert some data to the sybase database,
some variable such as i,j,k,name,k,j I have defined before.
I write the sql statement here But I meet some errors,How to write this
nested String for sql query?
For example:
import Sybase
db = Sybase.connect('boyee','sa','',"test'')
c = db.c
[EMAIL PROTECTED] wrote:
> Check out subprocess. It's meant to be a replacement for all of the
> above.
OK, I've done this. What is the benefit of subprocess? Improved
performance? It doesn't seem that way--in fact, os.popen has a
non-blocking mode, which subprocess seems to lack.
--
Kevin Wal
Sounds like phpBB (http://www.phpbb.com/) would do great. I'm not sure
why you want to go write another forum management tool when others are
already out there for usage. I know its not in python, but not
everything has to be in python.
--
http://mail.python.org/mailman/listinfo/python-list
boyeestudio wrote:
> now,I want to insert some data to the sybase database,
> some variable such as i,j,k,name,k,j I have defined before.
> I write the sql statement here But I meet some errors,How to write this
> nested String for sql query?
> For example:
>
> >>>import Sybase
> >>> db = Sybas
Nothing beats http://diveintopython.org/toc/index.html for getting
into the basics of Python. This guy's writing is great!
--
http://mail.python.org/mailman/listinfo/python-list
Maxim Veksler wrote:
> I'm trying to bind a non-blocking socket, here is my code:
> """
> #!/usr/bin/env python
>
> import socket, select
> from time import sleep
>
> s_nb1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> s_nb1.setblocking(0)
>
> s_nb1.bind(('192.168.2.106', 10
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| For any list x, x.index(item) returns the index of the FIRST
| occurrence of the item in x. Is there a simple way to identify the
| LAST occurrence of an item in a list? My solution feels complex -
| reverse the list, look for the firs
I don't think I would use sets at all. They change the semantic
meaning of the original list. What if you have duplicate entries that
you want to keep? Converting to a set and back will strip out the
duplicates of that.
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 4, 7:05 am, [EMAIL PROTECTED] wrote:
> My book says that in a heap, a value at position i will be than the
> values at positions 2*i and 2*i + 1.
>
> >> I am sure your book either uses 1-based arrays or a 0-based arrays
> >> with the first not used. The need to kee
Hy
I'm using Python 2.4.2 on an ARM (PXA-270) platform (linux-2.6.17).
My Goal is to write a list of bytes down to a file (opened in binary
mode) in one cycle. The crux is that a '0x0a' (line feed) will break the
cycle of one writing into several pieces. Writing to a "simple" file,
this wouldn't ca
On Apr 4, 3:08 am, Steven D'Aprano <[EMAIL PROTECTED]>
wrote:
> On Wed, 04 Apr 2007 00:59:23 -0700, 7stud wrote:
> > On Apr 3, 3:53 pm, "bahoo" <[EMAIL PROTECTED]> wrote:
> >> > target = "0024"
> >> > l = ["0024", "haha", "0024"]
>
> >> > for index, val in enumerate(l):
> >> > if val==target:
>
In article <[EMAIL PROTECTED]>,
"lancered" <[EMAIL PROTECTED]> wrote:
> Here is the eigenvalues of KK I obtained:
>
> >>> linalg.eigvals(KK)
> array([ 1.11748411e+05, 3.67154458e+04, 3.41580846e+04,
> 2.75272440e+04, 2.09790868e+04, 1.86242332e+04,
> 8.68628325e+03,
Kevin Walzer wrote:
> [EMAIL PROTECTED] wrote:
>> Check out subprocess. It's meant to be a replacement for all of the
>> above.
>
> OK, I've done this. What is the benefit of subprocess?
Code that will work on most platforms and into the Python 3.0, when the popen*
zoo will disappear in favor of
On Apr 4, 10:55 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | For any list x, x.index(item) returns the index of the FIRST
> | occurrence of the item in x. Is there a simple way to identify the
> | LAST occurrence of an item in a
Mangabasi wrote:
> Robert,
>
> Thanks for your prompt response. I think I got a lot closer but no
> cigar yet.
>
> This is the output
>
> C:\fortrandll>f2py -c -m sample sample.pyf sample.for
> numpy_info:
> FOUND:
> define_macros = [('NUMERIC_VERSION', '"\\"24.2\\""')]
> include_dirs
On Apr 4, 11:20 am, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 4, 10:55 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
> > <[EMAIL PROTECTED]> wrote in message
>
> >news:[EMAIL PROTECTED]
> > | For any list x, x.index(item) returns the index of the FIRST
> > | occurrence of the item in x. Is there
On Apr 4, 1:27 am, "ianaré" <[EMAIL PROTECTED]> wrote:
> i'm doing this:
>
> mylocale = wx.Locale(wx.LANGUAGE_POLISH, wx.LOCALE_LOAD_DEFAULT)
> if not wx.Locale.IsOk(mylocale):
> mylocale = wx.Locale(wx.LANGUAGE_DEFAULT, wx.LOCALE_LOAD_DEFAULT)
>
> and getting this:
> Segmentation fault (core d
Go for it! I can see immediate application in displaying and
exploring multivariate projections. e.g., factor analyses and
components analysis, multivariate groupings superimposed on projected
hyperspaces... This is stuff some of us have been dreaming about for a
couple of decades, and getting the
"7stud" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| How about:
|
| l = [1, 2, 1, 3, 1, 5]
| target = 1
| for index, val in enumerate(l):
|if val==1:
|lastIndexOf = index
|
| print lastIndexOf
You might want to initialize lastIndexOf (to None, for instance).
If len(l
I have a small script for doing some ssh stuff for me. I could have
written it as shell script, but wanted to improve my python skills
some.
RIght now, I'm not catching a syntax error as I'd like to.
Here's my code:
#!/usr/bin/env python
import sys
import os
port = input("Please enter a port to
On Apr 4, 11:40 am, "Thomi Aurel RUAG A" <[EMAIL PROTECTED]> wrote:
> Hy
> I'm using Python 2.4.2 on an ARM (PXA-270) platform (linux-2.6.17).
> My Goal is to write a list of bytes down to a file (opened in binary
> mode) in one cycle. The crux is that a '0x0a' (line feed) will break the
> cycle of
On Apr 4, 12:38 pm, "oscartheduck" <[EMAIL PROTECTED]> wrote:
> I have a small script for doing some ssh stuff for me. I could have
> written it as shell script, but wanted to improve my python skills
> some.
>
> RIght now, I'm not catching a syntax error as I'd like to.
>
> Here's my code:
>
> #!/
On 2007-04-04, Thomi Aurel RUAG A <[EMAIL PROTECTED]> wrote:
> I'm using Python 2.4.2 on an ARM (PXA-270) platform (linux-2.6.17).
> My Goal is to write a list of bytes down to a file (opened in binary
> mode) in one cycle. The crux is that a '0x0a' (line feed) will break the
> cycle of one writin
"oscartheduck" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I have a small script for doing some ssh stuff for me. I could have
| written it as shell script, but wanted to improve my python skills
| some.
|
| RIght now, I'm not catching a syntax error as I'd like to.
|
| Here's my
1 - 100 of 237 matches
Mail list logo