Re: What's wrong with Zope 3 ?

2005-05-31 Thread Wolfram Kraus
Kay Schluehr wrote: > The last downloadable release is from november 2004. The Windows > installer is configured for Python 2.3(!). The Zope.org main page > announces Zope 2.8 beta 2. Is it stillborn? > > Kay > What you see is not Zope 3, it is Zope X 3. To quote from the X3 information page: "

Re: pickle alternative

2005-05-31 Thread simonwittber
> I can't reproduce your large times for marshal.dumps. Could you > post your test code? Certainly: import sencode import marshal import time value = [r for r in xrange(100)] + [{1:2,3:4,5:6},{"simon":"wittber"}] t = time.clock() x = marshal.dumps(value) print "marshal enc T:", time.clock

Re: something like CPAN, PPMs?

2005-05-31 Thread Maurice LING
Hi Alex, I am actually working on something like that as an academic project. At this stage, at least for the purpose of my scope, it will not be as extensive as CPAN but a set of mechanisms for the same effect for Python. maurice Alex Gittens wrote: > I'm new to Python from Perl, and loving i

Re: Beginner question: Python types

2005-05-31 Thread Paul McNett
Uppal, Deepali wrote: > Hello, Hello, and welcome to the world of Python. Don't take anything we say too personally, it is meant to help. > I am facing a bit of a problem due to python implicitly > attaching a type to an object. Ooh. In general, don't say 'implicit'. For the most part, Python

Beginner question: Python types

2005-05-31 Thread Uppal, Deepali
  Hello,       I am facing a bit of a problem due to python implicitly attaching a type to an object. I will briefly tell you the problem that I am facing. I am trying to print the docstring of a test case in my pyUnit base test class. I accept the name of the test class as

Re: Rss lib in python?

2005-05-31 Thread lihui
Please use feedparser: http://feedparser.org/ 2005/6/1, Grant Edwards <[EMAIL PROTECTED]>: > On 2005-06-01, Owen <[EMAIL PROTECTED]> wrote: > > > i want to know some rss library in python.For example, some > > for rss readers, and some for generator. > > http://www.learnwebskills.com/search/ma

Re: Rss lib in python?

2005-05-31 Thread Grant Edwards
On 2005-06-01, Owen <[EMAIL PROTECTED]> wrote: > i want to know some rss library in python.For example, some > for rss readers, and some for generator. http://www.learnwebskills.com/search/main.html http://www.learnwebskills.com/search/google.html Googling for "python rss library" generate a who

Re: What are OOP's Jargons and Complexities?

2005-05-31 Thread Tassilo v. Parseval
Also sprach Dale King: > David Formosa (aka ? the Platypus) wrote: >> On Tue, 24 May 2005 09:16:02 +0200, Tassilo v. Parseval >> <[EMAIL PROTECTED]> wrote: >> >>> [...] I haven't yet come across a language that is both statically and >>>strongly typed, in the strictest sense of the words. I wond

Re: Rss lib in python?

2005-05-31 Thread lihui
PyRSS2Gen http://www.dalkescientific.com/Python/PyRSS2Gen.html example: mport datetime import PyRSS2Gen rss = PyRSS2Gen.RSS2( title = "Andrew's PyRSS2Gen feed", link = "http://www.dalkescientific.com/Python/PyRSS2Gen.html";, description = "The latest news about PyRSS2Gen, a "

Re: scripting browsers from Python

2005-05-31 Thread Olivier Favre-Simon
On Tue, 31 May 2005 00:52:33 -0700, Michele Simionato wrote: > I would like to know what is available for scripting browsers from > Python. > For instance, webbrowser.open let me to perform GET requests, but I > would like > to do POST requests too. I don't want to use urllib to emulate a > browse

Re: Software licenses and releasing Python programs for review

2005-05-31 Thread poisondart
> I'm a little curious about your position. > > Though code encodes knowledge (hence the word, of course :-), the > system of concepts embodied in your code is not the same thing as the > code itself. Right? > > So, firstly, I don't follow your argument there: how does it follow > from the fact th

Re: Incrementing letters

