Re: Fredrik Lundh

2005-05-08 Thread D H
Robert Kern wrote: > The Daily Python-URL isn't obligated to link to *anything*. I never suggested it was. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fredrik Lundh

2005-05-08 Thread D H
Sakesun Roykiattisak wrote: > IMHO, Pythonware.com does not have to be about python. It can be > anything the maintainer want it to be. > > Get the point ? You successfully repeated my own argument, so yes, I get the point. -- http://mail.python.org/mailman/listinfo/python-list

Re: path(file)

2005-05-08 Thread alex23
Sara Khalatbari wrote: > Suppose I have a list of files & I wanna know their > path. > is there a command that helps me do so in python? Do you _really_ intend to learn Python one question to this list at a time? There's a tutorial list that exists to help early users: http://mail.python.org/ma

Re: Fredrik Lundh

2005-05-08 Thread Robert Kern
D H wrote: > Robert Kern wrote: > >>It's called Daily Python-URL not Daily Python-Like-Languages-URL. *That* >>explains it. > > google for logix site:pythonware.com He's announced plenty non-python > stuff that is of interest to python users, including plenty of marketing > for his own softwa

Re: Fredrik Lundh

2005-05-08 Thread Sakesun Roykiattisak
>google for logix site:pythonware.com He's announced plenty non-python >stuff that is of interest to python users, including plenty of marketing >for his own software. > > IMHO, Pythonware.com does not have to be about python. It can be anything the maintainer want it to be. Get the point

Re: Fredrik Lundh

2005-05-08 Thread Erik Max Francis
D H wrote: > Yet again someone bitches about a thread right after they hypocritically > throw their own little darts into the mix. No one cares. Please take it elsewhere. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erik

Re: Fredrik Lundh

2005-05-08 Thread D H
Robert Kern wrote: > It's called Daily Python-URL not Daily Python-Like-Languages-URL. *That* > explains it. google for logix site:pythonware.com He's announced plenty non-python stuff that is of interest to python users, including plenty of marketing for his own software. > It's not like Py

Re: __brace__ (PEP?)

2005-05-08 Thread Kay Schluehr
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 c

Re: computer unable to load _pysvn.pyc

2005-05-08 Thread Timothy Smith
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 "pys

urllib open error

2005-05-08 Thread Thomas Thomas
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

Re: computer unable to load _pysvn.pyc

2005-05-08 Thread vincent wehren
"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 ? |

Re: How to implement multiple constructors

2005-05-08 Thread Steven Bethard
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

clear the files using python

2005-05-08 Thread Sez
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

Re: Fredrik Lundh

2005-05-08 Thread Robert Kern
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. >> >> > > You never learn, do you Fredrik. I guess that explains why Boo will > never be mentioned on the python daily site your pythonwar

urllib open error

2005-05-08 Thread Thomas Thomas
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='';>>> f=urllib.u

Fredrik Lundh

2005-05-08 Thread D H
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. >>Ju

Outlook-MAPI

2005-05-08 Thread V.C.Sekhar
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)

Re: how to calc the difference between two datetimes?

2005-05-08 Thread Stewart Midwinter
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

Using a Scripting Language as Your Scripting Language

2005-05-08 Thread DaveInSidney
FWIW: http://www.informit.com/guides/content.asp?g=windowsserver&seqNum=183&rl=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

Re: computer unable to load _pysvn.pyc

2005-05-08 Thread Timothy Smith
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

computer unable to load _pysvn.pyc

2005-05-08 Thread Timothy Smith
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 att

Re: New Python regex Doc

2005-05-08 Thread Skip Montanaro
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>

Re: how to calc the difference between two datetimes?

2005-05-08 Thread Jp Calderone
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 wou

RE: how to calc the difference between two datetimes?

2005-05-08 Thread Robert Brewer
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 stri

how to calc the difference between two datetimes?

2005-05-08 Thread Stewart Midwinter
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: ti

undefined symbol?

2005-05-08 Thread Nemtos
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 was:

Re: __brace__ (PEP?)

2005-05-08 Thread Roy Smith
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

Re: __brace__ (PEP?)

2005-05-08 Thread James Stroud
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

Re: __brace__ (PEP?)

2005-05-08 Thread Jp Calderone
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 nest

Declaring self in PyObject_CallMethod

2005-05-08 Thread lamthierry
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,

Re: __brace__ (PEP?)

2005-05-08 Thread Roy Smith
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 s

__brace__ (PEP?)

2005-05-08 Thread James Stroud
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

RE: Ask for a tool to protect my .pyc file :)

