Re: Help

2006-09-18 Thread Ben Finney
"Rrajal" <[EMAIL PROTECTED]> writes: > Hi there, I am new in this subject so could you please tell me from > where I can get help (or good e-book) of python? You need look no further than Python's own web site. http://www.python.org/doc/> Of course, you *can* look further if you want to --

Help

2006-09-18 Thread Rrajal
Hi there, I am new in this subject so could you please tell me from where I can get help (or good e-book) of python? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find number of characters in a unicode string?

2006-09-18 Thread Preben Randhol
On Mon, 18 Sep 2006 22:29:20 +0200 Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Yes and you already seem to know the answer: Decode the byte string > and use `len()` on the unicode string. .decode("utf-8") did the trick. Thanks! Preben -- http://mail.python.org/mailman/listinfo/python

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-18 Thread Georg Brandl
Damjan wrote: >>> I understand that I can use __metaclass__ to create a class which >>> modifies the behaviour of another class. >>> >>> How can I add this metaclass to *all* classes in the system? >>> >>> (In ruby I would alter the "Class" class) >> >> You'd have to set >> >> __metaclass__ = w

Re: How to efficiently proceed addition and subtraction in python list?

2006-09-18 Thread Paul Rubin
"Daniel Mark" <[EMAIL PROTECTED]> writes: > I have a list AAA = [1, 2, 3] and would like to subtract one from list > AAA > so AAA' = [0, 1, 2] > > What should I do? BBB = [x-1 for x in AAA] -- http://mail.python.org/mailman/listinfo/python-list

Re: How to efficiently proceed addition and subtraction in python list?

2006-09-18 Thread Chiucs
try this a=[1, 2, 3] b=a[:] "Daniel Mark" <[EMAIL PROTECTED]> ??? news:[EMAIL PROTECTED] ???... > Hello all: > > I have a list AAA = [1, 2, 3] and would like to subtract one from list > AAA > so AAA' = [0, 1, 2] > > What should I do? > > > Thank you > -Daniel > -- http://mail.python.org/mailman

Re: EyeDB Object Database (ODBMS) - Python wrapper

2006-09-18 Thread Ilias Lazaridis
GinTon wrote: > EyeDB is a free ODBMS based on the ODMG 3 specification with > programming interfaces for C++ and Java. It is very powerfull, mature, > safe and stable. In fact, it was developed in 1992 for the Genome View > project althought rewritten in 1994, and has been used in a lot of > bioin

Re: Recursing for Progress Bar

2006-09-18 Thread [EMAIL PROTECTED]
Makes perfect sense. Sometimes it takes being whacked to see it the right way. Thanks! Ben Finney wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > Is there a way to get around recursion limits? Help! > > > > ~~ > > > > def incrementProgress

Re: Recursing for Progress Bar

2006-09-18 Thread [EMAIL PROTECTED]
DOLT! Thanks! Dennis Lee Bieber wrote: > On 18 Sep 2006 19:38:48 -0700, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > Is there a way to get around recursion limits? Help! > > > Yes... restructure your code to not use recursion... > >

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-18 Thread Ilias Lazaridis
Calvin Spealman wrote: > On 18 Sep 2006 20:23:03 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > > Steve Holden wrote: > > > Ilias Lazaridis wrote: > > ... > > > > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html > > > > > > > > I am not so much interested in old-style, as is s

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-18 Thread Calvin Spealman
On 18 Sep 2006 20:23:03 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > Ilias Lazaridis wrote: > ... > > > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html > > > > > > I am not so much interested in old-style, as is start production with > > > python 2.4

Re: Using sys.executable

2006-09-18 Thread Sanghyeon Seo
Oops, sent to the wrong address! 2006/9/19, Sanghyeon Seo <[EMAIL PROTECTED]>: > Following Elliot's advice, I changed my scripts to use sys.executable > instead of hardcoding the path. Also in SVN. > > # in run_tests.py > import os, sys > os.putenv('PYTHON', sys.executable) > > # in shell scripts

Using sys.executable

