Re: Help for NewBies at WikiBooks

2005-09-03 Thread Do Re Mi chel La Si Do
Hi ! I had read the article on Python's concept "Metaclass": zero error in the content ! @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: python logo

2005-09-03 Thread Steve Holden
Xah Lee wrote: > i noticed that Python uses various logos: > > http://python.org/pics/pythonHi.gif > http://python.org/pics/PyBanner038.gif > http://python.org/pics/PyBanner037.gif > http://python.org/pics/PythonPoweredSmall.gif > http://wiki.python.org/pics/PyBanner057.gif > > is this some deci

Re: PyBool_FromLong

2005-09-03 Thread Reinhold Birkenfeld
Michael Hoffman wrote: > Andrew MacKeith wrote: >> In the C API Docs, the signature of PyBool from long seems to be incorrect. >> >> int PyBool_FromLong(long v) >> Returns Py_True or Py_False depending on the truth value of v. New >> in version 2.3. >> >> The description would suggest: >> >

Re: python logo

2005-09-03 Thread Michele Petrazzo
Xah Lee ha scritto: > i noticed that Python uses various logos: > Ok, this are not a logo, but better image are this: http://python.org/pics/PythonIndented_Back.jpg Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: python logo

2005-09-03 Thread Xah Lee
what's the decision? any reference to the discussion? i thought it is better for Python to have one single recognizable logo. Perhaps python doesn't have a logo and the official python people decided it shouldn't or just doesn't have one currently? of course, a logo helps in identity and as well

Re: python logo

2005-09-03 Thread Tim Churches
Xah Lee wrote: >i noticed that Python uses various logos: > >http://python.org/pics/pythonHi.gif >http://python.org/pics/PyBanner038.gif >http://python.org/pics/PyBanner037.gif >http://python.org/pics/PythonPoweredSmall.gif >http://wiki.python.org/pics/PyBanner057.gif > > is this some decision tha

Re: Proposal: add sys to __builtins__

2005-09-03 Thread tiissa
Michael Hoffman wrote: > To the contrary, I agree with Larry Wall that laziness is one of the > cardinal virtues of a programmer. There's lazy and too lazy. You don't want to be too lazy to even get out of bed to code in Python. Of course, with Perl, that's entirely another mattress^Wmatter. >

Re: python logo

2005-09-03 Thread Diez B. Roggisch
> "A foolish consistency is the hobgoblin of little minds." > - Ralph Waldo Emerson > > Tim C > > PS Yes, I know that I shouldn't feed the trolls (or hobgoblins), but I > invoke Screwtape's Defence: other people who should know better don't > seem to be able to resist the temptation ei

Re: 'isa' keyword

2005-09-03 Thread Devan L
talin at acm dot org wrote: > Thanks for all the respones :) I realized up front that this suggestion > is unlikely to gain approval, for reasons eloquently stated above. > However, there are still some interesting issues raised that I would > like to discuss. > > Let me first respond to a few of t

Re: python logo

2005-09-03 Thread Devan L
Xah Lee wrote: > what's the decision? any reference to the discussion? > > i thought it is better for Python to have one single recognizable logo. > Perhaps python doesn't have a logo and the official python people > decided it shouldn't or just doesn't have one currently? > > of course, a logo he

How to identify which interface a broadcast packet comes in on?

2005-09-03 Thread Lincoln Yeoh
Hi, If I have a program listening on 0.0.0.0:(someport) on all interfaces, how do I know which network interface a broadcast packet is coming in on - assuming Linux and _many_ interfaces. And how do I set which interface a frame will leave on, assuming I'm sending a raw frame (no IP address, just

embedding python in C, working but with exception at the end

2005-09-03 Thread brobigi
well I manage to figure it out myself. I'm using Bloodshed Dev-cpp Here's the code: #include "python.h" #include int main(int argc, char* argv[]) { double answer = 0; PyObject *modname, *mod, *mdict, *func, *stringarg, *args, *rslt; Py_Initialize(); modname = PyStri

Re: 'isa' keyword

2005-09-03 Thread phil hunt
On Sat, 03 Sep 2005 00:45:19 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: >> I'm not talking about a change in *paradigm* merely a change in >> *syntax*; this: >> >>receiver selector argument >> >> would mean the same as the current Python: >> >>receiver.selector(argument) >> >Aah, I

