Hi,
Thanks a lot for the snips you have included in your post...
those were quite helpful...
And about the 3rd party data
we receive the data in csv format ... but we are not supposed to modify
the files provided by the user directly...
Instead we make another file with the same name & differ
Dennis Lee Bieber enlightened us with:
> The above is windows, I believe Linux uses instead of
>
That's correct. And so do all unix systems including MacOS X.
Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
On Sun, 3 Sep 2006 00:19:17 -0700
"Darren Kirby" <[EMAIL PROTECTED]> wrote:
[...]
> I guess I am wondering if given the fact I need a custom protocol, and need
> to
> talk TCP/IP should I stick with twisted or just use plain old sockets and
> build it myself? Is there a third option I shoul
Hi,
what has to be done for upgrading from Python 2.4 to 2.5?
- How can I find out which packages (in addition to the core packages) have been
installed up to now
- Can I just copy /usr/local/lib/python2.4/site-packages to
/usr/local/lib/python2.5 ?
Many thanks for a h
Hi,
I am new in python-list and quite new in Python programming as well. I
am working mainly with GIS and using Esri's geoprocessing tools.
I want to use .ini file to set the parameters, especially paths, in my
project. PythonWin 2.1. is my version.
Why do I get the default back in the case belo
I'm having some trouble building a proper argument for an ioctl call.
The operation I'm working with is TUNSETIFF _IOW('T', 202, int) which
takes a struct ifreq as the arg. Could someone familiar with the
struct (usually defined in net/if.h) tell me how the heck to encode it
using the struct/array
Helmut Jarausch wrote:
> Hi,
>
> what has to be done for upgrading from Python 2.4 to 2.5?
>
> - How can I find out which packages (in addition to the core packages) have
> been
>installed up to now
> - Can I just copy /usr/local/lib/python2.4/site-packages to
> /usr/
lazaridis_com wrote:
> Georg Brandl wrote:
>> lazaridis_com wrote:
>> > I would like to fulfill the following task:
>> >
>> > The construct:
>> >
>> > if __name__ == '__main__':
>> >
>> > should be changed to something like:
>> >
>> > if identifier.name == '__main__':
>> >
>> > The term "identifier
Jay wrote:
> So, are you saying this would be possible to do with the PlaySound
> function?
Fredrik is often terse. ;) I think what he's saying is that when I
said you could pass a .wav file to an external application, he showed
that you could pass it to a Python module instead. I think you still
Hi,
I was wondering if someone could help me with a problem I've been
having with mod-python and a javascript application I'm running. When
I run a GET on the actual XML file from the javascript, I can easily
parse the file. However, when I use a mod-python handler and run this
code:
LOCAL_FILE
Sorry, there should be no "req.write(file)" there.
> def get_request(req):
> if req.method == 'GET':
> req.content_type = "text/xml"
> req.sendfile(LOCAL_FILE)
> req.write(file)
> return apache.OK
>
--
http://mail.python.org/mailma
Alex Martelli wrote:
> What a mess it would be to disambiguate statements such as
>
> x = foo bar baz bat
>
> is it x = (foo, bar, baz, bat)
> or x = foo(bar, baz, bat)
> or x = foo(bar(baz), bat)
> or x = foo(bar, baz(bat))
> or x = foo(bar(baz, bat))
It will be x=foo(bar,baz,bat). The parenthes
I'm reading Alex Martelli's "Nutshell" second edition. In the section
called "Cooperative superclass method calling", he presents a diamond
inheritance hierachy:
class A(object):
def met(self):
print "A.met"
class B(A):
def met(self):
print "B.met"
A.met(self)
clas
Hi,
Is there a better way to replace/remove characters (specifically ' and
" characters in my case, but it could be anything) in strings in a
list, than this example to replace 'a' with 'b':
x = ["a","123a","as"]
for i, v in enumerate(x) :
x[i] = v.replace("a","b")
This works, bu
> Michele Simionato already pointed you to `PEP 359`_. One of the reasons
> that I withdrew it was that people seemed to feel that you could get
> most of what you want now by defining appropriate metaclasses. In your
> case, for example, the appropriate metaclass and its usage might look
> l
ddtl schrieb:
> Thanks everybody for pointing out the problem.
> And indeed, the script was named differently on Linux.
>
> ddtl.
And because I just spent a day searching all the wrong corners: you
remembered to delete or rename the "re.pyc" that the first import
probably left in the same directo
Steve Holden wrote:
> Nicko wrote:
> > Fredrik Lundh wrote:
> >>if you cannot refrain from pulling arguments out of your ass, you not
> >>really the right person to talk about hygiene.
> >
> > I'm impressed but your mature argument. Clearly, in the face of such
> > compelling reasoning, I shall hav
> Does the "EMCenter" really need to /subclass/ from all of those? Or
> would it be better to make some of those attributes of an EMCenter
> INSTANCE (passing in instances of the others to the __init__() ).
>
> class EMCenter(object):
> def __init__(self, b, r, c, ol):
>
Thx Alex,
This is exactly what i want to look at . Async will definitely be
something i will look at . Does it make sense to mix async and threaded
server ( let say a threaded server accepting max 10 connections and
dealing with client request asynchronously ). Does it sounds you a good
design.
Chris Brat <[EMAIL PROTECTED]> wrote:
> Is there a better way to replace/remove characters (specifically ' and
> " characters in my case, but it could be anything) in strings in a
> list, than this example to replace 'a' with 'b':
x = map(lambda foo: foo.replace('a', 'b'), x)
cu
Philipp
flit wrote:
>
> I am struggling with some ldap files.
More general you are struggling with multiple attribute values of DN
syntax stored in a single field of a CSV file.
> I am using the csv module to work with this files (I exported the ldap
> to a csv file).
I guess you have MS AD and used MS
Philipp Pagel wrote:
> Chris Brat <[EMAIL PROTECTED]> wrote:
> > Is there a better way to replace/remove characters (specifically ' and
> > " characters in my case, but it could be anything) in strings in a
> > list, than this example to replace 'a' with 'b':
>
> x = map(lambda foo: foo.replace('a
Mike Krell wrote:
> BTW, the official docs are even worse in this regard. AFAICT, they
> essentially say that super() returns a superclass with no discussion of
> diamond inheritance or any hint of how the semantics of super(B,
> self).met() would be any different than those of A.met(self).
>
> Th
Mike Krell wrote:
> class A(object):
> def met(self):
> print "A.met"
>
> class B(A):
> def met(self):
> print "B.met"
> super(B, self).met()
>
> class C(A):
> def met(self):
> print "C.met"
> super(C, self).met()
>
> class D(B,C):
> def met(s
Le lundi 04 septembre 2006 12:25, Mike Krell a écrit :
> 1. The super() call in D somehow invokes both parent class methods
> instead of stopping when the method is resolved in B. This has
> nothing to do with truncated lookup per se. Why isn't the output "D
> B A"?
>
Yes but, super(B, B
Le lundi 04 septembre 2006 13:48, Carl Banks a écrit :
> Essentially, it's objects that have MROs, not classes.
Wrong, __mro__ is an attribute of types (subtypes of type) but like __class__
it is not available in the instances.
mro() is standard a method of type.
In [150]: A.mro()
Out[150]: [, ]
Helmut Jarausch schrieb:
> Hi,
>
> what has to be done for upgrading from Python 2.4 to 2.5?
>
> - How can I find out which packages (in addition to the core packages)
> have been
> installed up to now
> - Can I just copy /usr/local/lib/python2.4/site-packages to
> /usr/l
Is anyone using python for modbus? I would like to communicate with
some
modbus devices - I can use pyserial and follw the protocol, just
wondering
if anybody has already done this?
--
http://mail.python.org/mailman/listinfo/python-list
Cliff> On Sun, 2006-09-03 at 21:30 -0700, sridhar wrote:
>> is there any way to call stored procedures from python as in java?
Cliff> I mostly use PostgreSQL, so perhaps it's different for some other
Cliff> databases, but calling stored procedures doesn't require any
Cliff> sp
thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks, thats exactly what I was looking for - very neat.
George Sakkis wrote:
> Philipp Pagel wrote:
>
> > Chris Brat <[EMAIL PROTECTED]> wrote:
> > > Is there a better way to replace/remove characters (specifically ' and
> > > " characters in my case, but it could be anything) in strings in a
>
I was trying to add this to my project but I must be missing some
includes or there is a serius error somewhere
Anthra Norell wrote:
> Dexter,
> Here's a function that screens out all instrument blocks and puts them into a
> dictionary keyed on the instrument number:
> ---
When I create an instance of a class,
are the class's functions *copied* to create the methods?
Or are method calls actually calls of the class's functions?
I am sure this is both obvious and FAQ,
but I did not find a clear answer
(e.g. here
http://docs.python.org/tut/node11.html#SECTION001134
Hi
I have a string which I convert into a list then read through it
printing its glyph and numeric representation
#-*- coding: utf-8 -*-
thestring = "abcd"
thelist = list(thestring)
for c in thelist:
print c,
print ord(c)
Works fine for latin characters but when I put in a unicode cha
David Isaac wrote:
> When I create an instance of a class,
> are the class's functions *copied* to create the methods?
> Or are method calls actually calls of the class's functions?
On the class functions. You can make every instance have it's own methods,
though - but only explicitly.
Diez
--
Sibylle Koczian wrote:
> Helmut Jarausch schrieb:
>> Hi,
>>
>> what has to be done for upgrading from Python 2.4 to 2.5?
>>
>> - How can I find out which packages (in addition to the core packages)
>> have been
>> installed up to now
>> - Can I just copy /usr/local/lib/python2.4/site-packages
I have a list of lists, N+1 deep.
Like this (for N=2):
[[['r00','g00','b00'],['r01','g01','b01']],[['r10','g10','b10'],['r11','g11'
,'b11']]]
I want to efficiently produce the same structure
except that the utlimate lists are replaced by a chosen (by index) item.
E.g.,
[['r00','r01'],['r10','r11']
> When I create an instance of a class,
> are the class's functions *copied* to create the methods?
> Or are method calls actually calls of the class's functions?
>
> I am sure this is both obvious and FAQ,
> but I did not find a clear answer
The best way to find out is to try it:
##
[EMAIL PROTECTED] wrote:
> I was trying to add this to my project but I must be missing some
> includes or there is a serius error somewhere
>
[...]
>
> I cut and pasted this.. It seems to be crashing my program.. I am not
> sure that I have all the right imports.. seems to be fine when I go to
On 9/4/06, Paul Johnston <[EMAIL PROTECTED]> wrote:
> Hi
> I have a string which I convert into a list then read through it
> printing its glyph and numeric representation
>
> #-*- coding: utf-8 -*-
>
> thestring = "abcd"
> thelist = list(thestring)
>
> for c in thelist:
> print c,
> prin
Paul Johnston wrote:
> Hi
> I have a string which I convert into a list then read through it
> printing its glyph and numeric representation
>
> #-*- coding: utf-8 -*-
>
> thestring = "abcd"
> thelist = list(thestring)
>
> for c in thelist:
> print c,
> print ord(c)
>
> Works fine fo
Jet Jaguar wrote:
> I'm trying to find a way to set a custom folder icon in OS X. I
> thought that Applescript would be able to do it, but apparently it
> can't. Is there anything in the Macintosh libraries of Python that
> will allow me to take an image file (e.g., jpeg, png, tiff, etc.) and
> s
Hi all,
Is there any PEP to introduce true threading features into python's
next version as in java? i mean without having GIL.
when compared to other languages, python is fun to code but i feel its
is lacking behind in threading
regards,
KM
--
http://mail.python.org/mailman/listinfo/python-list
Guido Goldstein wrote:
> You might have a look at asyncore/asychat in the standard library.
> It does the async stuff for you and it's easy to understand and to
> use.
or Allegra might work
http://laurentszyster.be/blog/allegra/
its anti-twisted melodrama comes at no extra charge.
i.
--
htt
> Alan Isaac wrote:
> > When I create an instance of a class,
> > are the class's functions *copied* to create the methods?
> > Or are method calls actually calls of the class's functions?
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On the class functions. You
Hi,
GIL won't go. You might want to read
http://blog.ianbicking.org/gil-of-doom.html .
Regards,
-Justin
--
http://mail.python.org/mailman/listinfo/python-list
It is giving errors on the import statements.. I will get an error on
the line where I import this routine import csoundroutines and then the
when I import the the program that tried to import csoundroutines I get
an error and on down the chain.. when I go back to where I started in
csoundroutine
David Isaac wrote:
> I have a list of lists, N+1 deep.
> Like this (for N=2):
> [[['r00','g00','b00'],['r01','g01','b01']],[['r10','g10','b10'],['r11','g11'
> ,'b11']]]
>
> I want to efficiently produce the same structure
> except that the utlimate lists are replaced by a chosen (by index) item.
>
David Isaac wrote:
> I have a list of lists, N+1 deep.
> Like this (for N=2):
> [[['r00','g00','b00'],['r01','g01','b01']],[['r10','g10','b10'],['r11','g11'
> ,'b11']]]
>
> I want to efficiently produce the same structure
> except that the utlimate lists are replaced by a chosen (by index) item.
>
[EMAIL PROTECTED] wrote:
> It is giving errors on the import statements.. I will get an error on
> the line where I import this routine import csoundroutines and then the
> when I import the the program that tried to import csoundroutines I get
> an error and on down the chain..
Please paste here
limodou wrote:
> > Code:
> >
> > import feedparser
> > from xml.sax import saxutils
> >
> > feed_number=200
> >
> > feed_list = open("feed_listing.conf","r")
> > for each_feed in feed_list:
> > data=feedparser.parse(each_feed)
> > feed_title=data.entries[0].title
> > xml_output=open("xm
Thanks to both Roberto and George.
I had considered the recursive solution
but was worried about its efficiency.
I had not seen how to implement the numpy
solution, which looks pretty nice.
Thanks!
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
Are there any alternate ways of attaining true threading in python ?
if GIL doesnt go then does it mean that python is useless for
computation intensive scientific applications which are in need of
parallelization in threading context ?
regards,
KM
#import se
# se available at http://cheeseshop.python.org/pypi/SE/2.2%20beta
looks like it is the se beta.. I didn't get any kind of error or
traceback that would tell me that though..
Roberto Bonvallet wrote:
> [EMAIL PROTECTED] wrote:
> > It is giving errors on the import statements.. I w
"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> thanks.
>
poplib
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
You might want to split your calculation onto different
worker-processes.
Then you can use POSH [1] to share data and objects.
You might even want to go a step further and share the data via
Sockets/XML-RPC or something like that. That makes it easy to throw
aditional boxes at a specific calc
"km" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if GIL doesnt go then does it mean that python is useless for
> computation intensive scientific applications which are in need of
> parallelization in threading context ?
No.
--
http://mail.python.org/mailman/listinfo/pyth
km enlightened us with:
> Is there any PEP to introduce true threading features into python's
> next version as in java? i mean without having GIL.
What is GIL? Except for the Dutch word for SCREAM that is...
> when compared to other languages, python is fun to code but i feel
> its is lacking be
On Mon, 4 Sep 2006 17:48:14 +0200, Sybren Stuvel <[EMAIL PROTECTED]> wrote:
>km enlightened us with:
>> Is there any PEP to introduce true threading features into python's
>> next version as in java? i mean without having GIL.
>
>What is GIL? Except for the Dutch word for SCREAM that is...
>
>> whe
I'm unclear how PIL handles multi-frame GIF images. I have such a GIF image
in a file, bogus.gif. I can view the individual frames like so
(ImageSequence is from the PIL tutorial):
>>> img = Image.open("bogus.gif")
>>> for frame in ImageSequence(img):
... frame.show()
All but the
lazaridis_com wrote:
> Ο/Η Bruno Desthuilliers έγραψε:
>> lazaridis_com wrote:
>>> John Salerno wrote:
Are there any major differences between these two? It seems they can
both be used with TurboGears, and SQLAlchemy with Django. I'm just
wondering what everyone's preference is, and
Sybren Stuvel wrote:
> km enlightened us with:
>> Is there any PEP to introduce true threading features into python's
>> next version as in java? i mean without having GIL.
>
> What is GIL? Except for the Dutch word for SCREAM that is...
the global interpreter lock, that prevents python from con
I wrote a little win32 console application that uses libxml2. It is
working fine. If I create an .exe version, I get this error when I try
to start the program:
Traceback (most recent call last):
File "MyProgram.py", line 3, in ?
File "mylib\item.pyc", line 5, in ?
ImportError: dynamic modu
The trouble is there are some environments where you are forced to use
threads. Apache and mod_python are an example. You can't make use of
mutliple CPUs unless you're on *nux and run with multiple processes AND
you're application doesn't store large amounts of data in memory (which
mine does) so y
How can you prevent self from being passed to a function stored as a
member variable?
class Foo(object):
def __init__(self, callback):
self.func = callback
f =Foo(lambda x: x)
f.func(1) # TypeError, func expects 1 argument, recieved 2
I thought maybe you could do this:
class Foo(object
On 4 Sep 2006 09:39:32 -0700, Sandra-24 <[EMAIL PROTECTED]> wrote:
> How can you prevent self from being passed to a function stored as a
> member variable?
>
> class Foo(object):
>def __init__(self, callback):
> self.func = callback
>
> f =Foo(lambda x: x)
> f.func(1) # TypeError, func e
On 4 Sep 2006 09:39:32 -0700, Sandra-24 <[EMAIL PROTECTED]> wrote:
>How can you prevent self from being passed to a function stored as a
>member variable?
This doesn't happen:
>>> class x:
... def __init__(self):
... self.x = lambda: None
...
>>> x().x()
>>> class y(object):
...
km wrote:
> Is there any PEP to introduce true threading features into python's
> next version as in java? i mean without having GIL.
> when compared to other languages, python is fun to code but i feel its
> is lacking behind in threading
Some of the technical problems:
- probably breaks compati
What is the correct way to download a file through HTTP and save it to
the file name suggested by "Content-Disposition"?
I would use urlretrieve but I'm not sure how to obtain the file name
through the HTTP headers without downloading the body (e.g.
urlopen(url).info()).
--
http://mail.python.or
David Isaac wrote:
> When I create an instance of a class,
> are the class's functions *copied* to create the methods?
No, unless you explicitely do it.
> Or are method calls actually calls of the class's functions?
Depends on how the method was associated to the instance (you can set
methods on
Qiangning Hong wrote:
> Do you really get that error?
Sorry, my bad. You're correct of course. I had accidentally passed an
object, by naming it the same as the function, instead of my function,
and the object had __call__ defined, and took exactly two parameters,
just like my function, but one of
I'm trying to install SOAPpy per the instructions on Dive Into Python
(http://diveintopython.org/soap_web_services/install.html). I've got PyXML
installed, but I'm stuck trying to find fpconst.
The URL given on the DIP page doesn't work; www.analytics.washington.edu
doesn't resolve in DNS. Li
In the following code I would like to ascertain
that x has/is a number. What the simplest TEST should be?
(Could not find good example yet.)
---
x=raw_input('\nType a number from 1 to 20')
if TEST :
Do_A
else:
Do_B
---
Thanks for any guidance.
== Posted via News
> Anybody know where I can find fpconst?
I uploaded the lastest copy I could find to the Cheese Shop
(http://www.python.org/pypi/fpconst/).
I'm not affiliated in any way with fpconst, btw.
Rob
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Rob De Almeida" <[EMAIL PROTECTED]> wrote:
> http://www.python.org/pypi/fpconst/
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Excel uses web queries to read data (like financial/weather data) from
web. How to do the same in python? Even pointers to such would be of
help.
Thank you,
Joseph
--
http://mail.python.org/mailman/listinfo/python-list
On 04/09/06, Dr. Pastor <[EMAIL PROTECTED]> wrote:
> In the following code I would like to ascertain
> that x has/is a number. What the simplest TEST should be?
> (Could not find good example yet.)
> ---
> x=raw_input('\nType a number from 1 to 20')
> if TEST :
> Do_A
> else:
>
On 9/3/06, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Sun, 3 Sep 2006 00:19:17 -0700, Darren Kirby <[EMAIL PROTECTED]> wrote:
> >Hey all,
> >
> >I have a (FOSS) project here that I am about to start that requires TCP
> >networking support, and in fact, will require me to design and impleme
Daniel Dittmar wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> - removing reference counting and relying on garbage collection alone
> will break many Python applications (because they rely on files being
> closed at end of scope etc.)
>
They are already broken on at least 2 python imp
Tim Williams wrote:
> On 04/09/06, Dr. Pastor <[EMAIL PROTECTED]> wrote:
>> In the following code I would like to ascertain
>> that x has/is a number. What the simplest TEST should be?
>> (Could not find good example yet.)
>> ---
>> x=raw_input('\nType a number from 1 to 20')
>> if TEST :
>>
Dexter,
Whenever I can I post solutions. And when I do, I run them in an IDLE
window and copy my commands plus the output over into
the message. So my posting should be replicable, if you would copy the commands
into your IDLE window one by one and hitting return.
Please do this and c
Helmut Jarausch wrote:
> One step further
>
> try:
>eval(x+'0')
>
That is an exceedingly bad idea. Type:
__import__('sys').exit(),
in the prompt and see what happens.
You _never_ want to run `eval` on an untrusted string. Never.
--
Erik Max Francis && [EMAIL PROTECTED] &&
Dr. Pastor wrote:
> In the following code I would like to ascertain
> that x has/is a number. What the simplest TEST should be?
> (Could not find good example yet.)
> ---
> x=raw_input('\nType a number from 1 to 20')
> if TEST :
> Do_A
> else:
> Do_B
> ---
> Thanks for
On Mon, 4 Sep 2006 11:40:33 -0700, Darren Kirby <[EMAIL PROTECTED]> wrote:
>> As for documentation, many people say it is lacking, but perhaps one person
>> in a thousand points out _how_ or _where_ it is lacking. Unfortunately it
>> is difficult to improve things (or even determine if they really
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Monday, September 04, 2006 4:58 AM
Subject: Re: newbe question about removing items from one file to another file
>
> Anthra Norell wrote:
> > Dexter,
> >
> > Here's a function that screens out all ins
<[EMAIL PROTECTED]> wrote:
> Thx Alex,
> This is exactly what i want to look at . Async will definitely be
> something i will look at . Does it make sense to mix async and threaded
> server ( let say a threaded server accepting max 10 connections and
> dealing with client request asynchronously
samir <[EMAIL PROTECTED]> wrote:
...
> That depends of your need to such tools. For example if you need to
> copy a file, then, resolve a linear system then chroot and set the
> password as de hexadecimal representation of the hash function of pi
> multiplied by the averge of the solution coordi
Sandra-24 wrote:
> The trouble is there are some environments where you are forced to use
> threads. Apache and mod_python are an example. You can't make use of
> mutliple CPUs unless you're on *nux and run with multiple processes AND
> you're application doesn't store large amounts of data in memo
Dr. Pastor wrote:
> In the following code I would like to ascertain
> that x has/is a number. What the simplest TEST should be?
> (Could not find good example yet.)
> ---
> x=raw_input('\nType a number from 1 to 20')
> if TEST :
> Do_A
> else:
> Do_B
> ---
> Thanks for
I have a module which needs to invoke a suid helper program in order to
do what it needs to do. This suid helper program needs to be built and
installed at the same time as the module.
Is there any way to do this with distutils? I've been looking through
the documentation but haven't really f
> Alan Isaac wrote:
> > are method calls actually calls of the class's functions?
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Depends on how the method was associated to the instance (you can set
> methods on a per-instance property), but in the general case
Tim Williams wrote:
> On 04/09/06, Dr. Pastor <[EMAIL PROTECTED]> wrote:
>> In the following code I would like to ascertain
>> that x has/is a number. What the simplest TEST should be?
def isnumber(value):
try:
value/1
return true
except TypeError:
return false
I t
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> If it's read/write data or you're not on a Unix platform, you can use
> shared memory to shared it between many processes.
>
> Threads are way overused in modern multiexecution programming. The
> decision on whether to use processes or threads sho
Joseph wrote:
> Hi,
> Excel uses web queries to read data (like financial/weather data) from
> web. How to do the same in python? Even pointers to such would be of
> help.
>
[EMAIL PROTECTED] ~/hwb
$ python
Python 2.5b2 (trunk:50713, Jul 19 2006, 16:04:09)
[GCC 3.4.4 (cygming special) (gdc 0.12, u
Maric Michaud wrote:
> Le lundi 04 septembre 2006 13:48, Carl Banks a écrit :
> > Essentially, it's objects that have MROs, not classes.
> Wrong, __mro__ is an attribute of types (subtypes of type) but like __class__
> it is not available in the instances.
> mro() is standard a method of type.
I
Hi Robert,
I'm using the scipy package for such problems. In the submodule
scipy.optimize there is an implmentation of a least-square fitting
algorithm (Levenberg-Marquardt) called leastsq.
You have to define a function that computes the residuals between your
model and the data points:
import s
Laszlo Nagy a écrit :
>
> I wrote a little win32 console application that uses libxml2. It is
> working fine. If I create an .exe version, I get this error when I try
> to start the program:
>
> Traceback (most recent call last):
> File "MyProgram.py", line 3, in ?
> File "mylib\item.pyc", li
Hi,
can someone explane this:
>>> from time import *
>>> timezone
18000
>>> t=time()
>>> mktime(gmtime(t))-t
17999.680048942566
why there is a difference?
--
alf
--
http://mail.python.org/mailman/listinfo/python-list
I have a program with many "forms" (Toplevel windows with entry fields).
Sometimes when I .deiconify() and .lift() a form that is a child of another
form, but that just got buried under other forms it comes up 'not active'
(dimmed). I have to click on the title bar (or anywhere in the window)
Hi,
t = (1, (2, 3))
I am bit suprised, that I cannot access '3' via:
t[1].[1] # syntax error
But t[1].__getitem__(1) works like expected.
Why is that?
Regards
Georg Sauthoff
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 147 matches
Mail list logo