Which python version do I use with "virtualenv"?

2009-05-07 Thread OldGrantonian
I have Windows Vista Home Premium. As a non-techy, I want to use "virtualenv" I had Python 2.6 on my laptop. I needed "easyinstall" to install virtualenv. During installation of easyinstall, I got the message "Python 2.5 not found" So I installed Python 2.5, then installed virtualenv So I now

Re: Threading and GIL

2009-05-07 Thread googler . 1 . webmaster
Hi, thats the reason why its not working. Imagine the end() method of the thread object is called so the C++ Function is opened where the code for this method is in. At a line the Code ...->End() is called which waits that the C++ Thread class is finished. BUT here is the problem: In the Method o

Re: [Python-Dev] [RELEASED] Python 3.1 beta 1

2009-05-07 Thread Daniel Fetchinson
> On behalf of the Python development team, I'm thrilled to announce the first > and > only beta release of Python 3.1. .. > Other features include an ordered dictionary implementation Are there plans for backporting this to python 2.x just as multiprocessing has been? I know that the

Re: Checking for required arguments when instantiating class.

2009-05-07 Thread Lacrima
On May 6, 3:36 pm, Chris Rebert wrote: > On Wed, May 6, 2009 at 5:24 AM, Piet van Oostrum wrote: > > > > >> Lacrima (L) wrote: > > >>L> Hello! > >>L> For example I have two classes: > > >> class First: > >>L>     def __init__(self, *args, **kwargs): > >>L>             pass > > >> cla

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Steven D'Aprano
On Thu, 07 May 2009 00:03:11 -0700, OldGrantonian wrote: > So I now have c:\Python 2.5 and c:\Python 2.6 > > On the virtualenv web site, the instructions for use are: > > $ python virtualenv.py ENV > > My question is, which "python" should I use on this command line: 2.5 or > 2.6? I'm not an e

Re: Simple way of handling errors

2009-05-07 Thread Peter Otten
TomF wrote: > As a relative newcomer to Python, I like it a lot but I'm dismayed at > the difficulty of handling simple errors. In Perl if you want to > anticipate a file-not-found error you can simply do: > > open($file) or die("open($file): $!"); > > and you get an intelligible error message

idea

2009-05-07 Thread r-w
Redirect sys.stderr to the log file in ANUGA logging. This might catch unexpected exceptions. -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension question

2009-05-07 Thread Lie Ryan
Steven D'Aprano wrote: "If you’ve got the stomach for it, list comprehensions can be nested. They are a powerful tool but – like all powerful tools – they need to be used carefully, if at all." How does this discourage the use of list comprehensions? At most, it warns that complicated list com

Re: list comprehension question

2009-05-07 Thread Lie Ryan
Lie Ryan wrote: Steven D'Aprano wrote: "If you’ve got the stomach for it, list comprehensions can be nested. They are a powerful tool but – like all powerful tools – they need to be used carefully, if at all." How does this discourage the use of list comprehensions? At most, it warns that com

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Ant
On May 7, 8:03 am, OldGrantonian wrote: ... > I had Python 2.6 on my laptop. > > I needed "easyinstall" to install virtualenv. During installation of > easyinstall, I got the message "Python 2.5 not found" > > So I installed Python 2.5, then installed virtualenv > > So I now have c:\Python 2.5 and

Re: list comprehension question

2009-05-07 Thread Lie Ryan
Scott David Daniels wrote: John Posner wrote: Shane Geiger wrote: if type(el) == list or type(el) is tuple: A tiny improvement: if type(el) in (list, tuple): or (even better) if isinstance(el, (list, tuple)) However, it is my contention that you shouldn't be flattening by typ

Statically linked extension and relative import

2009-05-07 Thread David Cournapeau
Hi, I am trying to build a 3rd party extension and link it statically to python. I managed to get things working by customizing Setup.local in python source tree, but I have a problem for imports of the 'foo.bar' form. For example, let's say the 3rd party module is laid out as follows: foo/__init

Re: Logging exceptions to a file