Re: Find day of week from month and year

2005-09-03 Thread Paul McGuire
Donn, You didn't look closely enough at those results. The OP's point was that he did not know how to set all the tuple values correctly. Here's a clearer example, I think: import time print time.asctime((2005,9,1,0,0,0,0,0,0)) print time.asctime((2005,9,1,0,0,0,1,0,0)) print time.asctime((2005

Re: python logo

2005-09-03 Thread Fredrik Lundh
Tim Churches wrote: > PPS Emerson's assertion might well apply not just to Python logos, but > also, ahem, to certain aspects of the Python standard library. you've read the python style guide, I presume? http://www.python.org/peps/pep-0008.html -- http://mail.python.org/mailman/listi

Re: embedding python in C, working but with exception at the end

2005-09-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Program crashes at line Py_Finalize(). Program tries to read some >memory location and suffer run time exception. PyTuple_SetItem "steals" a reference, so changing Py_XDECREF(stringarg); Py_XDECREF(args); to just Py_XDECREF(args); might fix the problem.

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-09-03 Thread Scott David Daniels
Bengt Richter wrote: > On Wed, 31 Aug 2005 14:16:28 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: > [...] > >>The problem with negative index's are that positive index's are zero >>based, but negative index's are 1 based. Which leads to a non >>symmetrical situations. Although it is _way_ too late t

Re: embedding python in C, working but with exception at the end

2005-09-03 Thread jepler
I see a couple of problems. First, because I'm using Unix, where filenames are case-sensitive, I had to '#include "Python.h"' instead of '#include "python.h"'. Next, it looks like the behavior that '.' is placed on sys.path isn't done automatically when embedding. So I had to set the environment

Re: Decrypting GPG/PGP email messages

2005-09-03 Thread Alessandro Bottoni
Piet van Oostrum wrote: > What benefit is there in encrypting the messages? It would only prevent > people intercepting the message from seeing what's inside, but it won't > give you any additional protection on the server. You are right. Bad guys can still try to send garbage to my system and, wi

pyNMS

2005-09-03 Thread Colin J. Williams
The pyNMS package is available for network management using Linux. Is there anything similar for Win32? Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Problems with Python for Windows extensions

2005-09-03 Thread KK
the code below is taken from M$ technet as an example on using vb script to do a replace all in word: Const wdReplaceAll = 2 Set objWord = CreateObject("Word.Application") objWord.Visible = True Set objDoc = objWord.Documents.Open("K:\Development\Fabricbase\prod\Test.doc") Set objSelection = ob

Re: Find day of week from month and year

2005-09-03 Thread Peter Hansen
Paul Rubin wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: > >>(And, if I were "optimizing", I would of course dispense with the >>dynamic creation of the static table upon every execution of >>expiration(), and move it outside the function.) > > Replacing it with a tuple might be enough for th

Re: using common lisp with python.

2005-09-03 Thread [EMAIL PROTECTED]
Thank you all for the advice, I think I'll be writing my lisp code in python. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to identify which interface a broadcast packet comes in on?

2005-09-03 Thread Jorgen Grahn
On Sat, 03 Sep 2005 18:46:05 +0800, Lincoln Yeoh <[EMAIL PROTECTED]> wrote: > Hi, > > If I have a program listening on 0.0.0.0:(someport) on all interfaces, > how do I know which network interface a broadcast packet is coming in > on - assuming Linux and _many_ interfaces. And how do I set which >

Re: Find day of week from month and year

