Adam W. wrote:
File C:\Python25\lib\xml\sax\expatreader.py, line 207, in feed
self._parser.Parse(data, isFinal)
File C:\Users\Adam\Desktop\Rev3 DL\XMLWorkspace.py, line 51, in
characters
self.data.append(string)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in
On Jul 30, 10:43 pm, Erik Max Francis [EMAIL PROTECTED] wrote:
Russ P. wrote:
On Jul 30, 9:27 pm, Erik Max Francis [EMAIL PROTECTED] wrote:
You're sure going on about a distinction without a difference for a guy
who childishly likes to call other people names. A reasonable person
would
william tanksley wrote:
william tanksley [EMAIL PROTECTED] wrote:
I'm still puzzled why I'm getting some non-Unicode out of an
ElementTree's text, though.
Now I know.
Okay, my answer is that cElementTree (in Python 2.5) is simply
deranged when it comes to Unicode. It assumes everything's
castironpi [EMAIL PROTECTED] wrote:
In C, we have:
int x, y;
x= 10;
y= x+ 1;
It translates as, roughly:
8000 .data
7996 #x
7992 #y
7988 .end data
7984 loadi reg0 7996
7980 loadi reg1 7992
7976 loadi reg2 10
7972 loadi reg3 1
7968 storv reg2 reg0
7964 add reg0 reg1 reg2
7960
On Jul 30, 7:50 pm, Giampaolo Rodola' [EMAIL PROTECTED] wrote:
On 30 Lug, 09:49, Frank Millman [EMAIL PROTECTED] wrote:
Thanks again, Giampaolo, your input is really appreciated.
I pretty much have the same overview I had before.
As far as I can tell the only reason you want to use a thread
On Jul 31, 7:26 am, alex23 [EMAIL PROTECTED] wrote:
kj wrote:
Sorry, I should have googled this first. I just found splitlines()...
Still, for my own edification, is there a way to achieve the same
effect using re.split?
re.split(os.linesep, string) works the same as string.splitlines()
LessPaul [EMAIL PROTECTED] wrote:
...My
question is in regard to GUI platforms. My primary target would be
Windows, but I would also like be able to support Linux and Mac
versions if possible. I'm also interested in using a system that also
has support for pure C++ applications. As such, and
Are there any techniques I can use to strip a dictionary data
structure down to the smallest memory overhead possible?
Sure. You can build your own version of a dict using
UserDict.DictMixin. The underlying structure can be as space
efficient as you want.
FWIW, dictionaries automatically
Steven D'Aprano [EMAIL PROTECTED] wrote:
I don't expect that Python will have a built-in core-counting function.
You would probably need to ask the operating system. On Linux, you could
do this:
import os
text = os.popen('cat /proc/cpuinfo').read()
How you would do it in Windows or
sterling wrote:
I'm curious as to why the difference between IDLE and pythonWin when
using win32com.
opening an excel file, i've attempted to grab the chart information
out of the file.
commands like co = ChartObjects(1) works in pythonWin but doesn't
work in IDLE.
however, on both co =
:-) [EMAIL PROTECTED] writes:
[...]
Please send me how U expect your new CMS would be?
I don't mean to be disparaging, but I'd like to point out a few things
that I'm not entirely sure you've thought through.
Firstly, there is currently no shortage in CMS', and especially not in
Dennis Lee Bieber [EMAIL PROTECTED] wrote:
It gets even worse... No Windows-based PC has ever used the
PowerPC processor -- which had been a staple of the Macintosh before
they went Intel...
Actually the were personal computers sold using PowerPC processors that
ran Windows NT. I even
Hi!
Did anyone used this hosting or heard about it? It's good or not? what
can you talk about it?
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 31, 12:58 am, william tanksley [EMAIL PROTECTED] wrote:
Thank you for the response. Here's some more info, including a little
that you didn't ask me for but which might be useful.
John Machin [EMAIL PROTECTED] wrote:
william tanksley [EMAIL PROTECTED] wrote:
To ask another way: how
laredotornado was kind enough to say:
How would I set up the ms1 array such that I can use three items per
object?
Use tuples. But that should depend on which values make up the key for your
mapping.
E.g.
ms1 = {('managed1':7019):8020, ('managed2':7020):8021}
ms2 = {'managed1':(7019:8020),
in 76135 20080731 090911 Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 31 Jul 2008 06:17:59 GMT, Tim Roberts [EMAIL PROTECTED] declaimed
the following in comp.lang.python:
And again, I never said that it did. CPython is an interpreter. the
user's code is never translated into machine
Terry Reedy [EMAIL PROTECTED] wrote:
1. Portability: The Microsoft C# JIT compiler runs under Windows .NET
on x86/amd64 and maybe it64 and what else? Just porting .NET to run
0n Linux on the same processors was/is a bit task. Does MONO have a
JIT also?
Technically there is no such thing
On Jul 31, 7:08 am, Russ P. [EMAIL PROTECTED] wrote:
On Jul 30, 10:43 pm, Erik Max Francis [EMAIL PROTECTED] wrote:
Russ P. wrote:
On Jul 30, 9:27 pm, Erik Max Francis [EMAIL PROTECTED] wrote:
You're sure going on about a distinction without a difference for a guy
who childishly
Hi,
until yesterday I was a happy user of pylint. Then I upgraded to ubuntu
hardy heron - and the trouble began.
The packaged version of pylint (0.13.2) fails with this error (last line):
logilab.common.configuration.UnsupportedAction: callback
The same error happens if I use
on 31.07.2008 11:29 Diez B. Roggisch said the following:
snip
The packaged version of pylint (0.13.2) fails with this error (last line):
snip
So - anybody out here having an actually working pylint config and can tell
me what versions work together? I've become pretty dependend on it to be
On 30 Jul, 20:30, Jason Tishler [EMAIL PROTECTED] wrote:
You need to build (and install) pysvn under Cygwin. The pre-built
Windows version will not work under Cygwin.
Thanks. Presumably this same problem would affect anything that uses
a .pyd under Cygwin?
--
On 2008-07-31 02:29, [EMAIL PROTECTED] wrote:
Are there any techniques I can use to strip a dictionary data
structure down to the smallest memory overhead possible?
I'm working on a project where my available RAM is limited to 2G
and I would like to use very large dictionaries vs. a traditional
On 2008-07-30 18:49, Mike Hjorleifsson wrote:
Has anyone gotten python working with Interbase database platform ? I
need to query some info from an interbase database on another server
need a lil help getting started.
You could try the EasySoft ODBC driver for InterBase:
Hello,
Can someone explain to me the difference between a type and a class?
After reading http://www.cafepy.com/article/python_types_and_objects/
it seems to me that classes and types are actually the same thing:
- both are instances of a metaclass, and the same metaclass ('type')
can
On 30 Jul, 20:15, Peter Otten [EMAIL PROTECTED] wrote:
Paul Boddie wrote:
Who wants to be first to submit a patch? ;-)
And where? The sourceforge page says
PyXML is no longer maintained.
The minidom code is in the standard library:
http://svn.python.org/view/python/trunk/Lib/xml/dom/
Gerard flanagan wrote:
What is it?
---
A Google custom search engine which targets only the following sites:
+ `The Hazel Tree http://thehazeltree.org`__
+ `The Python standard library docs http://docs.python.org/lib`__
+ `The Python wiki http://wiki.python.org`__
+ `Python Package
Hi,
I'm relatively new to programming in general, and totally new to python,
and I've been told that this language is particularly good for what I
need to do. Let me explain.
I have a large corpus of English text, in the form of several files.
First of all I would like to scan each file. Then,
def str_sort(string):
s =
for a in sorted(string):
s+=a
return s
if i instead do:
def str_sort(string):
s =
so = sorted(string)
for a in so:
s+=a
return s
will that be faster or the interpreter can
Fred Mangusta:
Could I use the join function to reform the string?
You can write a function to split the words, for example taking in
account the points too, etc.
And, regarding the casetest() function, what do you suggest to do?
Python strings have isupper, islower, istitle methods, they
On Jul 30, 6:48 pm, Guilherme Polo [EMAIL PROTECTED] wrote:
On Wed, Jul 30, 2008 at 6:33 PM, [EMAIL PROTECTED] wrote:
...
...
The second option is to not create the root there, instead, make App
inherit Tk. I rarely see people doing this, but it works too. Here you
won't need to store the
On Jul 31, 11:37 am, Nikolaus Rath [EMAIL PROTECTED] wrote:
So why does Python distinguish between e.g. the type 'int' and the
class 'myclass'? Why can't I say that 'int' is a class and 'myclass'
is a type?
I might be wrong here, but I think the point is that there is no
distinction. A class
ssecorp wrote:
def str_sort(string):
s =
for a in sorted(string):
s+=a
return s
if i instead do:
def str_sort(string):
s =
so = sorted(string)
for a in so:
s+=a
return s
will that be faster or the interpreter can figure out that it only has
to do
Can someone explain to me the difference between a type and a class?
If your confusion is of a more general nature I suggest reading the
introduction of `Design Patterns' (ISBN-10: 0201633612), under
`Specifying Object Interfaces'.
In short: A type denotes a certain interface, i.e. a set of
On Jul 31, 11:29 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Hi,
until yesterday I was a happy user of pylint. Then I upgraded to ubuntu
hardy heron - and the trouble began.
The packaged version of pylint (0.13.2) fails with this error (last line):
Am Donnerstag, 31. Juli 2008 13:09:57 schrieb ssecorp:
def str_sort(string):
s =
for a in sorted(string):
s+=a
return s
if i instead do:
def str_sort(string):
s =
so = sorted(string)
for a in so:
s+=a
return s
Gros Bedo wrote:
Thank you guys for your help. My problem is that I project to use this command
to terminate a script when uninstalling the software, so I can't store the PID.
This command will be integrated in the spec file of the RPM package. Here's the
script I'll use, it may help someone
ssecorp wrote:
def str_sort(string):
s =
for a in sorted(string):
s+=a
return s
if i instead do:
def str_sort(string):
s =
so = sorted(string)
for a in so:
s+=a
return s
will that be faster or the interpreter can figure out that it only has
to do sorted(string)
Hi All,
An opportunity for a talented Python Software Engineer has arisen to
join a company which is currently going through a phase of rapid
expansion. Candidates must have excellent software development skills to
join an established team within this small company with offices in the
U.K. and
Hello,
Hussein B wrote:
Please correct my if I'm wrong but it seems to me that the major
continuous integration servers (Hudson, CruiseControl, TeamCity ..)
don't support Python based application.
It seems they mainly support Java, .NET and Ruby.
Can I use one of the previous listed servers for
Stefan Rank wrote:
on 31.07.2008 11:29 Diez B. Roggisch said the following:
snip
The packaged version of pylint (0.13.2) fails with this error (last
line):
snip
So - anybody out here having an actually working pylint config and can
tell me what versions work together? I've become
Andy,
On Thu, Jul 31, 2008 at 03:10:26AM -0700, Andy Dingley wrote:
On 30 Jul, 20:30, Jason Tishler [EMAIL PROTECTED] wrote:
You need to build (and install) pysvn under Cygwin. The pre-built
Windows version will not work under Cygwin.
Thanks. Presumably this same problem would affect
Thomas Troeger [EMAIL PROTECTED] writes:
Can someone explain to me the difference between a type and a class?
If your confusion is of a more general nature I suggest reading the
introduction of `Design Patterns' (ISBN-10: 0201633612), under
Specifying Object Interfaces'.
In short: A type
oj [EMAIL PROTECTED] writes:
On Jul 31, 11:37 am, Nikolaus Rath [EMAIL PROTECTED] wrote:
So why does Python distinguish between e.g. the type 'int' and the
class 'myclass'? Why can't I say that 'int' is a class and 'myclass'
is a type?
I might be wrong here, but I think the point is that
Which version of python-logilab-common and python-logilab-astng are
installed on your machine ?
By now, pylint 0.14 with logilab.common 0.27 and astng 0.17.2
I was able to track down the problem as being related to a custom init-hook.
See the attached .pylintrc + hook. They don't actually
Le Thursday 31 July 2008 14:30:19 Nikolaus Rath, vous avez écrit :
oj [EMAIL PROTECTED] writes:
On Jul 31, 11:37 am, Nikolaus Rath [EMAIL PROTECTED] wrote:
So why does Python distinguish between e.g. the type 'int' and the
class 'myclass'? Why can't I say that 'int' is a class and 'myclass'
On Jul 31, 4:29 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Hi,
until yesterday I was a happy user of pylint. Then I upgraded to ubuntu
hardy heron - and the trouble began.
The packaged version of pylint (0.13.2) fails with this error (last line):
Le Thursday 31 July 2008 13:32:39 Thomas Troeger, vous avez écrit :
De :
Thomas Troeger [EMAIL PROTECTED] (Aioe.org NNTP Server)
À :
python-list@python.org
Date :
Aujourd'hui 13:32:39
Can someone explain to me the difference between a type and a class?
If your confusion is of
That would imply that I cannot create instances of a type, only of
a class that implements the type, wouldn't it?
But Python denotes 'int' as a type *and* I can instantiate it.
Now I start getting confused also ;-)
a=5
a.__class__
type 'int'
a.__class__.__class__
type 'type'
dir(a)
i use this to find out current week and total number of weeks for
current year:
now = datetime.now()
weeks_in_year = int(date(now.year, 12, 31).strftime(%W))
current_week = int(date(now.year, now.month, now.day).strftime(%W))
is this the best way or is there a better way?
Aljosa Mohorovic
--
hi every one, i am new to python,
and coz i want to write a handy command for my linux machine, to find
a word in all the files which are under the current folder.
the code is half done, but when i run it, it complain, and i don`t know why???
can anyone help me have a look at it?
here is the
Stefan Behnel [EMAIL PROTECTED] wrote:
william tanksley wrote:
Okay, my answer is that ElementTree (in Python 2.5) is simply
deranged when it comes to Unicode. It assumes everything's ASCII.
It does not assume that. It *requires* byte strings to be ASCII.
You can't encode Unicode into an
Hi All,
An opportunity for a talented Python Software Engineer has arisen to
join a company which is currently going through a phase of rapid
expansion. Candidates must have excellent software development skills to
join an established team within this small company with offices in the
U.K. and
Am Donnerstag, 31. Juli 2008 15:44:33 schrieb shrimpy:
hi every one, i am new to python,
and coz i want to write a handy command for my linux machine, to find
a word in all the files which are under the current folder.
What about
grep -R myword .
? Even works on regular expression (with
Greetings,
I'm trying to wrap a function in a C library as a compiled C Python
module. Everything is going great, but I've hit a snag. There's a
function in the form of this:
First the typedef:
typedef void(*FPtr_DeviceMessageHandler) (const DeviceMessage, const
char*);
Then the actual function
John Machin [EMAIL PROTECTED] wrote:
william tanksley [EMAIL PROTECTED] wrote:
Buffett Time - Annual Shareholders\xc2\xa0L.mp3
1. This isn't Unicode; it's missing the u (I printed using repr).
2. It's got the UTF-8 bytes there in the middle.
In addition to the above results,
*WHAT*
Hello,
I know this issue pops up once in a while, but I haven't found a good
answer to it. I need to debug a long running application under
windows. The application is a combined java/python framework for
testing ECUs in the automotive industry. Basically, the Java GUI
(Eclipse-based) starts
Aljosa Mohorovic wrote:
i use this to find out current week and total number of weeks for
current year:
now = datetime.now()
weeks_in_year = int(date(now.year, 12, 31).strftime(%W))
current_week = int(date(now.year, now.month, now.day).strftime(%W))
is this the best way or is there a
[EMAIL PROTECTED] wrote:
Greetings,
I'm trying to wrap a function in a C library as a compiled C Python
module. Everything is going great, but I've hit a snag. There's a
function in the form of this:
First the typedef:
typedef void(*FPtr_DeviceMessageHandler) (const DeviceMessage, const
Hello Diez.
May I suggest you move to ctypes for wrapping? It's easier, pure python and
callbacks are already built-in.
I'm pretty new to extending Python in C, I don't understand what
you're saying. Are there any examples or a brief explanation/URL you
could point me to?
--
[EMAIL PROTECTED] wrote:
Hello Diez.
May I suggest you move to ctypes for wrapping? It's easier, pure python
and callbacks are already built-in.
I'm pretty new to extending Python in C, I don't understand what
you're saying. Are there any examples or a brief explanation/URL you
could
On Jul 31, 2:39 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Which version of python-logilab-common and python-logilab-astng are
installed on your machine ?
By now, pylint 0.14 with logilab.common 0.27 and astng 0.17.2
I was able to track down the problem as being related to a custom
Ctypes is a since python2.5 built-in module that allows to declare
interfaces to C-libraries in pure python. You declare datatypes and
function prototypes, load a DLL/SO and then happily work with it. No C, no
compiler, no refcounts, no nothing.
And you can pass python-functions as
On Jul 14, 8:22 am, Kinokunya [EMAIL PROTECTED] wrote:
Hi guys,
My group and I will be working on our final year project, the scope to
do a program/web-based application similar areas of functionalities
like thePyLintand PyChecker; a Python syntax checker. We have no
Python background,
[EMAIL PROTECTED] wrote:
Ctypes is a since python2.5 built-in module that allows to declare
interfaces to C-libraries in pure python. You declare datatypes and
function prototypes, load a DLL/SO and then happily work with it. No C,
no compiler, no refcounts, no nothing.
And you can pass
Diez B. Roggisch wrote:
[EMAIL PROTECTED] wrote:
Ctypes is a since python2.5 built-in module that allows to declare
interfaces to C-libraries in pure python. You declare datatypes and
function prototypes, load a DLL/SO and then happily work with it. No C,
no compiler, no refcounts, no
How much more liberal can it get than MIT-licensed?
Again, the licensing issue is everything to do with the original
library distributor, NOT ctypes.
But then, if you insist, go down the hard road.
Irrelevant and unnecessary. If you don't want to help, don't please
don't reply.
--
Maric Michaud [EMAIL PROTECTED] writes:
Can someone explain to me the difference between a type and a class?
If your confusion is of a more general nature I suggest reading the
introduction of `Design Patterns' (ISBN-10: 0201633612), under
`Specifying Object Interfaces'.
In short: A type
[EMAIL PROTECTED] wrote:
How much more liberal can it get than MIT-licensed?
Again, the licensing issue is everything to do with the original
library distributor, NOT ctypes.
I read library distributor as ctypes-library distributor because it is
3rd-party under 2.4. Which was the reason I
Greetings all. I'm new to PAMIE and I've watched / followed to PAMIE
videos on Show me Do. I've tried to duplicate the scriptWrite
function in an attempt to automate the forms process... without
success.
Can someone PLEASE Assist!?
I'm using the following code
from cPAMIE import PAMIE
Le Thursday 31 July 2008 16:46:28 Nikolaus Rath, vous avez écrit :
Maric Michaud [EMAIL PROTECTED] writes:
Can someone explain to me the difference between a type and a class?
If your confusion is of a more general nature I suggest reading the
introduction of `Design Patterns' (ISBN-10:
Maric Michaud [EMAIL PROTECTED] writes:
Le Thursday 31 July 2008 14:30:19 Nikolaus Rath, vous avez écrit :
oj [EMAIL PROTECTED] writes:
On Jul 31, 11:37 am, Nikolaus Rath [EMAIL PROTECTED] wrote:
So why does Python distinguish between e.g. the type 'int' and the
class 'myclass'? Why can't
On Jul 31, 4:28 am, Tim Golden [EMAIL PROTECTED] wrote:
sterling wrote:
I'm curious as to why the difference between IDLE and pythonWin when
using win32com.
opening an excel file, i've attempted to grab the chart information
out of the file.
commands like co = ChartObjects(1) works in
Robert LaMarca wrote:
Hi,
I am using numpy and wish to create very large arrays. My system is AMD 64
x 2 Ubuntu 8.04. Ubuntu should be 64 bit. I have 3gb RAM and a 15 GB swap
drive.
Does a full 64-bit version of CPython, one where all pointers
and sizes are 64 bits, even exist?
On Jul 31, 10:47 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
I take the freedom to do so as I see fit - this is usenet...
Fine, then keep beating a dead horse by replying to this thread with
things that do nobody any good. It seems like there are a lot better
way to waste time, though.
The
Maric Michaud [EMAIL PROTECTED] writes:
Le Thursday 31 July 2008 16:46:28 Nikolaus Rath, vous avez écrit :
Maric Michaud [EMAIL PROTECTED] writes:
Can someone explain to me the difference between a type and a class?
If your confusion is of a more general nature I suggest reading the
Gabriel,
I meant the latter, so this helps
Or, do you mean you already have those names and values, perhaps mixed
with a lot more names, and want to extract only those starting with x
and following with a number?
result = {}
for name, value in vars(): # or locals().items(), or
Le Thursday 31 July 2008 17:00:51 Nikolaus Rath, vous avez écrit :
There are some confusion about the terms here.
Classes are instances of type 'type',
Could you please clarify what you mean with 'instance of type X'? I
guess you mean that 'y is an instance of type X' iif y is constructed
One great open source GUI package that you left out is GTK ie. pygtk.
i cant compare it with wx as i have never used it but isay its much
better than QT.
Anyway for ur q if u want to compair qt n wx. QT should be faster coz
it has a better documentation.
and welcome to the python family!
kind
On Jul 31, 3:58 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Instead of datetime.now() use date.today(), which removes a lot of
boilerplate.
int(date.today().strftime(%W))
Apart from that, I think it's the way to go.
what if i know current context week = 20 (example), what would be the
On Jul 29, 12:28 pm, LessPaul [EMAIL PROTECTED] wrote:
I recently discovered Python and see it as a great language to use for
personal projects (and more). I made my living for over a decade as a
coder in C, C++, ADA, Fortran, and Assembly before moving to systems
engineering.
I'm now
On Jul 31, 5:42 pm, Aljosa Mohorovic [EMAIL PROTECTED]
wrote:
what if i know current context week = 20 (example), what would be the
best way to get datetime objects for first and last day of current
context week?
by current context week i don't mean current week for current year
but current
Ctypes is a since python2.5 built-in module that allows to declare
interfaces to C-libraries in pure python. You declare datatypes and
function prototypes, load a DLL/SO and then happily work with it. No C, no
compiler, no refcounts, no nothing.
And you can pass python-functions as
On Wed, 30 Jul 2008 09:32:25 -0700, bearophileHUGS wrote:
This post is not about practical stuff, so if you have little time,
you may ignore it.
This is a task of the rosettacode.org site:
http://www.rosettacode.org/wiki/Non_Continuous_Subsequences
A subsequence contains some subset of
On Tue, Jul 29, 2008 at 3:37 AM, Carl Banks [EMAIL PROTECTED] wrote:
On Jul 28, 8:15 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Thu, 31 Jul 2008 23:44:33 +1000, shrimpy wrote:
hi every one, i am new to python,
and coz i want to write a handy command for my linux machine, to find
a word in all the files which are under the current folder.
the code is half done, but when i run it, it complain, and i don`t know
[EMAIL PROTECTED] wrote:
Greetings,
I'm trying to wrap a function in a C library as a compiled C Python
module. Everything is going great, but I've hit a snag. There's a
function in the form of this:
First the typedef:
typedef void(*FPtr_DeviceMessageHandler) (const DeviceMessage, const
On Thu, Jul 31, 2008 at 10:27 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
On Jul 31, 10:47 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
I take the freedom to do so as I see fit - this is usenet...
Fine, then keep beating a dead horse by replying to this thread with
things that do nobody
Bruce Frederiksen:
Your solution is a bit different from what I was thinking about (I was
thinking about a generator function, with yield), but it works.
This line:
return itertools.chain(
itertools.imap(lambda ys: x + ys, ncsub(xs, s + p1)),
On Jul 30, 11:32 am, [EMAIL PROTECTED] wrote:
This post is not about practical stuff, so if you have little time,
you may ignore it.
This is a task of the rosettacode.org
site:http://www.rosettacode.org/wiki/Non_Continuous_Subsequences
A subsequence contains some subset of the elements of
Steven D'Aprano wrote:
On Wed, 30 Jul 2008 09:23:05 -0600, Matthew Fitzgibbons wrote:
If you're expecting a list (and only a list)
then your point makes sense. 'if x' can get you into trouble if you
_don't_ want its polymorphism.
if x is hardly unique in that way. If you're expecting a list,
william tanksley wrote:
I didn't
pass a string. I passed a file. It didn't error out; instead, it
produced bytestring-encoded output (not Unicode).
From my experience (and from the source code I have seen so far), ElementTree
does not return UTF-8 encoded strings at the API level. Can you
Maric Michaud [EMAIL PROTECTED] writes:
What the type int means is that int is not a user type but a
builtin type, instances of int are not types (or classes) but common
objects, so its nature is the same as any classes.
The way it prints doesn't matter, it's just the __repr__ of any
I have been playing with computers since I first learned to program
moving shapes on an Atari 800XL in BASIC. After many years of dabbling
in programming languages as a hobbyist (I am not a computer scientist
or other IT professional), I have never found a way to stick with a
language far enough
On Jul 31, 1:32 pm, fprintf [EMAIL PROTECTED] wrote:
I have been playing with computers since I first learned to program
moving shapes on an Atari 800XL in BASIC. After many years of dabbling
in programming languages as a hobbyist (I am not a computer scientist
or other IT professional), I
From this noob's perspective, I'd say take a look at Magnus Lie
Hetland's Beginning
Pythonhttp://www.amazon.com/Beginning-Python-Novice-Professional/dp/159059519Xbook.
It covers the core syntax (which it sounds like you're familiar with
already) and then includes a bunch of projects, from text
Steven D'Aprano wrote:
On Wed, 30 Jul 2008 09:23:05 -0600, Matthew Fitzgibbons wrote:
If you're expecting a list (and only a list)
then your point makes sense. 'if x' can get you into trouble if you
_don't_ want its polymorphism.
if x is hardly unique in that way. If you're expecting a list,
Matthew Fitzgibbons wrote:
Steven D'Aprano wrote:
On Wed, 30 Jul 2008 09:23:05 -0600, Matthew Fitzgibbons wrote:
If you're expecting a list (and only a list)
then your point makes sense. 'if x' can get you into trouble if you
_don't_ want its polymorphism.
if x is hardly unique in that way.
Lets say we have this list:
funlist = ['a', 'b', 'c']
and lets say I do this:
if funlist[4]:
print funlist[4]
I will get the exception list index out of range
How can I test if the list item is empty without getting that exception?
--
View this message in context:
Alexnb:
How can I test if the list item is empty without getting that exception?
In Python such list cell isn't empty, it's absent. So you can use
len(somelist) to see how much long the list is before accessing its
items. Often you can iterate on the list with a for, so you don't need
to care of
fprintf:
and yet they all end at the point where a person has enough
knowledge of the syntax, but not really enough to do anything.
A programming language is a tool to solve problems, so first of all:
do you have problems to solve? You can create some visualizations,
some program with GUI, some
1 - 100 of 207 matches
Mail list logo