2009-05-07 Thread Lie Ryan
Pierre GM wrote: All, I need to log messages to both the console and a given file. I use the following code (on Python 2.5) import logging # logging.basicConfig(level=logging.DEBUG,) logfile = logging.FileHandler('log.log') logfile.setLevel(level=logging.INFO) logging.getLogger('').addHandler(l

About Odfpy links

2009-05-07 Thread shruti surve
hey all, For my project, i am using ODFpy open office spreadsheets. I am creating ledgers in python ie.ledger.py. So when i run ledger.py, spreadsheet will be opened in open office. since ledger is made of number of accounts, i am creating multiple tables for all accounts in single spreadsheet. S

Re: Python-list Digest, Vol 68, Issue 79

2009-05-07 Thread shruti surve
> > > 3. Re: About ODFPY links (Terry Reedy) > > > > > > > -- Forwarded message -- > From: Terry Reedy > To: python-list@python.org > Date: Wed, 06 May 2009 19:02:59 -0400 > Subject: Re: About ODFPY links > shruti surve wrote: > >> hey all, >> For my project, i am using ODFpy op

Re: Simple way of handling errors

2009-05-07 Thread Stephen Hansen
> If it fails, you get both a straight-forward error message and a useful > traceback: > > Traceback (most recent call last): > File "", line 1, in > IOError: [Errno 2] No such file or directory: 'foomanchu' > > > The only reason you would bother going to the time and effort of catching > the err

Re: Simple way of handling errors

2009-05-07 Thread Steven D'Aprano
On Wed, 06 May 2009 20:21:38 -0700, TomF wrote: >> The only reason you would bother going to the time and effort of >> catching the error, printing your own error message, and then exiting, >> is if you explicitly want to hide the traceback from the user. > > Well, to me, exposing the user to suc

Re: idea

2009-05-07 Thread Diez B. Roggisch
r-w wrote: > Redirect sys.stderr to the log file in ANUGA logging. > This might catch unexpected exceptions. brillant. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread OldGrantonian
Thanks to both Steven D'Aprano and Ant :) >> Sounds like you've downloaded the Python 2.5 version of Easy Install. There's no Python 2.6 version of EasyInstall :( For 2.5, there is: setuptools-0.6c9.win32-py2.5.exe But for 2.6, it's: setuptools-0.6c9-py2.6.egg For any other egg file, I woul

Re: The Fujitsu Lifebook A6120

2009-05-07 Thread Diez B. Roggisch
> > Does it run Python? > > (sorry, could not resist) You could at least resist to quote the spammers url, so it doesn't get higher pagerank. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Why there is a parameter named "self" for classmethod function?

2009-05-07 Thread Aaron Brady
On May 7, 1:29 am, Steven D'Aprano wrote: > On Thu, 07 May 2009 00:39:28 -0400, Terry Reedy wrote: > > Functions that refer to neither the class nor an instance thereof can > > usually be moved outside the class altogether.  Python is not Java.  I > > believe staticmethod() was mainly added becaus

Re: Statically linked extension and relative import

2009-05-07 Thread Andrew MacIntyre
David Cournapeau wrote: Hi, I am trying to build a 3rd party extension and link it statically to python. I managed to get things working by customizing Setup.local in python source tree, but I have a problem for imports of the 'foo.bar' form. For example, let's say the 3rd party module is laid o

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Duncan Booth
OldGrantonian wrote: > Thanks to both Steven D'Aprano and Ant :) > >>> Sounds like you've downloaded the Python 2.5 version of Easy Install. > > There's no Python 2.6 version of EasyInstall :( I wonder what I've been running then? > > For 2.5, there is: > > setuptools-0.6c9.win32-py2.5.exe

Re: Statically linked extension and relative import

2009-05-07 Thread David Cournapeau
On Thu, May 7, 2009 at 8:34 PM, Andrew MacIntyre wrote: > David Cournapeau wrote: >> >> Hi, >> >> I am trying to build a 3rd party extension and link it statically to >> python. I managed to get things working by customizing Setup.local in >> python source tree, but I have a problem for imports of

ply and threads