2005-09-03 Thread Jorgen Grahn
On Fri, 02 Sep 2005 20:53:44 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: > Carsten Haese wrote: >> On Fri, 2005-09-02 at 16:46, Laguna wrote: >>>def expiration(year, month): >>> weekday = calendar.weekday(year, month, 1) >>> table = [19, 18, 17, 16, 15, 21, 20] >>> return table[weekd

Re: Extend Python

2005-09-03 Thread Jorgen Grahn
On Thu, 1 Sep 2005 19:09:55 +0200, Filip Dreger <[EMAIL PROTECTED]> wrote: >> My Question: >> Swig offers some great features but is to basic for us. Is there >> another program that creates more readble code that can be easily >> edited? How much work is it to write our own wrappers? > > Not too m

Managing events

2005-09-03 Thread cantabile
Hi, I have a class (a gui) with buttons and other controls. A button, for example, has a callback method, so that writing b = Button(label, OnClick) will call the global OnClick method. Now, if I want the OnClick method to call some of my main class methods, I need to write: UI = No

Re: Sockets: code works locally but fails over LAN

2005-09-03 Thread n00m
Bryan wrote: > Do you want to be a network engineer? lol... definetely not! It's just my curiosity. At my work my tools are: vba, vbs, jet-sql (ms access), t-sql (ms sql server). The pretty humble set. > My first two guess are: > The client is trying to make more than one connection. > Put

Re: Decrypting GPG/PGP email messages

2005-09-03 Thread Paul Rubin
Alessandro Bottoni <[EMAIL PROTECTED]> writes: > I'm going to use my own implementation of OTP because the existing > mechanism are devoted to protect the remote login channel and cannot > be easily adapted to my weird e-mail-based mechanism. Anyway, I'm > going to use a (encrypted) very long pseud

Re: Bug in string.find

2005-09-03 Thread Ron Adam
Terry Reedy wrote: >>b[-1:] = ['Z']# replaces last item >>b[-1:-0] = ['Z'] # this doesn't work >> >>If you are using negative index slices, you need to check for end >>conditions because you can't address the end of the slice in a >>sequential/numerical way. > > OK, now I understand

Re: 'isa' keyword

2005-09-03 Thread Steve Holden
phil hunt wrote: > On Sat, 03 Sep 2005 00:45:19 -0500, Steve Holden <[EMAIL PROTECTED]> wrote: > >>>I'm not talking about a change in *paradigm* merely a change in >>>*syntax*; this: >>> >>> receiver selector argument >>> >>>would mean the same as the current Python: >>> >>> receiver.selector

Re: pickling the objects returned by array.array()

2005-09-03 Thread Reinhold Birkenfeld
Raymond Hettinger wrote: > John Machin wrote: >> Looks like arrays are NOW (2.4.1) pickleable but not unpickleable > > Please file a bug report and assign to me. Done. http://python.org/sf/1281383 Reinhold -- http://mail.python.org/mailman/listinfo/python-list

Re: Sockets: code works locally but fails over LAN

2005-09-03 Thread Bryan Olson
n00m wrote: > Your last version works like a champ. It easily handles up > to 5 instances of my.vbs! Except of this thing: > >>AttributeError: 'module' object has no attribute 'SHUT_WR' > > Seems it's a pure Unix constant. No, my guess is that you're running an old version of Python. The con

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type

2005-09-03 Thread Ron Adam
Bengt Richter wrote: > IMO the problem is that the index sign is doing two jobs, which for zero-based > reverse indexing have to be separate: i.e., to show direction _and_ a _signed_ > offset which needs to be realtive to the direction and base position. Yes, that's definitely part of it. > A l

Re: Sockets: code works locally but fails over LAN

2005-09-03 Thread Peter Hansen
n00m wrote: > Bryan wrote: > PS Yes! Your last version works like a champ. It easily handles up > to 5 instances of my.vbs! Except of this thing: > >>AttributeError: 'module' object has no attribute 'SHUT_WR' > > Seems it's a pure Unix constant. Definitely not. Are you sure you've got a proper

Re: plotting with gnuplot.py

2005-09-03 Thread [EMAIL PROTECTED]
Thanks for the response Varun, I guess I still not sure the distingtion betweein gnuplot.py and its implentation in scipy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,wasRe: Bug in slice type

2005-09-03 Thread Terry Reedy
"Ron Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > (I was wondering why list's couldn't have len,min, and max attribute > that are updated when ever the list is modified in place of using > len,min, and max functions? Python's list and, I believe, other builtin roster objec

Re: Managing events

2005-09-03 Thread Steve Holden
cantabile wrote: > Hi, > > I have a class (a gui) with buttons and other controls. A button, for > example, has a callback method, so that writing > > b = Button(label, OnClick) > > will call the global OnClick method. > > Now, if I want the OnClick method to call some of my main class met

Re: Managing events

2005-09-03 Thread Rob Williscroft
cantabile wrote in news:[EMAIL PROTECTED] in comp.lang.python: > Hi, > > I have a class (a gui) with buttons and other controls. A button, for > example, has a callback method, so that writing > > b = Button(label, OnClick) > > will call the global OnClick method. > > Now, if I want the

Submitting doc bug reports without SF registration

2005-09-03 Thread Terry Reedy
In response to posts about the overhead of registering as SourceForge to submit quick doc typo/bug reports, I sent an email to docs AT python.org (== Fred Drake) about submitting via that address instead. He responded that he really does not want specific action items sent there because such em

Re: Sockets: code works locally but fails over LAN

2005-09-03 Thread n00m
1. Python 2.3.4 2. Win98 and Win2k Professional -- http://mail.python.org/mailman/listinfo/python-list

ANN: PyInstaller 1.0 in the works: package your Python app into a single-file executable

2005-09-03 Thread Giovanni Bajo
Hello, http://pyinstaller.hpcf.upr.edu/ PyInstaller is a program that packages Python programs into stand-alone executables, under both Windows and Linux. This is similar to the famous py2exe, but PyInstaller is also able to build fully-contained (single file) executables, while py2exe can only b

Re: Sockets: code works locally but fails over LAN

2005-09-03 Thread Bryan Olson
Dennis Lee Bieber wrote: > Bryan Olson declaimed the following in comp.lang.python: > >>No, my guess is that you're running an old version of Python. >>The constant was added in the source on 27 Nov 2003; I'm not > > > Are you sure of that 2003? Yes, but that's when it went into the sourc

descriptors for container items

2005-09-03 Thread Brock Filer
> I personally would first try to dump the quotes and use standard > attributes -- countries.us.Colorado... -- and the __get/set/delattr__ > methods. If I do that, the attributes (that was a stupid name for me to choose) and children would have to not share any names with each other, with the

Re: PyChecker lives, version 0.8.15 released

2005-09-03 Thread Al Christians
Neal Norwitz wrote: > Special thanks to Ken Pronovici. He did a lot of work for this > release and helped ensure it occurred. > > Version 0.8.15 of PyChecker is available. It's been over a year since > the last release. Wow, time really does fly. Since it's been so long > I'm sure I screwed so

Digest MD5 authentication over using ZSI

2005-09-03 Thread trapeze . jsg
Hi. I am trying to get through to Microsoft MapPoint Services using ZSI for soap handling. I can generate the service classes and also the soap-requests generated by the service classes seem to be OK. The problem I am facing is that I can't seem to authenticate myself. I have made a small change t

Re: python logo

2005-09-03 Thread Tim Churches
Fredrik Lundh wrote: > Tim Churches wrote: > > >>PPS Emerson's assertion might well apply not just to Python logos, but >>also, ahem, to certain aspects of the Python standard library. > > > you've read the python style guide, I presume? > > http://www.python.org/peps/pep-0008.html A Fool

Language Work Benches in Py

2005-09-03 Thread yoda
Hi, I recently read Martin Fowler's article on language workbenches and domain specific languages(http://www.martinfowler.com/articles/languageWorkbench.html). I then had the pleasure of reading Rainer Jowsig's implementation of the sample in Lisp(http://lispm.dyndns.org/news?ID=NEWS-2005-07-08-1).

Re: Sockets: code works locally but fails over LAN

2005-09-03 Thread n00m
Bryan; Look at how I corrected your the very first version (see added arguments in both functions). And now it really can handle multiple connections! import socket, thread sqls_host, sqls_port = '127.0.0.1', 1433 proxy_host, proxy_port = '127.0.0.1', 1434 # How I tested it: # sqls_host, sqls_p

Re: descriptors for container items

2005-09-03 Thread Terry Reedy
"Brock Filer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> I personally would first try to dump the quotes and use standard >> attributes -- countries.us.Colorado... -- and the __get/set/delattr__ >> methods. > > If I do that, the attributes (that was a stupid name for me to c

Re: plotting with gnuplot.py

2005-09-03 Thread [EMAIL PROTECTED]
Still having some issues plotting: In attempting as explained above: import Gnuplot,Numeric filename = ('Default.PL1') data = scipy.io.array_import.read_array(filename) y = data[:,1] x = data[:,0] z = data[:,2] //I think u need to take the transpose of this column before plotting.. x=Numeric.t

os.system(r"ls") prints to screen??

2005-09-03 Thread Xah Lee
does anyone know why the folllowing prints to the screen? # python import os os.system(r"ls") Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Add lists to class?

2005-09-03 Thread Mike Meyer
"BBands" <[EMAIL PROTECTED]> writes: >> Why don't you use a real list instead? > > I am using lists... I just showed the naming schema. Here is how they > are implemented. > > for var in range(len(self.symbols)): > setattr(self, "_" + str(var), []) That's not the list he's talking about. And

Re: Add lists to class?

2005-09-03 Thread Mike Meyer
Paolino <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> "BBands" <[EMAIL PROTECTED]> writes: >>>I have a list with some strings in in it, 'one', 'two' 'three' and so >>>on. I would like to add lists to a class with those names. I have no >>>way of knowing what will be in the list or how long the

Re: os.system(r"ls") prints to screen??

2005-09-03 Thread Robert Kern
Xah Lee wrote: > does anyone know why the folllowing prints to the screen? > > # python > import os > os.system(r"ls") os.system() starts a shell and has the shell execute the program as a separate process. If you want to get the output of the given program, then use the subprocess module. -- R

Command config, quitting, binary, Timer

2005-09-03 Thread bearophileHUGS
Hello, I have four things to ask or to suggest, sorry if they seem basic or already discussed. --- I am still ignorant about Tkinter. This little program, after pressing the "Go" eats more and more RAM, is it normal? Can it be avoided? (In normal programs this is isn't a real prob

Re: global interpreter lock

2005-09-03 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Wed, 31 Aug 2005 22:44:06 -0400, Mike Meyer <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: >> I don't know what Ada offers. Java gives you pseudo-monitors. I'm > > From the days of mil-std 1815, Ada has supported "tasks" w

Re: Command config, quitting, binary, Timer

2005-09-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I am still ignorant about Tkinter. This little program, after pressing > the "Go" eats more and more RAM, is it normal? Can it be avoided? (In > normal programs this is isn't a real problem). > > ! import Tkinter > ! def dogo(): > ! while 1: > ! b.config(comm

Re: os.system(r"ls") prints to screen??

2005-09-03 Thread Steve Holden
Xah Lee wrote: > does anyone know why the folllowing prints to the screen? > > # python > import os > os.system(r"ls") > > Xah > [EMAIL PROTECTED] > ∑ http://xahlee.org/ > It only prints to the screen when standard output of the invoking process is the screen. The sub-process forked by os.sys

Re: Submitting doc bug reports without SF registration

2005-09-03 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > 1. A DocImprovement wiki. People could optionally sign up for update > reports on specific wiki pages. > > 2. A new SF tracker, only for doc bugs, that would accept anonymous > submissions. The other trackers require login because most items need >

descriptors for container items

2005-09-03 Thread Brock Filer
> > If I do that, the attributes (that was a stupid name for me to > choose) > > and children would have to not share any names with each other, > > Since multiple objects can indeed have duplicate attribute names, and > such > duplication is rampant in Python, I am not sure what you mean. felo

how to do this?

2005-09-03 Thread Justin Straube
Greetings Pythonistas. Im looking for a way to write this but not sure where or how to begin. As the user enters or removes characters into/from sEnt I would like for set_info() to set infVar with the correct value. The same as how IDLE shows the line and column in the lower right corner. Cod

gmail access

2005-09-03 Thread gerald gillespie
how do I access my new Gmail account [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -- http://mail.python.org/mailman/l

Re: how to do this?

2005-09-03 Thread Steve Holden
Justin Straube wrote: > Greetings Pythonistas. > Im looking for a way to write this but not sure where or how to begin. > As the user enters or removes characters into/from sEnt I would like > for set_info() to set infVar with the correct value. The same as how > IDLE shows the line and column in t

Re: how to do this?

2005-09-03 Thread Peter Otten
Justin Straube wrote: > As the user enters or removes characters into/from sEnt I would like > for set_info() to set infVar with the correct value. The same as how > IDLE shows the line and column in the lower right corner. > > Code Example > from time import localtime > from Tkinter im

Re: Problems with Python for Windows extensions

2005-09-03 Thread vincent wehren
"KK" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | the code below is taken from M$ technet as an example on using vb | script to do a replace all in word: | | Const wdReplaceAll = 2 | | Set objWord = CreateObject("Word.Application") | objWord.Visible = True | | Set objDoc =