cannot execute binary file (Python 3.0.1)

2009-03-01 Thread cf29
Greetings, On Mac OS 10.5.6, I updated Python to version 3.0.1. When I want to run a py file, I get an error: xxx:~ xxx$ cd '/Users/xxx/Documents/programmingPractice/' '/usr/ local/bin/python' '/Users/xxx/Documents/programmingPractice/ python_file.py' echo Exit status: $? exit 1 -bash:

Re: cannot execute binary file (Python 3.0.1)

2009-03-01 Thread cf29
want to run py file either with Python Launcher.app or directly from BBEdit (the text editor i use). I get the cannot execute binary file error. In /usr/local/bin/ the python symbolic link is connected to Python v3 Charly http://cf29.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: cannot execute binary file (Python 3.0.1)

2009-03-01 Thread cf29
. And now it works fine. Usually I use to run python scripts from BBEdit itself and this is now working as expected. What a great place to find answers! Thanks again. Charly http://cf29.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: TextWrangler and new Python version (Mac)

2008-01-05 Thread cf29
Thank you Jean, I could fix this problem. Creating the symbolic link wasn't really obvious though. They also say about the documentation: *Extract the documentation files, and place them in some suitable location, e.g. ~/Library/Python-Docs *Edit your environment.plist file, and create an

TextWrangler and new Python version (Mac)

2008-01-04 Thread cf29
I installed Python 2.5 on my Mac (OS X Tiger). When running scripts with the TextWrangler Run command it is using the system installed version of Python (2.3). If I run the scripts with the Apple Terminal it uses the new version (2.5). Is there any way to ask TextWrangler to use the new version

documentation

2007-12-28 Thread cf29
Which website would you recommend for a great documentation about Python? I am looking for a list of methods and properties of all the Python elements with syntax examples. -- http://mail.python.org/mailman/listinfo/python-list

Re: 5 queens

2007-12-24 Thread cf29
On Dec 23, 2:04 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: def combinations(seq, n):     if n == 0:         yield []     else:         for i in xrange(len(seq)):             for cc in combinations(seq[i+1:], n-1):                 yield [seq[i]]+cc for c in

Re: 5 queens

2007-12-23 Thread cf29
To make it simple and not have to deal with the 8 queens problem that is different with the 5 queens one, I'll ask in a different way. I am not familiar with implementing in Python such terms as standard depth-first search of the solution space, permutation, recursion, 'canonical' form, ... I

5 queens

2007-12-22 Thread cf29
Greetings, I designed in JavaScript a small program on my website called 5 queens. (http://www.cf29.com/design/dame5_eng.php) The goal is to control all the chess board with five queens that do not attack each other. I found manually many solutions to this problem (184 until now) and wanted to

Re: 5 queens

2007-12-22 Thread cf29
On Dec 22, 11:05 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:         Only 5? The classic algorithm is 8-queens on a standard 8x8 board, as I recall... This is a different problem. You have to control all the squares with only 5 queens. In the 8 queens problem you have to put 8 safe queens. I

Re: 5 queens

2007-12-22 Thread cf29
On Dec 23, 12:39 am, Jervis Liang [EMAIL PROTECTED] wrote: On Dec 22, 2:36 pm, cf29 [EMAIL PROTECTED] wrote: The goal is to control all the chess board with five queens that do not attack each other. I found manually many solutions to this problem (184 until now) How did you find 184

Re: 5 queens

2007-12-22 Thread cf29
On Dec 23, 1:49 am, John Machin [EMAIL PROTECTED] wrote: How did you find 184 solutions? Wolfram says there are 91 distinct solutions for 5-queens on an 8x8 board with no two queens attacking each other. It's *91* distinct solutions to what appears to be *exactly* your problem: k

Re: 5 queens

2007-12-22 Thread cf29
Sorry again I forgot a part of the function in my previous post: --- # add nbQueens (5) new queens on safe squares def newQueens(nbQueens=5): solution = [] # one solution for i in range(len(board)): # 64 squares