2009-05-07 Thread dean
I have two threads that exchange information by passing messages. I wanted to parse those messages with ply. I'd prefer using two independent parsers so that I can avoid using locks. Can somebody explain how to do this with ply? Ply seems to be doing a lot of odd things, such as reading the the py

Open the franchisee of Karvy

2009-05-07 Thread garryvin
Karvy stock broking introduces, Karvy Fortune a business opportunity for individuals in similar business from Karvy, it gives the opportunity to associate with “Karvy Family” as Franchisee, Remisser, or as an Independent Financial Advisors. Karvy Stock Broking Ltd ranks among 5 stock brokers in Ind

How should I use grep from python?

2009-05-07 Thread Matthew Wilson
I'm writing a command-line application and I want to search through lots of text files for a string. Instead of writing the python code to do this, I want to use grep. This is the command I want to run: $ grep -l foo dir In other words, I want to list all files in the directory dir that contain

Re: Code works fine except...

2009-05-07 Thread MRAB
John Yeung wrote: On May 7, 12:30 am, Ross wrote: If I were to set up a dictionary that counted players used in the bye list and only allowed players to be added to the bye list if they were within 2 of the least used player, would this be a good approach for managing bye selection or would usi

Re: Checking for required arguments when instantiating class.

2009-05-07 Thread Piet van Oostrum
> Chris Rebert (CR) wrote: >CR> On Wed, May 6, 2009 at 5:24 AM, Piet van Oostrum wrote: Lacrima (L) wrote: >L> But what if I have to instantiate any class with 3 or 4 required >L> arguments? How can I do it? >>> >>> cls.__init__.im_func.__code__.co_argcount >>> >>> This will inc

Re: [Python-Dev] [RELEASED] Python 3.1 beta 1

2009-05-07 Thread Scott David Daniels
Daniel Fetchinson wrote: Other features include an ordered dictionary implementation Are there plans for backporting this to python 2.x just as multiprocessing has been? Why not grab the 3.1 code and do it yourself for your 2.X's? It should be far less work than attempting something as fidget

Re: How should I use grep from python?

2009-05-07 Thread Diez B. Roggisch
Matthew Wilson wrote: > I'm writing a command-line application and I want to search through lots > of text files for a string. Instead of writing the python code to do > this, I want to use grep. > > This is the command I want to run: > > $ grep -l foo dir > > In other words, I want to list al

Re: Logging exceptions to a file

2009-05-07 Thread Pierre GM
On May 7, 5:32 am, Lie Ryan wrote: > Pierre GM wrote: > > All, > > I need to log messages to both the console and a given file. I use the > > following code (on Python 2.5) > > import logging > # > logging.basicConfig(level=logging.DEBUG,) > logfile = logging.FileHandler('log.l

Re: How should I use grep from python?

2009-05-07 Thread Tim Chase
I'm writing a command-line application and I want to search through lots of text files for a string. Instead of writing the python code to do this, I want to use grep. This is the command I want to run: $ grep -l foo dir In other words, I want to list all files in the directory dir that contai

Re: [Python-Dev] [RELEASED] Python 3.1 beta 1

2009-05-07 Thread Jesse Noller
On Thu, May 7, 2009 at 9:12 AM, Scott David Daniels wrote: > Daniel Fetchinson wrote: >>> >>> Other features include an ordered dictionary implementation >> >> Are there plans for backporting this to python 2.x just as >> multiprocessing has been? > > Why not grab the 3.1 code and do it yourself f

Re: How should I use grep from python?

2009-05-07 Thread Matthew Wilson
On Thu 07 May 2009 09:09:53 AM EDT, Diez B. Roggisch wrote: > Matthew Wilson wrote: >> >> As of May 2009, what is the recommended way to run an external process >> like grep and capture STDOUT and the error code? > > subprocess. Which becomes pretty clear when reading it's docs: Yeah, that's what

Get Into The World Of YOUSUF JUSANI

2009-05-07 Thread muhammadanushanif
Get The Most Valuable and Best For Investment Properties IN ASIA, !! Real Estate Builders.. Real Estate Dealer Buy, Sell REAL EASTAE IN GULF ,DUBAI AND AUSTRIA FOR MORE INFO http://www.yousufjusani.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How should I use grep from python?

