* Arnaud Delobelle, on 21.09.2010 11:13:
On Sep 21, 7:19 am, "Alf P. Steinbach /Usenet" wrote:
* Alf P. Steinbach /Usenet, on 21.09.2010 01:09:
* Astley Le Jasper, on 20.09.2010 23:42:
I have a list of tuples that indicate a relationship, ie a is related
to b, b is related to
* Alf P. Steinbach /Usenet, on 21.09.2010 01:09:
* Astley Le Jasper, on 20.09.2010 23:42:
I have a list of tuples that indicate a relationship, ie a is related
to b, b is related to c etc etc. What I want to do is cluster these
relationships into groups. An item will only be associated with a
uivalent to. Then in second pass simply drag
out each equivalence group (recurse on each symbol's list of equivalences).
Approaches 1 and 2 seem to be pretty inefficient for a large number of symbols,
but I think approach 1 may be a practical option for a small number of symbols.
Cheers &a
might be that its argument is a sorted array. So regarding the nature of the
checks it's not hopelessly incompatible with Python.
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Standish P, on 16.08.2010 09:20:
[garble garble]
Nonsense article "We look for an exogenous stack" cross-posted to
[comp.lang.c],
[comp.lang.c++],
[comp.theory],
[comp.lang.python],
[comp.lang.forth].
Please refrain from following up on Standish' article.
em into your message (e.g. [Ctrl V]).
And then, if you haven't already figured it out, somebody probably will. :-)
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
;U").
I suspect this is a leftover from Python 2.x, where strings were bytes, and that
this is a bug?
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Vladimir Jovic, on 19.07.2010 09:41:
Alf P. Steinbach /Usenet wrote:
#include // PyWeakPtr, PyPtr, PyModule,
PyClass
using namespace progrock;
namespace {
using namespace cppy;
struct Noddy
{
PyPtr first;
PyPtr last;
int number
ey and might be one of the
suckers responding to spam.
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Alf P. Steinbach /Usenet, on 17.07.2010 11:50:
[Cross-posted comp.lang.c++ and comp.lang.python]
[snip]
this occurred to me:
#define CPPY_GETSET_FORWARDERS( name ) \
::progrock::cppy::forwardersGetSet( \
&CppC
member pointer,
which the macro supplies *twice*, once as run-time arg and once as compile-time.
He he.
Perhaps this trick is well-known already, but it was new to me, so! :-)
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
cumented. This way is inefficient for small data set, but works.
In order to get a better handle on the general problem -- not the Python
technicalitities -- google up "KWIC", KeyWord In Context. It's a common exercise
problem given to first or second-year students. So I thin
* Hrvoje Niksic, on 14.07.2010 10:17:
"Alf P. Steinbach /Usenet" writes:
Also, things like the 'owned' option is just asking for trouble.
Isn't owned=true (or equivalent) a necessity when initializing from a
PyObject* returned by a function declared to return a &
* Steven D'Aprano, on 14.07.2010 06:31:
Gary did the right thing by pointing out that the simple-sounding term
"points to" is anything but simple, it depends on what you mean by
pointing and pointers.
Possibly you have a point here.
Cheers,
- Alf
--
blog at http://alfp
ather, I'd make that as explicit as possible.
Like,
x = {"sharedVar": 123}
y = x
The one won't be surprised when changing x["sharedVar"] also changes
y["sharedVar"].
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* sturlamolden, on 13.07.2010 22:06:
On 13 Jul, 21:39, "Alf P. Steinbach /Usenet" wrote:
Thanks! It seems that SCXX does those things that I've been planning to do but
haven't got around to (wrapping standard Python types), while what it doesn't do
(abstracting away
* sturlamolden, on 13.07.2010 22:03:
On 9 Jul, 17:52, "Alf P. Steinbach /Usenet" wrote:
For an extension module it seems that Python requires each routine to be defined
as 'extern "C"'.
That is strange. PyMethodDef is just a jump table. So why should
'ext
b ); // Should be OK with any compiler.
}
... compiles, and works.
Cheers, & thanks,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Robert Kern, on 13.07.2010 17:16:
On 7/13/10 2:34 AM, Alf P. Steinbach /Usenet wrote:
PS: You (the reader) may be wondering, why why why Yet Another Python/C++
binding? Well, because I had this great name for it, "pyni", unfortunately
already in use. But cppy is very different
* geremy condra, on 09.07.2010 23:43:
On Fri, Jul 9, 2010 at 5:22 PM, Ian Collins wrote:
On 07/10/10 03:52 AM, Alf P. Steinbach /Usenet wrote:
[Cross-posted comp.lang.python and comp.lang.c++]
I lack experience with shared libraries in *nix and so I need to ask...
This is about "
* Steven D'Aprano, on 13.07.2010 01:34:
On Mon, 12 Jul 2010 20:28:49 +0200, Alf P. Steinbach /Usenet wrote:
As I see it it doesn't matter whether the implementation is CPython call
frame slots or that mechanism called something else or a different
mechanism called the same or a
* Steven D'Aprano, on 13.07.2010 01:50:
On Mon, 12 Jul 2010 22:57:10 +0200, Alf P. Steinbach /Usenet wrote:
Existence of a variable means, among other things, that
* You can use the value, with guaranteed effect (either unassigned
exception
or you get a proper value
* Rami Chowdhury, on 13.07.2010 00:14:
Perhaps I'm misunderstanding, but ...
On Jul 12, 2010, at 13:57 , Alf P. Steinbach /Usenet wrote:
Existence of a variable means, among other things, that
* You can use the value, with guaranteed effect (either unassigned exception
or you
= options
)
setup(
name= "noddy",
version = '1.0',
description = 'This is a demo package',
ext_modules = [module1]
)
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
ut only
creates one:
foo("Monday")
('Locals:', {'day': 'Monday'})
foo.func_code.co_varnames
('day', 'x')
foo.func_code.co_nlocals
2
So, the question is, is x a local variable or not? It's not in locals,
but the function clearly kno
* Steven D'Aprano, on 12.07.2010 04:39:
On Mon, 12 Jul 2010 03:12:10 +0200, Alf P. Steinbach /Usenet wrote:
* MRAB, on 12.07.2010 00:37:
[...]
In Java a variable is declared and exists even before the first
assignment to it. In Python a 'variable' isn't declared and w
* sturlamolden, on 12.07.2010 16:59:
On 12 Jul, 07:51, "Alf P. Steinbach /Usenet" wrote:
We're talking about defining a 'swap' routine that works on variables.
I did not miss the point. One cannot make a swap function that rebinds
its arguments in the callin
at no other threads execute while PyInit_spam is called? Can it
be called simultaneously by two or more threads?
5. Reload of interpreter?
My impression from the documentation is that finalization and reinit of the
interpreter is something that an application shouldn't really do, a
* sturlamolden, on 12.07.2010 06:52:
On 11 Jul, 21:37, "Alf P. Steinbach /Usenet" wrote:
Oh, I wouldn't give that advice. It's meaningless mumbo-jumbo. Python works like
Java in this respect, that's all; neither Java nor Python support 'swap'.
x,y = y,
* MRAB, on 12.07.2010 04:09:
Alf P. Steinbach /Usenet wrote:
* MRAB, on 12.07.2010 00:37:
Alf P. Steinbach /Usenet wrote:
* Stephen Hansen, on 11.07.2010 21:00:
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
Follow-up:
Is there a way to define compile-time constants in python and have
the
* Stephen Hansen, on 12.07.2010 04:02:
On 7/11/10 6:12 PM, Alf P. Steinbach /Usenet wrote:
However, as stated up-thread, I do not expect facts, logic or general
reasoning to have any effect whatsoever on such hard-core religious
beliefs.
Grow up, and/or get a grip, and/or get over yourself
* MRAB, on 12.07.2010 00:37:
Alf P. Steinbach /Usenet wrote:
* Stephen Hansen, on 11.07.2010 21:00:
On 7/11/10 11:45 AM, wheres pythonmonks wrote:
Follow-up:
Is there a way to define compile-time constants in python and have the
bytecode compiler optimize away expressions like:
if
ce when one's goals
require acceptance in a society dominated by a religious clique. And just as I'm
not out to engage you in any debate on this issue (futile), neither am I calling
you irrational. Perhaps your choice is the same as that author's.
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
numero
uno all this nonsense would be rectified! Str, Float, List, Range,
etc, etc. You think Python 3000 was a hump to climb over just wait for
Python 4000.
Just thoughts.
Just do
Str = str
List = list
Float = float
and so on in module "myBasicTypes", and import that.
:-)
Che
English, like "file" and "philosophy". So it's an error committed not
by the limbic system but by a slightly higher level sound-to-text translator
brain circuit. The text is generated from how the word sounds in one's head.
Cheers & hth.,
- Alf
--
blog at http://alfp
stead of as a
value of a different type.
And write e.g.
not_found = -1
...
if choiceIdx1 == choiceIdx2 == not_found:
bah, none of them
elif choice2Idx == not_found:
use choice 1
elif choice1Idx == not_found:
use choice 2
else:
determine bestest choice
C
ans do everything in triplicate" - Old jungle proverb
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
cation is not using the final module
name but instead something like "xxmodule" or "_csv"?
More to the point, what's the point?
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Ian Collins, on 09.07.2010 23:22:
On 07/10/10 03:52 AM, Alf P. Steinbach /Usenet wrote:
[Cross-posted comp.lang.python and comp.lang.c++]
I lack experience with shared libraries in *nix and so I need to ask...
This is about "cppy", some support for writing Python extensions in
rking in Windows the Notepad++ and PSPad and old Crimson Editor (all
free) all work nicely and are reasonably light-weight.
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
me##_##name##_descriptor \
);
#define CPPY_MODULE_CROUTINE( cppClassName, name, docString ) \
CPPY_MODULE_CROUTINE_DEF( cppClassName, name ) \
CPPY_MODULE_CROUTINE_INSTALLDATA( cppClassName, name, docString )
TIA.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
r, just a use-as-you-wish finalization callback. Nice!
But I think that could be more clear in the docs...
Code, for those who might be interested:
// progrock.cppy -- "C++ plus Python"
// A simple C++ framework for writing Python 3.x extensions.
//
// Copyright (C) Al
looks like this:
// progrock.cppy -- "C++ plus Python"
// A simple C++ framework for writing Python 3.x extensions.
//
// Copyright (C) Alf P. Steinbach, 2010.
#ifndef CPPY_MODULE_H
#define CPPY_MODULE_H
#include
//-
ion_NewEx, and more criticially, I'm
unable to find any documented way to turn a C or C++ function into a Python
function object?
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Alf P. Steinbach /Usenet, on 08.07.2010 01:47:
enum DoAddRef { doAddRef };
class Ptr
{
private:
PyObject* p_;
public:
Ptr( PyObject* p = 0 ): p_( p )
{}
Ptr( PyObject* p, DoAddRef ): p_( p )
{
assert( p
* rantingrick, on 07.07.2010 07:42:
On Jul 6, 9:11 pm, "Alf P. Steinbach /Usenet" wrote:
"pyni"! Pronounced like "tiny"! Yay!
hmm, how's about an alternate spelling... "pyknee", or "pynee", or
"pynie" ... considering those
* Alf P. Steinbach /Usenet, on 07.07.2010 23:19:
However developing an extension with MSVC 10 the extension will use the
10.0 CRT, which is not necessarily present on the end user's system.
As I see it there are five solutions with different trade-offs:
A Already having Visual Studio
ed until some new Python version.
And I think the clue here is that the CRT state problems can be avoided by
careful coding.
Hence, for those who cannot do A I think B is a realistic practical option, and
D would be nice...
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
that it crashed when
passing FILE*. Then we started explaining that mixing CRTs is risky.
Oh.
Well then. :-)
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* sturlamolden, on 07.07.2010 21:46:
On 7 Jul, 21:41, "Alf P. Steinbach /Usenet" wrote:
You still have two CRTs linked into the same process.
So?
CRT resources cannot be shared across CRT borders. That is the
problem. Multiple CRTs are not a problem if CRT resources are ne
* sturlamolden, on 07.07.2010 21:12:
On 7 Jul, 06:54, "Alf P. Steinbach /Usenet" wrote:
PyAPI_FUNC(void *) PyMem_Malloc(size_t);
#define PyMem_MALLOC(n) (((n)< 0 || (n)> PY_SSIZE_T_MAX) ? NULL \
: malloc((n) ? (n) : 1))
I wa
her difficult to do
with Microsoft's tools, for otherwise people would have employed that solution
before, and so I wouldn't trust the result, and wouldn't waste the time trying.
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
e
user the choice of automatically downloading from python.org, or perhaps direct
from Microsoft. This scheme would support dependencies on new runtime lib
versions not yet conceived when the user's version of Python was installed.
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
htt
name "pyni" occurred to me.
"pyni"! Pronounced like "tiny"! Yay!
I sat down and made my first Python extension module, following the tutorial in
the docs. It worked!
But, wait, perhaps some other extension is already named "piny"?
Google.
http://code.g
ks fine no matter what compiler you use,
although it's many many years since I've done JNI things. Similarly, Python
should IMHO just have a well defined compiler independent native code interface,
e.g. "PNI", or "pynacoin", the PYthon NAtive COde INterface :-)
C
* Steven D'Aprano, on 03.07.2010 16:24:
On Sat, 03 Jul 2010 08:46:57 -0400, D'Arcy J.M. Cain wrote:
On Fri, 02 Jul 2010 22:40:34 -0700
John Nagle wrote:
Not according to Vex's published package list:
http://www.vex.net/info/tech/pkglist/
Hold on. That *is* the generated list
return wrapper
class Thing(object):
@expose()
def test1(self, arg1):
return arg1
@expose( "testing" )
def test2(self, arg2):
return arg2
o = Thing()
print( o.test1( 1.11 ) )
print( o.test2( 2.22 ) )
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
ht type-specific routines directly. :-)
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
rom a GUI subsystem program.
results = open('results.txt', 'w')
for n in range(10):
p.stdin.write("%d\n" % n)
result = p.stdout.readline().strip()
results.write('double(%s) => %2s\n' % (n, result))
results.close()
--- end of
ionary and bypass any overriden __getitem__/__setitem__ methods (an
optimization, surely). I'm afraid it will be hard to intercept global
variable usage in these circumstances.
Great exposition.
But who would have thunk that Python *isn't dynamic enough*? :-)
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
ted this way of marking emails, correct me
if I am wrong here.
But if its true, is there any other way or library in Python to meet
my requirements?
You can access GMail via an ordinary e-mail client. What's that called, POP
protocol? I think the protocol for sending is SMTP. Any library ha
s adopted the idea of PEPs from Python. In C++
they're called "proposals" or "papers" but it's much the same thing. Python has
Guido, C++ has Bjarne. In both cases the original language was designed
single-handedly by the god. And in both cases it's now essen
id( 10, 10, 20, 20 )
topwin = TopWin()
topwin.mainloop()
Here the effective presentation area size is (seems to be) 400x300 pixels.
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
* Dodo, on 07.06.2010 12:38:
Le 05/06/2010 19:07, Alf P. Steinbach a écrit :
* Dodo, on 05.06.2010 15:46:
Hi,
let's consider this exemple :
from tkinter import *
from tkinter.ttk import *
class First:
def __init__(self):
self.root = Tk()
B = Button(self.root, command=self.op)
B
uires 16 GiB or more RAM...
Cheers,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
op'.
Don't.
Except for modal dialogs the single top level 'mainloop' suffices (all it does
is to dispatch "messages" to "handlers", such as your button press callback).
So, just place a single call to 'mainloop' at the end of your program. Remove
e recently in DDJ where the author seemed to be unaware of
this, but I'm not going to pay for the privilege of commenting on articles.
Cheers & hth.,
- Alf
PS: How come that when I post a blog entry proving mathematically that the
reader is really really smart, the number of views
ups (Google picked up that archive from Deja News).
Until some replacement for Usenet appears, online discussion will in general be
effectively /local/, unknown to all but the parties currently using a given web
forum, and it will in general not be archived.
As I see it, those who have made a
already *is* a forum. Whatever it is you think is needed, it's
already a forum. Can you be more specific about what you would add?
I meant a web forum.
You can access [comp.lang.python] via Google Groups and other web based
interfaces.
So it already is a web forum.
Cheers & hth
uot;why is the door rectangular when sheep are known to
dance in the moonlight only on dates divisible by cinnamon?".
It's rather difficult to answer.
I guess it's back to basics: read up on classes, instances, constructors.
Experiment, create a lot of small programs. Don't think
what to call
such a class, and now it's clear. :-)
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
ng the reference. You
can think of it as the "reference value" if you want; it's what's copied by an
assignment to a variable.
Second, the reason that you get the same id for various 42 objects is that
CPython uses a cache of "small integer" objects. As I recall the cache ranges
from -5 to some 127 or so (or perhaps it was double that). Any value outside
that cached range you'll see different id's for the same value.
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
's more properly the domain
of a special purpose library.
The question then boils down to which GUI libraries your image/rich text library
is compatible with.
Perhaps if someone else has handled that combination they'll chime in.
Cheers & hth.,
- Alf
PS: Tkinter on its own d
ecall that Tkinter offers some
automatic update magic via something-something), then I don't know.
Would be very happy for any hints.
Just update the widget whenever you change the text.
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
t might be an issue with the server itself,
but still, any input would be very appreciated.
Check if there's any way to specify time-outs.
Check if there's any way to trace the actual commands and responses.
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
( levels, result = None, key = '' )
if result is None: result = {} # Evaluated for each call.
# Blah blah, the rest
There are also other ways.
Cheers & hth.,
- Alf
--
blog at http://alfps.wordpress.com>
--
http://mail.python.org/mailman/listinfo/python-list
evant info up front (holding a
lock for hours seems ungood to me).
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
* Terry Reedy:
* Alf P. Steinbach:
* Aahz:
and sometimes
they rebind the original target to the same object.
At the Python level that seems to be an undetectable null-operation.
If you try t=(1,2,3); t[1]+=3, if very much matters that a rebind occurs.
Testing:
>&
e, to be meaningless.
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
ly. Nothwithstanding the current CPython and Jython
documentation error of sys.getrefcount (or whatever the name was) that indicates
that it's available in any implementation.
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
o stuff a potato into the tailpipe
of your Chevrolet.
The point is, what you're suggesting doesn't save work at all
as you've shown it. There are other ways to do the same thing,
for virtually no work at all.
Don't put big text dumps in your program. Problem solved!
Alf suggest
On 30.04.2010 21:46, * Lie Ryan:
On 05/01/10 05:43, Lie Ryan wrote:
On 05/01/10 03:56, Alf P. Steinbach wrote:
Use triple-quoted, let them flow, done. I've never heard of any text
editor in current use without text wrapping capability, even Notepad has
it. And if I've got 5k
On 30.04.2010 19:31, * Lie Ryan:
On 05/01/10 00:01, Alf P. Steinbach wrote:
On 30.04.2010 12:51, * Lie Ryan:
On 04/30/10 12:07, Alf P. Steinbach wrote:
On 30.04.2010 01:29, * Carl Banks:
On Apr 28, 11:16 am, "Alf P. Steinbach"wrote:
On 28.04.2010 18:54, * Lie Ryan:
Python h
On 30.04.2010 12:51, * Lie Ryan:
On 04/30/10 12:07, Alf P. Steinbach wrote:
On 30.04.2010 01:29, * Carl Banks:
On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
On 28.04.2010 18:54, * Lie Ryan:
Python have triple-quoted string when you want to include large amount
of text;
Y
ns?
#Py3
lines = (
"83927 300023_25_5_09_FL 9086 9134 F3LQ2BE01AQLXF 1 49 + 80 ZA8Z89HIB7M",
"blah blah",
"2 small tortoises"
)
for line in lines:
parts = line.split()
if len( parts ) > 0:
try:
v = int( parts[0] )
print( "OK " + line )
except ValueError:
print( "! " + line )
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
On 30.04.2010 01:29, * Carl Banks:
On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
On 28.04.2010 18:54, * Lie Ryan:
Python have triple-quoted string when you want to include large amount
of text;
Yes, that's been mentioned umpteen times in this thread, including the *ver
getframeinfo( frame )
s = "Pleased to meet you, I was originally called '{}'!".format(
info.function )
print( s )
bar = foo
del foo
bar()
Pleased to meet you, I was originally called 'foo'!
But as mentioned, I'd personally choose a "real" object instead of a bare
function.
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
On 28.04.2010 18:54, * Lie Ryan:
On 04/28/10 15:34, Alf P. Steinbach wrote:
On 28.04.2010 07:11, * Sagar K:
Use triple quote:
d = """ this is
a sample text
which does
not mean
anything"""
"goldtech" wrote in message
news:4e25733e-eafa-477b-a84d-a
jous day! callooh! callay!\"\n"
" He chortled in his joy.\n"
"\n"
"'Twas brillig, and the slithy toves\n"
"Did gyre and gimble in the wabe;\n"
" All mimsy were the borogoves,\n"
"And the mome raths ou
On 26.04.2010 22:26, * Dodo:
Le 26/04/2010 22:26, Alf P. Steinbach a écrit :
On 26.04.2010 22:12, * Dodo:
Hi all,
Under python 2.6, chr() "Return a string of one character whose ASCII
code is the integer i." (quoted from docs.python.org)
Under python 3.1, chr() "Return th
convert a ASCII code back to a character under python 3, not
Unicode.
How can I do that?
Just use chr().
ASCII (7-bit) is a subset of ISO Latin-1 (7-bit), which is a subset of Unicode's
Basic Multilingual Plane (BMP, original Unicode, 16-bit) which is a subset of
Unicode (21-bit).
Chee
by default.
This option may be re-enabled by the project by placing a file with the name
".htaccess" with this line:
Options +Indexes
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
* Steven D'Aprano:
On Fri, 23 Apr 2010 13:19:41 +0200, Alf P. Steinbach wrote:
But for a literal context-free interpretation e.g. the 'sys.getrefcount'
function is not documented as CPython only and thus an implementation
that didn't do reference counting would not be
;Objects that have __del__() methods and are part of a reference cycle cause
the entire reference cycle to be uncollectable, including objects not
necessarily in the cycle but reachable only from it."
... which means that a programming style assuming current CPython semantics and
employing
i ask for
the len of the sting it include also the"'%0D%0A".
My question is how i can cut the last part of the string if it is
every time different?
Try rtrim.
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
n easy language.
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
ssarily complete for a Very Long Time).
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
nd
conversely, the third parameter "end" signifies where the search starts. :-)
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
erforming cleanup by using a finally clause (low level technique).
3.2.3 Performing cleanup by using a with statement.
Comments welcome!
Cheers,
- Alf
Notes:
[1] I'm posting this only to [comp.lang.python], for now seeking feedback mainly
on the language aspects and general approach. Parti
}
}
So, yes, considering Ada, C++, Java and C# -- and so on. ;-)
Cheers & hth.,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 648 matches
Mail list logo