To which degree python language support features of following langauage
categories?
Imperative, Object Oriented, Scriptig or Functional.
--
http://mail.python.org/mailman/listinfo/python-list
wrote:
When used in terms of Usenet, I think it can be applied in the sense
of 'a troll who is greedy for attention'.
Hence the saying 'do not feed the troll'.
Unless you can cause a buffer overflow :-D
--
John Small Perl scripts: http://johnbokma.com/perl/
Xah Lee [EMAIL PROTECTED] writes:
HTML Problems in Python Doc
Why dont you write a Mathematica tutorial instead ?
It looks like you know a little about Mathematica while
your knowledge of Python is abyssmal.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
To which degree python language support features of following langauage
categories?
Imperative, Object Oriented, Scriptig or Functional.
Sounds like a homework assignment to me How about your do some
research on your own, like the following:
google for
Svennglenn wrote:
# -*- coding: cp1252 -*-
titel = åäö
titel = unicode(titel)
Instead of this, just write
# -*- coding: cp1252 -*-
titel = uåäö
fil = open(testfil.txt, w)
fil.write(titel)
fil.close()
Instead of this, write
import codecs
fil = codecs.open(testfil.txt, w, cp1252)
Be reassured, I'm not working in any business related to pacemakers,
avionics or railway signalling equipement ... :)
I'm just a guy who is learning Python because to me it seems to be the
best alternative to Perl, and trying to know what it is fit for.
--
Hi everbybody again,
I have a little problem, I don't understand the reason of this:
a = [10,1,2,3]
def foo():
global a
for el in a:
el = el*2
This doesn't make any difference, if I do
def foo():
global a
a[0] = 4
But
def foo():
global a
for n in range(len(a)):
a[n] =
To win this point, you need to produce evidence that doesn't exist.
I was not trying to win any point when I put my naive question on this
forum.
I'm just learning Python and trying to know what it is best made for.
So far I've learnt that Python is lazy about tyche-checking, it is
dynamic by
Does anyone know if there are any Python Active Directory Modules out
there? I looked at LDAP module but there is no version for Python 2.4
and it's support for Active Directory seems to be lacking a bit.
Thanks,
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Hi.
pyvm is a program which can run python 2.4 bytecode (the .pyc files).
A demo pre-release is available at:
http://students.ceid.upatras.gr/~sxanth/pyvm/
Facts about pyvm:
- It's FAST. According to the cooked-bench benchmark suite it finishes
in 55% of the time python takes;)
-
On Sun, 08 May 2005 11:23:49 +0200, Martin v. Löwis
[EMAIL PROTECTED] wrote:
Svennglenn wrote:
# -*- coding: cp1252 -*-
titel = åäö
titel = unicode(titel)
Instead of this, just write
# -*- coding: cp1252 -*-
titel = uåäö
fil = open(testfil.txt, w)
fil.write(titel)
fil.close()
Instead
Harlin Seritt wrote:
Does anyone know if there are any Python Active Directory Modules out
there?
You could use ADSI with python-win32.
I looked at LDAP module but there is no version for Python 2.4
Off course python-ldap works with Python 2.4. There are even Win32
binaries for Python 2.4:
On 2005-05-08, andrea crotti wrote:
I have a little problem, I don't understand the reason of this:
a = [10,1,2,3]
def foo():
global a
for el in a:
el = el*2
Simple data types (as integer) are _not_ implemented as references as
you obviously expected. Instead el is copied by value
Hi,
I'd like to fit a curve (a rectangular hyperbola, in fact) to some data
points as part of a program i'm writing. Can anyone suggest a package
which would help me do this?
A bit of googling suggests that SciPy might be what i want. Does that
sound likely?
Thanks,
tom
--
OBEY GIANT
--
Hi all,
in my cross-reference tool I have the need to highlight the variables
(by printing them in bold).
I am using the kwrite editor, and I am not able to control it from
python.
I was thinking of various solutions:
- consider the text file as html and use b.../b
- use LaTex
- define a new
I am trying to use SGMLlib module to extract all links from some data I
pulled from the web (via urllib). I have looked at the documentation
online and can not make sense of it. As a quick example, how would I
get the hyperlinks for an html file?
thanks,
Harlin
--
Mike Meyer wrote:
As I've suggested before, what's really needed is a short tutorial on
regular expressions in general. That page could include a definition
of terms that are unique to regular expressions, and the re package
documentation could link the word greedy to that definition.
You
On Sunday 08 May 2005 13:41, [EMAIL PROTECTED] wrote:
As you can see you can interact with kwrite from dcop.
Unfortunately I don't have this module in my Python (2.3) nor I have
been able to find it.
It's normally installed seperately from the main kde libraries - on gentoo
it's a package
Harlin Seritt wrote:
I am trying to use SGMLlib module to extract all links from some data I
pulled from the web (via urllib). I have looked at the documentation
online and can not make sense of it. As a quick example, how would I
get the hyperlinks for an html file?
I know you're not someone
If anyone is interested in a /etc/hosts.deny automatic update script
(Unix only) based on sshd/vsftpd attacks, here's a python script:
http://www.aczoom.com/tools/blockhosts/
This is a beta release, and my first attempt at Python coding.
Any comments, suggestions, pointers on using more common
Jeremy Bowers [EMAIL PROTECTED] writes:
On Sat, 07 May 2005 12:10:46 -0400, François Pinard wrote:
[Martin von Löwis]
François Pinard wrote:
Am I looking in the wrong places, or else, should not the standard
documentation more handily explain such things?
It should, but,
Stelios Xanthakis wrote:
Hi.
pyvm is a program which can run python 2.4 bytecode (the .pyc files).
A demo pre-release is available at:
http://students.ceid.upatras.gr/~sxanth/pyvm/
Facts about pyvm:
- It's FAST. According to the cooked-bench benchmark suite it
finishes
in 55%
Hi all,
I was wondering if the session:
Intuition and Python Programming - the Python Visual Sandbox
did occur, of if it was canceled. To this day, there is
still no sign of a corresponding paper on
http://www.python.org/pycon/2005/papers/
nor did I see any report about it.
Just curious,
On Sun, 08 May 2005 13:46:22 +, John J. Lee wrote:
I don't mean to put words into Franois' mouth, but IIRC he managed,
for example, GNU tar for some time and, while using some kind of
tracking system under the covers, didn't impose it on his users.
IMVHO, that was very nice of him, but
Thanks for the help, I just didn't like the way that SGMLlib forces one
to instantiate a class to do this (or httplib for that matter). I
looked at those links you graciously sent (thanks!) but didn't like
them. At any rate, I went ahead and wrote my own. Thank goodness that
it's easy to parse
On 8 May 2005 02:59:22 -0700, LDD [EMAIL PROTECTED] wrote:
Be reassured, I'm not working in any business related to pacemakers,
avionics or railway signalling equipement ... :)
I'm just a guy who is learning Python because to me it seems to be the
best alternative to Perl, and trying to know
On 2005-05-08, Tom Anderson [EMAIL PROTECTED] wrote:
I'd like to fit a curve (a rectangular hyperbola, in fact) to
some data points as part of a program i'm writing. Can anyone
suggest a package which would help me do this?
I use the LeastSquares function in Scientific Python:
Peter Hansen [EMAIL PROTECTED] writes:
Harlin Seritt wrote:
I am trying to use SGMLlib module to extract all links from some data I
pulled from the web (via urllib). I have looked at the documentation
online and can not make sense of it. As a quick example, how would I
get the hyperlinks
Let's say I have a python function do some math like the following:
def doMath(self):
self.val = self.val + 1
How can I call this python function from C++? Assuming I have some sort
of Python wrapper around my C++ codes.
--
http://mail.python.org/mailman/listinfo/python-list
I've seen the benchmarks, they look quite interesting.
This project is probably a LOT of work; maybe people can tell us about
such efforts *before* doing so much work, so we can discuss it, and
avoid wasting time.
Maybe you can explain us why it is so fast, and/or maybe you can work
with the
John Machin wrote:
Martin, I can't guess the reason for this last suggestion; why should
a Windows system use iso-8859-1 instead of cp1252?
Windows users often think that windows-1252 is the same thing as
iso-8859-1, and then exchange data in windows-1252, but declare them
as iso-8859-1 (in
Jeremy Bowers wrote:
Then I'd honor his consistency of belief, but still consider it impolite
in general, as asking someone to do tons of work overall to save you a bit
is almost always impolite.
This is not what he did, though - he did not break the protocol by
sending in patches by email
[EMAIL PROTECTED] wrote:
Let's say I have a python function do some math like the following:
def doMath(self):
self.val = self.val + 1
How can I call this python function from C++? Assuming I have some sort
of Python wrapper around my C++ codes.
See the Embedding and Extending
I am in the progress of laying the groundwork for a small application I
intend to make, and I'd like some expert advice, since this is the first
larger project I've gotten myself into.
First problem is which backend to use for data storage. The application I am
trying to create is a small
Kay Schluehr wrote:
Stelios Xanthakis wrote:
pyvm is a program which can run python 2.4 bytecode (the .pyc files).
A demo pre-release is available at:
http://students.ceid.upatras.gr/~sxanth/pyvm/
could You tell us a bit more about Your motivation to create an
alternative C-Python
could You tell us a bit more about Your motivation to create an
alternative C-Python interpreter?
I'd also be curious to know if the performance gains would remain
once it gets fleshed out with things like closures, long numbers,
new style classes and a C library compatibility shim.
Roger
Look for the packet called KirbyBase. Small, pythonic, text based
files...
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 08 May 2005 20:09:29 +0200, Mikkel Høgh [EMAIL PROTECTED] wrote:
I am in the progress of laying the groundwork for a small application I
intend to make, and I'd like some expert advice, since this is the first
larger project I've gotten myself into.
First problem is which backend to use
Stelios Xanthakis [EMAIL PROTECTED] writes:
- The demo is an x86/linux binary only. You shouldn't trust binaries,
run it in a chrooted environment not as root!
Are you going to release the source? If not, it's a lot less interesting.
--
http://mail.python.org/mailman/listinfo/python-list
vermicule wrote:
What is so hard to understand ?
Should be perfectly clear even to a first year undergraduate.
As for greedy even a minimal exposure to Djikstra's shortest path
algorithm would have made the concept intuitive. And from memory,
that is the sort of thing done in Computing
Hello I have a question about inheritance in Python. I'd like to do
something like this:
class cl1:
def __init__(self):
self.a = 1
class cl2(cl1):
def __init__(self):
self.b = 2
But in such a way that cl2 instances have atributes 'b' AND 'a'.
Obviously, this is not the way of doing
On 8 May 2005 12:07:58 -0700, [EMAIL PROTECTED] wrote:
Hello I have a question about inheritance in Python. I'd like to do
something like this:
class cl1:
def __init__(self):
self.a = 1
class cl2(cl1):
def __init__(self):
self.b = 2
But in such a way that cl2 instances have
For the riddles' lovers among you, you are most invited to take part
in the Python Challenge, the first python programming riddle on the net.
You are invited to take part in it at:
http://www.pythonchallenge.com
--
http://mail.python.org/mailman/listinfo/python-list
alex goldman [EMAIL PROTECTED] writes:
vermicule wrote:
What is so hard to understand ?
Should be perfectly clear even to a first year undergraduate.
As for greedy even a minimal exposure to Djikstra's shortest path
algorithm would have made the concept intuitive. And from memory,
that
The zip file essentially contains the whole system in on lump.
Change
the system, and naturally your users will have to download the whole
lump again. [...]
but if it was just a dir, when they update from the svn at log in,
all
they do is download the extra\changed files. much much quicker
Thanks.
Jp Calderone wrote:
On 8 May 2005 12:07:58 -0700, [EMAIL PROTECTED] wrote:
Hello I have a question about inheritance in Python. I'd like to do
something like this:
class cl1:
def __init__(self):
self.a = 1
class cl2(cl1):
def __init__(self):
self.b = 2
But in
Is here anybody who has practical experiences with programing Olympus
R1000 hand-held (Linux OS) using Qtopia, PyQt and Python? If yes, can
you share your experiences?
I am intending to use this platform, but I would like to know if the
device is mature enough and if Qtopia, PyQt and Python works
http://www.developer.com/lang/article.php/10924_3330231_3
On Sunday 08 May 2005 11:53 am, alex goldman wrote:
He's right actually. If we understand the term greedy as it's used in
graph search and optimization algorithms, Python's RE matching actually IS
greedy.
--
James Stroud
UCLA-DOE
On Sun, 08 May 2005 21:27:35 GMT, les [EMAIL PROTECTED] wrote:
I am working on a homework assignment and trying to use cPickle to store
the answers from questor.py I believe I have the syntax correct but am not
sure if I am placing everything where it needs to be. Any help would be
greatly
les wrote:
Traceback (most recent call last):
File /home/les/workspace/Module 2/questor.py, line 18, in ?
f = file(questorlistfile)
NameError: name 'questorlistfile' is not defined
I thought that I had defined questorlistfile on the 4th line below
# define some constants for
OK, looks like it is time for a break!
Thanks for the replies!
--
http://mail.python.org/mailman/listinfo/python-list
I am a C++ developer with only a little experience using Python. I
want to create a Python class where by I can construct an instance from
that class based on one of two different object types.
For example, if I were programming in C++, I would do the something
like the following:
class MyClass
Hi all,
I need to limit as much as possible the lenght of a source line,
stripping white spaces (except indentation).
For example:
. . max_move and AC_RowStack.acceptsCards ( self, from_stack, cards
)
must be reduced to:
. . max_move and AC_RowStack.acceptsCards(self,from_stack,cards)
My
[EMAIL PROTECTED] wrote:
Hello I have a question about inheritance in Python. I'd like to do
something like this:
class cl1:
def __init__(self):
self.a = 1
class cl2(cl1):
def __init__(self):
self.b = 2
But in such a way that cl2 instances have atributes 'b' AND 'a'.
[EMAIL PROTECTED] wrote:
I am a C++ developer with only a little experience using Python. I
want to create a Python class where by I can construct an instance from
that class based on one of two different object types.
For example, if I were programming in C++, I would do the something
On Sun, 8 May 2005, Grant Edwards wrote:
On 2005-05-08, Tom Anderson [EMAIL PROTECTED] wrote:
I'd like to fit a curve (a rectangular hyperbola, in fact) to
some data points as part of a program i'm writing. Can anyone
suggest a package which would help me do this?
I use the LeastSquares
On Sunday 08 May 2005 03:05 pm, [EMAIL PROTECTED] wrote:
I am a C++ developer with only a little experience using Python. I
want to create a Python class where by I can construct an instance from
that class based on one of two different object types.
For example, if I were programming in
On Sunday 08 May 2005 03:28 pm, James Stroud wrote:
try:
self.avalue = isinstance.get_avalue()
except NameError:
self.avalue = isinstance.get_anothervalue()
I have no idea where I copied those isinstances from. Also, the except
should be an AttributeError. Here is a retry:
On Sun, 08 May 2005 19:49:42 +0200, Martin v. Löwis
[EMAIL PROTECTED] wrote:
John Machin wrote:
Martin, I can't guess the reason for this last suggestion; why should
a Windows system use iso-8859-1 instead of cp1252?
Windows users often think that windows-1252 is the same thing as
iso-8859-1,
I am working on a homework assignment and trying to use cPickle to store
the answers from questor.py I believe I have the syntax correct but am not
sure if I am placing everything where it needs to be. Any help would be
greatly appreciated. When I attempt to run what I have I end up with the
[EMAIL PROTECTED] wrote:
I am a C++ developer with only a little experience using Python. I
want to create a Python class where by I can construct an instance from
that class based on one of two different object types.
The approaches I've seen used are to use a new class method as an
Hello All,
If __call__ allows anobject() and __getitem__ allows anobject[arange], why
not have __brace__ (or some other, better name) for anobject{something}.
Such braces might be useful for cross-sectioning nested data structures:
anary = [[1,2,3],[4,5,6]]
anary{2} == [3,6]
or for a list
James Stroud [EMAIL PROTECTED] wrote:
why not have __brace__ (or some other, better name)
for anobject{something}. Such braces might be useful for
cross-sectioning nested data structures:
This seems like a pretty esoteric operation to devote a bit of syntax to.
It doesn't seem like
Calling a python method from C++ has the following signature:
PyObject *
PyObject_CallMethod(PyObject *self, char *method_name,
char *arg_format, ...);
I'm having trouble figuring out how to declare self.
Let's say my python file is called stuff.py and is like the following,
On Sun, 8 May 2005 16:29:03 -0700, James Stroud [EMAIL PROTECTED] wrote:
Hello All,
If __call__ allows anobject() and __getitem__ allows anobject[arange], why
not have __brace__ (or some other, better name) for anobject{something}.
Such braces might be useful for cross-sectioning nested data
On Sunday 08 May 2005 05:15 pm, Roy Smith wrote:
This seems like a pretty esoteric operation to devote a bit of syntax to.
It doesn't seem like something people want to do very often.
Similar to __call__, I don't think that this syntax would be neccessarily
devoted to any particular operation.
In article [EMAIL PROTECTED],
James Stroud [EMAIL PROTECTED] wrote:
On Sunday 08 May 2005 05:15 pm, Roy Smith wrote:
This seems like a pretty esoteric operation to devote a bit of syntax to.
It doesn't seem like something people want to do very often.
Similar to __call__, I don't think
Hi,
I upgraded my laptop from RH9 to Fedora 3 yesterday. It seems to have a
problem with an undefined symbol in Python. Specifically, if I try to run
system-config-packages, I get the following error:
Unable to import gtk module. This may be due to running without
$DISPLAY set. Exception
After an hour of research, I'm more confused than ever. I don't know
if I should use the time module, or the eGenix datetime module. Here's
what I want to do: I want to calculate the time difference (in
seconds would be okay, or minutes), between two date-time strings.
so: something like this:
Stewart Midwinter wrote:
After an hour of research, I'm more confused than ever. I don't know
if I should use the time module, or the eGenix datetime module. Here's
what I want to do: I want to calculate the time difference (in
seconds would be okay, or minutes), between two date-time
On Sun, 8 May 2005 19:06:31 -0600, Stewart Midwinter [EMAIL PROTECTED] wrote:
After an hour of research, I'm more confused than ever. I don't know
if I should use the time module, or the eGenix datetime module. Here's
what I want to do: I want to calculate the time difference (in
seconds would be
Peter And which, at least implicitly, defines greedy by in section
Peter 6.3 titled Greedy versus Non-Greedy. It's not perfect, but
Peter then nobody in this thread has offered anything even remotely
Peter resembling perfect documentation for regular expressions
Peter yet.
this is truely maddening
Traceback (most recent call last):
File PubWare.py, line 11, in ?
File Main.pyc, line 46, in ?
File pysvn\__init__.pyc, line 12, in ?
File pysvn\_pysvn.pyc, line 9, in ?
File pysvn\_pysvn.pyc, line 7, in __load
ImportError: DLL load failed: A device attached to
Timothy Smith wrote:
this is truely maddening
Traceback (most recent call last):
File PubWare.py, line 11, in ?
File Main.pyc, line 46, in ?
File pysvn\__init__.pyc, line 12, in ?
File pysvn\_pysvn.pyc, line 9, in ?
File pysvn\_pysvn.pyc, line 7, in __load
ImportError: DLL load failed:
FWIW:
http://www.informit.com/guides/content.asp?g=windowsserverseqNum=183rl=1
..
Remove NOSPAM. before replying
Pursuant to U.S. code, title 47, Chapter 5, Subchapter II, Section 227
Any and all unsolicited commercial E-mail
thanks Robert, those 4 lines of code sure beat the 58 of my
home-rolled time-date function!
cheers
S
--
http://mail.python.org/mailman/listinfo/python-list
Hi there,
Can any one please help in getting me Python-Outlook
programming issue clarified.
I just wanted to do the following using Python:
1)Open a New Oulook Mail Window
2) Fill the field: to-email address and Write some body to it.(I
DON't want to send it automatically)
Fredrik Lundh wrote:
D H [EMAIL PROTECTED] wrote:
Why do you think you need a regular expression?
If another approach that involved no regular expressions worked much
better, would you reject it for some reason?
A regular expression will work fine for his problem.
Just match the digits
Hi all,
trying to download a file using urllib. Working fine on most
machines.. failing in one..
Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200
32 bit (Intel)] on win32Type "help", "copyright", "credits" or "license" for
more information. import urllib;
url='';
D H wrote:
Fredrik Lundh wrote:
you forgot to mention Boo here, Doug. nice IronPython announcement,
btw. the Boo developers must be so proud of you.
/F
You never learn, do you Fredrik. I guess that explains why Boo will
never be mentioned on the python daily site your pythonware
Hi,
I'm not a programmer. I start working as text miner and as a first task
I have given 1000 dirty files that needs to be cleaned before
classification tasks. I have been told python is the best tool for this
job.
Each file's structure as below:
Comments: This is article 1965 obtained from the
James Stroud wrote:
If you know what type of object object is
(BTW, a keyword in 2.3 and later, I believe)
Not a keyword, but a builtin as of 2.2.
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
Timothy Smith [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
| Timothy Smith wrote:
|
| this is truely maddening
|
| Traceback (most recent call last):
| File PubWare.py, line 11, in ?
| File Main.pyc, line 46, in ?
| File pysvn\__init__.pyc, line 12, in ?
| File
Hi
It's seem to me that it works fine if I use
hostname instead of ip address.
Note: Can anyone tell me how i reply to a question
in thread, rather than starting a new one"
regards
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
vincent wehren wrote:
Timothy Smith [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
| Timothy Smith wrote:
|
| this is truely maddening
|
| Traceback (most recent call last):
| File PubWare.py, line 11, in ?
| File Main.pyc, line 46, in ?
| File pysvn\__init__.pyc, line
Roy Smith wrote:
foo-bar == foo.__arrrow__(bar)
foo$bar == foo.__dollar__(bar)
foo#bar == foo.__hash__(bar)
foo::bar == foo.__scope__(bar)
I'm strongly in favor for the arrow ( but with two r only ). The
question is simply: for what?
and so on down the list of non-alphanumeric characters,
Bugs item #1197806, was opened at 2005-05-08 19:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1197806group_id=5470
Category: Python Interpreter Core
Group: Python 2.4
Status:
Bugs item #1197806, was opened at 2005-05-08 20:35
Message generated for change (Comment added) made by mwh
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1197806group_id=5470
Category: Python Interpreter Core
Group: Python 2.4
Status: Closed
Resolution:
Bugs item #1197883, was opened at 2005-05-09 00:56
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1197883group_id=5470
Category: Installation
Group: None
Status: Open
Resolution:
89 matches
Mail list logo