2005-05-31 Thread Dan Sommers
On 27 May 2005 10:52:36 -0400, Dan Sommers <[EMAIL PROTECTED]> wrote: > And use string.ascii_letters[ 1 : ] + string.ascii_letters[ 0 ] for the > second parameter to string.maketrans. Oops. Thank you Duncan and Rocco for correcting my mistake. Regards, Dan -- Dan Sommers

Re: Rss lib in python?

2005-05-31 Thread nephish
Hey man, i would like to know this too. hope someone knows... -- http://mail.python.org/mailman/listinfo/python-list

Rss lib in python?

2005-05-31 Thread Owen
Hi all, i want to know some rss library in python.For example, some for rss readers, and some for generator. Thanks for any information. Owen. -- http://mail.python.org/mailman/listinfo/python-list

Re: The need to put "self" in every method

2005-05-31 Thread John Machin
Skip Montanaro wrote: > Simon> Of course, if you *don't* use 'self', you should expect an angly > Simon> mob with pitchforks and torches outside your castle. > > I take it an "angly mob" is a large group of stick figures? > > Skip Yep -- straw men. -- http://mail.python.org/mailman/lis

Re: The need to put "self" in every method

2005-05-31 Thread Skip Montanaro
Simon> Of course, if you *don't* use 'self', you should expect an angly Simon> mob with pitchforks and torches outside your castle. I take it an "angly mob" is a large group of stick figures? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle alternative

2005-05-31 Thread Andrew Dalke
simonwittber wrote: > marshal can serialize small structures very qucikly, however, using the > below test value: > > value = [r for r in xrange(100)] + > [{1:2,3:4,5:6},{"simon":"wittber"}] > > marshal took 7.90 seconds to serialize it into a 561 length string. > decode took 0.08 seconds

ignoring SIGPIPE in a python script?

2005-05-31 Thread Dan Stromberg
I have a python script that sometimes gets a SIGPIPE signal, and errors out. And I want it to just terminate as though it had hit EOF. I'm running: signal.signal(signal.SIGPIPE,signal.SIG_IGN) ...in the main function, but the script is still erroring out on sigpipe when the consumer to its

Re: Questions on using Qt or wxWindows with Python and OS X

2005-05-31 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I maintain a lot of wxPython and PyQt packages for OS X: in fact, I released the first generally available binary installer for PyQt on the Mac. I'm not at an advanced level with either toolkit, but here's my two cents: 1. Both are robust in the sense

ANN: Version 0.9 of RUR-PLE

2005-05-31 Thread =?ISO-8859-1?Q?Andr=E9_Roberge?=
Version 0.9 of RUR: a Python Learning Environment has been released. Information about RUR-PLE can be obtained at http://rur-ple.sourceforge.net Note that the project website is slightly out of date. Among the changes in this new version: ***Spanish translation added.* Changed image for languag

Re: running tkinter

2005-05-31 Thread flamesrock
I'm having the same problem (latest gentoo 2005.0) and I've installed the tcl and tk languages. -- http://mail.python.org/mailman/listinfo/python-list

Re: Swig compile errors

2005-05-31 Thread [EMAIL PROTECTED]
Nop No luck. That dint work. -- http://mail.python.org/mailman/listinfo/python-list

Re: The need to put "self" in every method

2005-05-31 Thread Peter Hansen
John Machin wrote: > Simon Brunning wrote: >> Of course, if you *don't* use 'self', you should expect an angly mob >> with pitchforks and torches outside your castle. > > Wouldn't an angly mob be carrying fishing rods? No, I rather think they'd be acutely obtuse, right? -- http://mail.python.org

Re: Swig compile errors

2005-05-31 Thread John Machin
[EMAIL PROTECTED] wrote: > Hi I am trying to write a python wrapper for a C code I have using > swig. when i try to compile the _wrap.c i get a bunch of these warnings > and errors can anyone help > Steps I followed : > > $swig -python test_hk.c > this generates test_hk.py and test_hk_wrap.c > the

Re: The need to put "self" in every method

2005-05-31 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > >>Of course, if you *don't* use 'self', you should expect an angly mob > >>with pitchforks and torches outside your castle. > >> > > > > Wouldn't an angly mob be carrying fishing rods? > > >