2009-05-07 Thread Matthew Wilson
On Thu 07 May 2009 09:25:52 AM EDT, Tim Chase wrote: > While it doesn't use grep or external processes, I'd just do it > in pure Python: Thanks for the code! I'm reluctant to take that approach for a few reasons: 1. Writing tests for that code seems like a fairly large amount of work. I think I

Re: How should I use grep from python?

2009-05-07 Thread Marco Mariani
Matthew Wilson wrote: consensus. I could os.popen, commands.getstatusoutput, the subprocess module, backticks, etc. Backticks do_not_do what you think they do. And with py3k they're also as dead as a dead parrot. -- http://mail.python.org/mailman/listinfo/python-list

pyMPI error on mpi.barrier()

2009-05-07 Thread Dina Ali
Hello there I am trying to paralleize GA code using pyMPI. part of the code and and the error message is as below. i write the new positions in a file by root (which is mpi.rank = 0) then other processes are suppose to wait until the written in the file finishes to start evaluating the objective.

Re: [RELEASED] Python 3.1 beta 1

2009-05-07 Thread CTO
On May 7, 9:12 am, Scott David Daniels wrote: > Daniel Fetchinson wrote: > >> Other features include an ordered dictionary implementation > > > Are there plans for backporting this to python 2.x just as > > multiprocessing has been? > > Why not grab the 3.1 code and do it yourself for your 2.X's?

ANN: Python process utility (psutil) 0.1.2 released

2009-05-07 Thread Giampaolo Rodola'
Hi, I'm pleased to announce the 0.1.2 release of psutil: http://code.google.com/p/psutil === About === psutil is a module providing an interface for retrieving information on running processes and system utilization (CPU, memory) in a portable way by using Python, implementing many functionalitie

Re: Parsing text

2009-05-07 Thread Suraj Barkale
iainemsley googlemail.com> writes: > > Hi, > I'm trying to write a fairly basic text parser to split up scenes and > acts in plays to put them into XML. I've managed to get the text split > into the blocks of scenes and acts and returned correctly but I'm > trying to refine this and get the rele

Re: FLV download script works, but I want to enhance it

2009-05-07 Thread Aahz
In article , The Music Guy wrote: > >After I download the files, I usually want to convert them to another >video format using command line tools, and I usually convert each one >in a separate terminal since that way they can all be converted at the >same time rather than one-by-one. Oddly enough

Re: How should I use grep from python?

2009-05-07 Thread Nick Craig-Wood
Matthew Wilson wrote: > I'm writing a command-line application and I want to search through lots > of text files for a string. Instead of writing the python code to do > this, I want to use grep. > > This is the command I want to run: > > $ grep -l foo dir > > In other words, I want to l

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Krishnakant
I have another question in this same context. I have python 2.6 and want to set up a vertualenv in /opt/turbogears/python2.5. Then use this for all the things a turbogears based application would need for project execution. so I have decided that I will download python 2.5 and compile it with ./co

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Diez B. Roggisch
Krishnakant wrote: > I have another question in this same context. > I have python 2.6 and want to set up a vertualenv > in /opt/turbogears/python2.5. > Then use this for all the things a turbogears based application would > need for project execution. > > so I have decided that I will download p

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Krishnakant
> You are confusing virtualenv with a custom-build python. You can of course > use VE with a custom-build python, but then there isn't as much use for it, > as you then have a distinct python-instance already - unless you are going > to share it amongst projects, which then leads to the question w

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread Diez B. Roggisch
Krishnakant wrote: > >> You are confusing virtualenv with a custom-build python. You can of >> course use VE with a custom-build python, but then there isn't as much >> use for it, as you then have a distinct python-instance already - unless >> you are going to share it amongst projects, which th

tkinter and widget placement after resizing

2009-05-07 Thread jamieson
Hello, I've got a fairly simple GUI that places pmw.EntryFields into a window starting in the upper left corner. When the first column is filled with these widgets I'd like to start a new column and continue placement, and so on. It is working now with the grid manager if I explicitly set the ma