2006-09-18 Thread Sanghyeon Seo
Following Elliot's advice, I changed my scripts to use sys.executable instead of hardcoding the path. Also in SVN. # in run_tests.py import os, sys os.putenv('PYTHON', sys.executable) # in shell scripts $PYTHON alltests.py -- Seo Sanghyeon -- http://mail.python.org/mailman/listinfo/python-list

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-18 Thread Ilias Lazaridis
Steve Holden wrote: > Ilias Lazaridis wrote: ... > > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html > > > > I am not so much interested in old-style, as is start production with > > python 2.4 (possibly even with python 2.5). > > > > The fact remains that you won't be able to aff

Re: Recursing for Progress Bar

2006-09-18 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Is there a way to get around recursion limits? Help! > > ~~ > > def incrementProgress(self, window, workorder): > #... > time.sleep(.1) > self.incrementProgress(wi

Recursing for Progress Bar

2006-09-18 Thread [EMAIL PROTECTED]
I'm making a small interface for copying large groups of files around a filesystem. I have a progressbar that counts the items in the destination, and increments as each new file is copied over. It compares this number to the number of files in the source and updates accordingly. All is fine and

weird exception : AttributeError: 'module' object has no attribute 'logException'

2006-09-18 Thread kepioo
I am running a script (summary.py) which is calling the method logException in another module ( pytool). Yesterday, ard 18:50, all of a sudden summary.py was throwing the exception : AttributeError: 'module' object has no attribute 'logException' What I did to fix it was to delete the compiled

Re: win32com InvokeTypes is None

2006-09-18 Thread Gabriel Genellina
At Monday 18/9/2006 12:32, SS Hares wrote: I'm encountering an issue where the InvokeTypes method is returning None and I'm unable to Dispatch a particular COM object from I think you will get better responses if you post on http://mail.python.org/mailman/listinfo/python-win32 Gabriel Gen

[OT] Re: why a main() function?

2006-09-18 Thread Dan Sommers
On 18 Sep 2006 14:38:12 -0700, [EMAIL PROTECTED] wrote: > ... There is another secondary advantage: the code inside a function > runs faster (something related is true for C programs too). Usually > this isn't important, but for certain

Re: How to Send the Message using win32gui?

2006-09-18 Thread Gabriel Genellina
At Monday 18/9/2006 02:07, =?GB2312?B?0vzP6cH6?= wrote: I want to send LVM_SETITEMSTATE message using win32gui. But I don't know how to do in Python. The obvious way is win32api.PostMessage - but I feel you have another, higher-level, problem... Gabriel Genellina Softlab SRL

Re: Read a group of files as a list

2006-09-18 Thread citlaly
Thanks Steven! I'll check it!! Saludos!! Citlalyy -- http://mail.python.org/mailman/listinfo/python-list

Re: Read a group of files as a list

2006-09-18 Thread citlaly
Thanks Steven! I'll check it!! Saludos!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Read a group of files as a list

2006-09-18 Thread citlaly
Thanks a lot Bearophile!! It works great! Well, it seems something easy for experts, but for beginners as me, your help is very useful... thanks!! Citlalyy > > >>> import os > >>> os.listdir("...path...") > [ file names... ] > > If you are using Windows I suggest you to invert the slashes of t

RE: Could not build MySQLdb on PowerMac (PPC)

2006-09-18 Thread Ted Zeng
Thank. I got it installed by following your instructions. I also needed to add the path to $PATH in the shell to make it work. ted -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Diez B. Roggisch Sent: Monday, September 18, 2006 11:38 AM To: python-list

Re: Read a group of files as a list

2006-09-18 Thread Steve Holden
citlaly wrote: > Hi!! > I'm a beginner in python and I'm trying to use the files from a > "folder" as a list. What I want to do is read each one as a list, but > just the name of the file, the data inside doesn't matter. How can I do > it? I was trying using a list, but I don't know how "convert"

Re: why a main() function?

2006-09-18 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > I think I read a suggestion somewhere to wrap the code where a > > Python script starts in a main() function > > [...] > > What are the advantages of doing this? > > > Guido van Rossum himself can tell you: >http://www.ar

