Re: proposed Python logo

2006-04-21 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "Michael Tobis" <[EMAIL PROTECTED]> wrote: >"Is this the right room for an argument?" > >http://geosci.uchicago.edu/~tobis/snake.png Too rigid-looking somehow. I think get rid of the straight right-angle lines. -- http://mail.python.org/mailman/listinfo/python-l

Re: Activating Batch Files from Python

2006-04-21 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "Jeff Groves" <[EMAIL PROTECTED]> wrote: >>How about sourcing it from a shell, then using that same shell instance >>to run the programs? > >How would I do that? As I've said, I haven't found a Python command >that lets you send multiple commands to the same shell

Re: How can I call a python method from the XML-RPC client in Java?

2006-04-21 Thread Eric Brunel
On 20 Apr 2006 11:31:23 -0700, <[EMAIL PROTECTED]> wrote: > Hi all, > I have created a XML-RPC model (with server and client) written in > Java. > I want to call the methods in another XML-RPC model written in > Python. > I know that in Java, I can use like > "xmlrpc_client.excute("han

Re: a subprocess qns

2006-04-21 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >i wanted to start execute a command and put it in the background. i am >using Unix. >Usually i start this command using something like this : >"/path/somecmd &" with the "&" to put it to background. Even if it's in the background with "&

Re: py.test munging strings in asserts?

2006-04-21 Thread Johnny deBris
Timothy Grant wrote: > > granted the left side of that equality could be messed up due to > create_output() NOT doing the right thing. But the right side is > simply the contents of the variable "text" so WHY is the first part of > the path being substituted with "..."? > Some grepping on '...' r

OT: Mozart (was Re: perspective on ruby)

2006-04-21 Thread Dave Benjamin
On Thu, 20 Apr 2006, Alex Martelli wrote: > Edward Elliott <[EMAIL PROTECTED]> wrote: > ... >> course in C++ doesn't cut it, the curriculum should either use different >> languages fitted to each task or emphasize a single language with broad >> abilities (picking the best programming model for

python-mysql on Windows -- How to?

2006-04-21 Thread Chris Seymour
Can anybody provide any guidance on what I will need to do get mysql-python setup on my win xp workstation? I have Mysql 4.1 installed and activepython 2.4.3 installed. What do I need to do to install/setup mysql-python? Thanks. Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: Strategy Design Pattern

2006-04-21 Thread Kay Schluehr
Daniel Santa Cruz wrote: > Hello all, > > I've been trying to go over my OO Patterns book, and I decided to try > to implement them in Python this time around. I figured this would > help me learn the language better. I guess it might help clarifying what OO is about since you see what happens w

Property In Python

2006-04-21 Thread sushant . sirsikar
Hi, I want to know how we can write Properties in Pyhton.Any one knows good doc for this one? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Property In Python

2006-04-21 Thread gangesmaster
class person(object): def _get_age(self): return self.__age age = property(_get_age) # a read-only property def _get_name(self): return self.__name def _set_name(self, value): self.__name = value name = property(_get_name, _set_name) -- http://mail.pyt

Re: a subprocess qns

2006-04-21 Thread Ben C
On 2006-04-21, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i wanted to start execute a command and put it in the background. i am > using Unix. If you use subprocess, or even os.spawn, it should be portable and work on all systems (although the docs list some restrictions). > Usually i st

Re: Strategy Design Pattern

2006-04-21 Thread Ben Sizer
Daniel Santa Cruz wrote: > Well, I've gotten stuck with my first go at OO patterns with Python. I > guess it goes without say that some of the stuff that are taken for > granted in most of the books (ie. Interfaces, Abstract classes) don't > really apply to Python per say, but the idea behind the

Re: Strategy Design Pattern

2006-04-21 Thread Gerard Flanagan
Daniel Santa Cruz wrote: > Hello all, > > I've been trying to go over my OO Patterns book, and I decided to try > to implement them in Python this time around. I figured this would > help me learn the language better. > > Well, I've gotten stuck with my first go at OO patterns with Python. I > g

Re: How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namespac

