Hello
you are using the module variable ie inside the Generic
Function, but you have to use "d" since this is the Python object
which is allowed to access the COM object in the
separate thread.
Stefan
From: Tejovathi P
[mailto:[EMAIL PROTECTED] Sent: Monday, October 16,
Robert Kern wrote:
> Martin Manns wrote:
> > Hello,
> >
> > Is there any library that allows employing max-plus dioids in
> > python (e.g. based on numpy/scipy)?
>
> Google says "no" and I haven't heard of any, so I imagine that there aren't.
> There might be something buried in some of the control
Hi everyone,
When i decide to paras a string,which return from running a CVS command,it's amaze that i want to get some file of the echo string ,how to make paras process more effect?
the problem detail as follow that:
run command:"cvs status -r" it will return all the file list in as follow
Méta-MCI wrote:
> Hi!
>
>
> .func( is not defined...
>
>
> @-salutations
> --
> Michel Claveau
I am sorry. By func(dest) I meant MyNavigate(dest). Can u please help
me out...
Thnks,
Teja.P
--
http://mail.python.org/mailman/listinfo/python-list
Gregor Horvath schrieb:
>
> Is there any other solution, probably with metaclasses ?
>
I've found this one:
class mymeta(type):
def __new__(meta, class_name, bases, new_attrs):
new_attrs["edit"] = adecorator(new_attrs['xy'])(bases[0].edit))
return type.__new__(meta, class_na
On 10/17/06, Kevien Lee <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> When i decide to paras a string,which return from running a CVS command,it's
> amaze that i want to get some file of the echo string ,how to make paras
> process more effect?
>
> the problem detail as follow that:
>
> run command
On 10/17/06, Kevien Lee <[EMAIL PROTECTED]> wrote:
> PS:is there any python lib for CVS ?
Doubt it, but there is a Python library for Subversion (SVN > CVS anyway).
-- Theerasak
--
http://mail.python.org/mailman/listinfo/python-list
Teja wrote:
> I am sorry. By func(dest) I meant MyNavigate(dest). Can u please help
> me out...
nobody here can read your mind. please post the code you're actually
using, *and* the error you're getting.
--
http://mail.python.org/mailman/listinfo/python-list
Kevien Lee wrote:
> PS:is there any python lib for CVS ?
there's some stuff in Demo/pdist in the Python source distribution,
including a module called "cvslib".
--
http://mail.python.org/mailman/listinfo/python-list
On 10/17/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Kevien Lee wrote:
>
> > PS:is there any python lib for CVS ?
>
> there's some stuff in Demo/pdist in the Python source distribution,
> including a module called "cvslib".
then I stand corrected...
-- Theerasak
--
http://mail.python.org/mail
On 10/17/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> "Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote:
> > Kay Schluehr wrote:
> > > Bruno Desthuilliers wrote:
> > >
> > >> Just for the record : Ruby's code-blocks (closures, really) come from
> > >> Smalltalk, which is still the OneTrueObje
Fredrik Lundh wrote:
> Teja wrote:
>
> > I am sorry. By func(dest) I meant MyNavigate(dest). Can u please help
> > me out...
>
> nobody here can read your mind. please post the code you're actually
> using, *and* the error you're getting.
>
>
Thnks for your immediate reply.
Here is the code:
On 14 Oct 2006 09:25:00 -0700, Paul Boddie <[EMAIL PROTECTED]> wrote:
> Unlike Java, Python's first class functions and
> methods are already highly useful for callback-based systems
Curious: how well does the use of returning inner functions work as a
strategy for providing effectively 'anonymou
In a web application users can post some information. I would like to
link each posting with a "weight of importance" for a user, depending
on a keywords in the posting.
For example, I know that a user A is interested in Nokia mobiles while
user B in Siemens mobiles.
So, if a user A is signed, he w
Fredrik Lundh 写道:
> dracula571 wrote:
>
> > but k[-6:2] = [1,2]
> > why k[-6:2] is [1,2]not [].i do follow (3),to make i positive by
> > plusing len(k) twice.
>
> twice?
>
>
that is -6 + len(k) + len(k) =4
--
http://mail.python.org/mailman/listinfo/python-list
Hello NG,
I am using the latest Numpy release 1.0rc2 which includes F2PY. I
have switched to Python 2.5 so this is the only alternative I have
(IIUC). With Python 2.4, I was able to build a very simple fortran
extension without problems.
My extension contains 4 subroutines that scan a file an
[EMAIL PROTECTED] 写道:
> dracula571 wrote:
> > s[i:j] slice of s from i to j (3), (4)
> >
> > (3)
> > If i or j is negative, the index is relative to the end of the string:
> > len(s) + i or len(s) + j is substituted. But note that -0 is still 0.
> >
> >
> > (4)
> > The slice of s from i t
On Mon, 16 Oct 2006 09:21:11 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
[me]
> >> - the wildcard object, which compares equal to everything else
>
[Paul]
> Paul> class MatchAny(object):
> Paul> def __cmp__(self,other):
> Paul> return 0
>
> Pau
"dracula571" wrote:
>> dracula571 wrote:
>>
>> > but k[-6:2] = [1,2]
>> > why k[-6:2] is [1,2]not [].i do follow (3),to make i positive by
>> > plusing len(k) twice.
>>
>> twice?
>
> that is -6 + len(k) + len(k) =4
sure, but what makes you think you should add the length twice?
--
http://m
Dennis Lee Bieber wrote:
> On 17 Oct 2006 00:58:59 -0700, "Teja" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> >thread.start_new_thread(self.nav, (s,'www.google.com')
> >
> > I am getting an attribute error
>
> That can not be the REAL code... I'd expect a sy
Teja wrote:
> s=pythoncom.CoMarshalInterThreadInterfaceInStream(pythoncom.IID_IDispatch,ie)
>
>thread.start_new_thread(self.nav, (s,'www.google.com')
>
> I am getting an attribute error
the traceback tells you what attribute Python was looking for, and may also
provide
additional clues
Teja wrote:
>
> Dennis Lee Bieber wrote:
>> On 17 Oct 2006 00:58:59 -0700, "Teja" <[EMAIL PROTECTED]> declaimed
>> the following in comp.lang.python:
>>
>> >thread.start_new_thread(self.nav, (s,'www.google.com')
>> >
>> > I am getting an attribute error
>>
>> That can not be the REAL code
Diez B. Roggisch wrote:
> Teja wrote:
>
> >
> > Dennis Lee Bieber wrote:
> >> On 17 Oct 2006 00:58:59 -0700, "Teja" <[EMAIL PROTECTED]> declaimed
> >> the following in comp.lang.python:
> >>
> >> >thread.start_new_thread(self.nav, (s,'www.google.com')
> >> >
> >> > I am getting an attribut
neoedmund wrote:
(snip)
> So I can reuse a method freely only if it's worth reusing.
> For the word "inheritance", in some aspect, meanings reuse the super
> class, with the condition: must reuse everything from super class.
Not really. In fact, inheritance *is* a special case of
composition/deleg
Jorgen Grahn <[EMAIL PROTECTED]> wrote:
>> >> - the wildcard object, which compares equal to everything else
>>
> [Paul]
>> Paul> class MatchAny(object):
>> Paul> def __cmp__(self,other):
>> Paul> return 0
>>
>> Paul> wild = MatchAny()
>
> FWIW, I define __eq
On 16/10/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Jia Lu wrote:
> > Hi all:
> >
> > I try to do things below:
> import sys
> for i in sys.modules.keys():
> > import i
> > Traceback (most recent call last):
> > File "", line 2, in
> > import i
> > ImportError: No m
Dennis,
Thank you for your reply
You say:
>Pretend you are the computer/application/etc. How would YOU
> perform such a ranking?
That is what I do not know , how to perform such ranking.
Do you have any idea?
Regards,
Lad.
--
http://mail.python.org/mailman/listinfo/python-list
Wolfgang Keller wrote:
>> Developping quality SQLDBMS-based applications requires more than "a
>> bit" of SQL knowledge.
>
> No doubt. :-) But my "bit" is enough to get me going and to know where to
> look for further information if I hit a wall. Especially the people on the
> Postgres mailingli
[EMAIL PROTECTED] wrote:
> Randy> There is a free Beta test of a Python 2.4 Certification test
> Randy> available at Brainbench.com. They are a provider of skills-based
> Randy> certification exams. Go to the link below to find the test. It
> Randy> is free to take the test.
>
> Ra
Lad wrote:
> Dennis,
> Thank you for your reply
> You say:
> >Pretend you are the computer/application/etc. How would YOU
> > perform such a ranking?
> That is what I do not know , how to perform such ranking.
> Do you have any idea?
>
> Regards,
> Lad.
take a piece of paper to *play* the use-cas
On 17 Oct 2006 02:56:45 -0700, Lad <[EMAIL PROTECTED]> wrote:
>
> Dennis,
> Thank you for your reply
> You say:
> >Pretend you are the computer/application/etc. How would YOU
> > perform such a ranking?
> That is what I do not know , how to perform such ranking.
> Do you have any idea?
The detail
Tim Williams wrote:
> eval( 'reload(%s)' % modname)
reload takes a module object, not a module name. since you need to have the
object, you might as well pass it to the reload() function.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Clodoaldo Pinto Neto wrote:
>
> > But I still don't understand what is happening. The manual says that
> > when shell=True the executable argument specifies which shell to use:
>
> no, it says that when shell=True, it runs the command "through" the
> default shell. that is,
"Tim Williams" <[EMAIL PROTECTED]> wrote:
>> The import statement expects a name (a symbol), not a string.
>>
>
> eval( 'import %s' % modname)
>
> and
>
> eval( 'reload(%s)' % modname)
>
> Usual warnings about eval apply, but in this case it is usable.
Did you actually try your suggestion be
Theerasak Photha skrev:
> On 14 Oct 2006 09:25:00 -0700, Paul Boddie <[EMAIL PROTECTED]> wrote:
>
> > Unlike Java, Python's first class functions and
> > methods are already highly useful for callback-based systems
>
> Curious: how well does the use of returning inner functions work as a
> strategy
I'll keep this brief. Please see the web site for details
Thanks.
--
Dale Strickland-Clark
We are recruiting Python programmers. Please see the web site.
Riverhall Systems www.riverhall.co.uk
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-10-17, Ron Adam <[EMAIL PROTECTED]> wrote:
> Neil Cerutti wrote:
>> On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote:
>>> I have several applications where I want to sort lists in
>>> alphabetical order. Most examples of sorting usually sort on
>>> the ord() order of the character set as a
On Mon, 16 Oct 2006 14:50:03 -0500,
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> suggests that it was sufficiently obscure that either a) nobody who knew
> about it found a way to take advantage of it, or b) it was only recently
It might well be difficult to exploit to run arbitrary cod
On Mon, 16 Oct 2006 22:22:47 -0500, Ron Adam <[EMAIL PROTECTED]> wrote:
...
> I see this is actually a very complex subject.
...
> It looks to me this would be a good candidate for a configurable class.
> Something preferably in the string module where it could be found easier.
/And/ choosing a l
Hi,
I'm trying to convert some code from Ruby to Python, specifically..
timestamp = "%08x" % Time.now.to_i
Make a hex version of the current timestamp. Any ideas how best to do
this in python gratefully received..
--
http://mail.python.org/mailman/listinfo/python-list
"kevin evans" wrote:
> I'm trying to convert some code from Ruby to Python, specifically..
>
> timestamp = "%08x" % Time.now.to_i
>
> Make a hex version of the current timestamp. Any ideas how best to do
> this in python gratefully received..
that's perfectly valid Python code, provided Time is a
On Tue, 2006-10-17 at 08:43, kevin evans wrote:
> Hi,
> I'm trying to convert some code from Ruby to Python, specifically..
>
> timestamp = "%08x" % Time.now.to_i
>
> Make a hex version of the current timestamp. Any ideas how best to do
> this in python gratefully received..
import time
timestam
kevin evans wrote:
> Hi,
> I'm trying to convert some code from Ruby to Python, specifically..
>
> timestamp = "%08x" % Time.now.to_i
>
> Make a hex version of the current timestamp. Any ideas how best to do
> this in python gratefully received..
>
how about
import time
"%08X"% (int)(time.mkt
kevin> I'm trying to convert some code from Ruby to Python,
kevin> specifically..
kevin> timestamp = "%08x" % Time.now.to_i
kevin> Make a hex version of the current timestamp. Any ideas how best
kevin> to do this in python gratefully received..
Try
import time
times
On Tue, 2006-10-17 at 08:49, hg wrote:
> import time
> "%08X"% (int)(time.mktime(time.localtime()))
Have you not had your coffee yet or are you trying to win an obfuscated
python programming competition? ;)
-Carsten
--
http://mail.python.org/mailman/listinfo/python-list
Teja:
> ie=win32com.client.Dispatch('internetexplorer.application')
> ie.Visible=1
>
> class GenericFunctions:
> def __init__(self):
> print "In Constructor of Generic Functions"
> def MyNavigate(self,dest):
> ie.Navigate(dest)
You are using an interface created on th
> On 17 Oct 2006 02:56:45 -0700, Lad <[EMAIL PROTECTED]> wrote:
> >
> > Dennis,
> > Thank you for your reply
> > You say:
> > >Pretend you are the computer/application/etc. How would YOU
> > > perform such a ranking?
> > That is what I do not know , how to perform such ranking.
> > Do you have any
Carsten Haese wrote:
> On Tue, 2006-10-17 at 08:49, hg wrote:
>> import time
>> "%08X"% (int)(time.mktime(time.localtime()))
>
> Have you not had your coffee yet or are you trying to win an obfuscated
> python programming competition? ;)
>
> -Carsten
>
>
Just one cup
hg
--
http://mail.python.
x = None
result = (x is None and "" or str(x))
print result, type(result)
---
OUTPUT
---
None
y = 5
result = (y is 5 and "it's five" or "it's not five")
print result
-
OUTPUT
-
it's five
...what's wrong with the first operation I did with x?
This is the trae back ,can you help me please.
Traceback (most recent call last):
File "C:\Documents and Settings\dzxbrn\Desktop\Stop Test\13
Oct\MainThread.py", line 13, in threadFunction
obj.MyNavigate(dest) # this is gving an error.
File "C:\Documents and Settings\dzxbrn\De
Wolfgang Keller wrote:
> I know about the existence of MVC. But what I'm actually missing is a nice
> textbook that teaches how to actually implement it (and other design patterns
> which are useful for database applications) in a real-world application in a
> way that leads to non-ridiculous be
In article <[EMAIL PROTECTED]>,
Robert Kern <[EMAIL PROTECTED]> wrote:
> I presume what you did was something like this:
>
>from matplotlib import pylab
>[N,x] = hist(eig, 10)
>
> What you actually want is this:
>
>from matplotlib import pylab
>[N,x] = pylab.hist(eig, 10)
>
>
"abcd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>x = None
> result = (x is None and "" or str(x))
>
> ...what's wrong with the first operation I did with x? I was expecting
> "result" to be an empty string, not the str value of None.
Your evil tertiary hack has failed you be
> x = None
> result = (x is None and "" or str(x))
>
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
>
>
> y = 5
> result = (y is 5 and "it's five" or "it's not five")
>
> print result
>
> -
> OUTPUT
> -
> it's five
>
> ...what's wr
On Tue, 2006-10-17 at 09:30, abcd wrote:
> x = None
> result = (x is None and "" or str(x))
>
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
The "condition and result1 or result2" trick only works if result1 is an
expression with a True boolean value. The emp
Sébastien Boisgérault wrote:
> Robert Kern wrote:
>> Martin Manns wrote:
>>> Hello,
>>>
>>> Is there any library that allows employing max-plus dioids in
>>> python (e.g. based on numpy/scipy)?
>> Google says "no" and I haven't heard of any, so I imagine that there aren't.
>> There might be somethi
Great stuff - many thanks
hg wrote:
> Carsten Haese wrote:
> > On Tue, 2006-10-17 at 08:49, hg wrote:
> >> import time
> >> "%08X"% (int)(time.mktime(time.localtime()))
> >
> > Have you not had your coffee yet or are you trying to win an obfuscated
> > python programming competition? ;)
> >
> >
Hello,
is there a assignement operator, that i can overwrite?
class MyInt:
def __init__(self, val):
assert(isinstance(val, int))
self._val = val
a = MyInt(10)
# Here i need to overwrite the assignement operator
a = 12
Thanks
Alexander
--
http://mail.py
I installed the SciPy superpackage and have pylab, matplotlib, scipy,
and numpy apparently running well. But I want to use matplotlib/pylab
interactively. The instructions suggest doing this in IPython. But
using ipython on the command line gives me an error. The system doesn't
know the com
Carsten Haese wrote:
> Use Python 2.5 where there is a true conditional
> expression or find another way to solve your problem.
python 2.5 once we upgrade (hopefully soon), anyways...an earlier post
suggested the inverse...
x = None
result = (x is not None and str(x) or "")
which works just fine
On 10/17/06, Alexander Eisenhuth <[EMAIL PROTECTED]> wrote:
> Hello,
>
> is there a assignement operator, that i can overwrite?
Soirry, no, assignment is a statement, not an operator, and can't be overridden.
--
Cheers,
Simon B
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
--
http
Tim Chase wrote:
> {True: "", False: str(x)}[x is None]
first the localtime/mktime roundtrip with a simulated cast, and now this? in
less
than one hour? solar flares?
--
http://mail.python.org/mailman/listinfo/python-list
Alexander Eisenhuth wrote:
> is there a assignement operator, that i can overwrite?
no.
--
http://mail.python.org/mailman/listinfo/python-list
"abcd" <[EMAIL PROTECTED]> wrote:
> Any ideas? Basically I want to make an animated GIF out of a bunch of
> images taken using the ImageGrab module.
the screen is an RGB device, but the gifmaker wants palette images (mode P).
to fix this, insert
im = im.convert("P")
after the grab (or befo
I am using gifmaker.py from PIL v1.1.5 on python 2.4.1.
CODE
import ImageGrab, gifmaker
seq = []
while keepOnGoing:
im = ImageGrab.grab()
seq.append(im)
fp = open("out.gif", "wb")
gifmaker.makedelta(fp, seq)
fp.close()
--
Hallo people,
I have the following code that implements a simple recursive tree like
structure.
The trouble is with the GetTreeBranch function, the print statement
prints a valid value but the return immediatley afterward doesn't return
anything.
Can anyone help me with why?
Thanks,
Matt.
Co
On Tue, 2006-10-17 at 09:48, Tim Chase wrote:
> [...]
> Either of the following should suffice:
>
> # return a non-empty string
> x is None and "None" or str(x)
This one can be "optimized" to just str(x) since str(None)=="None".
>[...]
> There are more baroque ways of writing the ter
On Tue, 17 Oct 2006 06:30:32 -0700, abcd wrote:
> x = None
> result = (x is None and "" or str(x))
Boolean operators "and" and "or" stop as soon as a result is known. So:
X and Y evaluates as X if X is false; otherwise it evaluates as Y.
X or Y evaluates as X if X is true; otherwise it evaluates
Alexander Eisenhuth wrote:
> Hello,
>
> is there a assignement operator, that i can overwrite?
You can't overwrite assignment operator, but you can
overwrite methods of numeric objects:
http://docs.python.org/ref/numeric-types.html
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-li
In article <[EMAIL PROTECTED]>,
"abcd" <[EMAIL PROTECTED]> wrote:
> Carsten Haese wrote:
> > Use Python 2.5 where there is a true conditional
> > expression or find another way to solve your problem.
>
> python 2.5 once we upgrade (hopefully soon), anyways...an earlier post
> suggested the inver
Alexander Eisenhuth a écrit :
> Hello,
>
> is there a assignement operator, that i can overwrite?
Adding to Simon Brunning reply (assignment is a statement).
> class MyInt:
> def __init__(self, val):
> assert(isinstance(val, int))
> self._val = val
>
> a = MyInt(10)
>
> # H
Hi, Bernard.
Just tried the first 2 commands on win XP, Python 2.5 under Idle.
An Error is raised: "unsupported locale setting" (lib/locale.py in
setlocale, line 476).
Actually I get the error also under Python 2.4.3
Any idea what I'm missing?
Thanks in advance.
Jürgen
Bernard wrote:
> >>> import l
On Tue, 17 Oct 2006 15:50:47 +0200, Alexander Eisenhuth wrote:
> Hello,
>
> is there a assignement operator, that i can overwrite?
No.
We were just discussing the reasons why Python will not and can not have
an assignment operator just a few days ago. Check the archives for more
details.
> cl
On Oct 17, 8:50 am, Alexander Eisenhuth <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> is there a assignement operator, that i can overwrite?
>
> class MyInt:
> def __init__(self, val):
> assert(isinstance(val, int))
> self._val = val
>
> a = MyInt(10)
>
> # Here
Replace the conv function call with locale.localeconv.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Tue, 17 Oct 2006 15:50:47 +0200, Alexander Eisenhuth wrote:
>
>> Hello,
>>
>> is there a assignement operator, that i can overwrite?
>
> No.
>
> We were just discussing the reasons why Python will not and can not have
> an assignment operator just a few days ago. Chec
Hi,
I noticed, that sys.stout does not get flushed before the process is
replaced. The last print statements (before execvp()) disappear.
It only happens, if the output is redirected to a file (if sys.stdout is
not line buffered).
"""#testexec.py
import os
print "Messsage"
os.execvp("/bin/true",
Did you install it with the --install-scripts command line option? If
you did, then there will be a ipython script located in the
$INSTALL_SCRIPTS/bin directory. If you didn't, then I think the
default location is /usr/lib/python or something like that.
--
http://mail.python.org/mailman/listinf
aznach wrote:
> Hello!
>
> I have a shared hosting account at GrokThis.net and have a problem with
> the module order of the Python search path.
>
> I'd like to use django's svn trunk instead of the
> "Django-0.95-py2.4.egg" provided in site-packages.
> I use ~/.bash_profile to set:
> ---
Lou Pecora wrote:
> I installed the SciPy superpackage and have pylab, matplotlib, scipy,
> and numpy apparently running well. But I want to use matplotlib/pylab
> interactively. The instructions suggest doing this in IPython. But
> using ipython on the command line gives me an error. The syst
Jerry wrote:
(snip)
> I believe the property function is what you are looking for.
It is not.
> e.g.
>
> class MyClass:
Descriptors don't work fine with old-style classes. Should be:
class MyClass(object):
> def __init__(self, val):
> self.setval(val)
>
> def getval(self):
>
Dennis,
I tried a ProxyHandler with the following code ...
proxy_support = urllib2.ProxyHandler({})
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)
... but it's giving me the same result.
Then I tried to tunnel using code from ...
http://aspn.activestate.com/ASPN/Co
abcd a écrit :
> x = None
> result = (x is None and "" or str(x))
>
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
>
>
> y = 5
> result = (y is 5 and "it's five" or "it's not five")
>
> print result
>
> -
> OUTPUT
> -
> it's five
>
Wow, thanks a lot for your quick answers.
That assignement is no operator, but a statemant is a pity, but indeed I came
foward with overwritten methods for numeric types
Regards
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
jr wrote:
>> >>> import locale
>> >>> locale.setlocale(locale.LC_ALL, 'English_United States.1252')
>> 'English_United States.1252'
> Just tried the first 2 commands on win XP, Python 2.5 under Idle.
> An Error is raised: "unsupported locale setting" (lib/locale.py in
> setlocale, line 476).
> Ac
abcd wrote:
> x = None
> result = (x is None and "" or str(x))
You don't need the parenthesis.
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
>
>
> y = 5
> result = (y is 5 and "it's five" or "it's not five")
By all means *don't* use identity tests in such
In article <[EMAIL PROTECTED]>,
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
>
> > I installed the SciPy superpackage and have pylab, matplotlib, scipy,
> > and numpy apparently running well. But I want to use matplotlib/pylab
> > interactively. The instructions suggest do
[EMAIL PROTECTED] wrote:
> [EMAIL PROTECTED] wrote:
> > [EMAIL PROTECTED] wrote:
> >
> > > I don't think that would help in the case of Pywin32 since the
> > > Sourceforge dates for build 210 are 9/22.
> > > I emailed Mark Hammond but have not heard anything back yet.
> >
> > In the case of pywin3
abcd wrote:
> x = None
> result = (x is None and "" or str(x))
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
>
>
[snip]
> ...what's wrong with the first operation I did with x?
You weren't using Python 2.5:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MS
In article <[EMAIL PROTECTED]>,
"Jerry" <[EMAIL PROTECTED]> wrote:
> Did you install it with the --install-scripts command line option? If
> you did, then there will be a ipython script located in the
> $INSTALL_SCRIPTS/bin directory. If you didn't, then I think the
> default location is /usr/l
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote:
>
> > I admit I am totally flmmexed by your answer.
> > What does when the bug was introduced have to do with
> > anything?
>
> oh, I thought your main concern was whether the packages available had
> been compromised,
Yes.
> and that you asked if
Lou Pecora wrote:
> In article <[EMAIL PROTECTED]>,
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>> Lou Pecora wrote:
>>
>> > I installed the SciPy superpackage and have pylab, matplotlib, scipy,
>> > and numpy apparently running well. But I want to use matplotlib/pylab
>> > interactively
Hi,
is it possible in python (with/without matplotlib, numpy etc) to store
a whole class with its data into a file, instead it to reconstruct
every time again? So is there an analogous to the matlab functions
load/save available?
Thanks
Alex
--
http://mail.python.org/mailman/listinfo/python-l
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> "Lawrence D'Oliveiro" <[EMAIL PROTECTED]> wrote:
>
>
>> In message <[EMAIL PROTECTED]>, Hendrik van
>> Rooyen wrote:
>>
>> > "Lawrence D'Oliveiro" <[EMAIL PROTECTED]> wrote:
>> >
>> > 8<
>> >
[EMAIL PROTECTED] enlightened us with:
> is it possible in python (with/without matplotlib, numpy etc) to
> store a whole class with its data into a file
Check out the pickle module.
Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
--
http://mail.python.org/mailman/listinfo/python-li
Matthew Warren wrote:
> I have the following code that implements a simple recursive tree like
> structure.
>
> The trouble is with the GetTreeBranch function, the print statement
> prints a valid value but the return immediatley afterward doesn't return
> anything.
hint: how many "return" state
> break
> else:
> _DoThingsToTree(path[1:],value,item[path[0]],delete)
>
The '_' in front of DoThingsToTree shouldn't be there. That's what I get
for trimming off the '_' elsewhere after I pasted the code in.
Matt.
This email is confidential and
> class MyClass:Descriptors don't work fine with old-style classes.
Interesting, I have used this construct before in Python 2.4.3 and not
run into the recursion problem you talk about. Also, it has worked
fine for me. Perhaps you can post a link to your source so that I
could study it and unders
Ilias Lazaridis wrote:
> Peter Wang wrote:
> > Ilias Lazaridis wrote:
> > > what about persistency?
> >
> > Um... what about it?
>
> "
> As far as I can see, there's no persistency binding available.
>
> Is one planned?
> "
> http://groups.google.com/group/comp.lang.python/msg/dbdaedc68eee653a
Th
Matt,
You should consider not using the long footer on posts to
comp.lang.python. It doesn't make a lot of sense there.
-Larry
> This email is confidential and may be privileged. If you are not the intended
> recipient please notify the sender immediately and delete the email from your
> comp
1 - 100 of 207 matches
Mail list logo