(trying again)
"Saravanan D" wrote:
> > > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int
> op
> > > = 88026108, struct _object * v = 0x0001, struct _object * w =
> > > 0x)+0xa9 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3880]
> > > 04 023ffb18 1e016ba4 01
"Saravanan D" wrote:
> > > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int
> op
> > > = 88026108, struct _object * v = 0x0001, struct _object * w =
> > > 0x)+0xa9 [F:\Python-2.3.3\Python-2.3.3\Python\ceval.c @ 3880]
> > > 04 023ffb18 1e016ba4 014f3318 0002
"phil" wrote:
> If someone doesn't know the answer to this question or if noone
> knows the answer to this question
there is no answer to your question. Python works as specified in
the language specification, and the language specification makes
no guarantees. changes in the CPython interpreter
"Saravanan D" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> > The crash occured at the following line:
>> > c = strcmp(vname, wname) (object.c)
> The above one is C Code. The same line is present in object.c file of
> Python Interpreter Source and the function name is
> defaul
Kartic wrote:
> The Great 'Alexander Fillips' uttered these words on 5/9/2005 7:34 AM:
>
>> Hi,
>>
>> my short question:
>>
>> is there a python object which can interpret java-script?
>>
>> the whole story ;-)
>>
>> I wrote some streaming-scripts for the xbox mediaplayer which supports
>> python
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Saravanan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Im running Python Application as a Windows Service (using windows
> > extensions). But, sporadically the application crashes (crash in
> > Py
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Saravanan D" <[EMAIL PROTECTED]> wrote:
>
> > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outcome(int
op
> > = 88026108, struct _object * v = 0x0001, struct _object * w =
> > 0x)+0xa9 [F:\Py
David Harrison wrote:
> I am working on an application on Mac OS X that calls out
> to python via PyImport_ImportModule(). I find that if
> the imported module creates and starts a python thread,
> the thread seems to be killed when the import of
> the module is complete. Is this expected?
No
Hello,
Component which uses only windows extension modules and callback from C++ to
Python.
- Saravanan D
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Saravanan D" <[EMAIL PROTECTED]> wrote:
>
> > 03 023ffaa4 1e013182 055b1250 00637470 python23!cmp_outc
what would be the best tool to use to sync my local dir with a remote
one, say off a http resorce (although i'm open to other options there) i
haven't gotten any feed back on my problems with loading pysvn on win98,
and i can apprechiate if the dev's are too busy/can't be bothered with
win98. b
On 9 May 2005 09:51:34 -0700, [EMAIL PROTECTED] wrote:
>Hi I would like to know how to resize an Image without using python
>Imaging library.
>
You don't say how your image is represented, nor whether you require
the same representation on both ends of the transformation. You don't
say anything ab
Version 0.8.5 of rur-ple has been released.
The web site has completely changed; it includes over 35 pages.
http://rur-ple.sourceforge.net/
--
Learning to program computer should be fun, for adults and children
alike. RUR-PLE is an environment designed to help
James Stroud wrote:
> Hello All,
>
> If "__call__" allows anobject() and "__getitem__" allows anobject[arange],
> why
> not have "__brace__" (or some other, better name) for anobject{something}.
> Such braces might be useful for cross-sectioning nested data structures:
>
> anary = [[1,2,3],[4,
On 9 May 2005 11:06:22 -0700, "Dan Bishop" <[EMAIL PROTECTED]> wrote:
>Skip Montanaro wrote:
>> I understand why the repr() of float("95.895") is
>"95.8949996".
>> What I don't understand is why if I multiply the best approximation
>to
>> 95.895 that the machine has by 1 I magically se
I am working on an application on Mac OS X that calls out
to python via PyImport_ImportModule(). I find that if
the imported module creates and starts a python thread,
the thread seems to be killed when the import of
the module is complete. Is this expected? Does
python have to be in control t
djw <[EMAIL PROTECTED]> writes:
> Paul Rubin wrote:
>> Stelios Xanthakis <[EMAIL PROTECTED]> writes:
>>
>>>- The demo is an x86/linux binary only. You shouldn't trust binaries,
>>> run it in a chrooted environment not as root!
>>
>>
>> Are you going to release the source? If not, it's a lot
Scott David Daniels wrote:
> André Roberge wrote:
>
>>... Each time I refresh the screen, I could
>>force that call, then check to see if Evil has been
>>destroyed by Python, which would give me the information
>>I need to destroy Evil_twin behind the scene myself -
>>which is what I am really af
You're right. I somehow missed the index part :-o. It's easy to fix
though.
--
http://mail.python.org/mailman/listinfo/python-list
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> Is there an easy way to grab the Unique elements from a list?
> For Example:
> data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]
Untested: here's an iterator that gives you the index and value,
without reordering. Uses dicts instead of sets for backwards c
In article <[EMAIL PROTECTED]>,
runes <[EMAIL PROTECTED]> wrote:
>
>This is not the most beautiful idiom, but it works...
>
>d = {}
>for k in data:
>try:
>d[k] += 1
>except:
>d[k] = 1
>
>for k,v in d.items():
>if v == 1:
>print k
Only if "works" does not include
>
> Fredrik Lundh wrote:
>
>>Python is not C++.
>>
Praise the Lord.
>>
>
> I dunno if this makes QOTW, but I vote we put this in our list text that
> goes out with each and every list message.
>
> There will still be a lot of people who don't read it, but at least
> we'll get to say, "We t
phil <[EMAIL PROTECTED]> writes:
> By the way, I understand that __del__ is only called when the last
> reference to an instance is deled. That's fine, if consistent.
Actually, __del__ is called when the instance is garbage
collected. Exactly when that is is implementation dependent. In the
impl
In article <[EMAIL PROTECTED]>,
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Is there an easy way to grab the Unique elements from a list?
> For Example:
> data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]
>
> what I am looking for is the unique elements 0.4 and 0.9 with their
> index from the list.
Hi All--
Fredrik Lundh wrote:
>
> Python is not C++.
>
I dunno if this makes QOTW, but I vote we put this in our list text that
goes out with each and every list message.
There will still be a lot of people who don't read it, but at least
we'll get to say, "We told you so."
-ly y'rs,
Ivan;-)
André Roberge wrote:
> ... Each time I refresh the screen, I could
> force that call, then check to see if Evil has been
> destroyed by Python, which would give me the information
> I need to destroy Evil_twin behind the scene myself -
> which is what I am really after.
What might work is to keep
runes:
> d = {}
> for k in data:
> try:
> d[k] += 1
> except:
> d[k] = 1
>
> for k,v in d.items():
> if v == 1:
> print k
For this problem, if duplicated keys are common enough, this version is
probably the faster.
With this *different* problem, it seems that
On Mon, 09 May 2005 10:54:22 -0400, Jeremy Jones <[EMAIL PROTECTED]> wrote:
>I've written a piece of code that iterates through a list of items and
>determines the filename to write some piece of data to based on
>something in the item itself. Here is a small example piece of code to
>show the ty
hello there,
i get the following error when attempting to load pysvn on a win98 system
Traceback (most recent call last):
> File "PubWare.py", line 11, in ?
> File "Main.pyc", line 46, in ?
> File "pysvn\__init__.pyc", line 12, in ?
> File "pysvn\_pysvn.pyc", line 9, in ?
> File "pysvn\_pysvn
Your set-approach is very nice, but if the list of data is huge, it is
rather slow because you'll have to loop through the data list and count
every member.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 9 May 2005 15:48:14 +0200, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Bill Mill wrote:
>
> for rep in L:
>> ... source = source.replace(token, rep, 1)
>
>here's another way to do it:
>
L = ["11", "22", "33"]
S = "xyzzy text we've got xyzzy text xyzzy yeah yeah yeah"
On Monday 09 May 2005 03:15 pm, [EMAIL PROTECTED] wrote:
> Is there an easy way to grab the Unique elements from a list?
> For Example:
> data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]
>
> what I am looking for is the unique elements 0.4 and 0.9 with their
> index from the list.
> Probably something like
On Monday 09 May 2005 03:15 pm, [EMAIL PROTECTED] wrote:
> Is there an easy way to grab the Unique elements from a list?
from sets import Set
data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]
[x for x in Set(data) if data.count(x) == 1]
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box
[EMAIL PROTECTED] wrote:
> Is there an easy way to grab the Unique elements from a list?
>
Yes.
The set data type.
Look in the reference of python 2.4.
--
Best regards
Roie Kerstein
--
http://mail.python.org/mailman/listinfo/python-list
OK I need to be more clear I guess!Unique Elements I mean, elements
that are non repeating. so in the above list 0.4, 0.9 are unique as
they exist only once in the list.
--
http://mail.python.org/mailman/listinfo/python-list
This is not the most beautiful idiom, but it works...
d = {}
for k in data:
try:
d[k] += 1
except:
d[k] = 1
for k,v in d.items():
if v == 1:
print k
--
http://mail.python.org/mailman/listinfo/python-list
"Anthra Norell" <[EMAIL PROTECTED]> writes:
> I don't follow. There is no bitwise correlation between a plain-text
> character and its encoded equivalent. What's more, there is no detectable
> correlation at all.
Your question was how could you tell if two ciphertexts were encrypted
with the same
alex goldman <[EMAIL PROTECTED]> writes:
> vermicule wrote:
>
> >
> > What is so hard to understand ?
> > Should be perfectly clear even to a first year undergraduate.
> >
> > As for "greedy" even a minimal exposure to Djikstra's shortest path
> > algorithm would have made the concept intuitiv
QOTW: "It's not perfect, but then nobody in this thread has offered
anything even remotely resembling perfect documentation for regular
expressions yet. " - Peter Hansen
"Python's flavor of OO is perfectly valid and usable, even though it
doesn't follow the Java Holy Bible of Object Orientation (g
Is there an easy way to grab the Unique elements from a list?
For Example:
data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]
what I am looking for is the unique elements 0.4 and 0.9 with their
index from the list.
Probably something like a Hash Table approach!!
I would like to get this done without unneces
Paul Rubin wrote:
> Stelios Xanthakis <[EMAIL PROTECTED]> writes:
>
>>- The demo is an x86/linux binary only. You shouldn't trust binaries,
>> run it in a chrooted environment not as root!
>
>
> Are you going to release the source? If not, it's a lot less interesting.
From the website:
"..
Paul,
I thank you too for your response. Let me just tell you what goes
through my mind.
- Original Message -
From: "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid>
Newsgroups: comp.lang.python
To:
Sent: Monday, May 09, 2005 9:45 PM
Subject: Re: Encryption with Python?
> "Anthra Nor
John Machin wrote:
> Terminology disambiguation: what I call "users" wouldn't know what
> 'cp1252' and 'iso-8859-1' were. They're not expected to know. They
> just type in whatever characters they can see on their keyboard or
> find in the charmap utility. It's what I'd call 'admins' and
> 'develop
My python file(progressbar.py) looks like the following:
pbar = gtk.ProgressBar()
def updateBar(percentage):
print percentage
pbar.pulse()
class ProgressBar:
def __init__(self):
# other gui codes
align.add(pbar)
pbar.show()
My C++ codes look like the followi
Or if you're using wxPython, wx.Image can load, rescale and save.
There's also a Python wrapper for imageMagick, which will do just
about anything to medium-small files.
One way or another you'll need to incorporate (depend on) something
that can decode the various image file formats that you nee
Does cimport work for importing from different packages in Pyrex ?
Here's a minimal example:
# in ./foo/bar.pxd
cdef class Bar:
cdef int i
# in ./foo/bar.pyx
cdef class Bar:
def __init__(self, i):
self.i = i
# in ./tmp.pyx
cimport foo.bar
$ pyrexc foo/bar.pyx
$ pyrexc tmp.pyx
tm
Fredrik Lundh wrote:
> André Roberge wrote:
>
>
>
>>This morning I had the following thought:
>>I can, when I create a Jekyll object, update
>>an outside_list.
>>If, somehow, I could update that list when
>>a Jekyll object disappears
>>(perhaps by using __del__, which I have never touched)
>
>
Great Stuff!!!
>(probably including a few specific
> examples of embedding Python for .NET in a .NET application).
Cool!! :-)
Guy
Brian Lloyd wrote:
> Hi all -
>
> I'm happy to announce the release of Python for .NET 1.0 RC1.
> You can download it from:
>
> http://www.zope.org/Members/Bri
"phil" wrote:
> > Python makes no guarantees whatsover about when and how to
> > run __del__, so relying on it to remove user-visible resources is a
> > rather bad idea.
> What does that mean? Is it a destructor or not?
it's a finalizer.
most Python implementations do a reasonable attempt to c
Title: PyAr - Python Argentina 9th Meeting, this Thursday
The Argentine Python User Group, PyAr, will have its nineth
meeting this Thursday, May 12nd at 7:00pm.
Agenda
--
Despite our agenda tends to be rather open, this time we would
like to cover these topics:
- See what we'll do w
andrea crotti <[EMAIL PROTECTED]> writes:
> Hi everbybody again,
> I have a little "problem", I don't understand the reason of this:
>
> a = [10,1,2,3]
> def foo():
> global a
> for n in range(len(a)):
> a[n] = a[n]*2
If I type the above, and then call foo, I get what looks like
reasonabl
"[EMAIL PROTECTED]" wrote:
> Calling a python method from C++ has the following signature:
>
> PyObject *
> PyObject_CallMethod(PyObject *self, char *method_name,
> char *arg_format, ...);
>
> I'm having trouble figuring out how to declare self.
Reading the C API documentation
"Anthra Norell" <[EMAIL PROTECTED]> writes:
> The non-randomness of the difference is evidence of having guessed the key,
> right? Why then do I need two samples? If I hack away at a single sample I
> get a probably more conspicuous non-randomness twice as fast.
No. Let's say you encrypt two asci
PIL is the best way. Or you can call some external program to
do it (using os.system).
Larry Bates
[EMAIL PROTECTED] wrote:
> Hi I would like to know how to resize an Image without using python
> Imaging library.
>
--
http://mail.python.org/mailman/listinfo/python-list
"Eli" wrote:
> I've followed the Python docs about extending the Python interperter
> and created an extension library.
> I've added my functions like this:
>
> static PyMethodDef pmylib_methods[] = {
> {"foo", pmylib_foo, METH_VARARGS, "foo() doc string"},
> ...
> }
> static PyObject *pmylib_foo(
André Roberge wrote:
> This morning I had the following thought:
> I can, when I create a Jekyll object, update
> an outside_list.
> If, somehow, I could update that list when
> a Jekyll object disappears
> (perhaps by using __del__, which I have never touched)
Python makes no guarantees whatsov
Hi Richie,
thank you for your answer.
Your solution is interesting but does not take into account some white
spaces (like those after the commas, before or after mathematical
operands etc...).
Besides that I'm a almost a newbie in Python, and I have the very old
programmers' habits (I don't use cla
[Dan]
>Dan> The floating-point representation of 95.895 is exactly
>Dan> 6748010722917089 * 2**-46.
[Skip Montanaro]
> I seem to recall seeing some way to extract/calculate fp representation from
> Python but can't find it now. I didn't see anything obvious in the
> distribution.
For Da
Hi,
With py2exe-0.3.3 for Python 2.2 in Windows XP, how to configure
setup.py such that multiple executables can share the dll files (like
wx*.dll etc.) as follows:
# Source folders
\Program1
Program1.py
Program1WX.py
\Program2
Program2.py
Program2WX.py
# Output binary folders
\Sha
>> Why isn't the last result "958949.996"? IOW, how'd I get
>> back the lost bits?
Dan> You were just lucky.
Thanks for the response (and to Tim as well).
Dan> The floating-point representation of 95.895 is exactly
Dan> 6748010722917089 * 2**-46.
I seem to recall se
Roy Smith wrote:
> "Kay Schluehr" <[EMAIL PROTECTED]> wrote:
>
> > Roy Smith wrote:
> >
> > > foo->bar ==> foo.__arrrow__(bar)
> > > foo$bar ==> foo.__dollar__(bar)
> > > foo#bar ==> foo.__hash__(bar)
> > > foo::bar ==> foo.__scope__(bar)
> >
> > I'm strongly in favor for the arrow ( but with two "
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
QOTW: "It's not perfect, but then nobody in this thread has offered
anything even remotely resembling perfect documentation for regular
expressions yet. " - Peter Hansen
"Python's flavor of OO is perfectly valid and usable, even though it
doesn't follow the Java Holy Bible of Object Orientation (g
Skip Montanaro wrote:
> I understand why the repr() of float("95.895") is
"95.8949996".
> What I don't understand is why if I multiply the best approximation
to
> 95.895 that the machine has by 1 I magically seem to get the lost
> precision back. To wit:
>
> % python
> Python 2
http://www.pycon.org/talks/
Cheers,
SB
--
http://mail.python.org/mailman/listinfo/python-list
Suppose I have two classes: 'Jekyll' and 'Hyde' that are
related in a particular way.
When I create a Jekyll object, a Hyde one gets automatically
created (and displayed on a screen).
drum roll to announce Python script ===
Nice = Jekyll()# Nice_twin, a Hyde object, gets created.
Nice.
[Skip Montanaro]
> I understand why the repr() of float("95.895") is "95.8949996".
> What I don't understand is why if I multiply the best approximation to
> 95.895 that the machine has by 1 I magically seem to get the lost
> precision back. To wit:
>
>% python
>Python 2.3.4 (#
Hey all,
There was a lot of talk on this list about recording pycon 2005 talks,
but I never saw any messages saying that they'd actually been
recorded. The wiki page (
http://www.python.org/moin/PyConDC2005/TalkRecording ) doesn't give
links to any recordings.
Does anybody know if these recording
I understand why the repr() of float("95.895") is "95.8949996".
What I don't understand is why if I multiply the best approximation to
95.895 that the machine has by 1 I magically seem to get the lost
precision back. To wit:
% python
Python 2.3.4 (#12, Jul 2 2004, 09:48:10)
On 9 May 2005 09:58:19 -0700, ohms377 <[EMAIL PROTECTED]> wrote:
> Dear python users,
>
> In interactive mode, I was wondering if there is a way to list all
> declared variables and functions (and from global workspace).
>
>>> x = 12
>>> z = 13
>>> import re
>>> locals()
{'__builtins__': , 're':
Dear python users,
In interactive mode, I was wondering if there is a way to list all
declared variables and functions (and from global workspace).
Thanks,
-frankie
--
http://mail.python.org/mailman/listinfo/python-list
Hi I would like to know how to resize an Image without using python
Imaging library.
--
http://mail.python.org/mailman/listinfo/python-list
This code should help.
code
import win32com.client
olMailItem = 0x0
obj = win32com.client.Dispatch("Outlook.Application")
newMail = obj.CreateItem(olMailItem)
newMail.Subject = "This works"
newMail.Body = "It worked aging\n"
newMail.display()
V.C.Sekhar wrote:
> Hi there,
>
> Can any
[EMAIL PROTECTED] wrote:
> Let's say I have a python function do some math like the following:
>
> def doMath(self):
>self.val = self.val + 1
>
>
> How can I call this python function from C++? Assuming I have some sort
> of Python wrapper around my C++ codes.
>
Elmer?
http://elmer.source
Hi,
I've followed the Python docs about extending the Python interperter
and created an extension library.
I've added my functions like this:
static PyMethodDef pmylib_methods[] = {
{"foo", pmylib_foo, METH_VARARGS, "foo() doc string"},
...
}
static PyObject *pmylib_foo(PyObject *self, PyObject *a
"Saravanan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Im running Python Application as a Windows Service (using windows
> extensions). But, sporadically the application crashes (crash in
> Python23.dll) and this stops the service. This problem cann't be
> reproduced easily i
wrote:
> Ah damn , that's the way.
>
> And what if you have a very big class and want to include some class
> functions ?
>
> class ThisIsAClass:
> def __init__(self):
>
> Here I want to import a class def
>
The usual way to handle that would be to not write a 'very big class' at
a
Well, not to be left out, here is a pyparsing solution. But this looks
suspiciously like some form of mail-merge or templating application.
Google for 'python templating' for existing approaches to this problem.
Interestingly, using an iterator of L sidesteps a number of other
problems. My origi
Fredrik Lundh wrote:
Jeremy Jones wrote:
#
file_dict = {}
a_list = [("a", "a%s" % i) for i in range(2500)]
b_list = [("b", "b%s" % i) for i in range(2500)]
c_list = [("c", "c%s" % i) for i in range(2500)]
d_list = [("d", "d%s" % i) for i in range(2
Fredrik Lundh wrote:
> you do realize that this opens the file again every time, so you end
> up having 4x2500 file handles pointing to 4 physical files. that's a
> bad idea.
>
Assuming he is using the common C Python most of those file handles get
closed immediately after opening, so he never
Hi folks,
I notice that M2Crypto (a python wrap of OpenSSL) leaks (haemorrhages)
memory significantly and affects my long running app very badly.
Does anyone know of fixes to this problem?
Does anyone recommmend alternatives to M2C ? e.g pyopenssl.
I notice that Guido Van Rossum has flamed abou
Max M wrote:
>> (I just noticed that there's no euro sign on my swedish keyboard. I've
>> never missed it ;-)
>
> It's probably "AltGR + E" like here in DK
ah, there it is. almost entirely worn out. and it doesn't work. but a little
fooling around reveals that AltGr+5 does work. oh well, you
Ah damn , that's the way.
And what if you have a very big class and want to include some class
functions ?
class ThisIsAClass:
def __init__(self):
Here I want to import a class def
--
http://mail.python.org/mailman/listinfo/python-list
Jeremy Jones wrote:
> Here is a small example piece of code to
> show the type of thing I'm doing::
>
> #
> file_dict = {}
>
> a_list = [("a", "a%s" % i) for i in range(2500)]
> b_list = [("b", "b%s" % i) for i in range(2500)]
> c_list = [("c", "c%s" % i) for i in
Robert,
Thanks a lot for your thorough explanations.
- Original Message -
From: "Robert Kern" <[EMAIL PROTECTED]>
To:
Sent: Saturday, May 07, 2005 3:18 PM
Subject: Re: Encryption with Python?
( snip )
> >>You do realize that if I have two ciphertexts encrypted with the same
> >>ke
I would like to adapt the PyShell code completion to DrPython, because
both
programs are very good... Any clue for start finding the code location
in
both programs to accomplish this?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Jeremy Jones wrote:
> #
> file_dict = {}
>
> a_list = [("a", "a%s" % i) for i in range(2500)]
> b_list = [("b", "b%s" % i) for i in range(2500)]
> c_list = [("c", "c%s" % i) for i in range(2500)]
> d_list = [("d", "d%s" % i) for i in range(2500)]
>
>
> joined_list =
the PHP include doesn't have an exact match in Python, but I think you
can do what you intend.
To follow the first example from php.net, this would work
vars.py
color = 'green'
fruit = 'apple'
test.py
from vars import *
print "A " , color, fruit
HTH
--
http://mail.python.org/mailman/listinfo
How about?
put apythonscript_function.py in a separate file
then
inculde apythonscript_function.py at the top of maincode.py
Looks like you probably need to go back and read the tutorial.
-Larry
[EMAIL PROTECTED] wrote:
> H!
>
> I'm trying to find a python function to use like this:
>
> --
I've written a piece of code that iterates through a list of items and
determines the filename to write some piece of data to based on
something in the item itself. Here is a small example piece of code to
show the type of thing I'm doing::
#
file_dict = {}
a_list
H!
I'm trying to find a python function to use like this:
-- maincode.py
Include "apythonscript_function.py"
-- end
So I can split the maincode.py file in smalle pieces.
Or yust save the function's in other file and include them once.
I really want to use this because else { the maincode.py wi
Thursday, 7PM
Harvard Science Center
1 Oxford St Room 507
Cambridge, mA 02101
'Nuff said.
--
http://mail.python.org/mailman/listinfo/python-list
On 5/9/05, Max M <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
>
> > (I just noticed that there's no euro sign on my swedish keyboard. I've
> > never missed it ;-)
>
> It's probably "AltGR + E" like here in DK
My UK keyboard has it as AltGr + 4, FWIW.
--
Cheers,
Simon B,
[EMAIL PROTECTED]
Fredrik Lundh wrote:
> (I just noticed that there's no euro sign on my swedish keyboard. I've
> never missed it ;-)
It's probably "AltGR + E" like here in DK
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
Bill Mill wrote:
for rep in L:
> ... source = source.replace(token, rep, 1)
here's another way to do it:
>>> L = ["11", "22", "33"]
>>> S = "xyzzy text we've got xyzzy text xyzzy yeah yeah yeah"
>>> L.reverse()
>>> re.sub("xyzzy", lambda x: L.pop(), S)
"11 text we've got 22 text 33 yeah
[EMAIL PROTECTED] wrote:
> I would like to replace string with different values,
> For example :
> source = 'kode1 bla bla kode1 bla kode1'
> I have a list with each member will replace each of kode1.
> L = [11,22,33]
> So the new source will become:
> newsource = '11 bla bla 22 bla 33'
>
> How c
[EMAIL PROTECTED] wrote:
> I would like to replace string with different values,
> For example :
> source = 'kode1 bla bla kode1 bla kode1'
> I have a list with each member will replace each of kode1.
> L = [11,22,33]
> So the new source will become:
> newsource = '11 bla bla 22 bla 33'
Here's on
On 9 May 2005 06:23:41 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I would like to replace string with different values,
> For example :
> source = 'kode1 bla bla kode1 bla kode1'
> I have a list with each member will replace each of kode1.
> L = [11,22,33]
> So the new source
John Machin wrote:
> I find it a bit hard to imagine that the euro sign wouldn't get a fair
> bit of usage in Swedish data processing even if it's not their own
> currency.
it's spelled "Euro" or "EUR" in swedish.
(if you live in a country that use letters to represent its own currency,
you tend
Hello,
I would like to replace string with different values,
For example :
source = 'kode1 bla bla kode1 bla kode1'
I have a list with each member will replace each of kode1.
L = [11,22,33]
So the new source will become:
newsource = '11 bla bla 22 bla 33'
How can I do it ? I tried to find using s
"Kay Schluehr" <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
> > foo->bar ==> foo.__arrrow__(bar)
> > foo$bar ==> foo.__dollar__(bar)
> > foo#bar ==> foo.__hash__(bar)
> > foo::bar ==> foo.__scope__(bar)
>
> I'm strongly in favor for the arrow ( but with two "r" only ). The
> question is simpl
1 - 100 of 126 matches
Mail list logo