Re: Read a group of files as a list

2006-09-18 Thread bearophileHUGS
citlaly: > I'm trying to use the files from a > "folder" as a list. What I want to do is read each one as a list, but > just the name of the file, the data inside doesn't matter. >>> import os >>> os.listdir("...path...") [ file names... ] If you are using Windows I suggest you to invert the

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Calvin Spealman
On 18 Sep 2006 16:33:20 -0700, George Sakkis <[EMAIL PROTECTED]> wrote: > Calvin Spealman wrote: > > > Just once, I would like to see a programming contest that was judged > > on the quality of your code, not the number of bytes you managed to > > incomprehensively hack it down to. > > Unfortunatel

Re: Read a group of files as a list

2006-09-18 Thread Calvin Spealman
On 18 Sep 2006 17:09:22 -0700, citlaly <[EMAIL PROTECTED]> wrote: > Hi!! > I'm a beginner in python and I'm trying to use the files from a > "folder" as a list. What I want to do is read each one as a list, but > just the name of the file, the data inside doesn't matter. How can I do > it? I was

Re: Python programs always open source?

2006-09-18 Thread Ben Finney
Leif K-Brooks <[EMAIL PROTECTED]> writes: > >> Ben Finney wrote: > >>> So long as you're not distributing some or all of Python itself, > >>> or a derivative work, the license for Python has no legal effect > >>> on what license you choose for your own work. > I was replying to Ben Finney's claim

Re: gnome module

2006-09-18 Thread Jay
Sorry. Nevermind. It's no longer an issue. :-) Jay wrote: > Am I correct in assuming that I can use the gnome module to minimize > all windows (aka show desktop)? If so, how? -- http://mail.python.org/mailman/listinfo/python-list

Read a group of files as a list

2006-09-18 Thread citlaly
Hi!! I'm a beginner in python and I'm trying to use the files from a "folder" as a list. What I want to do is read each one as a list, but just the name of the file, the data inside doesn't matter. How can I do it? I was trying using a list, but I don't know how "convert" the elements (files) to

Read a group of files as a list

2006-09-18 Thread citlaly
Hi!! I'm a beginner in python and I'm trying to use the files from a "folder" as a list. What I want to do is read each one as a list, but just the name of the file, the data inside doesn't matter. How can I do it? I was trying using a list, but I don't know how "convert" the elements (files) to

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread George Sakkis
Calvin Spealman wrote: > Just once, I would like to see a programming contest that was judged > on the quality of your code, not the number of bytes you managed to > incomprehensively hack it down to. Unfortunately, quality is not as easy to judge as number of bytes. Such contest would be as craz

Re: Cross-process dictionary/hashtable

2006-09-18 Thread Sandra-24
I looked at posh, and read the report on it, it's very interesting, but it will not work for me. Posh requires that it forks the processes, but in mod_python the processes were forked by apache and use different interpreters. Calvin Spealman wrote: > Maybe what you want is something like memcache

Re: Help me use my Dual Core CPU!

2006-09-18 Thread Michael Sparks
Paul Rubin wrote: > "Ramon Diaz-Uriarte" <[EMAIL PROTECTED]> writes: > > You might also want to check > > http://www.lindaspaces.com/products/NWS_overview.html > > by the guys who "invented" Linda. > > Cool, I guess. > > > (The Oz language/Mozart system is a good example of a different and > > very

Message dialog on 'focus-out-event'