2005-05-08 Thread Delaney, Timothy C (Timothy)
Lily Kakm wrote: > when I distribute my software, I will give the users .pyc file (maybe > I can use py2exe, but I think there's no essential different), > because I don't like them to know my source code. Leaving aside all other arguments of whether or not you should allow your users to see your

Re: How to implement multiple constructors

2005-05-08 Thread J C Lawrence
[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 alte

Clueless with cPickle

2005-05-08 Thread les
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 foll

Re: Trouble saving unicode text to file

2005-05-08 Thread John Machin
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 >i

Re: How to implement multiple constructors

2005-05-08 Thread James Stroud
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 "isinstance"s from. Also, the except should be an AttributeError. Here is a retr

Re: How to implement multiple constructors

2005-05-08 Thread James Stroud
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

Re: Curve fitting

2005-05-08 Thread Tom Anderson
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 L

Re: How to implement multiple constructors

2005-05-08 Thread Steven Bethard
[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

Re: A question about inheritance

2005-05-08 Thread Steven Bethard
[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' A

Strip white spaces from source

2005-05-08 Thread qwweeeit
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 s

How to implement multiple constructors

2005-05-08 Thread tron . thomas
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

Re: Clueless with cPickle

2005-05-08 Thread les
OK, looks like it is time for a break! Thanks for the replies! -- http://mail.python.org/mailman/listinfo/python-list

Re: Clueless with cPickle

2005-05-08 Thread Roel Schroeven
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

Re: Clueless with cPickle

2005-05-08 Thread Jp Calderone
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 a

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-08 Thread James Stroud
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

Olympus R1000 Linux, Qtopia, PyQt and Python

2005-05-08 Thread McBooCzech
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

Re: A question about inheritance

2005-05-08 Thread arserlom
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): > > se

Re: py2exe and library.zip

2005-05-08 Thread brian
> > >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 mu

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-08 Thread Måns Rullgård
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 f

Python Challenge ahead [NEW] - for riddle lovers

2005-05-08 Thread pythonchallenge
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

Re: A question about inheritance

2005-05-08 Thread Jp Calderone
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 ha

A question about inheritance

2005-05-08 Thread arserlom
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 i

Re: Language documentation ( was Re: Computing Industry shams)

2005-05-08 Thread alex goldman
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 Com

Re: pyvm -- faster python

2005-05-08 Thread Paul Rubin
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-lis

Re: Database backend?

2005-05-08 Thread Jp Calderone
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 f

Re: Database backend?

2005-05-08 Thread elbertlev
Look for the packet called "KirbyBase". Small, pythonic, text based files... -- http://mail.python.org/mailman/listinfo/python-list

Re: pyvm -- faster python

2005-05-08 Thread Roger Binns
> 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

Re: pyvm -- faster python

2005-05-08 Thread Peter Hansen
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-Pyt

Database backend?

2005-05-08 Thread Mikkel Høgh
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 presenta

Re: Calling a python function from C++

2005-05-08 Thread "Martin v. Löwis"
[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 Extendi

Re: Q: The `print' statement over Unicode

2005-05-08 Thread "Martin v. Löwis"
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

Re: Trouble saving unicode text to file

2005-05-08 Thread "Martin v. Löwis"
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 pa

Re: pyvm -- faster python

2005-05-08 Thread bearophileHUGS
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 othe

Calling a python function from C++

2005-05-08 Thread lamthierry
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

Re: SGMLlib module

2005-05-08 Thread John J. Lee
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

Re: Curve fitting

2005-05-08 Thread Grant Edwards
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: http://s

Re: Newbie : checking semantics

2005-05-08 Thread Bengt Richter
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

Re: SGMLlib module

2005-05-08 Thread Harlin Seritt
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 with

Re: Q: The `print' statement over Unicode

2005-05-08 Thread Jeremy Bowers
On Sun, 08 May 2005 13:46:22 +, John J. Lee wrote: > I don't mean to put words into FranÃois' 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

Question about Pycon 2005 (Python Visual Sandbox)

2005-05-08 Thread André Roberge
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, Andr

Re: pyvm -- faster python

2005-05-08 Thread Kay Schluehr
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 >

Re: Q: The `print' statement over Unicode

2005-05-08 Thread John J. Lee
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? >

Coding comments/suggestions - first python script - sshd/ftpd blocking

2005-05-08 Thread avinashc
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 Pyt

Re: SGMLlib module

2005-05-08 Thread Peter Hansen
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 some

Re: Controlling kwrite by dcop

2005-05-08 Thread R. C. James Harlow
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 c

Re: New Python regex Doc

2005-05-08 Thread Peter Hansen
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

SGMLlib module

2005-05-08 Thread Harlin Seritt
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 -- http://mail.python.org/mailman

Controlling kwrite by dcop

2005-05-08 Thread qwweeeit
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 ... - use LaTex - define a "new" languag

Curve fitting

2005-05-08 Thread Tom Anderson
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 -- http

Re: global lists

2005-05-08 Thread Bernd Nawothnig
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 b

Re: Active Directory Modules?

2005-05-08 Thread Michael Ströder
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:

Re: Trouble saving unicode text to file

2005-05-08 Thread John Machin
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.wri

pyvm -- faster python

2005-05-08 Thread Stelios Xanthakis
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;) - It

Active Directory Modules?

2005-05-08 Thread Harlin Seritt
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

Re: Newbie : checking semantics

2005-05-08 Thread LDD
>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 na

global lists

2005-05-08 Thread andrea crotti
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] = a[n]

Re: Newbie : checking semantics

2005-05-08 Thread LDD
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. -- http://mail.python.org/mailman/listi

Re: Trouble saving unicode text to file

2005-05-08 Thread "Martin v. Löwis"
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",

Re: Python features

2005-05-08 Thread André Roberge
[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

Stick to what you know instead of making a complete idiot of yourself.

2005-05-08 Thread Taenia Solium
"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

Re: New Python regex Doc

2005-05-08 Thread John Bokma
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/

Python features

2005-05-08 Thread [EMAIL PROTECTED]
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