Re: Self function

2009-05-07 Thread Francis Carr
Scheme is arguably the programming language with the most support for recursion, including the most complete support for tail-call optimization, constructs like "letrec" to define collections of multiply-recursive functions (which get used very frequently -- by no means is it an uncommon situation,

Unable to build libpython2.5.so on OS X 10.4

2009-05-07 Thread Eric Winter
Hi all. I'm trying to build some internal code that needs to link against libpython2.5.so on a OS X 10.4 (Tiger) machine. It seems that no matter what combination of options and environment variables I give to the configure script from python 2.5.1, all I get is the libpython2.5.a (the static libra

P2P text chat engine

2009-05-07 Thread Navanjo
If you have the source code of a p2p text chat engine please send to me -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple way of handling errors

2009-05-07 Thread TomF
On 2009-05-07 01:01:57 -0700, Peter Otten <__pete...@web.de> said: TomF wrote: As a relative newcomer to Python, I like it a lot but I'm dismayed at the difficulty of handling simple errors. In Perl if you want to anticipate a file-not-found error you can simply do: open($file) or die("open

Re: Unable to build libpython2.5.so on OS X 10.4

2009-05-07 Thread Christian Heimes
Eric Winter schrieb: > Hi all. I'm trying to build some internal code that needs to link > against libpython2.5.so on a OS X 10.4 (Tiger) machine. It seems that > no matter what combination of options and environment variables I give > to the configure script from python 2.5.1, all I get is the > l

Re: SQL and CSV

2009-05-07 Thread Nick
On May 5, 8:27 pm, Tim Golden wrote: > Nick wrote: > > Part of the problem is that the 'selection' needs to be in a config > > file. I can put the if row['status'] != 'Cancelled': return True into > > a config, read it and eval it, but its not quite as clean as ansql > > route. > > Still not clear

Re: [RELEASED] Python 3.1 beta 1

2009-05-07 Thread Scott David Daniels
CTO wrote: ... If OrderedDict winds up being backported, will you include it in 2.x? I see it in the 2.7 sources. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Unable to build libpython2.5.so on OS X 10.4

2009-05-07 Thread elwinter
Christian, Thanks for the response. I knew about the .dylib suffix, but that's not being built either, even when I supply the --enable-shared option to configure. I also tried the --enable-unicode configure option, but no joy. Might there be some additional OS X package I need to install to get th

Re: Python 3.1 beta 1

2009-05-07 Thread bearophileHUGS
I appreciate the tables "Infinite Iterators" and "Iterators terminating on the shortest input sequence" at the top of the itertools module, they are quite handy. I'd like to see similar summary tables at the top of other docs pages too (such pages are often quite long), for example the collections

Re: Unable to build libpython2.5.so on OS X 10.4

2009-05-07 Thread Ned Deily
In article , Eric Winter wrote: > Hi all. I'm trying to build some internal code that needs to link > against libpython2.5.so on a OS X 10.4 (Tiger) machine. It seems that > no matter what combination of options and environment variables I give > to the configure script from python 2.5.1, all I

What would YOU like to see in a txt to html converter?

2009-05-07 Thread Florian Wollenschein
As you might have mentioned I'm just working on a txt to html converter called "thc". This project is intended for me to learn Python and now pyQT4 to which I changed a few days ago (started with Tkinter). I have implemented the following features so far: - Giving a title for the html - Choose

Re: Logging exceptions to a file

2009-05-07 Thread Stephen Hansen
> > > > > So far so good, but I'd like to record (possibly unhandled) exceptions > > > in the logfile. > > > * Do I need to explicitly trap every single exception ? > > > * In that case, won't I get 2 log messages on the console (as > > > illustrated in the code below: > Check out sys.excepthook,

Re: Self function

2009-05-07 Thread Arnaud Delobelle
Luis Alberto Zarrabeitia Gomez writes: > A bit offtopic: a while ago I think I saw a recipe for a decorator > that, via bytecode hacks, would bind otherwise global names to the > local namespace of the function. Can anyone remember it/point me to > it? An @bind decorator that would 'localize' all

Re: Logging exceptions to a file

2009-05-07 Thread segfaulthunter
On May 7, 1:19 pm, Pierre GM wrote: > On May 7, 5:32 am, Lie Ryan wrote: > > > > > Pierre GM wrote: > > > All, > > > I need to log messages to both the console and a given file. I use the > > > following code (on Python 2.5) > > > import logging > > # > > logging.basicConfig(level=

Re: Unable to build libpython2.5.so on OS X 10.4

2009-05-07 Thread elwinter
Hi Ned. The Python module I am building is actually the Python module for ROOT, a large package from CERN. However, the problem arises before that code enters the picture, when I am building Python itself. All I want to do is create "libpython2.5.dylib", or its equivalent, and I can't seem to make

Wing vs Netbeans IDE?

2009-05-07 Thread Lawrence Hanser
Dear Colleagues, I have been using NetBeans for a month or so now and am reasonably happy with it. I'm considering other options, and ran across Wing. I'm interested in opinions about NetBeans and Wing as IDE for Python. Thanks, Larry -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension question

2009-05-07 Thread J Kenneth King
Steven D'Aprano writes: > On Wed, 06 May 2009 09:48:51 -0400, J Kenneth King wrote: > >> Emile van Sebille writes: >> >>> On 5/5/2009 9:15 AM J Kenneth King said... >>> List comprehensions can make a reader of your code apprehensive because it can read like a run-on sentence and thus

Re: Wing vs Netbeans IDE?

2009-05-07 Thread nnp
I've tried Wing but not NetBeans. I would personally recommend Eclipse with the PyDev plugin. I prefer it to Wing by *far* and if you prefer Eclipse to NetBeans for Java then it might be worth your while checking it out. If you take a few minutes to learn a few of the shortcuts in Eclipse you can r

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread Dotan Cohen
> As you might have mentioned I'm just working on a txt to html converter > called "thc". This project is intended for me to learn Python and now pyQT4 > to which I changed a few days ago (started with Tkinter). > > I have implemented the following features so far: > > - Giving a title for the html

Re: Unable to build libpython2.5.so on OS X 10.4

2009-05-07 Thread Ned Deily
In article <0e05eca2-b460-4e01-aa54-cc1055f51...@q14g2000vbn.googlegroups.com>, elwinter wrote: > The Python module I am building is actually the Python module > for ROOT, a large package from CERN. However, the problem arises > before that code enters the picture, when I am building Python itse

RE: Wing vs Netbeans IDE?

2009-05-07 Thread Benjamin J. Racine
I'd love to see an updated shootout between these three, as I cannot for the life of me seem to be able to settle down with one of them. Things I don't like: Wing's lack of integrated mercurial/svn support. The clunkiness and scattered plugin approach of Eclipse (the latter is relavent when sta

Updating an Imported Function

2009-05-07 Thread Donovan Parks
Hello, I'm new to Python and have what is probably a very basic question. I am writing a helloWorld() function within a file called helloWorld.py: def helloWorld(): print 'hi' Now, I can import and run this function: import helloWorld helloWorld.helloWorld() Which will print 'hi' as ex

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread norseman
Dotan Cohen wrote: As you might have mentioned I'm just working on a txt to html converter called "thc". This project is intended for me to learn Python and now pyQT4 to which I changed a few days ago (started with Tkinter). I have implemented the following features so far: - Giving a title for

Downloading most recently modified files

2009-05-07 Thread AllenLars
I am trying to code a script that will allow me to go to ftp site and download files based on most recently modified file (date, time). I am brand new to programming. Any and all help is appreciated. -- View this message in context: http://www.nabble.com/Downloading-most-recently-modified-file

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread Will Wang
> "Florian" == Florian Wollenschein > writes: Florian> As you might have mentioned I'm just working on a txt to html converter called Florian> "thc". This project is intended for me to learn Python and now pyQT4 to which I Florian> changed a few days ago (started with Tkint

Re: Updating an Imported Function

2009-05-07 Thread Diez B. Roggisch
Donovan Parks schrieb: Hello, I'm new to Python and have what is probably a very basic question. I am writing a helloWorld() function within a file called helloWorld.py: def helloWorld(): print 'hi' Now, I can import and run this function: import helloWorld helloWorld.helloWorld() Wh

Re: Threading and GIL

2009-05-07 Thread Carl Banks
On May 7, 12:20 am, googler.1.webmas...@spamgourmet.com wrote: > thats the reason why its not working. Imagine the end() method of the > thread object is called so the C++ Function is opened where the code > for this method is in. You're going to have to post some code if you want better help; thi

Newcomer to Python tutorial question

2009-05-07 Thread Alan Cameron
I am not sure of this is the right place to ask a question about the tutorial http://docs.python.org/3.0/tutorial/datastructures.html#sets why is the printed result of >>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} >>> print(basket) {'orange', 'banana', 'pear', 'apple'}

Get Into The World Of YOUSUF JUSANI

2009-05-07 Thread muhammadanushanif
Get The Most Valuable and Best For Investment Properties IN ASIA, !! Real Estate Builders.. Real Estate Dealer Buy, Sell REAL EASTAE IN GULF ,DUBAI AND AUSTRIA FOR MORE INFO http://www.yousufjusani.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Newcomer to Python tutorial question

2009-05-07 Thread Chris Rebert
On Thu, May 7, 2009 at 11:35 AM, Alan Cameron wrote> I am not sure of this is the right place to ask a question about the > tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'ban

Re: Newcomer to Python tutorial question

2009-05-07 Thread Arnaud Delobelle
"Alan Cameron" writes: > I am not sure of this is the right place to ask a question about the > tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) >

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread Florian Wollenschein
Will Wang wrote: "Florian" == Florian Wollenschein writes: Florian> As you might have mentioned I'm just working on a txt to html converter called Florian> "thc". This project is intended for me to learn Python and now pyQT4 to which I Florian> changed a few days ago (started wi

Re: Newcomer to Python tutorial question

2009-05-07 Thread Florian Wollenschein
Alan Cameron wrote: I am not sure of this is the right place to ask a question about the tutorial http://docs.python.org/3.0/tutorial/datastructures.html#sets why is the printed result of basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) {'orange', 'banana', 'p

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread News123
Florian Wollenschein wrote: > As you might have mentioned I'm just working on a txt to html converter > called "thc". This project is intended for me to learn Python and now > pyQT4 to which I changed a few days ago (started with Tkinter). > > I have implemented the following features so far: > >

Re: Newcomer to Python tutorial question

2009-05-07 Thread Alan Cameron
"Alan Cameron" wrote in message news:hrfml.50224$tb.4...@newsfe07.ams2... >I am not sure of this is the right place to ask a question about the >tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple',

Re: Newcomer to Python tutorial question

2009-05-07 Thread Peter Otten
Alan Cameron wrote: > I am not sure of this is the right place to ask a question about the > tutorial > > http://docs.python.org/3.0/tutorial/datastructures.html#sets > > why is the printed result of > basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket) > {

Re: Could this expression parser be more 'Pythonic'?

2009-05-07 Thread Amr
Hi John, Thanks for the tips, I will check them out. --Amr -- http://mail.python.org/mailman/listinfo/python-list

subprocess.Popen howto?

2009-05-07 Thread OJOHANS
Hi, I have problems understanding the subprocess.Popen object. I have a iterative calculation in a process running and I want to pipe the output (stdout) from this calculation to a Python script. Let me include a simple code that simulates the calculating process: /* This code simulates a big

[RELEASED] Python 3.1 beta 1

2009-05-07 Thread Benjamin Peterson
On behalf of the Python development team, I'm thrilled to announce the first and only beta release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of features and changes Python 3.0 introduced. For example, the new I/O system has been rewritten in C for speed. File system

Re: Simple way of handling errors

2009-05-07 Thread Matt Nordhoff
Steven D'Aprano wrote: > On Wed, 06 May 2009 20:21:38 -0700, TomF wrote: > >>> The only reason you would bother going to the time and effort of >>> catching the error, printing your own error message, and then exiting, >>> is if you explicitly want to hide the traceback from the user. >> Well, to

Re: hex(dummy)[2:] - issue...

2009-05-07 Thread Florian Wollenschein
Tim Chase wrote: I need some advice :-) I'm using hex(dummy)[2:] to represent a color in hexadecimal format for the bgcolor in an html file. dummy is the color value in RGB of course... Now, if there's an R, G or B value of zero, this command only prints one single 0 instead of two. What's w

Re: P2P text chat engine

2009-05-07 Thread Diez B. Roggisch
Navanjo schrieb: If you have the source code of a p2p text chat engine please send to me I found that & a pot of gold under my bed. Care to give me your address so that I can send it to you? SCNR, Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Self function

2009-05-07 Thread bearophileHUGS
Francis Carr: I don't know who are you talking to, but I can give you few answers anyway. >collections of multiply-recursive functions (which get used very frequently -- >by no means is it an uncommon situation, as you suggest in your initial post),< They may be frequent in Scheme (because it's

Re: Newcomer to Python tutorial question

2009-05-07 Thread Chris Rebert
On Thu, May 7, 2009 at 11:58 AM, Alan Cameron wrote: > "Alan Cameron" wrote in message > news:hrfml.50224$tb.4...@newsfe07.ams2... >>I am not sure of this is the right place to ask a question about the >>tutorial >> >> http://docs.python.org/3.0/tutorial/datastructures.html#sets >> >> why is the

Re: What would YOU like to see in a txt to html converter?

2009-05-07 Thread Stefan Behnel
Florian Wollenschein wrote: > Will Wang wrote: >> *emphasis* >> **strong emphasis** >> ***very strong emphasis*** >> _underlined_ >> =verbatim and monospace= >> >> emacs-muse : http://mwolson.org/projects/EmacsMuse.html > > Thank you for this information. I already thought of using dots or > aster

RE: Wing vs Netbeans IDE?

2009-05-07 Thread J. Clifford Dyer
On Thu, 2009-05-07 at 10:49 -0700, Benjamin J. Racine wrote: > I'd love to see an updated shootout between these three, as I cannot for the > life of me seem to be able to settle down with one of them. > > Things I don't like: > Wing's lack of integrated mercurial/svn support. Wing *does* have

Re: Newcomer to Python tutorial question

2009-05-07 Thread Alan Cameron
"Chris Rebert" wrote in message news:mailman.5238.1241723354.11746.python-l...@python.org... > On Thu, May 7, 2009 at 11:58 AM, Alan Cameron > wrote: >> "Alan Cameron" wrote in message >> news:hrfml.50224$tb.4...@newsfe07.ams2... >>>I am not sure of this is the right place to ask a question ab

Re: Newcomer to Python tutorial question

2009-05-07 Thread Peter Otten
Alan Cameron wrote: > "Alan Cameron" wrote in message > news:hrfml.50224$tb.4...@newsfe07.ams2... >>I am not sure of this is the right place to ask a question about the >>tutorial >> >> http://docs.python.org/3.0/tutorial/datastructures.html#sets >> >> why is the printed result of >> > basket

Re: Threading and GIL

2009-05-07 Thread googler . 1 . webmaster
hey, thanks, that works fine. I wrapped it around, done a lot of tests and it works fine. Just had done a few other things to make it stable. cheers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.1 beta 1

2009-05-07 Thread pruebauno
On May 6, 9:32 pm, Benjamin Peterson wrote: > On behalf of the Python development team, I'm thrilled to announce the first > and > only beta release of Python 3.1. > > Python 3.1 focuses on the stabilization and optimization of features and > changes > Python 3.0 introduced.  For example, the ne

Re: Which python version do I use with "virtualenv"?

2009-05-07 Thread OldGrantonian
On May 7, 12:34 pm, Duncan Booth wrote: > OldGrantonian wrote: > > Thanks to both Steven D'Aprano and Ant :) > > >>>  Sounds like you've downloaded the Python 2.5 version of Easy Install. > > > There's no Python 2.6 version of EasyInstall :( > > I wonder what I've been running then? > > > > > For

  1   2   >