2006-09-18 Thread Tuomas
import pygtk, gtk, gobject, ... class MyEntry(gtk.Entry): def __init__(self, is_OK): gtk.Entry.__init__(self) self.is_OK=is_OK self.add_events(gtk.gdk.FOCUS_CHANGE) self.focus_out_id=self.connect('focus-out-event', se

Re: How to efficiently proceed addition and subtraction in python list?

2006-09-18 Thread Tim Chase
> I have a list AAA = [1, 2, 3] and would like to subtract one from list > AAA > so AAA' = [0, 1, 2] > > What should I do? Sounds like a list comprehension to me: >>> a = [1,2,3] >>> a_prime = [x-1 for x in a] >>> a_prime [0, 1, 2] -tkc -- http://mail.python.org/mailman/listinfo/python-

How to efficiently proceed addition and subtraction in python list?

2006-09-18 Thread Daniel Mark
Hello all: I have a list AAA = [1, 2, 3] and would like to subtract one from list AAA so AAA' = [0, 1, 2] What should I do? Thank you -Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Cheese Shop Registration error

2006-09-18 Thread John Machin
Richard Jones wrote: > [EMAIL PROTECTED] wrote: > > The Key ID that the kgpg shows. I tried to paste the key returned by > > the quiery on the keyserver. but it also doesn't work. I tried > > everything that has any connection with the key, but everything fails. > > > > By the way the key is: 6A61

gnome module

2006-09-18 Thread Jay
Am I correct in assuming that I can use the gnome module to minimize all windows (aka show desktop)? If so, how? -- http://mail.python.org/mailman/listinfo/python-list

Re: Which date will it be 'over x days'?

2006-09-18 Thread John Machin
cyberco wrote: > I must be overlooking something since I can't find a simple way to > calculate which date it will be over, say, 9 days. I checked the > datetime, time and calendar modules, but none of them seem to have a > function to calculate the time offset. I suppose that it depends on your t

Zenoss Version 0.22.3 Available

2006-09-18 Thread Drew Bray
09-18-2006 Announcing Zenoss Version 0.22.3 All, Version 0.22.3 of Zenoss is available for download. Version 0.22.3 is a dot release of version 0.22.0, which added several new features, including: * Support for Nagios Plugins (zenagios) * Addition of a GUI for the selection of Alerting Rule

Re: Problem with operator overloading and inheritance in Python

2006-09-18 Thread Calvin Spealman
On 9/18/06, Edward Waugh <[EMAIL PROTECTED]> wrote: > I quickly glanced at Guido's paper of new-style classes and I am puzzled > because the definition of a new-style class looks exactly the same as that > for the classic classes: class []: the class>. > > How do I define new-style classes? > > -

Re: Cheese Shop Registration error

2006-09-18 Thread Richard Jones
[EMAIL PROTECTED] wrote: > The Key ID that the kgpg shows. I tried to paste the key returned by > the quiery on the keyserver. but it also doesn't work. I tried > everything that has any connection with the key, but everything fails. > > By the way the key is: 6A61E3AD Here is the code that could

Re: [ANN] Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Calvin Spealman
On 9/18/06, Carl Drinkwater <[EMAIL PROTECTED]> wrote: > Hi all, > > Code Golf's 12th challenge has just been added to the site. It asks you > to calculate the first 1,000 digits of Pi - Something I'm sure most of > you have thought about, but never done. You can see the challenge at : > >htt

Which date will it be 'over x days'?

2006-09-18 Thread cyberco
I must be overlooking something since I can't find a simple way to calculate which date it will be over, say, 9 days. I checked the datetime, time and calendar modules, but none of them seem to have a function to calculate the time offset. -- http://mail.python.org/mailman/listinfo/python-list

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Paddy
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > With Python you can't win, because Perl and Ruby allow for shorter > > programs. > > Python has native bignums, which should simplify a program like this > enormously. I don't know if Ruby has them. Perl doesn't, and if you > use some CPAN librar

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Paul Rubin
[EMAIL PROTECTED] writes: > With Python you can't win, because Perl and Ruby allow for shorter > programs. Python has native bignums, which should simplify a program like this enormously. I don't know if Ruby has them. Perl doesn't, and if you use some CPAN library that simulates them, that shou

Re: Creating database structures in a portable way

2006-09-18 Thread Bruno Desthuilliers
Samuel a écrit : >>FWIW, there's a Python port of adodb: >>http://phplens.com/lens/adodb/adodb-py-docs.htm >> >>and parsing XML in Python is quite easy. So you could as well port the >>AdoDB XML to Python too. > > > That is exactly what I am trying to avoid. While implementing the > parser might

Re: why a main() function?

2006-09-18 Thread bearophileHUGS
Others have already told you the most important things. There is another secondary advantage: the code inside a function runs faster (something related is true for C programs too). Usually this isn't important, but for certain programs they can go 20%+ faster. Bye, bearophile -- http://mail.pyt

Re: newbie division question

2006-09-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Paul McGuire wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >>> PS Any news on when true division will be the default? >> >> Python 3.0 (aka P3K). It is the release that can break backwards >> compatibility. >> >> http://www.python.org/dev/peps/p

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Paddy
Paul McGuire wrote: > Success lies in the journey, not the destination. > > or in Yoda-speak: > > In the journey success lies, in the destination not. > > -- Paul Ah, I always wondered what lemmings thought , before splat!!! :-) - Pad. -- http://mail.python.org/mailman/listinfo/python-list