Re: The need to put "self" in every method

2005-05-31 Thread Carl Friedrich Bolz
John Machin wrote: >>Of course, if you *don't* use 'self', you should expect an angly mob >>with pitchforks and torches outside your castle. >> > > Wouldn't an angly mob be carrying fishing rods? > Well, I thought they would be carrying pitchfolks and tolches. -- http://mail.python.org/mailman

Re: Problem with re.match - Newbie needs some advice

2005-05-31 Thread John Machin
rh0dium wrote: > Hi all, > >I can't seem to get into the > second re.match. Can someone point out my apparent error? errorS: 1. Imprecision -- the problem is in the *third* re.match ... 2. ... which should be re.search 3. Using re at all when simple string methods would do -- see below [snip] >

Swig compile errors

2005-05-31 Thread [EMAIL PROTECTED]
Hi I am trying to write a python wrapper for a C code I have using swig. when i try to compile the _wrap.c i get a bunch of these warnings and errors can anyone help Steps I followed : $swig -python test_hk.c this generates test_hk.py and test_hk_wrap.c then i compile it as $gcc -Wall -std=c99 te

Re: DLL load failed: The specified procedure could not be found

2005-05-31 Thread John Machin
Bill Davy wrote: > sys.path: > H:\Husky\HostPC\V1\SHIP\Debug > H:\Husky\HostPC\V1\SHIP > E:\Bill\Python-2.4.1\PCbuild\python24_d.zip > C:\Python24\Lib > C:\Python24\DLLs > C:\Python24\Lib\lib-tk > H:\Husky\HostPC\V1\RunSHIP > H:\Husky\HostPC\V1\Debug > C:\Python24 > C:\Python24\lib\site-p

cgi help

2005-05-31 Thread nephish
Hey there, i am trying to write an online application using the cgi module. what i want to do is have an html form display a drop-down list and have the values of that list be the lines of text written in a file. this would be updated almost every time the site is visited. i have been sucessful in

What's wrong with Zope 3 ?

2005-05-31 Thread Kay Schluehr
The last downloadable release is from november 2004. The Windows installer is configured for Python 2.3(!). The Zope.org main page announces Zope 2.8 beta 2. Is it stillborn? Kay -- http://mail.python.org/mailman/listinfo/python-list

ANN: PyAuthD - beta 3

2005-05-31 Thread Heiko Wundram
Hi all! I've tagged PyAuthD, beta 3 today. This release marks a milestone, as PyAuthD has superseded PyPAM and PyNSS (the precursors not implemented on a client/server model which are private to my univ) on the mail server which hosts our university's student email accounts. I'm able to releas

Re: The need to put "self" in every method

2005-05-31 Thread John Machin
Simon Brunning wrote: > On 31 May 2005 08:45:45 -0700, Fernando M. > <[EMAIL PROTECTED]> wrote: > >>i was just wondering about the need to put "self" as the first >>parameter in every method a class has because, if it's always needed, >>why the obligation to write it? > > > It doesn't need to be

Problem with re.match - Newbie needs some advice

2005-05-31 Thread rh0dium
Hi all, I am having a problem with the method cpuNum. Basically I look to see if the "flag" for "ht" is enabled. If it is the total processors should be cpucount/2. It's not working. I can't seem to get into the second re.match. Can someone point out my apparent error? class Sysinfo: def

Re: anygui,anydb, any opinions?

2005-05-31 Thread Shane Hathaway
rzed wrote: > That's all I'm talking about here. To be able to write a Python > application that can ultimately be displayed using wxWidgets or Qt > or Tkinter or Curses. Then, without having to do more than to > change which interface package is imported, to expect to see the > result displaye

Re: convert a string to tuple

2005-05-31 Thread flamesrock
lol -- http://mail.python.org/mailman/listinfo/python-list

Re: something like CPAN, PPMs?

2005-05-31 Thread Michael Hoffman
Alex Gittens wrote: > I'm new to Python from Perl, and loving it. Has there ever been any > discussion of creating a similar resource as CPAN for Python, PyPI. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 CVS broken for HP-UX platform?