2006-04-21 Thread bruno at modulix
alisonken1 wrote: > As to the question "fail to see how version control relates to > code/test separation", the original poster asked several questions, one > of which was production/testing code separation. > > Along with the separation (so while you're testing new functionality, > you don't brea

Re: search files in a directory

2006-04-21 Thread bruno at modulix
Gary Herron wrote: > david brochu jr wrote: > >> Hello, >> >> I need to open every file in a directory and search for a string. What >> module is needed to do this and how would I go about searching each file? [bash] find /path/to/dir -exec grep -le "searched string" {} \; Ho, you meant : doin

Re: Property In Python

2006-04-21 Thread bayerj
>>> print property.__doc__ property(fget=None, fset=None, fdel=None, doc=None) -> property attribute fget is a function to be used for getting an attribute value, and likewise fset is a function for setting, and fdel a function for del'ing, an attribute. Typical use is to define a managed attribu

Re: Strategy Design Pattern

2006-04-21 Thread bruno at modulix
Daniel Santa Cruz wrote: > Hello all, > > I've been trying to go over my OO Patterns book, and I decided to try > to implement them in Python this time around. I figured this would > help me learn the language better. > > Well, I've gotten stuck with my first go at OO patterns with Python. I >

threading, how to?

2006-04-21 Thread akrapus
Hi, I am trying to understand how to use threading in Python. I get threading as a concept, but not the implementation. In order to start threading, do you call it as a separate function, which will then be applied to the rest of the code (functions) or do you open threading in each function. Thi

Re: the whole 'batteries included' idea

2006-04-21 Thread Ben Sizer
John Salerno wrote: > Pardon my naivety, you would think maybe I'd understand this by now, but > I've always kind of wondered about it. I've been curious why one of the > biggest points used to promote Python is that it has "batteries > included." True, this is a great feature, but the way it's bee

Re: Thanks from the Java Developer

2006-04-21 Thread Kent Johnson
Alex Martelli wrote: > Ant <[EMAIL PROTECTED]> wrote: > >> Python ruined my life. Python ruined me for Java coding too. > At least in the Bay Area, the jobmarket for Python programmers is wild, > right now -- firms such as Google, Pixar, BitTorrent, IronPort, etc, > etc, all hungry for Pythonist

Re: proposed Python logo

2006-04-21 Thread Ant
Sorry dude, but it looks like a hairdryer! Imagine it at 16x16 pixels or smaller, and it'll look like little more than a circle with two sticks. The current image scales well. I think that the current logo is fine. Much more professional than the old image. The + formation is positive enough, and

Re: threading, how to?

2006-04-21 Thread Sergei Organov
"akrapus" <[EMAIL PROTECTED]> writes: > Hi, > > I am trying to understand how to use threading in Python. I get > threading as a concept, but not the implementation. > > In order to start threading, do you call it as a separate function, > which will then be applied to the rest of the code (functi

are docstrings for variables a bad idea?

2006-04-21 Thread jelle
That's basically the idea... Often i find myself annotating what variables actually stand for, so to refer back to the code in half a year or so. # check if ID's or coords self.pointIDs = ptIDs self.coords = [tuple(RS.PointCoordinates(i)) for i in ptIDs] # map ids/coords and coords/ids self.po

Re: threading, how to?

2006-04-21 Thread akrapus
Thanks for reply. So would it be implemented as follows: Func 1 Func 2 Func 3 Thread for Func 1 Thread for Func 2 Thread for Func 3 Cheers Stevan -- http://mail.python.org/mailman/listinfo/python-list

Re: threading, how to?

2006-04-21 Thread Diez B. Roggisch
akrapus wrote: > Thanks for reply. > > So would it be implemented as follows: > > Func 1 > Func 2 > Func 3 > > Thread for Func 1 > Thread for Func 2 > Thread for Func 3 Could be, but the you woul most probably subclass threading.Thread and override the run-method. However, often it is done li

Re: threading, how to?

2006-04-21 Thread Sergei Organov
"akrapus" <[EMAIL PROTECTED]> writes: > Thanks for reply. > > So would it be implemented as follows: > > Func 1 > Func 2 > Func 3 > > Thread for Func 1 > Thread for Func 2 > Thread for Func 3 Yes, if you wish to run every of your 3 functions in a separate thread. -- Sergei. -- http://mail.pyth

Re: are docstrings for variables a bad idea?

2006-04-21 Thread Diez B. Roggisch
jelle wrote: > That's basically the idea... > Often i find myself annotating what variables actually stand for, so to > refer back to the code in half a year or so. > > # check if ID's or coords > self.pointIDs = ptIDs > self.coords = [tuple(RS.PointCoordinates(i)) for i in ptIDs] You aren't

Joining stdout & stderr of subprocess ?

2006-04-21 Thread robert
when I run a command myapp 2>&1 yet: #!python print os.popen("myapp 2>&1").read() the stderr stuff comes all after the stdout stuff. How can I get ahold of all the out and err joined synchronously in the order, it is created ? robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a programming resource for newbees

2006-04-21 Thread bruno at modulix
bambooforest wrote: > Hi all, > > I'm from a Linguistics background and am new(er) to programming. Could > someone recommend a book or resource that teaches programming aspects > with Python? Python I hear is a very appropriate language for handling > text and language processing. You may want to

Re: send cookie on request with urllib2

2006-04-21 Thread itay_k
ok. i will explain what exactly i wanna do. i want to simulate the following client-side script with python: document.cookie="name=tom"; document.images["Pic"].src="temp2.html" what that happen here, is when this page loading, the browser loads "temp2.html" with HTTP header:

Re: python-mysql on Windows -- How to?

2006-04-21 Thread BartlebyScrivener
Chris, I'm no expert, but this keeps coming up and the last several people have had better luck with mxODBC. http://tinyurl.com/fmp3y But if you're set on MySql-Python someone will jump in to help. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: threading, how to?

2006-04-21 Thread Iain King
akrapus wrote: > Thanks for reply. > > So would it be implemented as follows: > > Func 1 > Func 2 > Func 3 > > Thread for Func 1 > Thread for Func 2 > Thread for Func 3 > > Cheers > > Stevan Here's how I'm doing it, using the thread module (there's a higher level class-based module: threading, but

Re: threading, how to?

2006-04-21 Thread [EMAIL PROTECTED]
Here's a recipe I used a lot: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448 -- http://mail.python.org/mailman/listinfo/python-list

Re: PyLint 0.11 / astng 0.16

2006-04-21 Thread vj
It does. In my case I'm thinking of embedding pylint to check user scripts which are written in python. -- http://mail.python.org/mailman/listinfo/python-list

RE: proposed Python logo

2006-04-21 Thread Michael Yanowitz
How about having something from Monty Python in the logo rather than something snakelike. Python was named after Monty Python and not the snake. Snakes also don't appear friendly to me. I used to have rats as pets. Snakes are murderers of rats. Which I do find strange that there is a rat on th

BackgroundCall as Pythonic Thread - Re: threading, how to?

2006-04-21 Thread robert
akrapus wrote: > Hi, > > I am trying to understand how to use threading in Python. I get > threading as a concept, but not the implementation. > > In order to start threading, do you call it as a separate function, > which will then be applied to the rest of the code (functions) or do > you open

ANN: Pyrr 0.1 - Lexer and LR(1)-Parser Generator for Python

2006-04-21 Thread Heiko Wundram
Hi list! Not long ago I was looking for an easy to use, but powerful parser and lexer generating tool for Python, and to my dismay, I found quite a number of Python projects implementing an (LA)LR(1) parser generator, but none of them seemed quite finished, or even pythonic. As I required a pa

python equivalent of VB code sample

2006-04-21 Thread mirandacascade
Situation is this: 1) must write application that does the following: a) creates an xml document, the contents of which, is a request transaction b) send xml document to destination; I am assuming that a process at destination side processes the request and sends back a response c) t