Re: why a main() function?

2006-09-18 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I think I read a suggestion somewhere to wrap the code where a Python > script starts in a main() function, so one has > > def main(): > print "hi" > > main() > > instead of > > print "hi" > > What are the advantages of doing this? > Guido van Rossum himself can

Re: newbie division question

2006-09-18 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> PS Any news on when true division will be the default? > > Python 3.0 (aka P3K). It is the release that can break backwards > compatibility. > > http://www.python.org/dev/peps/pep-3000/ > > casevh > Yes, Break Backwards Compatibilit

Re: newbie division question

2006-09-18 Thread casevh
> PS Any news on when true division will be the default? Python 3.0 (aka P3K). It is the release that can break backwards compatibility. http://www.python.org/dev/peps/pep-3000/ casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find number of characters in a unicode string?

2006-09-18 Thread faulkner
are you sure you're using unicode objects? len(u'\u') == 1 the encodings module should help you turn '\xff\xff' into u'\u'. Preben Randhol wrote: > Hi > > If I use len() on a string containing unicode letters I get the number > of bytes the string uses. This means that len() can report siz

Re: How to find number of characters in a unicode string?

2006-09-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Preben Randhol wrote: > If I use len() on a string containing unicode letters I get the number > of bytes the string uses. This means that len() can report size 6 when > the unicode string only contains 3 characters (that one would write by > hand or see on the screen). Is

How to find number of characters in a unicode string?

2006-09-18 Thread Preben Randhol
Hi If I use len() on a string containing unicode letters I get the number of bytes the string uses. This means that len() can report size 6 when the unicode string only contains 3 characters (that one would write by hand or see on the screen). Is there a way to calculate in characters and not in b

Re: why a main() function?

2006-09-18 Thread Benjamin Niemann
[EMAIL PROTECTED] wrote: > I think I read a suggestion somewhere to wrap the code where a Python > script starts in a main() function, so one has > > def main(): > print "hi" > > main() > > instead of > > print "hi" > > What are the advantages of doing this? Refine this to: def main():

Re: why a main() function?

2006-09-18 Thread Calvin Spealman
On 18 Sep 2006 12:40:00 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I think I read a suggestion somewhere to wrap the code where a Python > script starts in a main() function, so one has > > def main(): > print "hi" > > main() > > instead of > > print "hi" > > What are the advantages

Re: Cross-process dictionary/hashtable

2006-09-18 Thread Calvin Spealman
On 18 Sep 2006 12:44:32 -0700, Sandra-24 <[EMAIL PROTECTED]> wrote: > A dictionary that can be shared across processes without being > marshaled? > > Is there such a thing already for python? > > If not is there one for C maybe? > > I was just thinking how useful such a thing could be. It's a great

Re: Cross-process dictionary/hashtable

2006-09-18 Thread Rob Wolfe
"Sandra-24" <[EMAIL PROTECTED]> writes: > A dictionary that can be shared across processes without being > marshaled? > > Is there such a thing already for python? Check this out: http://poshmodule.sourceforge.net/ -- HTH, Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie division question

2006-09-18 Thread David Isaac
> Alan Isaac wrote: > > Suppose x and y are ints in moduleA. > > > > If I put > > from __future__ import division > > in moduleA then x/y will produce the truediv result. > > > > If I put > > from __future__ import division > > in moduleB > > and > > from moduleB import * > > in module A > > then x