2005-05-31 Thread =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
mg wrote: > While trying to compile Python 2.5 from the nighlty CVS image, it raises > the following errors on HP-UX. This disables me the use of HP-UX for > some projects: Please submit patches to sf.net/projects/python. Thanks, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: convert a string to tuple

2005-05-31 Thread Peter Hansen
Steven Bethard wrote: > Just be sure you know where your strings come from. You wouldn't want > someone to pass you > """__import__('os').system('rm -rf /')""" > and then send that to eval. =) Why not, Steven? I just tried it and my compu -- http://mail.python.org/mailman/listinfo/python-l

Python as client-side browser script language

2005-05-31 Thread Rune Strand
What would it take to create a Firefox extension that enables Python as a script language in the browser - just like Javascript? Is it at all possible? Are the hundred good reasons not to bother? I once made an application that used MozPython[1]. It was fun and very fast compared to the Mod_Python

Re: The need to put "self" in every method

2005-05-31 Thread Piet van Oostrum
> "Fernando M." <[EMAIL PROTECTED]> (FM) wrote: >FM> Hi, >FM> i was just wondering about the need to put "self" as the first >FM> parameter in every method a class has because, if it's always needed, >FM> why the obligation to write it? couldn't it be implicit? >FM> Or is it a special reason

Re: Determine if windows drive letter is hard drive or optical from python?

2005-05-31 Thread Wolfgang Strobl
Magnus Lycka <[EMAIL PROTECTED]>: >Wolfgang Strobl wrote: >> ... for drive in string.letters[len(string.letters)/2:]: > >Or better... >..for drive in string.ascii_uppercase: > >string.letters differ with locale, but Windows drives are always >only A-Z (right?) and just iterating over u

Re: running tkinter

2005-05-31 Thread James Stroud
On Tuesday 31 May 2005 01:44 pm, Jim Anderson wrote: > Are tcl/tk still supposed to be an intergrated part of the > python release? > > Do I have to download, configure, make, install tcl and tk > packages to get tkinter running? I had to do this. Don't forget blt. -- James Stroud UCLA-DOE Insti

Re: convert a string to tuple

2005-05-31 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > Pass it to eval: > eval('(1, 2, 3, 4, 5)') > (1, 2, 3, 4, 5) Just be sure you know where your strings come from. You wouldn't want someone to pass you """__import__('os').system('rm -rf /')""" and then send that to eval. =) STeVe -- http://mail.python.org/m

Re: working with pointers

2005-05-31 Thread Shane Hathaway
Michael wrote: > sorry, I'm used to working in c++ :-p > > if i do > a=2 > b=a > b=0 > then a is still 2!? > > so when do = mean a reference to the same object and when does it mean make > a copy of the object?? To understand this in C++ terms, you have to treat everything, including simple inte

Re: convert a string to tuple

2005-05-31 Thread Steven Bethard
[EMAIL PROTECTED] wrote: > b is a string b = '(1,2,3,4)' to b = (1,2,3,4) py> tuple(int(s) for s in '(1,2,3,4)'[1:-1].split(',')) (1, 2, 3, 4) Or if you're feeling daring: py> eval('(1,2,3,4)', dict(__builtins__=None)) (1, 2, 3, 4) Python makes no guarantees about the security of this second o

Re: convert a string to tuple

2005-05-31 Thread [EMAIL PROTECTED]
Pass it to eval: >>> eval('(1, 2, 3, 4, 5)') (1, 2, 3, 4, 5) Basically what you are doing it evaluating the repr of the tuple. -Brett -- http://mail.python.org/mailman/listinfo/python-list

Re: convert a string to tuple

2005-05-31 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, querypk wrote: > how do I convert > b is a string b = '(1,2,3,4)' to b = (1,2,3,4) In [1]: b = '(1,2,3,4)' In [2]: b[1:-1] Out[2]: '1,2,3,4' In [3]: b[1:-1].split(',') Out[3]: ['1', '2', '3', '4'] In [4]: tuple(b[1:-1].split(',')) Out[4]: ('1', '2', '3', '4') Ooops,

Re: avl tree