Re: Joining stdout & stderr of subprocess ?

2006-04-21 Thread Duncan Booth
robert wrote: > > when I run a command > > myapp 2>&1 > [ I guess you meant to say here that the stdout, stderr output was interleaved ] > > yet: > > #!python > print os.popen("myapp 2>&1").read() > > the stderr stuff comes all after the stdout stuff. > How can I get ahold of all the out an

Re: quick surface plots

2006-04-21 Thread buchstaebchen
Thanks folks... -- http://mail.python.org/mailman/listinfo/python-list

Re: How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namespac

2006-04-21 Thread Fabio Zadrozny
COMMONsrca.b.c.commontesta.b.c.common Ok, first thing... it won't work becaus as soon as python finds the first a.b.c.common it will bail on the other... That's the default approach for java, becase it will give you access to module-level things declared as 'default', that otherwise

Re: Joining stdout & stderr of subprocess ?

2006-04-21 Thread Piet van Oostrum
> robert <[EMAIL PROTECTED]> (R) wrote: >R> when I run a command >R> myapp 2>&1 >R> yet: >R> #!python >R> print os.popen("myapp 2>&1").read() >R> the stderr stuff comes all after the stdout stuff. >R> How can I get ahold of all the out and err joined synchronously in the >R> order, it is

Re: are docstrings for variables a bad idea?