Re: why a main() function?

2006-09-18 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > I think I read a suggestion somewhere to wrap the code where a Python > script starts in a main() function, so one has > > def main(): > print "hi" > > main() > > instead of > > print "hi" > > What are the advantages of doing this? I'm sure there are other reasons,

Threads blocking on OpenBSD w/ Python 2.4.2

2006-09-18 Thread [EMAIL PROTECTED]
I'm attempting to write a faily simple threaded app that fires off a thread to select() on a FIFO while the main loop handles data read from that pipe and a few other tasks. For some reason, calls to time.sleep() seem to block until the first time data is dumped into the pipe. Clearly, I could wo

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Paddy: >> Is having good 'code-fu' worthwhile? It may be trivial to score but do >> the results show who iss the better programmer? > > With Python you can't win, because Perl and Ruby allow for shorter > programs. > Beside the language

Cross-process dictionary/hashtable

2006-09-18 Thread Sandra-24
A dictionary that can be shared across processes without being marshaled? Is there such a thing already for python? If not is there one for C maybe? I was just thinking how useful such a thing could be. It's a great way to share things between processes. For example I use a cache that subclasses

why a main() function?

2006-09-18 Thread beliavsky
I think I read a suggestion somewhere to wrap the code where a Python script starts in a main() function, so one has def main(): print "hi" main() instead of print "hi" What are the advantages of doing this? -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie division question

2006-09-18 Thread casevh
David Isaac wrote: > Suppose x and y are ints in moduleA. > > If I put > from __future__ import division > in moduleA then x/y will produce the truediv result. > > If I put > from __future__ import division > in moduleB > and > from moduleB import * > in module A > then x/y will NOT produce the tru

PIL PSDraw textsize method

2006-09-18 Thread Bauke Veenstra
Running the example from the excellent PIL handbook gives an error, after these two lines: ps.setfont("HelveticaNarrow-Bold", 36) w, h, b = ps.textsize(title) AttributeError: PSDraw instance has no attribute 'textsize' Can someone tell me what's wrong, this error occurred on my Linux and on my Win

python and snmp

2006-09-18 Thread Nicolas Miyasato
Hi all, I was just wondering if someone here had any experience with some of these implementations of the snmp protocol? pysnmp, libsnmp, snmpy. Does anybody know of another implementation? thanks in advance!!! -- miya -- http://mail.python.org/mailman/listinfo/python-list

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread bearophileHUGS
Paddy: > Is having good 'code-fu' worthwhile? It may be trivial to score but do > the results show who iss the better programmer? With Python you can't win, because Perl and Ruby allow for shorter programs. Beside the language, you win if you can invent more tricks, that you have to avoid in real

newbie division question

2006-09-18 Thread David Isaac
Suppose x and y are ints in moduleA. If I put from __future__ import division in moduleA then x/y will produce the truediv result. If I put from __future__ import division in moduleB and from moduleB import * in module A then x/y will NOT produce the truediv result (in moduleA). Why? And is ther

Re: Could not build MySQLdb on PowerMac (PPC)

2006-09-18 Thread Diez B. Roggisch
Ted Zeng schrieb: > Hi, > > I am new to Python. I am trying to build MySQLdb for my PowerPC > PowerMac. > I just downloaded the source last week and tried to build it. > But I got the error messages as follow. I checked and there is no such > files as > mysql_config > mysql.h > my_config.h > ...

Re: Help

2006-09-18 Thread Wildemar Wildenburger
Matimus wrote: >> Hi there, I am new in this subject so could you please tell me from >> where I can get help (or good e-book) of python? > http://www.diveintopython.org/ That did the trick for me. It is, however, "a Python book for experienced programmers" (quoted from website). Not too tough, b

Re: Help