2005-05-31 Thread =?utf-8?q?Berthold_H=C3=B6llmann?=
Zunbeltz Izaola <[EMAIL PROTECTED]> writes: > On Mon, 30 May 2005 21:13:57 +0200, Berthold Höllmann wrote: > >> >> I'm afraid you won't be happy with the code. It's very old and likely >> won't compile. We have an inhouse version of this module which >> compiles and run on Sparc solaris (32 Bit)

running tkinter

2005-05-31 Thread Jim Anderson
I have just installed Fedora Core 3 on my pc. Python runs fine, but when I try to run tkinter the tkinter library is not found. I tried installing python 2.4.1 and could not get tkinter to run there either. When I look through the build directories for 2.4.1, I find a lib-tk, but I do not find an

Re: Newbie Here

2005-05-31 Thread newcoder
The impression for me for python is that it can be scalable and you can really build a full fledge application from it. In the past I used to evangelized on certain language and think that the world is full of philips screws that I can use my philips screwdriver to screw at. I was totally wrong. Bu

convert a string to tuple

2005-05-31 Thread querypk
how do I convert b is a string b = '(1,2,3,4)' to b = (1,2,3,4) -- http://mail.python.org/mailman/listinfo/python-list

Re: exit after process exit

2005-05-31 Thread Jeff Epler
You might want os.spawnv(os.P_WAIT, "a.exe", ["a.exe"]) os.system("a.exe") Jeff pgpp3Fxdo0nYA.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: how to prepend string to a string?

2005-05-31 Thread newcoder
How about this: dirList = ['depth1', 'depth2', 'depth3'] string = """position""" for x in range(len(dirList)): string += '>> %s' % dirList.pop(0) print string flamesrock wrote: > Thanks for all the responses :) > > You're right, Kent. That does exactly what I need it to. > > Anyways..

Re: working with pointers

2005-05-31 Thread Rocco Moretti
> "Dave Brueck" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Michael wrote: >> >>>sorry, I'm used to working in c++ :-p >>> >>>if i do >>>a=2 >>>b=a >>>b=0 >>>then a is still 2!? >>> >>>so when do = mean a reference to the same object >> >>Always. >> >> >>>and when does it mea

Re: working with pointers

2005-05-31 Thread Grant Edwards
On 2005-05-31, Michael <[EMAIL PROTECTED]> wrote: > except numbers?? Um, no? Unless you provide some context, how are we supposed to know what you're asking about? Numbers are immutable, so there is no practical difference. -- Grant Edwards grante Yow! Are we T

Re: Stupid Newbie Question Concerning CGI and Reading Forward Slashes

2005-05-31 Thread Joey C.
Steve Holden wrote: > It's not a common question, but it's relatively easily answered. You are > splitting everything but the filename off with os.path.split and then > complaining about the result! Once you stop doing that your problem is > solved. Thus, it's a stupid newbie question. Thanks a l

Re: working with pointers