2006-04-21 Thread jelle
---I don't know for sure what you mean by "pop up as doc-string" - I guess you want them magically merged into the functions doc string, at least inside your editor? That sure could be done - but I personally don't think that is too useful. Because you lose context.--- point taken. perhaps only va

Re: proposed Python logo

2006-04-21 Thread Gerard Flanagan
Michael Yanowitz wrote: > How about having something from Monty Python in the logo rather > than something snakelike. Python was named after Monty Python and not > the snake. Snakes also don't appear friendly to me. > I used to have rats as pets. Snakes are murderers of rats. Which I Never mind

Re: python equivalent of VB code sample

2006-04-21 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > Situation is this: > 1) must write application that does the following: > a) creates an xml document, the contents of which, is a request > transaction > b) send xml document to destination; I am assuming that a process > at destination side processes the reques

Re: are docstrings for variables a bad idea?

2006-04-21 Thread bearophileHUGS
Docstrings for variables seems a new interesting idea to me, but I don't know how much useful it can be. Do you mean something like this? >>> rcar_speed = 25 >>> print rcar_speed 25 >>> print rcar_speed.__doc__ int(x[, base]) -> integer ... >>> rcar_speed.__ndoc__ = "Speed of the red car, km/h" ..

Re: proposed Python logo

2006-04-21 Thread BartlebyScrivener
No matter what you do, "Python" is going to sum up the image of a powerful snake. I suppose you could change the name to "Monty," if you wanted more humor and more of a reference to Monty Python, or maybe "Bring Out Your Dead." Personally I like the snake associations and the notion that you're jo

Read and extract text from pdf

2006-04-21 Thread Julien ARNOUX
Hi, I have a problem :), I just want to extract text from pdf file with python. There is differents libraries for that but it doesn't work... pyPdf and pdfTools, I don't know why but it doesn't works with some pdf... For example space chars are delete in the text.. Pdf playground : I don't unders

Re: are docstrings for variables a bad idea?

2006-04-21 Thread Diez B. Roggisch
jelle wrote: > ---I don't know for sure what you mean by "pop up as doc-string" - I > guess you > want them magically merged into the functions doc string, at least > inside > your editor? That sure could be done - but I personally don't think > that is > too useful. Because you lose context.--- >

Re: Read and extract text from pdf

2006-04-21 Thread Rene Pijlman
Julien ARNOUX: >I have a problem :), I just want to extract text from pdf file with >python. There is differents libraries for that but it doesn't work... > >pyPdf and pdfTools, I don't know why but it doesn't works with some >pdf... Text can be represented in different ways in PDF: as tagged tex

what has python added to programming languages? (lets be esoteric, shall we ;)

2006-04-21 Thread Wildemar Wildenburger
Over the time I've seen lots of remarks about python that read like "a lot like lists in lisp" or "like the hashtable in java" or any other form of "like in ". Are there any concepts that python has not borrowed, concepts that were not even inspired by other languages? I'm just interested if i

ANN: Leo 4.4 b4 released

2006-04-21 Thread Edward K. Ream
Leo 4.4 beta 4 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 This version fixes a long-standing MacOS bug. It is likely to be the last beta release before 4.4 rc1. This release also adds several new commands and contains a script for updating

Re: Leo 4.4 b4 released

2006-04-21 Thread Edward K. Ream
Correction: Leo's cvs repository has been moved to tigris: http://leo.tigris.org/source/browse/leo/ Edward Edward K. Ream email: [EMAIL PROTECTED] Leo: http://webpages.charter.net/edreamleo/front.html

Re: are docstrings for variables a bad idea?

2006-04-21 Thread jelle
didn't you just do that ;') such variables docstrings would help one to speed up understanding an API, and more importantly, could reduce assumptions you make on what a variable means. who's the mother of assumptions again? i'm not evangalizing at all that each and every variable should be docume

Re: are docstrings for variables a bad idea?

2006-04-21 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "jelle" <[EMAIL PROTECTED]> wrote: > When programming a more complex class, it would be quite helpful that > these annotations would pop-up as a docstring. I'm currently working with a OO database system that lets you attach a doc string not just to classes, but

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Michele Simionato
Wildemar Wildenburger wrote: > Over the time I've seen lots of remarks about python that read like "a > lot like lists in lisp" or "like the hashtable in java" or any other > form of "like in ". > > Are there any concepts that python has not borrowed, concepts that were > not even inspired by othe