2006-09-18 Thread BartlebyScrivener
Rrajal wrote: > Hi there, I am new in this subject so could you please tell me from > where I can get help (or good e-book) of python? You don't provide much info about where you are in your learning cycle. New to programming? New to Python? Both? If you do use the Tutorial, use the newest versio

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Paddy
Carl Drinkwater wrote: > For those who haven't heard of codegolf.com, it can be described as > "allowing you to show off your code-fu by trying to solve coding > problems using the least number of keystrokes." Is having good 'code-fu' worthwhile? It may be trivial to score but do the results show

PyPy Sprint Announcement, Duesseldorf 30 Oct - 5 Nov

2006-09-18 Thread Carl Friedrich Bolz
Hi all! The next PyPy sprint will be held in the Computer Science department of Heinrich-Heine Universitaet Duesseldorf from the 30th of October to the 5th of November 2006. Topics and goals The topics of the sprints are not fixed yet. We will progress on the subjects that we a

Re: Creating database structures in a portable way

2006-09-18 Thread Samuel
> FWIW, there's a Python port of adodb: > http://phplens.com/lens/adodb/adodb-py-docs.htm > > and parsing XML in Python is quite easy. So you could as well port the > AdoDB XML to Python too. That is exactly what I am trying to avoid. While implementing the parser might be easy, you have to transl

Re: Pythondocs.info : collaborative Python documentation project

2006-09-18 Thread Laurent Pointal
[EMAIL PROTECTED] wrote: > Hi, > > I am a bit disapointed with the current Python online documentation. I > have read many messages of people complaining about the documentation, > it's lack of examples and the use of complicated sentences that you > need to read 10 times before understanding wha

Could not build MySQLdb on PowerMac (PPC)

2006-09-18 Thread Ted Zeng
Hi, I am new to Python. I am trying to build MySQLdb for my PowerPC PowerMac. I just downloaded the source last week and tried to build it. But I got the error messages as follow. I checked and there is no such files as mysql_config mysql.h my_config.h ... Did I download the wrong source? pytho

Re: Help

2006-09-18 Thread Matimus
I have yet to find a language/community with better online documentation. I taught myself with the Python tutorial found at http://docs.python.org/tut/tut.html. I would look there first. If you are new to programming altogether I think Python may still be a good choice, but that may not be the _bes

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread [EMAIL PROTECTED]
Carl Drinkwater wrote: > Hi all, > > Code Golf's 12th challenge has just been added to the site. It asks you > to calculate the first 1,000 digits of Pi - Something I'm sure most of > you have thought about, but never done. You can see the challenge at : > >http://codegolf.com/1000-digits-of

Re: Pythondocs.info : collaborative Python documentation project

2006-09-18 Thread Laurent Pointal
[EMAIL PROTECTED] wrote: > Hi, > > I am a bit disapointed with the current Python online documentation. I > have read many messages of people complaining about the documentation, > it's lack of examples and the use of complicated sentences that you > need to read 10 times before understanding wha

Re: Interfacing my chess client with GNU chess using python

2006-09-18 Thread Will McGugan
Varun Hiremath wrote: > Hello, >I have written a chess client using python which is a graphic >interface to play chess. It is at present a two player version, >players move their peices by clicking two squares on the board as >in any other chess clients. >Now i want to interfac

Re: Help

2006-09-18 Thread Larry Bates
Rrajal wrote: > Hi there, I am new in this subject so could you please tell me from > where I can get help (or good e-book) of python? > Some books that helped me: Python Bible by Dave Brueck and Stephen Tanner Python Cookbook by Alex Martelli, Anna Martelli Revenscroft & David Ascher Python pro

Re: Help me use my Dual Core CPU!

2006-09-18 Thread mystilleef
Paul Rubin wrote: > "mystilleef" <[EMAIL PROTECTED]> writes: > > I use D-Bus (Python). I recommend it. I don't know how cross platform > > it is. However, it supports message passing of most built-in (strings, > > ints, lists, dictionaries etc) Python objects accross processes. You > > can mimick

Re: Help me use my Dual Core CPU!