2005-05-31 Thread Chris Cioffi
Nope, numbers too.  When you do:   a = 4   You are storing a reference to the literal 4 in a.    >>> a = 4>>> dir(a)['__abs__', '__add__', '__and__', '__class__', '__cmp__', '__coerce__', '__delattr__', '__div__', '__divmod__', '__doc__', '__float__', '__floordiv__', '__getattribute__', '__getne wa

Re: working with pointers

2005-05-31 Thread Steven Bethard
Michael wrote: > if i do > a=2 > b=a > b=0 > then a is still 2!? > > so when do = mean a reference to the same object and when does it mean make > a copy of the object?? It *always* means a reference. It *never* makes a copy. Although the terminology isn't quite right, you can think of all "var

[no subject]

2005-05-31 Thread python-list-bounces+archive=mail-archive . com
#! rnews 1598 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!newsfeeder.wxs.nl!textfeed1.on.meganewsservers.com!meganewsservers.com!feeder2.on.meganewsservers.com!216.196.98.140.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!diablo.voice

Re: working with pointers

2005-05-31 Thread Leif K-Brooks
Michael wrote: > a=2 > b=a > b=0 That's more or less equivalent to this C++ code: int *a; int *b; a = new int; *a = 2; b = a; b = new int; *b = 0; -- http://mail.python.org/mailman/listinfo/python-list

Re: working with pointers

2005-05-31 Thread Ivan Van Laningham
Hi All-- Dave Brueck wrote: > > Michael wrote: > > sorry, I'm used to working in c++ :-p > > > > if i do > > a=2 > > b=a > > b=0 > > then a is still 2!? > > > > so when do = mean a reference to the same object > > Always. > > > and when does it mean make a copy of the object?? > > Never. > T

Re: working with pointers

2005-05-31 Thread Michael
except numbers?? "Dave Brueck" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Michael wrote: > > sorry, I'm used to working in c++ :-p > > > > if i do > > a=2 > > b=a > > b=0 > > then a is still 2!? > > > > so when do = mean a reference to the same object > > Always. > > > and when

Re: working with pointers

2005-05-31 Thread Dave Brueck
Michael wrote: > sorry, I'm used to working in c++ :-p > > if i do > a=2 > b=a > b=0 > then a is still 2!? > > so when do = mean a reference to the same object Always. > and when does it mean make a copy of the object?? Never. -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: plotting with Python

2005-05-31 Thread Leonard J. Reder
Hi Philippe, You may want to look at HippoDraw application. The web site is http://www.slac.stanford.edu/grp/ek/hippodraw/. I have used both the C++ api and python bindings. They have a layer of python called hippoplotter.py to make it easy to instance the basic plotting canvase and place mult

Re: working with pointers

2005-05-31 Thread Michael
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Michael wrote: > > Do expicit pointers exist in python?? > > > > if i do: > > > > a = [5,7] > > b = a > > > > a.empty() > > > > b = ? > > This is what the interactive prompt is for. Try it: > > py> a = [5,7] > py> b = a

Re: working with pointers

2005-05-31 Thread Steven Bethard
Michael wrote: > Do expicit pointers exist in python?? > > if i do: > > a = [5,7] > b = a > > a.empty() > > b = ? This is what the interactive prompt is for. Try it: py> a = [5,7] py> b = a py> a.empty() Traceback (most recent call last): File "", line 1, in ? AttributeError: 'list' objec

working with pointers

2005-05-31 Thread Michael
Do expicit pointers exist in python?? if i do: a = [5,7] b = a a.empty() b = ? how do i do explicit pointers?? Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: how to prepend string to a string?

2005-05-31 Thread Peter Hansen
flamesrock wrote: > Thanks for all the responses :) > > You're right, Kent. That does exactly what I need it to. > > Anyways.. if there isn't a prepend function, I'm going to request it > from the devs. Would be cool to see that in future versions of python. Since strings cannot be modified in-p

Re: scripting browsers from Python

2005-05-31 Thread John J. Lee
"Michele Simionato" <[EMAIL PROTECTED]> writes: > I would like to know what is available for scripting browsers from > Python. > For instance, webbrowser.open let me to perform GET requests, but I > would like > to do POST requests too. I don't want to use urllib to emulate a > browser, I am > int

Re: anygui,anydb, any opinions?

2005-05-31 Thread max
rzed <[EMAIL PROTECTED]> wrote in news:Xns9667883C1D343jreeder@ 63.223.7.253: > So what do you think? What's wrong with the picture? Why isn't > there a greater priority to work in this direction? > Without giving any reasons beyond intuition, I would have to say that it boils down to 2 things

array concatenation

2005-05-31 Thread [EMAIL PROTECTED]
Hello, I have 2 arrays defined with different typecodes. a = array('B', '\0', 6) b = array('L', '\0', 526) for i in range( 6): a[i] = 0xFF for i in range( 520): b[i] = 0x How do i concatenate these two arrays so that, i get b = 0xff 0xff 0xff 0xff 0xff 0xff 0x 0x

Re: how to prepend string to a string?

2005-05-31 Thread flamesrock
Thanks for all the responses :) You're right, Kent. That does exactly what I need it to. Anyways.. if there isn't a prepend function, I'm going to request it from the devs. Would be cool to see that in future versions of python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Seti-like program