Re: python-mysql on Windows -- How to?

2006-04-21 Thread Chris Seymour
HI Rick, I did some searching on SourceForge and found a Windows installer for the mysql-python 1.2.0. (MySQL-python.exe-1.2.0.win32-py2.4.zip). I unzipped and ran this installer and seem to be all set. I will keep testing. Thanks. Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: are docstrings for variables a bad idea?

2006-04-21 Thread jelle
Hi Diez, please take note, this suggestion does not nessecarily apply to programmers such as you & myself of course for whom any python code is as transparant as the API's we write ;') I feared that you meant that - but wasn't sure. This is one of the often-requested-yet-they-will-never-c

Does wxWindow.MakeModal(True) work for all Windows or just frames?

2006-04-21 Thread mw
I am using wxPython 2.6.3.0 As far as I can tell from the documentation (www.wxpython.org), MakeModal() should work for all windows, but when I do some practical tests, I can only get it to work for frames. Can anyone confirm what the status of this method is. Is it intended to work for all windo

Re: are docstrings for variables a bad idea?

2006-04-21 Thread Michele Simionato
Notice that class attributes can already be annoted (properties have a docstring). BTW in Python 2.5 you have a convenient way to define readonly attributes (for instance constants) and give them a docstring. Here is an example: class C(object): @property def pi(self): 'pi is 3.141

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Carl Banks
Wildemar Wildenburger wrote: > Are there any concepts that python has not borrowed, concepts that were > not even inspired by other languages? I'm just interested if it is > "merely" a best-of collection of language features or if there are > actually inventions that have not - or hardly - existed

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread dadapapa
It's true that most features of python are intentionally borrowed from other languages. If I can think of anything that I believe to be specific to python, I would say it is the combination of high level datatypes together with an extremely simple syntax. Actually, this combination often results in

Re: are docstrings for variables a bad idea?

2006-04-21 Thread jelle
class GeographicCoordinate: def __init__ (self, lat, long): self.lat = lat "Latitude in degrees (positive North), per WGS84" self.long = long "Longitude in degrees (positive West), per WGS84" Thanks for your example Roy, that illustrates well what I'm after: self.lat

ANN: Pyrex 0.9.4.1

2006-04-21 Thread greg
Pyrex 0.9.4.1 is now available: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ This is a very minor update to correct a tab/space problem in the distutils extension. What is Pyrex? -- Pyrex is a language for writing Python extension modules. It lets you freely mix operation

Re: are docstrings for variables a bad idea?

2006-04-21 Thread jelle
Hi Michele, Thanks for pointing that out, cool! I would argue -even- that is too much programming effort. Like method docstring, variables docstrings should be effortless to write. -- http://mail.python.org/mailman/listinfo/python-list

Re: are docstrings for variables a bad idea?

2006-04-21 Thread Diez B. Roggisch
jelle wrote: > > why is this ambigious at all? > am i seriously overlooking something? Yes. A full example is this: import random class A: """I'm A """ pass class B: """ I'm B """ pass def factory(): if random.random() >= .5: return A() return B() o = factory()

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Iain King
Wildemar Wildenburger wrote: > Over the time I've seen lots of remarks about python that read like "a > lot like lists in lisp" or "like the hashtable in java" or any other > form of "like in ". > > Are there any concepts that python has not borrowed, concepts that were > not even inspired by oth

Re: what has python added to programming languages? (lets beesoteric, shall we ; )

2006-04-21 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Examples for this are one-liners like > > x,y = y,x > a,b,c = f(x) > for key in my_dict : do_some_thing_with(my_dict[key]) > > It might be that Guido adapted such notations from ABC, a language I am > not familiar with something like: PUT (x, y) IN y, x

Re: Does wxWindow.MakeModal(True) work for all Windows or just frames?

2006-04-21 Thread mw
I found a post "Re: modal controls" that addresses more or less the same issue: http://blog.gmane.org/gmane.comp.python.wxpython/month=20041101 Still, any additional input would be more than welcome. /Magnus -- http://mail.python.org/mailman/listinfo/python-list

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread BartlebyScrivener
In the Tutorial, the BFDL says: Strings can be subscripted (indexed); like in C, the first character of a string has subscript (index) 0. There is no separate character type; a character is simply a string of size one. Like in Icon, substrings can be specified with the slice notation: two indices