2006-09-18 Thread mystilleef
Paul Rubin wrote: > "mystilleef" <[EMAIL PROTECTED]> writes: > > I use D-Bus (Python). I recommend it. I don't know how cross platform > > it is. However, it supports message passing of most built-in (strings, > > ints, lists, dictionaries etc) Python objects accross processes. You > > can mimick c

Re: Pythondocs.info : collaborative Python documentation project

2006-09-18 Thread Bruno Desthuilliers
Rakotomandimby (R12y) wrote: > On Sat, 16 Sep 2006 22:43:41 +0200, Daniel Nogradi wrote: >> Then how about running your site on python and not php? > > PHP has "better" documentation... ;-) > More seriously, I can provide a CPS hosting to nicolasfr if he wants. Alert ! Unusable undocumented monst

Re: Creating database structures in a portable way

2006-09-18 Thread Bruno Desthuilliers
Samuel wrote: > Hi, > > I am looking for a library that takes an XML file that specifies a > table structure, and generates the CREATE/DROP/ALTER SQL statements to > create the tables in the database. > > In particular, I am trying to port a PHP application that currently > uses the AdoDB XML sch

Creating database structures in a portable way

2006-09-18 Thread Samuel
Hi, I am looking for a library that takes an XML file that specifies a table structure, and generates the CREATE/DROP/ALTER SQL statements to create the tables in the database. In particular, I am trying to port a PHP application that currently uses the AdoDB XML schema: > http://phplens.com/len

Re: Interact with system command prompt

2006-09-18 Thread Diez B. Roggisch
billie wrote: > Uhm... It seems that IPython got some problems: > http://ipython.scipy.org/doc/manual/node12.html > > In details: > >>Note that this does not make IPython a full-fledged system shell. In >>particular, it has >no job control, so if you type Ctrl-Z (under Unix), >>you'll suspend py

win32com InvokeTypes is None

2006-09-18 Thread SS Hares
Hi, I'm encountering an issue where the InvokeTypes method is returning None and I'm unable to Dispatch a particular COM object from DMCoreAutomation.dll. Everything works fine except for method GetItemFields. Using Python 2.4.2, pywin32 build 209. Here is some example code (I can provide full s

How to stop a running embedded interpreter?

2006-09-18 Thread Dirk Runge
Hi! I have embedded Python in an C++ App. The Python-Interpreter is running in its own Thread (I'm using PThreads). I use PyRun_SimpleString to run Python-Code that the user entered in an editorwindow. I want the user to be able to stop the execution of Python-Code (e.g. using a Cancel-Button). U

Re: Python programs always open source?

2006-09-18 Thread Leif K-Brooks
Steve Holden wrote: > Leif K-Brooks wrote: >> Ben Finney wrote: >> >>> So long as you're not distributing some or all of Python itself, or a >>> derivative work, the license for Python has no legal effect on what >>> license you choose for your own work. >> >> >> How many Python programs use nothin

Re: Multiping

2006-09-18 Thread Steve Holden
Fransiska M Argasetya wrote: > dear all > > i have the following code that keeps on pinging several sites infinitely > > i was wondering if anyone could help me out in how to make the results > for each set of loops of the pings to be displayed in an excel file? i > need to use the maximum an

Re: Python programs always open source?

2006-09-18 Thread Steve Holden
Leif K-Brooks wrote: > Ben Finney wrote: > >>So long as you're not distributing some or all of Python itself, or a >>derivative work, the license for Python has no legal effect on what >>license you choose for your own work. > > > How many Python programs use nothing from the standard library?

Re: Interact with system command prompt

2006-09-18 Thread billie
Uhm... It seems that IPython got some problems: http://ipython.scipy.org/doc/manual/node12.html In details: >Note that this does not make IPython a full-fledged system shell. In >particular, it has >no job control, so if you type Ctrl-Z (under Unix), you'll >suspend pysh itself, not the >proces

[ANN] Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Carl Drinkwater
Hi all, Code Golf's 12th challenge has just been added to the site. It asks you to calculate the first 1,000 digits of Pi - Something I'm sure most of you have thought about, but never done. You can see the challenge at : http://codegolf.com/1000-digits-of-pi For those who haven't heard o

  1   2   >