2005-05-31 Thread GMane Python
I want to have a program download pictures from a netCam (Axis 2100). So, I want to start & stop, and also see progress (how many photos, are there errors, did I begin encoding to DivX, etc) for multiple cameras. -Dave <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Other examples-

anygui,anydb, any opinions?

2005-05-31 Thread rzed
Periodically, we see questions about which gui package is best, or which database package to use. These questions typically trigger some exchanges of opinion, though of course this no one best answer, and eventually things quiet down until the next round. But it seems to me that what seldom get

Re: COM+, Javascript and Python

2005-05-31 Thread Peter Hansen
dannyguindi wrote: > Do you guys know if there is a way to do this in Linux? What is "this"? Your subject line provides a context, but not a problem to which we can give you the solution. Please be specific. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.stderr and thread

2005-05-31 Thread Michele Petrazzo
Peter Hansen wrote: > Michele Petrazzo wrote: >> This is the exception: >> >> Unhandled exception in thread started by > Thread.__bootstrap of > >> Traceback (most recent call last): >> File "C:\Python23\lib\threading.py", line 451, in __bootstrap >> self.__stop() >> File "C:\Python23\lib\t

Re: The need to put "self" in every method

2005-05-31 Thread Roy Smith
Fernando M. <[EMAIL PROTECTED]> wrote: >i was just wondering about the need to put "self" as the first >parameter in every method a class has because, if it's always needed, >why the obligation to write it? couldn't it be implicit? Didn't this exact question get asked just a few days ago? Anyway,

Re: Running twisted http server - "Method Not Allowed" error

2005-05-31 Thread Richard Townsend
On 30 May 2005 23:50:45 -0700, [EMAIL PROTECTED] wrote: > from twisted.web import server, resource > from twisted.internet import reactor > > class Simple(resource.Resource): > isLeaf = True > def render_GET(self, request): > return "Hello, world!" > > site = server.Site(Simple()

Re: The need to put "self" in every method

2005-05-31 Thread Erik Max Francis
Fernando M. wrote: > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? couldn't it be implicit? > > Or is it a special reason for this being this way? Because it's not always ne

Re: Seti-like program

2005-05-31 Thread [EMAIL PROTECTED]
Other examples- PCAnyWhere, a Trojan Horse .. :) Anyway, this is quite simple. All you realy need is a server with a GUI that listens all the time for incoming connections, and a client that will connect to the server and work in the background. Here are some thoughts... - Figure out what ac

Re: The need to put "self" in every method

2005-05-31 Thread Simon Brunning
On 31 May 2005 08:45:45 -0700, Fernando M. <[EMAIL PROTECTED]> wrote: > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? It doesn't need to be 'self'. You could use 'this', or 's

Re: COM+, Javascript and Python

2005-05-31 Thread dannyguindi
Do you guys know if there is a way to do this in Linux? Thanks. Danny -- http://mail.python.org/mailman/listinfo/python-list

DLL load failed: The specified procedure could not be found

2005-05-31 Thread Bill Davy
sys.path: H:\Husky\HostPC\V1\SHIP\Debug H:\Husky\HostPC\V1\SHIP E:\Bill\Python-2.4.1\PCbuild\python24_d.zip C:\Python24\Lib C:\Python24\DLLs C:\Python24\Lib\lib-tk H:\Husky\HostPC\V1\RunSHIP H:\Husky\HostPC\V1\Debug C:\Python24 C:\Python24\lib\site-packages Traceback (most recent call la

Re: The need to put "self" in every method

2005-05-31 Thread Steven Bethard
Fernando M. wrote: > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? couldn't it be implicit? py> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Ex

Re: The need to put "self" in every method

2005-05-31 Thread John Roth
"Fernando M." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? couldn't it be implicit? > > Or is it a speci

Re: How do you drive-by-wire a car using Python ?

2005-05-31 Thread [EMAIL PROTECTED]
Cameron, Good point, I know you are a newbie :-). Let me help you out, just tell the guy in the hallway that for the recognition of the spelling for garbage in any other languages we use the zipfile module as pointed out in http://pegasusbridge.blogspot.com/2005/05/on-being-innovative-part-i.html

Re: how to convert string to list or tuple