Re: proposed Python logo

2006-04-21 Thread Michael Tobis
> Too rigid-looking somehow. Hey, I'm an amateur... There are lots of variations on the concept I can think of. I want someone with a lot of design talent *and a little familiarity with the language* to take enough interest to have a go at it. At least (unlike the tadpoles) it has some resonanc

Re: proposed Python logo

2006-04-21 Thread Grant Edwards
On 2006-04-21, Michael Tobis <[EMAIL PROTECTED]> wrote: >> Too rigid-looking somehow. > > Hey, I'm an amateur... There are lots of variations on the concept I > can think of. I want someone with a lot of design talent *and a little > familiarity with the language* to take enough interest to have

Re: what has python added to programming languages? (lets beesoteric, shall we ; )

2006-04-21 Thread Fredrik Lundh
Iain King wrote: > I find slice notation consistent and elegant - did it come form another > language? Icon: http://www.cs.arizona.edu/icon/ see e.g. http://infohost.nmt.edu/tcc/help/lang/icon/substring.html http://infohost.nmt.edu/tcc/help/lang/icon/positions.html -- http:/

Re: Joining stdout & stderr of subprocess ?

2006-04-21 Thread Nick Craig-Wood
robert <[EMAIL PROTECTED]> wrote: > when I run a command > > myapp 2>&1 Try myapp 2>&1 | cat and see what you get. You should get the same output as the python. > #!python > print os.popen("myapp 2>&1").read() > > the stderr stuff comes all after the stdout stuff. > How can I get aho

Re: are docstrings for variables a bad idea?

2006-04-21 Thread Ziga Seilnacht
jelle wrote: > Hi Michele, > > Thanks for pointing that out, cool! > > I would argue -even- that is too much programming effort. > Like method docstring, variables docstrings should be effortless to > write. I don't know what exactly do you mean with variable docstrings, but if you just want to ad

Re: How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namespac

2006-04-21 Thread ToddLMorgan
Thanks everyone for their assistance. I have managed to achieve all that I set out to do: - separation between src and test folders - now successfully sharing code between projects - running unittest s and suites - avoiding namespace collisions The solution involved the following (if anyone else

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Alex Martelli
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Over the time I've seen lots of remarks about python that read like "a > lot like lists in lisp" or "like the hashtable in java" or any other > form of "like in ". Since Python was released well before Java, saying that a feature in Python is "

how to append to a list twice?

2006-04-21 Thread John Salerno
If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] (where each item is repeated twice after the first one), how might I do that most efficiently? Right now I have this: series = [100] for x in range(10): # just for testing series.append(series[-1] - 1) But of course

Re: win32com.client.constants - AttributeError

2006-04-21 Thread kbperry
how do I do this? Where is the Word object library? -- http://mail.python.org/mailman/listinfo/python-list

Re: proposed Python logo

2006-04-21 Thread RK
That's a good try... Can we get some street pros? http://www.graffitifonts.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: how to append to a list twice?

2006-04-21 Thread Paul McGuire
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] > (where each item is repeated twice after the first one), how might I do > that most efficiently? > > Right now I have this: > > series = [100] > for

Re: how to append to a list twice?

2006-04-21 Thread Gerard Flanagan
John Salerno wrote: > If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] > (where each item is repeated twice after the first one), how might I do > that most efficiently? > > Right now I have this: > > series = [100] > for x in range(10): # just for testing > series.ap

Re: how to append to a list twice?

2006-04-21 Thread Alex Martelli
John Salerno <[EMAIL PROTECTED]> wrote: > If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] > (where each item is repeated twice after the first one), how might I do > that most efficiently? > > Right now I have this: > > series = [100] > for x in range(10): # just for te

Re: how to append to a list twice?

2006-04-21 Thread Tim Chase
> If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] > (where each item is repeated twice after the first one), how might I do > that most efficiently? > > Right now I have this: > > series = [100] > for x in range(10): # just for testing > series.append(series[-1] -

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread Michael Tobis
Although somewhat more elegant, Python slices follow Matlab's slice notation. In simpler cases they are identical. mt -- http://mail.python.org/mailman/listinfo/python-list

Re: how to append to a list twice?

2006-04-21 Thread [EMAIL PROTECTED]
Not sure if this is simpler or better, but here's a way to do it with a generator: value = 100 count = 0 def valueGen(): global value global count while(value >= 0): if(value == 100): yield value value -= 1 else: if(count & 1):

