2006/7/4, bruce <[EMAIL PROTECTED]>:
> hi...
>
> does python provide regex handling similar to perl. can't find anything in
> the docs i've seen to indicate it does...
>
> -bruce
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
http://python.org/doc/2.4.1/lib/module-re.html
Here is t
On Tue, 04 Jul 2006 18:25:14 +, Dennis Lee Bieber wrote:
> I suspect what you really want (I'm not going to open an interpreter
> to test) is:
>
> def __init__(self, value, extra=None):
> int.__init__(self, value)
Yes, that's exactly what I meant -- it was a copy-an
On Tue, 04 Jul 2006 19:26:36 +0200, Bruno Desthuilliers wrote:
> Steven D'Aprano wrote:
>> I'm having problems with sub-classes of built-in types.
>>
>> Here is a contrived example of my subclass. It isn't supposed
>> to be practical, useful code, but it illustrates my problem.
>>
>> class MyStr
On Tue, 04 Jul 2006 22:07:59 -0700, bruce wrote:
> do i need to import anything for this.. or is it supposed to work out of the
> box..
Why don't you try it, and see if it gives you a result or raises an
exception? The exception (if any) will give you a clue what you need to do.
> and just what
bruce wrote:
> robert
>
> i did an
> python>>> import numpy
> a = array([['q','a'],['w','e']])
>
> and it didn't work...
>
> i used
> >>from import numpy *
>
> and it seems to accept the 'array' word.. .looks like it will work...
>
> what's the difference between 'import numpy', an
do i need to import anything for this.. or is it supposed to work out of the
box..
and just what is it doing!
-bruce
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of tac-tics
Sent: Tuesday, July 04, 2006 9:53 PM
To: python-list@python.org
Subject: Re: d
robert
i did an
python>>> import numpy
a = array([['q','a'],['w','e']])
and it didn't work...
i used
>>from import numpy *
and it seems to accept the 'array' word.. .looks like it will work...
what's the difference between 'import numpy', and "from import numpy *"
comments...
tha
bruce wrote:
> hi...
>
> basic question..
>
> how do i define a multi dimensional array
>
> a[10][10]
I find that list comprehensions are useful for this.
[ [None for x in xrange(10)] for y in xrange(10)]
You could easily write a wrapper for it to clean the syntax a bit.
--
http://mail.pytho
gel wrote:
> Hi
> I would like to pass a variable in and use it as part of a name of an
> object, something like below, where I pass the variable software into
> the function and use it as part of the name of the object so that I can
> append to it using the other vairables. Any suggestions?
>
>
bruce wrote:
> hi...
>
> i'm trying to find numarray.. i found the numpy on sourceforge and
> downloaded/installed..
>
> i did a
> python>> import numarray
>
> and got an error...
Never just say "I got an error." It tells us nothing. Copy-and-paste the exact
error message. I presume, however,
Brad Knowles wrote:
>Ethan said:
>
>> I plan on using [2] to generate mbox thread indexes for rapid navigation
>> of lists. Any suggestions for more robust variants would be welcome;
>> feedback on how to handle threading for message-id-less messages would
>> also be welcome.
>
>All messages shoul
i tried to do
a1[10][10] = ['a','q']
and get an error saying a1 is not defined
-bruce
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Erik Max Francis
Sent: Tuesday, July 04, 2006 9:14 PM
To: python-list@python.org
Subject: Re: defining multi dimensi
Hi
I would like to pass a variable in and use it as part of a name of an
object, something like below, where I pass the variable software into
the function and use it as part of the name of the object so that I can
append to it using the other vairables. Any suggestions?
def a_d(self,softwar
I tried downloading and installing from the fedora site and got this:
gtk2-2.8.19-2.i386.rpm is already installed
However, the problem seems to have gone away. Not sure what happened
there.
Thank you for the reply.
gtk2-2.8.19-2.i386.rpm is already installed
Frank Millman wrote:
> ianaré wrote:
hi...
i'm trying to find numarray.. i found the numpy on sourceforge and
downloaded/installed..
i did a
python>> import numarray
and got an error...
the docs that i've seen point to the sourceforge area.. but i only see
numpy.. which appears to incorporate numarray..
my goal is to somehow defi
bruce wrote:
> basic question..
>
> how do i define a multi dimensional array
>
> a[10][10]
>
> is there a kind of a = array(10,10)
It's just a list of lists.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfranci
update...
i need a multi dimensional array of lists...
ie
[q,a,d]
[q1,a1,d1]
[q2,a2,d2]
[q3,a3,d3]
which would be a (3,4) array...
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of bruce
Sent: Tuesday, July 04, 2006 8:15 PM
To: python-list@python.
hi...
basic question..
how do i define a multi dimensional array
a[10][10]
is there a kind of a = array(10,10)
thanks
-bruce
--
http://mail.python.org/mailman/listinfo/python-list
Simon Forman wrote:
> I've got a function that I'd like to improve.
>
> It takes a list of lists and a "target" element, and it returns the set
> of the items in the lists that appear either before or after the target
> item. (Actually, it's a generator, and I use the set class outside of
> it to
On Tue, 4 Jul 2006 16:53:27 -0700, Alex Martelli wrote:
> James Mitchelhill <[EMAIL PROTECTED]> wrote:
>> I'm trying to write a class that analyses some data. I only want it to
>> do as much work as necessary, so it saves method results to a
>> dictionary
> For your needs, I would suggest first
Hi All
CSpace aims to be the next generation in realtime communication. It is
an opensource python application, which provides a platform for secure,
decentralized, user-to-user communication.
The platform provides a connect(user,service) primitive, similar to the
sockets API connect(ip,port). Ap
I suspect you will have to process those formats separately. But the
good news, at least for doc files, is that there is a script in the
Python Cookbook 2Ed that does what you want for MS Word docs and
another script that does it for Open Office docs.
The scripts are 2.26 and 2.27 pages 101-102.
James Mitchelhill <[EMAIL PROTECTED]> wrote:
> Sorry for the clunky subject line - I have a feeling that not knowing
> the proper terms for this is part of my problem.
>
> I'm trying to write a class that analyses some data. I only want it to
> do as much work as necessary, so it saves method res
On 4/07/2006 8:06 PM, aliassaf wrote:
> Hello,
>
> If we write = x^2 and if I give to the program the values of x, it will
> going to calculate the values of y, and also for x.
>
> But it is possible ? that is if I give to the program the values of X and Y,
> it will indicate to me the rel
James Mitchelhill wrote:
> Sorry for the clunky subject line - I have a feeling that not knowing
> the proper terms for this is part of my problem.
>
> I'm trying to write a class that analyses some data. I only want it to
> do as much work as necessary, so it saves method results to a
> dictionary
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
...
> The obvious problem is, I have to create a custom method for every string
> method -- and if strings gain any new methods in some future version of
> Python, my subclass won't exhibit the correct behaviour.
As others already suggested, automating
Sorry for the clunky subject line - I have a feeling that not knowing
the proper terms for this is part of my problem.
I'm trying to write a class that analyses some data. I only want it to
do as much work as necessary, so it saves method results to a
dictionary, like so:
class MyClass:
def
Pypy aims to become (probably sometime next year) a strong candidate to
replace cpython as the main python implementation.
Its goals are very ambicious and one of them is making it fast.
Some of its developers even think it can get as fast as C, although I
think that if it can get as fast as java,
Steven D'Aprano wrote:
> On Tue, 04 Jul 2006 03:06:37 -0700, aliassaf wrote:
>
>
>>Hello,
>>
>>If we write = x^2 and if I give to the program the values of x, it will
>>going to calculate the values of y, and also for x.
>>
>>But it is possible ? that is if I give to the program the values
On 5/07/2006 1:09 AM, Steven D'Aprano wrote:
> On Mon, 03 Jul 2006 06:20:36 -0700, Vusi wrote:
>
>> /* $Id: dotquad.c 3529 2005-10-01 10:15:22Z dyoung $ */
>> /*
>> * Copyright (c) 2003, 2004 David Young. All rights reserved.
>> *
>> * This code was written by David Young.
>
> [snip code]
>
Roel Schroeven a écrit :
(snip)
> AFAIK, shape files are files with geospatial information used by ESRI
(snip)
> But I still can't answer the question. I don't even know if there's a
> way for python to read shape files.
There's of course a way to read files in Python - look at the
open( [,]) b
below is the data I am trying to read
"04""AS0042123BO" "AS 0042.123 ROYAL ELONG SEAT
BO" "001610""A/S Fixtures" 0 $99.00 3.70""
"0042123" 11/20/2003
"24""AS0042001BK" "AS 0042.001 ROYAL EL*DISC BY
MFG*BK" "001610""A/S
Fixture
Ethan said:
> In the interest of not reinventing the wheel, I'm looking for existing
> python (or other!) code that does the things I need. I'm also putting
> out a call for anybody who likes this sort of thing to help me out (see
> below).
Don't ignore non-Python solutions. In particular, you s
JohnJohn wrote>
> Is there a way that I can have python always bring up the Save As
> dialog pointing to the directory of my choice? In other words, I
> would like to specify what I want the default directory for saving
> files to be.
>
I use PythonWin, not IDLE. But I suspect you could use the
Situation is this:
1) I have inherited some python code that accepts a string object, the
contents of which is an XML document, and produces a data structure
that represents some of the content of the XML document
2) The inherited code is somewhat 'brittle' in that some well-formed
XML documents ar
bruce wrote:
> hi...
>
> does python provide regex handling similar to perl. can't find anything in
> the docs i've seen to indicate it does...
>
> -bruce
It helps to learn to search before asking for help.
Typing the words - python regex (words from your post) into Google
gives you plenty of res
On Tue, 04 Jul 2006 15:44:03 -0400, emf <[EMAIL PROTECTED]> wrote:
>Dearest mail manipulating macaques and perambulating python
>prestidigitators,
>
>I have been blessed by the grace of Google and so am working full-time
>on improving Mailman's web UI:
>
>http://wiki.list.org/display/DEV/Summer+of+
[EMAIL PROTECTED] writes:
[...]
> (Instead of numarray you can use ScyPy, numerics, etc.)
> If your data in on disk you can avoid the list=>array conversion, and
> load the data from the numerical library itself, this is probably
> almost as fast as doing the same thing in C.
Apparently if you're
Martin Manns wrote:
> Hi,
>
> When I use matplotlib for a scatter plot with both dots and connecting
> lines, the exported eps file is huge, if the distances between many points
> are small. I think of this as a bug, since no preview tiff is included in
> the generated eps and a variety of text p
Ian Vincent wrote:
> I cannot find a Jython newsgroup, so apologies in advance if this
> question has been posted to the wrong group.
>
Try the jython-users mailing list:
http://lists.sourceforge.net/mailman/listinfo/jython-users
- kz
--
http://mail.python.org/mailman/listinfo/python-lis
Dearest mail manipulating macaques and perambulating python
prestidigitators,
I have been blessed by the grace of Google and so am working full-time
on improving Mailman's web UI:
http://wiki.list.org/display/DEV/Summer+of+Code
In order to provide interfaces to archives, I believe I must perfo
Roman a écrit :
Roman, please stop top-posting and learn to quote.
> Bruno Desthuilliers wrote:
>
>>Roman wrote:
>>(please dont top-post - corrected)
>>
>>>
>>>My intention is to create matrix based on parsed csv file. So, I
>>>would like to have a list of columns (which are also lists).
>>
>>
[Nathan Bates]
> Are the Python developers running Python under Valgrind?
Please read Misc/README.valgrind (in your Python distribution).
--
http://mail.python.org/mailman/listinfo/python-list
Are the Python developers running Python under Valgrind?
If not, FYI, Valgrind is a excellent memory-checker for Linux.
Valgrind is reporting a ton of memory problems.
Worrisome are "Conditional jump or move depends on uninitialised
value(s)" errors.
I simply started the Python 2.4.2 interpreter,
t
[EMAIL PROTECTED] wrote:
> What is the actual problem you're trying to solve? If you just want to
> force a namespace declaration in output (this is sually to support
> QNames in content) the most well-known XML hack is to create a dummy
> attribute with the needed prefix and namespace. But this
> > /* $Id: dotquad.c 3529 2005-10-01 10:15:22Z dyoung $ */
> > /*
> > * Copyright (c) 2003, 2004 David Young. All rights reserved.
> > *
> > * This code was written by David Young.
>
> [snip code]
>
> Am I the only one who found it hilarious that this piece of code was made
> up of 24 lines of
Filipe wrote:
> term = row[1]
> print repr(term)
>
> output I got in Pyscripter's interpreter window:
> 'Fran\x87a'
>
> output I got in the command line:
> 'Fran\xd8a'
>
> I'd expect "print" to behave differently according with the console's
> encoding, but does this mean this happens with repr(
I am trying to learn a bit about dbus on my Fedora Core 5 laptop.
All of the python examples I find on google fail to "compile" for
one reason or another, I guess the interface is still in flux...
Does anyone know of a source for a few simple examples that can
get me started?
Does anyone know if
Steven D'Aprano wrote:
> On Tue, 04 Jul 2006 06:32:13 -0700, Gaurav Agarwal wrote:
>
> > Hi,
> >
> > I wanted a script that can convert any file format (RTF/DOC/HTML/PDF/PS
> > etc) to text format.
>
> PDF is (I believe) a compressed, binary format of PS. Perhaps you should
> look at the program pd
Thanks for spending so much time with me. I had since made the
following change.
matrix = [[[] for l in range(len(list(reader)[:10]))] for c in
range(len(list(reader)[7]))]
for numline, line in enumerate(reader):
for numcol, col in enumerate(line):
matrix[numcol][numline] = col
print
Steven D'Aprano wrote:
> I'm having problems with sub-classes of built-in types.
>
> Here is a contrived example of my subclass. It isn't supposed
> to be practical, useful code, but it illustrates my problem.
>
> class MyStr(str):
> """Just like ordinary strings, except it exhibits special b
Point well taken, and indeed a brilliant solution. Thank you I V for
demonstrating so clearly.
I V wrote:
> On Mon, 26 Jun 2006 19:40:52 -0700, digitalorganics wrote:
> > A misuse of inheritance eh? Inheritance, like other language features,
> > is merely a tool. I happen to be using this tool to
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > I'm working with a team that's doing social modeling, and for example,
> > I need to model workers that at some point in the program may or may
> > not also become employers. Now, I want the workers to take on all
> > behaviors and attributes o
aliassaf wrote:
> Hello,
>
> If we write = x^2 and if I give to the program the values of x, it will
> going to calculate the values of y, and also for x.
>
> But it is possible ? that is if I give to the program the values of X and Y,
> it will indicate to me the relation between the two variabl
Roman wrote:
(please dont top-post - corrected)
>
> Steven D'Aprano wrote:
>
>>On Tue, 04 Jul 2006 07:01:55 -0700, Roman wrote:
>>
>>
(snip)
>>
>>>cnt = 0
>>>p=[]
>>>reader = csv.reader(file("f:\webserver\inp.txt"), dialect="excel",
>>> quotechar="'", delimiter='\t')
>>>fo
Hi All,
I tried looking in several places, including Python's documentation,
CheeseShop, general search, and didn't find anything. Is implementation
of GNU date input formats
(http://www.gnu.org/software/tar/manual/html_node/tar_109.html)
available in Python? I'm primarily interested in parsing re
Nomen Nescio wrote:
> I'm running gpg in python to verify a signature. I can see that it is
> working, because gpg is displaying the results.
>
> But I need a way to let the python script know this. According to the gpg
> manual there is a return code from gpg of 0 if the verify is good and 1 if
>
In <[EMAIL PROTECTED]>, bruce wrote:
> does python provide regex handling similar to perl. can't find anything in
> the docs i've seen to indicate it does...
The `re` module handles Perl compatible regexes.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python
what you do here is you complete simple surveys and offers, some
require a credit card, but i just do all the free ones :D
its easy to do, you just register and do the offers, then click the
"done" button when you have completed it to what the instructions say,
here is the website if you want to
hi...
does python provide regex handling similar to perl. can't find anything in
the docs i've seen to indicate it does...
-bruce
--
http://mail.python.org/mailman/listinfo/python-list
I am getting
TypeError: unsubscriptable object
when specifying
for line in reader[:7]:
Steven D'Aprano wrote:
> On Tue, 04 Jul 2006 07:01:55 -0700, Roman wrote:
>
> > I would appreciate it if somebody could tell me where I went wrong in
> > the following snipet:
> >
> > When I run I get no res
thanks for your replies!!
the solution..
dd = dd.replace(u'\xa0','')
this allows the nbsp hex representation to be replaced with a ''. i thought
i had tried this early in the process.. but i may have screwed up the
typing...
-bruce
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[
On Tue, 04 Jul 2006 09:01:15 -0700, bruce wrote:
> update...
>
> the error i'm getting...
>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in
> position 62: ordinal not in range(128)
Okay, now we're making progress -- we know what exception you're getting.
Now, how about t
yep!
dang phat fingers!!! thanks
everything's working as it should... 6 hours to track down this little
issue!!!
arrrgghhh..
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Fredrik Lundh
Sent: Tuesday, July 04, 2006 9:09 AM
To: python-list@python.org
I'm running gpg in python to verify a signature. I can see that it is
working, because gpg is displaying the results.
But I need a way to let the python script know this. According to the gpg
manual there is a return code from gpg of 0 if the verify is good and 1 if
it is bad.
Can anyone tell me
removing int frrom host = int(sys.argv[1]) fixed the problem. Thanks
Fred!!!
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > #/ usr/bin/env python
> > # filename: tmc.py (CLIENT)
> >
> > import socket
> > import sys
> >
> > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> >
> > host
On 2006-07-04, aliassaf <[EMAIL PROTECTED]> wrote:
> But it is possible ? that is if I give to the program the values of X and Y,
> it will indicate to me the relation between the two variables, in the other
> hand if I look to the program x=2 y=4, x=3 y=9 ect... it is going to show me
> that f (t
Hi,Working on my current project, I discovered the following behaviour: a widget defined before the window in which I try to grid it won't show up, but will take space and behave like it is there (blind typing proves it). A widget defined after the griding window will come up fine. The following ex
Peter Otten wrote:
> from numarray import array
> a = array(a)
> b = array(b)
> c = array(c)
> d = array(d)
> e = (c-d) - (a-b)*(a-b)
Oops, bearophile has already posted the same idea with better execution...
--
http://mail.python.org/mailman/listinfo/python-list
bruce wrote:
> i've done the s.replace('\xa0','') with no luck.
let me guess: you wrote
s.replace("\xa0", "")
instead of
s = s.replace("\xa0", "")
?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> #/ usr/bin/env python
> # filename: tmc.py (CLIENT)
>
> import socket
> import sys
>
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>
> host = int(sys.argv[1])
> port = int(sys.argv[2])
the port number is an integer, but the host name/ip is obviously not an
[EMAIL PROTECTED] wrote:
> I hope I am not being too ignorant :p but here goes... my boss has
> written a bit of python code and asked me to speed it up for him...
> I've reduced the run time from around 20 minutes to 13 (not bad I think
> ;) to speed it up further I asked him to replace a loop li
I'm having problems with sub-classes of built-in types.
Here is a contrived example of my subclass. It isn't supposed
to be practical, useful code, but it illustrates my problem.
class MyStr(str):
"""Just like ordinary strings, except it exhibits special behaviour
for one particular value
steven...
when you have the >>>u'hello ? world'<< in your interpreter/output, is the
'u' indicating that what you're displaying is unicode?
i pretty much tried what you have in the replace.. and i got the same error
regarding the unicodedecode error...
-Original Message-
From: [EMAIL
Hi,
I have the following code for a cline and server which I got from a
small tutorial on the web.
#!/ usr/bin/env python
# tms.py (SERVER)
import socket
import sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = ''
port = int(sys.argv[1])
s.bind((host,port))
s.listen(1)
conn, add
update...
the error i'm getting...
>>>UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in
position 62: ordinal not in range(128)
is there a way i can tell/see what the exact char is at pos(62). i was
assuming that it's the hex \xa0.
i've done the s.replace('\xa0','') with no luc
Roman wrote:
(please dont top-post - corrected)
>
> Iain King wrote:
>
>>Roman wrote:
>>
>>>I would appreciate it if somebody could tell me where I went wrong in
>>>the following snipet:
>>>
(snip)
>>What are you trying to do here? p[:0] returns a new list, of all the
>>elements in p up to ele
Hi all,
I have
invested probably 500 hours in the development of a module which I think could
fill a gap, judging by some problems regularly discussed on this
forum. The module is finished and I want to contribute it. A kind
sould recently suggested I upload it to the Cheese Shop. I
Thanks Steven, Actually i wanted a do text processing for my office
where I can view all files in the system and use the first three to
give a summary of the document. Instead of having somebody actually
entering the summary. Seems there is no one code that can act as
convertor across formats, i'll
[EMAIL PROTECTED]:
Using Python you can do:
# Data:
l_a = [1.1, 1.2]
l_b = [2.1, 2.2]
l_c = [3.1, 3.2]
l_d = [5.1, 4.2]
from itertools import izip
l_e = [(c-d) - (a-b)*(a-b) for a,b,c,d in izip(l_a, l_b, l_c, l_d)]
print l_e
With psyco + the standard module array you can probably go quite fast,
On Tue, 04 Jul 2006 08:09:53 -0700, bruce wrote:
> simon...
>
> the issue that i'm seeing is not a result of simply using the
> 'string.replace' function. it appears that there's something else going on
> in the text
>
> although i can see the nbsp in the file, the file is manipulated by a n
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > ## just for a laugh my own zip function
> > ## the joke is it runs faster than built in zip ??
>
> since it doesn't do the same thing, it's not a very good joke.
>
> > def myzip(*args):
> > index = 0
> > for elem in args[0]:
> >
Fabian Holler wrote:
> Yes thats right, but that isn't my problem.
> The problem is in the "(?=(iface)|$)" part.
no, the problem is that you're thinking "procedural string matching from
left to right", but that's not how regular expressions work.
> I have i.e. the text:
>
> "auto lo eth0
> ifa
Steven D'Aprano wrote:
> On Tue, 04 Jul 2006 07:18:29 -0700, [EMAIL PROTECTED] wrote:
>
> > I hope I am not being too ignorant :p but here goes... my boss has
> > written a bit of python code and asked me to speed it up for him...
> > I've reduced the run time from around 20 minutes to 13 (not bad
Nothing got printed.
Could you tell me what would be pythonic version of what I am trying to
do?
Diez B. Roggisch wrote:
> > p[j] does not give you a reference to an element inside p. It gives
> > you a new sublist containing one element from p. You then append a
> > column to that sublist. T
> so fastest overall
you may experience speed-ups by using
from itertools import izip
and just use izip() instead to avoid the module namespace lookup. The
same applies for the list.append() methods. If you're appending some
million times
a_list = []
a_list_append = a_list.append
a_list_append
On Tue, 04 Jul 2006 07:18:29 -0700, [EMAIL PROTECTED] wrote:
> I hope I am not being too ignorant :p but here goes... my boss has
> written a bit of python code and asked me to speed it up for him...
> I've reduced the run time from around 20 minutes to 13 (not bad I think
> ;) to speed it up furt
[EMAIL PROTECTED] wrote:
> ## just for a laugh my own zip function
> ## the joke is it runs faster than built in zip ??
since it doesn't do the same thing, it's not a very good joke.
> def myzip(*args):
> index = 0
> for elem in args[0]:
> zipper = []
> for arg in args:
>
Hello Marc,
thank you for your answer.
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Fabian Holler wrote:
>> i have the following regex "iface lo[\w\t\n\s]+(?=(iface)|$)"
>>
>> If "iface" don't follow after the regex "iface lo[\w\t\n\s]" the rest of
>> the text should be selected.
>
> p[j] does not give you a reference to an element inside p. It gives
> you a new sublist containing one element from p. You then append a
> column to that sublist. Then, since you do nothing more with that
> sublist, YOU THROW IT AWAY.
Not correct.
p = [[]]
p[0].append(1)
print p
yields
[[1
Hi Terry.
I see:
http://codespeak.net/pypy/dist/pypy/doc/news.html
"...by translating RPython to Javascript..."
It isn't an implementation.
--
JavaScript implementation of Python
http://groups.google.it/group/JSython/
Terry Hancock ha scritto:
> . wrote:
>
> > What is the fast way for a fast
simon...
the issue that i'm seeing is not a result of simply using the
'string.replace' function. it appears that there's something else going on
in the text
although i can see the nbsp in the file, the file is manipulated by a number
of other functions prior to me writing the information out
Roman wrote:
> Thanks for your help
>
> My intention is to create matrix based on parsed csv file. So, I would
> like to have a list of columns (which are also lists).
>
> I have made the following changes and it still doesn't work.
>
>
> cnt = 0
> p=[[], [], [], [], [], [], [], [], [], [], []]
>
Rune Strand wrote:
> itertools.izip is usually faster than zip. You can try that.
Thanks very much
timing for itertools.izip
for av, bv, cv, dv in itertools.izip(a, b, c, d):
avbv = (av-bv) * (av - bv)
diff = cv - dv
e.append(diff - avbv)
on a 4 million element aray:
slice:
8.06299
In <[EMAIL PROTECTED]>, Fabian Holler wrote:
> Howdy,
>
>
> i have the following regex "iface lo[\w\t\n\s]+(?=(iface)|$)"
>
> If "iface" don't follow after the regex "iface lo[\w\t\n\s]" the rest of
> the text should be selected.
> But ?=(iface) is ignored, it is always the whole texte selected
On Mon, 03 Jul 2006 06:20:36 -0700, Vusi wrote:
> /* $Id: dotquad.c 3529 2005-10-01 10:15:22Z dyoung $ */
> /*
> * Copyright (c) 2003, 2004 David Young. All rights reserved.
> *
> * This code was written by David Young.
[snip code]
Am I the only one who found it hilarious that this piece of
Roman schrieb:
> I would appreciate it if somebody could tell me where I went wrong in
> the following snipet:
>
> When I run I get no result
>
> cnt = 0
> p=[]
> reader = csv.reader(file("f:\webserver\inp.txt"), dialect="excel",
> quotechar="'", delimiter='\t')
> for lin
Thanks for your help
My intention is to create matrix based on parsed csv file. So, I would
like to have a list of columns (which are also lists).
I have made the following changes and it still doesn't work.
cnt = 0
p=[[], [], [], [], [], [], [], [], [], [], []]
reader = csv.reader(file("f:\we
On Tue, 04 Jul 2006 03:06:37 -0700, aliassaf wrote:
>
> Hello,
>
> If we write = x^2 and if I give to the program the values of x, it will
> going to calculate the values of y, and also for x.
>
> But it is possible ? that is if I give to the program the values of X and Y,
> it will indi
Martin v. Löwis wrote:
> Filipe wrote:
> > output ---
> > u'Fran\xd8a'
> > FranØa
> >
> >
> > What do you think? Might it be Pymssql doing something wrong?
>
> I think the data in your database is
1 - 100 of 170 matches
Mail list logo