2005-05-31 Thread Steven Bethard
Duncan Booth wrote: > e.g. Assuming that the MyDatabase class does something nasty to a file: > class MyDatabase(object): > > def __init__(self, filename): > self.filename = filename > def initialise(self): > print "Splat %s" % self.filename > eval('''[ cls for cl

Re: The need to put "self" in every method

2005-05-31 Thread Steve Holden
Fernando M. wrote: > Hi, > > i was just wondering about the need to put "self" as the first > parameter in every method a class has because, if it's always needed, > why the obligation to write it? couldn't it be implicit? > > Or is it a special reason for this being this way? > > Thanks. > The

Dr. Dobb's Python-URL! - weekly Python news and links (May 31)

2005-05-31 Thread Simon Brunning
QOTW: "Not tested but confident should be an oxymoron for a programmer." - Peter Otten (Asked "Is this unsurprising if I look at it right?") - "Yes; in general this is true across many domains for a very large number of referents of "it" :-)" - John Machin "Strong typing means there [are] a lot

Re: prime number

2005-05-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, lostinpython <[EMAIL PROTECTED]> wrote: >It is a homework assignment from a book but not for a class. I'm >trying to teach my self some basic programming before I have to take it >in college. If I show enough understanding of the subject, my advisor >will let me fo

Alternative history (was: prime number)

2005-05-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: . . . >If it isn't a homework assignment, and you're honestly in such, then >you should know there's been a lot of research in this area, because >primes ar

Re: How do you drive-by-wire a car using Python ?

2005-05-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >Please note we had to avoid trash cans when the DARPA folks came to >visit us. Our vehicle aims at being a garbage avoidance system instead >:-) > >Igor. > Python clearly is unsuitable for Grand Challenges, as I believe

The need to put "self" in every method

2005-05-31 Thread Fernando M.
Hi, i was just wondering about the need to put "self" as the first parameter in every method a class has because, if it's always needed, why the obligation to write it? couldn't it be implicit? Or is it a special reason for this being this way? Thanks. -- http://mail.python.org/mailman/listinf

Re: change vars in place w/loop or list comprehension

2005-05-31 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > I am a python newbie, and am grappling with a fundamental concept. I > want to > modify a bunch of variables in place. Consider the following: > [snip] a = 'one' b = 'two' c = 'three' [a, b, c] = [s.upper() for s in [a, b, c]] > > Both of these accompl

Re: sys.stderr and thread

2005-05-31 Thread Peter Hansen
Michele Petrazzo wrote: > I have a wxpython application (the main program) and a lot of external > modules (import mymodule) that use always 2 thread (one is my > application and one is twisted with new threadselectreactor). > Sometime when I close my app, I receive a thread error that I want to >

Re: standard doc style for method signatures

2005-05-31 Thread David S.
David S. alumni.tufts.edu> writes: > > Is there a generally accepted way to denote method signatures---that is, > expected type or required interface for each argument. > Here is an answer: http://python.org/peps/pep-0257.html http://www.python.org/peps/pep-0008.html -- http://mail.python

Re: change vars in place w/loop or list comprehension

2005-05-31 Thread Raymond Hettinger
> >>> a = 'one' > >>> b = 'two' > >>> c = 'three' > >>> [a, b, c] = [s.upper() for s in [a, b, c]] > >>> a > 'ONE' > > Both of these accomplish what I'm after; I prefer the second for its > brevity. But either approach requires that I spell out my list of > vars-to-alter [a, b, c] twice. This stri

something like CPAN, PPMs?

2005-05-31 Thread Alex Gittens
I'm new to Python from Perl, and loving it. Has there ever been any discussion of creating a similar resource as CPAN for Python, or a similar distribution method as PPMs? Seems like it would make a great language even better. Alex -- http://tangentspace.net/cz -- http://mail.python.org/mailman/

Seti-like program

2005-05-31 Thread GMane Python
Hello I'd like to consider making a program which is 'seti-like' where I could run a command-line Python script to just 'do something', and then be able to launch a viewer program (maybe linux x11 or Windows, possibly over a network socket) using wxPython to be able to inter-act with it. (Start jo

  1   2   >