Re: ANN: Pyrr 0.1 - Lexer and LR(1)-Parser Generator for Python

2006-04-21 Thread Norman Shelley
FWIW: This has a similiar look/feel to how sabbey wrapped dparser. http://staff.washington.edu/sabbey/py_dparser/ Heiko Wundram wrote: > Hi list! > > Not long ago I was looking for an easy to use, but powerful parser and lexer > generating tool for Python, and to my dismay, I found quite a numbe

Re: proposed Python logo

2006-04-21 Thread Simon Brunning
On 4/21/06, Michael Yanowitz <[EMAIL PROTECTED]> wrote: >I think something from Monty Python (I haven't watched it recently > to know what would be ideal) would be more appropriate than an ugly > reptile which is usually associated with evil and our reason for leaving > the Garden of Eden. +1.

Re: how to append to a list twice?

2006-04-21 Thread John Salerno
Paul McGuire wrote: > "John Salerno" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] >> (where each item is repeated twice after the first one), how might I do >> that most efficiently? >> >> Right now I have t

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-21 Thread utabintarbo
Why does Python have to "add" anything, if it makes "that which came before" more easily accessible/usable? Perhaps that is its innovation. Is that not sufficient? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to append to a list twice?

2006-04-21 Thread Fredrik Lundh
Alex Martelli wrote: > > But of course that only does it once, and I don't want to have to copy > > and paste the append line. Perhaps there's a better way than this. > > def makeseries(N): > series = [N] > append = series.append > for tailer in xrange(N-1, -1, -1): > append(tailer) >

Re: how to append to a list twice?

2006-04-21 Thread Tim Chase
> Interesting. I tried the *2 method twice, but I kept > getting weird results, I guess because I was using append > and not extend. I thought extend added lists to lists, > but obviously that's not the case here. In the above example, it *is* "add[ing] lists to lists". Note the set of brackets:

Re: How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namespac

2006-04-21 Thread alisonken1
It can be fun when talking several subjects in the same post . In this case, it was just a matter of thinking about what the main question was about unit testing code that also required other production packages, but with the caveats that he didn't want to duplicate packages just to test code or h

Re: how to append to a list twice?

2006-04-21 Thread Gerard Flanagan
Gerard Flanagan wrote: > John Salerno wrote: > > If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] > > (where each item is repeated twice after the first one), how might I do > > that most efficiently? > > series = [100] > > for i in range(1,10): > series.extend([100-i]*2

Re: proposed Python logo

2006-04-21 Thread BartlebyScrivener
>> I'd like some variation of used as a logo. That has real potential, but I bet it's trademarked. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: how to append to a list twice?

2006-04-21 Thread Sybren Stuvel
John Salerno enlightened us with: > Interesting. I tried the *2 method twice, but I kept getting weird > results, I guess because I was using append and not extend. I > thought extend added lists to lists, but obviously that's not the > case here. [100].extend([90]) -> [100, 90] [100].append([90])

Refresh option Tix ExFileSelectBox

2006-04-21 Thread Arne
Hello! I am working with Tix. At the moment I try to use the ExFileSelectBox. I am looking for a option to refresh the valuer of the subwidget "file" after I have made some changes on these files. How can I refresh the view? Thanks Arne -- http://mail.python.org/mailman/listinfo/python-lis

Re: how to append to a list twice?

2006-04-21 Thread Sion Arrowsmith
John Salerno <[EMAIL PROTECTED]> wrote: >If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] >(where each item is repeated twice after the first one), how might I do >that most efficiently? > >Right now I have this: > >series = [100] >for x in range(10): # just for testing

Re: how to append to a list twice?

2006-04-21 Thread Edward Elliott
John Salerno wrote: > If I want to create a list of the form [100, 99, 99, 98, 98, 97, 97...] > (where each item is repeated twice after the first one), how might I do > that most efficiently? Why not just this: series = [x/2 for x in range(200, 1, -1)] -- http://mail.python.org/mailman/listi

Re: threading, how to?

2006-04-21 Thread Carl J. Van Arsdall
akrapus wrote: > Hi, > > I am trying to understand how to use threading in Python. I get > threading as a concept, but not the implementation. > > In order to start threading, do you call it as a separate function, > which will then be applied to the rest of the code (functions) or do > you open th

  1   2   3   >