__
/\/\ ___ (_)_ __ /\/\ ___ (_)_ __
/\ / _ \| | '_ \ /\ / _ \| | '_ \ __
/ /\/\ \ (_) | | | | / /\/\ \ (_) | | | | | /| |_
\/\/\___/|_|_| |_\/\/\___/|_|_| |_| |.__)
Hello everyone,
I'm happy to announce that WebFaction have now installed Python-2.5
on all their servers.
WebFaction (formerly Python-Hosting.com) support all the
major Python web frameworks (Django, TurboGears, CherryPy,
mod_python, Pylons, web.py, ...)
People using Python CGI or
Just released the 0.4.0 version of my html package.
What is html? Bet you know. But this module lets
you parse and construct html content without
templating languages. Goal was to wrap tags
in the simplest way python allows to.
Sample code:
f = (
HtmlFile()
(
Doctype(),
Stackless Python for Python 2.5 is now available.
What is Stackless Python?
=
Stackless Python is an enhanced version of the Python programming
language. It allows programmers to reap the benefits of thread-based
programming without the performance and complexity
Hi,
I've written a short script in pexpect to open the serial port and get
100 bytes. The script does receive a string of garbage, but not the
good text seen when I open a minicom terminal and look at ttyS0.
I know that the baud rate is wrong, and the other settings (such as 8N1) are unknown to
Francach wrote:
Hi,
I'd like to create a very small Frame without the usual minimise and
maximise icons on the top. Does anyone know how to do this with
wxPython? I've tried creating a Frame with the style wx.DOUBLE_BORDER,
which gives me a nice small window. But I can't move it around the
Hi,
I've written a short script in pexpect to open the serial port and get
100 bytes. The script does receive a string of garbage, but not the
good text seen when I open a minicom terminal and look at ttyS0.
I know that the baud rate is wrong, and the other settings (such as 8N1) are unknown to
manstey [EMAIL PROTECTED] writes:
If I have a string, how can I give that string name to a python
object, such as a tuple.
The thing I'd like to know before answering this is: how will you be
using that name to refer to the object later?
--
\ If you ever catch on fire, try to avoid
Lad [EMAIL PROTECTED] wrote:
from
image:
http://www.pythonware.com/library/pil/handbook/image.htm
This is some example code:
from PIL import Image
im = Image.open(1.jpg)
nx, ny = im.size
im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC)
im2.save(2.png)
Bye,
bearophile,
Thank
manstey [EMAIL PROTECTED] wrote:
If I have a string, how can I give that string name to a python object,
such as a tuple.
e.g.
a = 'hello'
b=(1234)
That's not a tuple. That's an integer. (1234,) is a tuple.
and then a function
name(b) = a
which would mean:
hello=(1234)
is this possible?
At Thursday 21/9/2006 00:59, manstey wrote:
If I have a string, how can I give that string name to a python object,
such as a tuple.
e.g.
a = 'hello'
b=(1234)
and then a function
name(b) = a
which would mean:
hello=(1234)
is this possible?
You may use another object as a namespace:
Tim Roberts wrote:
Lad [EMAIL PROTECTED] wrote:
from
image:
http://www.pythonware.com/library/pil/handbook/image.htm
This is some example code:
from PIL import Image
im = Image.open(1.jpg)
nx, ny = im.size
im2 = im.resize((int(nx*1.5), int(ny*1.5)), Image.BICUBIC)
At Thursday 21/9/2006 02:26, alex23 wrote:
page = urllib.urlopen('http://some.address')
add .read() at the end
open('saved_page.txt','w').write(page).close()
write() does not return the file object, so this won't work; you have
to bind the file to a temporary variable to be able to close
Gabriel Genellina wrote:
fixes for my stupidity
Thanks for the corrections, Gabriel. I really need to learn to
cutpaste working code :)
Cheers.
-alex23
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I have a program which will continue to run for several days. When it is
running, I can't do anything except waiting because it takes over most
of the CUP time.
Is it possible that the program can save all running data to a file when
I want it to stop, and can reload the data and continue
[EMAIL PROTECTED] ha scritto:
SpreadTooThin wrote:
How does one get the process id?
Is there a method for windows and unix (mac os x etc...)
under linux, do:
import os
os.getpid()
Under Windows:
import ctypes
ctypes.windll.kernel32.GetCurrentProcessId()
--
Irmen de Jong wrote:
Because the result of partition is a non mutable tuple type containing
three substrings of the original string, is it perhaps also the case
that partition works without allocating extra memory for 3 new string
objects and copying the substrings into them?
nope. the core
billie wrote:
[EMAIL PROTECTED] ha scritto:
SpreadTooThin wrote:
How does one get the process id?
Is there a method for windows and unix (mac os x etc...)
under linux, do:
import os
os.getpid()
Under Windows:
import ctypes
ctypes.windll.kernel32.GetCurrentProcessId()
Steve Holden wrote:
Is there any general rule that we must delete the object after using
it?
Just consider it good hygiene.
in this specific case, it may not be obvious for the casual reader that
the global draw variable will contain an indirect reference to the
original image object, so
billie wrote:
under linux, do:
import os
os.getpid()
Under Windows:
import ctypes
ctypes.windll.kernel32.GetCurrentProcessId()
getpid() works just fine on Windows too:
import ctypes
ctypes.windll.kernel32.GetCurrentProcessId()
1916
import os
os.getpid()
1916
/F
--
manstey wrote:
so they might provide a list of names, like 'bob','john','pete', with 3
structures per name, such as 'apple','orange','red' and I need 9 tuples
in my code to store their data:
bob_apple=()
bob_orange=()
..
pete_red=()
I then populate the 9 tuples with data they provide
Ben Sizer wrote:
But do you have an example of such a use case?
Here is a 69 lines implementation of the idea of applying extended
generators to manage Web forms (obviously this is only a proof of
concept and it contains many mistakes, but you have something to get
started).
Notice that I am not
Thanks guys! :o)
It seems that no module is missing since the Service starts and the
error message seem to indicate an error in the COM call to the AD.
I would expect some other exception..
I do have a separate thread for the asyncore.loop() as I otherwise
would risk a lockup.
I do not call
[EMAIL PROTECTED] wrote:
Hi,
I have a program which will continue to run for several days. When it is
running, I can't do anything except waiting because it takes over most
of the CUP time.
Is it possible that the program can save all running data to a file when
I want it to stop, and can
[EMAIL PROTECTED] wrote:
Is it possible that the program can save all running data to a file when
I want it to stop, and can reload the data and continue to run from
where it stops when the computer is free ?
This isn't what you asked for (I have no idea how to do that), but
given your
Hello All,
I'm curious, in
py 0 | (1 == 1)
1
py False | (1 == 1)
True
What is the logic of the former expression not evaluating to True (or
why the latter not 1?)? Is there some logic that necessitates the first
operand's dictating the result of the evaluation? Or is this an artefact
of the
Can anyone recommend an easy to install COBRA implementation which
works with Python? I am using Windows XP.
Thanks in advance.
Best,
rod
--
http://mail.python.org/mailman/listinfo/python-list
[MaR]
| I do not call pythoncom.CoInitialize () as I tend to expect a module
| wrapping COM stuff to do that.
Hmmm. A slightly philosophical point. As the author of
the said module, I think I'd have said that the other
way round: I do not call CoInit... because I expect a
user of the module
[EMAIL PROTECTED] wrote:
I have a program which will continue to run for several days. When it is
running, I can't do anything except waiting because it takes over most
of the CUP time.
Is it possible that the program can save all running data to a file when
I want it to stop, and can
manstey wrote:
so they might provide a list of names, like 'bob','john','pete', with 3
structures per name, such as 'apple','orange','red' and I need 9 tuples
in my code to store their data:
bob_apple=()
bob_orange=()
..
pete_red=()
I really think you should be using dictionaries here.
On 2006-09-21, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Is it possible that the program can save all running data to a file when
I want it to stop, and can reload the data and continue to run from
where it stops when the computer is free ?
Well, on Irix you could use cpr
how to use timer in python.
the functionnality is like the MFC SetTimer()
--
http://mail.python.org/mailman/listinfo/python-list
James Stroud wrote:
What is the logic of the former expression not evaluating to True (or
why the latter not 1?)? Is there some logic that necessitates the first
operand's dictating the result of the evaluation? Or is this an artefact
of the CPython implementation?
If I understand correctly,
At Thursday 21/9/2006 06:03, yxh wrote:
how to use timer in python.
the functionnality is like the MFC SetTimer()
Use the Timer class.
Gabriel Genellina
Softlab SRL
__
Preguntá. Respondé. Descubrí.
Todo
James Stroud wrote:
I'm curious, in
py 0 | (1 == 1)
1
py False | (1 == 1)
True
What is the logic of the former expression not evaluating to True (or
why the latter not 1?)? Is there some logic that necessitates the first
operand's dictating the result of the evaluation? Or is this
James Stroud a écrit :
Hello All,
I'm curious, in
py 0 | (1 == 1)
1
py False | (1 == 1)
True
What is the logic of the former expression not evaluating to True (or
why the latter not 1?)? Is there some logic that necessitates the first
operand's dictating the result of the
On 21 Sep 2006 01:48:55 -0700, rodmc [EMAIL PROTECTED] wrote:
Can anyone recommend an easy to install COBRA implementation which
works with Python? I am using Windows XP.
http://omniorb.sourceforge.net/ is the 2nd hit if you go to
http://www.google.com/search?q=python+corba. ;-)
--
Cheers,
On 20 Sep 2006 00:27:07 -0700, daniel [EMAIL PROTECTED] wrote:
Hello,
Can anyone explain the main points in working with threads in Python.
Why use threading and not Thread.I have read an article that i have to
subclass the Thread class and override some function.
I repeat this all the time,
Tim Golden wrote:
[MaR]
| I do not call pythoncom.CoInitialize () as I tend to expect a module
| wrapping COM stuff to do that.
Hmmm. A slightly philosophical point.
[snip]
:o) I agree!
I have added the CoInit.. call to the __init__() of the threaded class
(I understood the documentation
Dennis Lee Bieber wrote:
... slightly
simpler to use without subclassing (at the simplest level, you just pass
the function that is to be run, and a list of the arguments/parameters
it needs, to the threading creation class).
that's exactly how thread.start_new_thread(func, args) works, of
[MaR]
| Tim Golden wrote:
| [MaR]
|
| | I do not call pythoncom.CoInitialize () as I tend to
| expect a module
| | wrapping COM stuff to do that.
|
| Hmmm. A slightly philosophical point.
| [snip]
|
| :o) I agree!
|
| I have added the CoInit.. call to the __init__() of the threaded class
Jeremy Sanders [EMAIL PROTECTED] wrote:
For Linux (and other Unix like OSs), there are several checkpointing
libraries available which allow programs to be saved to disk, and
restarted later.
Another option which will work on just about anything would be to run the
program in a vmware
I'm trying to work with the following idea:
class animal:
def __init__(self, weight, colour):
self.weight = weight
self.colour = colour
class bird(animal):
def __init__(self, wingspan):
self.wingspan = wingspan
print self.weight, self.colour, self.wingspan
class
On Thu, 21 Sep 2006 10:48:55 +0200, rodmc [EMAIL PROTECTED]
wrote:
Can anyone recommend an easy to install COBRA implementation which
works with Python? I am using Windows XP.
I used to use fnorb (http://sourceforge.net/projects/fnorb), but the
project seems to be dead. It still seems to
Hello,
[EMAIL PROTECTED] wrote:
I'm trying to work with the following idea:
class animal:
def __init__(self, weight, colour):
self.weight = weight
self.colour = colour
class bird(animal):
def __init__(self, wingspan):
self.wingspan = wingspan
print self.weight,
Everyone wrote:
[something intelligent]
Ah, clarity. My confusion can undoubtedly be traced to a non-existent
formal training in computer programming.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
When I run my code from within the derived class, self.weight
and self.colour are not inherited (although methods are inherited as I
would have expected).
Animal is never initialized and you're not passing weight and color
into it anyway. You need something like:
Hi,
I have a simulation application (PlayerStage) in which the robot is asked
every ~200ms for an action. In the meantime the robot has to do some
calculation with the perception. As the calculation gets more and more time
consuming I am thinking about outsourcing it into a concurrently
Gabriel Genellina wrote:
At Thursday 21/9/2006 02:26, alex23 wrote:
page = urllib.urlopen('http://some.address')
add .read() at the end
open('saved_page.txt','w').write(page).close()
write() does not return the file object, so this won't work; you have to
bind the file to a
Thanks for the reply.
I think there's a basic misunderstanding about the nature of
inheritance on my side.
What I want to do is instantiate the sub class (derived class) from
within the animal class. I then expect the sub class to have inherited
some basic properties that it knows it has
At Thursday 21/9/2006 06:52, [EMAIL PROTECTED] wrote:
class animal:
def __init__(self, weight, colour):
self.weight = weight
self.colour = colour
class bird(animal):
def __init__(self, wingspan):
self.wingspan = wingspan
print self.weight, self.colour, self.wingspan
class
At Thursday 21/9/2006 07:34, LorcanM wrote:
I think there's a basic misunderstanding about the nature of
inheritance on my side.
What I want to do is instantiate the sub class (derived class) from
within the animal class. I then expect the sub class to have inherited
some basic properties that
LorcanM wrote:
Benjamin Niemann wrote:
You'll have to invoke the __init__ method of the superclass, this is not
done implicitly. And you probably want to add the weight and colour
attributes to your subclass in order to pass these to the animal
constructor.
class fish(animal):
def
Bryce Bolton [EMAIL PROTECTED] writes:
In short, setting of critical parameters is unclear under pexpect's
documentation, but may be obvious to those more familiar with os.open or
other filesystem internals.
Try using stty program on Linux to set these parameters before you use
pexpect.
Several changes have been made to Python 2.4 and 2.5 to support
AMD64-Linux better, and not all of these changes have been
incorporated into Python 2.3, as this software is no longer
maintained.
As others have said: you should really try to use the python 2.4
that comes with the operating
SpreadTooThin wrote:
How does one get the process id?
Is there a method for windows and unix (mac os x etc...)
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477
hth
--
http://mail.python.org/mailman/listinfo/python-list
Thanks to everyone for their help. I had tried OmniORB and while the
base library worked ok, the Python bit OmniORBpy seems to dislike
working... Perhaps there is something wrong with my settings.
I will also try the Python only suggestion.
cheers,
rod
--
James Stroud [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Depends on your namespace, but for the local namespace, you can use this:
py a = object()
py a
object object at 0x40077478
py locals()['bob'] = a
py bob
object object at 0x40077478
If you put this code within a
Hi Lorcan,
Mabye thinking of it like this will help: birds and fishes (I love that
word, even if it is incorrect) can _do_ all the things that all animals
have in common: eat, drink, die, reproduce, c; but that is generic.
class animal(object):
def eat(self, food): pass
...
class
Thanks a lot folks for all the help. Its a lot clearer now.
If I could summarise my original misunderstanding about inheritance:
I belived that a sub class inherited a *specific instance* of the super
class.
This is clearly not right - the misunderstanding arose as I was
instantiating the super
Georg Brandl [EMAIL PROTECTED] wrote:
The 0.1 release is not meant to be feature complete. It's more like a preview
to show off what's already there. If you like the idea, *feel free to join us!*
Looks very nice so far. Will fill an important gap in Python apps.
Oh, and you've been blogged:
MonkeeSage:
If you have multiple inheritance do you need the old style init anyway?
class Animal1(object):
def __init__(self, weight, colour):
self.weight = weight
self.colour = colour
class Animal2(object):
def __init__(self, name):
self.name = name
class Bird(Animal1,
[EMAIL PROTECTED] wrote:
If you have multiple inheritance do you need the old style init anyway?
I guess so, I'm not really sure. This page
http://fuhm.net/super-harmful/ talks about super() and MRO and such,
but I have only glanced over it the other day. I will read it more
fully sometime. I
Hi!
This is in Python 2.3.4 under WinXP.
I have a situation where I think changing the behaviour of a namespace
would be very nice. The goal is to be able to run a python file from
another in a separate namespace in such a way that a NameError is not
raised if a non-existing variable is used
Willi Richert wrote:
Hi,
I have a simulation application (PlayerStage) in which the robot is asked
every ~200ms for an action. In the meantime the robot has to do some
calculation with the perception. As the calculation gets more and more time
consuming I am thinking about outsourcing it
I want to extract emails from an mbox-type file which contains a number
of individual emails.
I tried the python mailbox and email modules individually, but I'm
unable to combine them to get what I want. Mailbox allows me to iterate
over all the mails but doesn't give me access the individual
Hello!
For quite some time I was a maintainer of mxCGIPython. Now I am going
to stop. There will no be mxCGIPython for Python 2.5. Python is quite
popular these days, it is hard to find hosting without it. Original author
abandoned mxCGIPython long ago, and I only provided some simple patches
Gabriel Genellina wrote:
(snip)
When you construct an object instance, it is of a certain type from that
precise moment, and you can't change that afterwards.
Err... Actually, in Python, you can. It's even a no-brainer.
(snip)
--
bruno desthuilliers
python -c print
Tim Golden wrote:
[snip..]
At this point there are several options open to us:
(in no particular order)
1) You could nudge the code at line 217 to make use of
that suggestion.
2) I could do that and send you the result.
3) I could alter the module so it doesn't use gencache
at all. I
Sorry for the late reply... better too late than never :)
Thanks to all for the tips. Stripogram is the winner, since it is the
most configurable and accept line-length parameter, which is handy for
email...
Ksenia.
On 7/19/06, Laurent Rahuel [EMAIL PROTECTED] wrote:
Hi,
I guess stripogram
manstey wrote:
[...]
bob_apple=()
bob_orange=()
..
pete_red=()
I then populate the 9 tuples with data [...]
You cannot populate a tuple. If you want to insert the values
individually, you have to use a list. If you insert them all together,
like this: bob_apple = (1, 2, ..., 9), you
LorcanM wrote:
(snip)
What I'm doing is a bit more
abstract: I'm instantiating a 'world' (as a super class) and then
various 'worldviews' as sub-classes. The 'worldviews' must know about
various aspects of the 'world' from which they are instantiated to be
able to do what they need to do
Bruno Desthuilliers wrote:
Gabriel Genellina wrote:
When you construct an object instance, it is of a certain type from that
precise moment, and you can't change that afterwards.
Err... Actually, in Python, you can. It's even a no-brainer.
Oh yeah, let's confuse the newbie, shall we :)
The
Mikael Olofsson wrote:
This is in Python 2.3.4 under WinXP.
To feed an arbitrary mapping object to execfile() you need to upgrade to
Python 2.4.
http://docs.python.org/dev/lib/built-in-funcs.html#l2h-26
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Saving the following code to a file and running the code through
python does not give the expected error. disableling the @decor line
leads to the expected error message. Is this a bug or an overseen
feature?
--- snip dectest.py ---
class decor(object):
def __init__(self, f):
self.f
On 21 Sep 2006 04:56:46 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Willi Richert wrote:
Hi,
I have a simulation application (PlayerStage) in which the robot is asked
every ~200ms for an action. In the meantime the robot has to do some
calculation with the perception. As the
On Thu, 2006-09-21 at 01:12, Dennis Lee Bieber wrote:
On Wed, 20 Sep 2006 13:21:54 -0400, Steve Holden [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
.execute() is a cursor method, not a connection method. Some DB API
modules do implement it as a connection method, but
Hello,
if after your command:
ie.Document.login_form.submit()
I write:
doc = ie.Document
s = doc.documentElement.outerHTML
print s
I can see the HTML of the document before the submit
command, but I would like to see the HTML of the page
after the submit command: do you know how to solve
this
rodmc wrote:
Thanks to everyone for their help. I had tried OmniORB and while the
base library worked ok, the Python bit OmniORBpy seems to dislike
working... Perhaps there is something wrong with my settings.
Omniorb is very actively developed, try and post your problems on the
mailing list:
[EMAIL PROTECTED] (Berthold =?iso-8859-15?Q?H=F6llmann?=) wrote:
Saving the following code to a file and running the code through
python does not give the expected error. disableling the @decor line
leads to the expected error message. Is this a bug or an overseen
feature?
It's a problem
2006/9/21, Berthold Höllmann [EMAIL PROTECTED]:
Saving the following code to a file and running the code through
python does not give the expected error. disableling the @decor line
leads to the expected error message. Is this a bug or an overseen
feature?
Try the new_decor class described
How to use python get my windows box's ip setting type? Dynamic ip, or
static ip?
If it's static ip, what's the exact value?
--
http://mail.python.org/mailman/listinfo/python-list
Brant Sears wrote:
Hi. I'm new to Python and I am trying to use the latest release (2.5) on
Windows XP.
What I want to do is execute a program and have the results of the
execution assigned to a variable. According to the documentation the way
to do this is as follows:
import commands
x
Peter Otten wrote:
To feed an arbitrary mapping object to execfile() you need to upgrade to
Python 2.4.
Thanks! As clear as possible. I will do that.
FYI: I think I managed to achieve what I want in Py2.3 using the
compiler module:
def getNamesFromAstNode(node,varSet):
if
Dennis Lee Bieber wrote:
On Thu, 21 Sep 2006 15:34:21 +0800, [EMAIL PROTECTED]
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
Is it possible that the program can save all running data to a file when
I want it to stop, and can reload the data and continue to run from
Ps. Aristotle can rest easy tonight:
class mortal(object): pass
class man(mortal): pass
Socrates = man()
all_men = mortal()
if Socrates == all_men:
print Socrates == all_man
else:
print Undistributed Middle is indeed a fallacy
;)
Regards,
Jordan
--
[EMAIL PROTECTED] wrote:
Hi,
I have a program which will continue to run for several days. When it is
running, I can't do anything except waiting because it takes over most
of the CUP time.
Is it possible that the program can save all running data to a file when
I want it to stop, and
Berthold Höllmann wrote:
Saving the following code to a file and running the code through
python does not give the expected error. disableling the @decor line
leads to the expected error message. Is this a bug or an overseen
feature?
Others have already pointed out the mistake. I wrote a
Hello,
I just tried to use the Windows XP installer for Python 2.5 AMD64 but I
get the error message: Installation package not supported by processor
type
I am running Windows XP Pro on an AMD Athon 64 Processor.
Do I need to have a 64-bit OS to use this version?
--
rodmc [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Thanks to everyone for their help. I had tried OmniORB and while the
base library worked ok, the Python bit OmniORBpy seems to dislike
working... Perhaps there is something wrong with my settings.
I will also try the Python only
Berthold Höllmann wrote:
Saving the following code to a file and running the code through
python does not give the expected error. disableling the @decor line
leads to the expected error message. Is this a bug or an overseen
feature?
Neither, I'd say. Just an unfortunate interaction between
kode4u [EMAIL PROTECTED] wrote:
How to use python get my windows box's ip setting type? Dynamic ip, or
static ip?
If it's static ip, what's the exact value?
Here's one way:
def ipinfo(interface=Local Area Connection):
dhcpenabled = False
staticip = None
subnetmask
Hi
I try/struggle to use an ActiveX component in a Tk app. When i execute
it i can catch the first event and then when i try to change the value
of the w widget everything blocks and nothing is updated anymore.
Does someone have an idea of what is wrong and how to smartly integrate
these events
first of all I have to claim that I'm a noob so please help me don't
blame me:)
for example:
def test(s):
if type(s) != ? :
return
#So here I want establish a situation about that if s is not string
#then return, but how should write the ? ?
#Or is there any other way to do it?
Brendan a écrit :
Hello,
I just tried to use the Windows XP installer for Python 2.5 AMD64 but I
get the error message: Installation package not supported by processor
type
I am running Windows XP Pro on an AMD Athon 64 Processor.
Do I need to have a 64-bit OS to use this version?
To be
Mikael Olofsson wrote:
Peter Otten wrote:
To feed an arbitrary mapping object to execfile() you need to upgrade to
Python 2.4.
Thanks! As clear as possible. I will do that.
FYI: I think I managed to achieve what I want in Py2.3 using the
compiler module:
def
def test(s):
if type(s) != ? :
return
#So here I want establish a situation about that if s is not string
#then return, but how should write the ? ?
#Or is there any other way to do it?
isinstance(hello, basestring)
True
isinstance(uhello, basestring)
True
This will
Thanks.
Christophe wrote:
Brendan a écrit :
Hello,
I just tried to use the Windows XP installer for Python 2.5 AMD64 but I
get the error message: Installation package not supported by processor
type
I am running Windows XP Pro on an AMD Athon 64 Processor.
Do I need to have a
On Thu, 21 Sep 2006 09:26:20 -0500, Tim Chase [EMAIL PROTECTED] wrote:
def test(s):
if type(s) != ? :
return
#So here I want establish a situation about that if s is not string
#then return, but how should write the ? ?
#Or is there any other way to do it?
Thank you so much it answers my humble question perfectly:)
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 193 matches
Mail list logo