答复: how to remove \n in the list

2008-04-14 Thread Penny Y.
> lines[:] = [line.rstrip('\n') for line in lines] why not just: lines = [line.rstrip('\n') for line in lines] what's the difference between lines[:] and lines here? Thanks. -邮件原件- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 Gabriel Genellina 发送时间: 2008年4月14日 12:59 收件人: python-

Game design : Making computer play

2008-04-14 Thread v4vijayakumar
In computer based, two player, board games, how to make computer play? Are there any formal ways to _teach_ computer, to choose best possible move? I know this is kind of off-topic here. Please redirect me, if there are more appropriate newsgroup. Many thanks. -- http://mail.python.org/mailman/l

Re: Java or C++?

2008-04-14 Thread Bob Martin
in 342367 20080414 074410 [EMAIL PROTECTED] wrote: >Hello, I was hoping to get some opinions on a subject. I've been >programming Python for almost two years now. Recently I learned Perl, >but frankly I'm not very comfortable with it. Now I want to move on >two either Java or

Re: Java or C++?

2008-04-14 Thread bdsatish
On Apr 14, 12:21 pm, Bob Martin <[EMAIL PROTECTED]> wrote: > in 342367 20080414 074410 [EMAIL PROTECTED] wrote: > > >Hello, I was hoping to get some opinions on a subject. I've been > >programming Python for almost two years now. Recently I learned Perl, > >b

Re: Game design : Making computer play

2008-04-14 Thread Marc 'BlackJack' Rintsch
On Mon, 14 Apr 2008 00:13:56 -0700, v4vijayakumar wrote: > In computer based, two player, board games, how to make computer play? > Are there any formal ways to _teach_ computer, to choose best possible > move? That depends on the type of the game. For a certain class of games one can use the `m

Different times between Python and System

2008-04-14 Thread Josh
Hi, Anyone know why python would not show the same time that my system shows? [EMAIL PROTECTED]:~$ date Mon Apr 14 01:27:36 MDT 2008 [EMAIL PROTECTED]:~$ python Python 2.4.5 (#2, Mar 12 2008, 00:15:51) [GCC 4.2.3 (Debian 4.2.3-2)] on linux2 Type "help", "copyright", "credits" or "license" for mor

Re: Game design : Making computer play

2008-04-14 Thread Richard Heathfield
v4vijayakumar said: > In computer based, two player, board games, how to make computer play? Write some code that works out what the computer player should do. If you want a better answer, ask a better question. > Are there any formal ways to _teach_ computer, to choose best possible > move? T

Re: Different times between Python and System

2008-04-14 Thread Josh
Hmm... That didn't work out so well that time. I feel like an idiot. Previously there has been an hour difference between the system time and the time that python reports. On Apr 14, 1:29 am, Josh <[EMAIL PROTECTED]> wrote: > Hi, > > Anyone know why python would not show the same time that my s

Remote mac address

2008-04-14 Thread Matias Surdi
Anyone knows how having the IP address of a host on the lan could I get the mac address of that hosr? p/d: Parsing the output of arp -a is not an option. Thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: Java or C++?

2008-04-14 Thread xakee
On Apr 14, 11:44 am, [EMAIL PROTECTED] wrote: > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure w

Re: Java or C++?

2008-04-14 Thread Brian
On Mon, Apr 14, 2008 at 3:24 AM, bdsatish <[EMAIL PROTECTED]> wrote: > On Apr 14, 12:21 pm, Bob Martin <[EMAIL PROTECTED]> wrote: > > in 342367 20080414 074410 [EMAIL PROTECTED] wrote: > > > > >Hello, I was hoping to get some opinions on a subject. I've be

Re: Game design : Making computer play

2008-04-14 Thread xakee
On Apr 14, 12:13 pm, v4vijayakumar <[EMAIL PROTECTED]> wrote: > In computer based, two player, board games, how to make computer play? > Are there any formal ways to _teach_ computer, to choose best possible > move? > > I know this is kind of off-topic here. Please redirect me, if there > are more

How to get the version of a file

2008-04-14 Thread J Wilson
Does anyone know how to get the version of an application on OS X (i.e. the version string that appears in the "Version" field in the "Get Info" window for an application)? I'm running OS 10.4.11, python 2.5. -- http://mail.python.org/mailman/listinfo/python-list

Re: Game design : Making computer play

2008-04-14 Thread v4vijayakumar
On Apr 14, 12:35 pm, Richard Heathfield <[EMAIL PROTECTED]> wrote: > v4vijayakumar said: > > In computer based, two player, board games, how to make computer play? > > Write some code that works out what the computer player should do. If you > want a better answer, ask a better question. I am just

Re: Java or C++?

2008-04-14 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure which. Which one do

Re: Java or C++?

2008-04-14 Thread Marc 'BlackJack' Rintsch
On Mon, 14 Apr 2008 00:49:13 -0700, xakee wrote: > Well if you need an easier transition, go for java. But personally i > would recommend you to go for C/C++. What's that C/C++!? C and C++ are quite different languages. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/l

Re: How to get the version of a file

2008-04-14 Thread martin . laloux
you need appscript "that allows you to control scriptable Mac OS X applications from Python" http://pypi.python.org/pypi/appscript/0.18.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Game design : Making computer play

2008-04-14 Thread Richard Heathfield
[comp.programming added, and followups set to that group] v4vijayakumar said: > On Apr 14, 12:35 pm, Richard Heathfield <[EMAIL PROTECTED]> wrote: >> v4vijayakumar said: >> > In computer based, two player, board games, how to make computer play? >> >> Write some code that works out what the compu

Re: Java or C++?

2008-04-14 Thread Robert Bossy
[EMAIL PROTECTED] wrote: > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure which. Which one do yo

Re: 答复: how to remove \n in the list

2008-04-14 Thread Gabriel Genellina
En Mon, 14 Apr 2008 04:08:06 -0300, Penny Y. <[EMAIL PROTECTED]> escribió: >> lines[:] = [line.rstrip('\n') for line in lines] > > why not just: > > lines = [line.rstrip('\n') for line in lines] > > > what's the difference between lines[:] and lines here? Thanks. My version (using [:]) replaces t

Re: 答复: how to remove \n in the list

2008-04-14 Thread Eric Brunel
(please avoid top-posting... corrected) On Mon, 14 Apr 2008 09:08:06 +0200, Penny Y. <[EMAIL PROTECTED]> wrote: > -邮件原件- > 发件人: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] 代表 Gabriel > Genellina > 发送时间: 2008年4月14日 12:59 > 收件人: python-list@python.org > 主题: Re: how to remove \n in the list

Re: How to get the version of a file

2008-04-14 Thread J Wilson
I'm not clear on how to use this to read the version resource. Specially, I need to get the version of Palm Conduit, which is, I guess, a "carbonized" shared library... or something. ? [EMAIL PROTECTED] wrote: > you need appscript "that allows you to control scriptable Mac OS X > applications

Re: 有中国人乎?

2008-04-14 Thread Jerry Fleming
Penny Y. wrote: > [EMAIL PROTECTED] 写道: >> Python这种语言有前途吗?在下想学他一学. > > hehe, so humorous you are! > Yes I think python has good future. > But it depends on what you use it to do. > If you're a singer, a financier, a historian etc, you don't need python. A singer uses his/here throat; a financier u

Chinese character become ??? by pymssql or pyodbc

2008-04-14 Thread James Su
I tried to use pymssql to access MSSQL 2000, with a table, I store Chinese Character in NVarchar field, Chinese Character display normally when I query them by MS SQL Query Analyzer under Windows or by unixODBC under Ubuntu. But when I query those data by pymssql or pyodbc, all Chinese Character di

Re: Game design : Making computer play

2008-04-14 Thread Willem
v4vijayakumar wrote: ) On Apr 14, 12:35 pm, Richard Heathfield <[EMAIL PROTECTED]> wrote: )> v4vijayakumar said: )> > In computer based, two player, board games, how to make computer play? )> )> Write some code that works out what the computer player should do. If you )> want a better answer, ask a

答复: 答复: how to remove \n in the list

2008-04-14 Thread Penny Y.
that's right. got it thanks. -邮件原件- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 Eric Brunel 发送时间: 2008年4月14日 16:17 收件人: python-list@python.org 主题: Re: 答复: how to remove \n in the list (please avoid top-posting... corrected) On Mon, 14 Apr 2008 09:08:06 +0200, Penny Y. <[EMAIL PRO

Re: Chinese character become ??? by pymssql or pyodbc

2008-04-14 Thread Jeroen Ruigrok van der Werven
-On [20080414 10:31], James Su ([EMAIL PROTECTED]) wrote: >But when I query those data by pymssql or pyodbc, all Chinese >Character display ??? instead. Sounds like you are getting typical Unicode replacement characters. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル

Re: Java or C++?

2008-04-14 Thread Marco Mariani
[EMAIL PROTECTED] wrote: > Which one do you think will educate me the best? Advanced javascript might teach you something too, and be very useful at the same time. Take a look at the Crockford lessons on Yahoo! Video. http://video.yahoo.com/watch/111593 http://video.yahoo.com/watch/111594 htt

Py2exe Json

2008-04-14 Thread [EMAIL PROTECTED]
I want to use json with py2exe but when I execute the program I have this errors : "Runtime Error : maximun recursion depth exceeded" Here is my code : import json jsonstr='{"toto":"toto"}' print json.read(jsonstr) and my setup #!/usr/bin/env python # -*- coding: latin-1 -*- import sys, os,

答复: Java or C++?

2008-04-14 Thread Penny Y.
Javascript is different from Java at all. Why not Perl? Perl is a functional language, that will show you another way of programming. Also C is good, will teach you some system level knowledge. :) -邮件原件- 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 Marco Mariani 发送时间: 2008年4月14日 16:

Python Workshop

2008-04-14 Thread m.moghimi
Hi, We are to hold a workshop about python (introduction). It will be two one hour and half sessions. I wanted to know which subjects do you suggest to be presented and is there a good presentation file (powerpoint or ...) about this on the net. We thought that it may be good that first session co

Re: py2exe, program has stoped working!?

2008-04-14 Thread skanemupp
> Is it a console program or a gui program? GUI > What happens when you run it without py2exe? it works perfectly, both from within python and launching from "windows" > Have you searched for "has stopped working" in (a) your source code yes no such message there > (b) the py2exe source code? no,

pygtk + threading.Timer

2008-04-14 Thread Dmitry Teslenko
Hello! I have simple chat application with pygtk UI. I want some event (for example update user list) to have place every n seconds. What's the best way to archive it? I tried threading.Timer but result is following: all events wait till exit of gtk main loop and only then they occur. Thanks in adv

Re: pygtk + threading.Timer

2008-04-14 Thread Jarek Zgoda
Dmitry Teslenko napisał(a): > I have simple chat application with pygtk UI. I want some event (for > example update user list) to have place every n seconds. > What's the best way to archive it? > I tried threading.Timer but result is following: all events wait till > exit of gtk main loop and onl

Re: Remote mac address

2008-04-14 Thread Michael Ströder
Matias Surdi wrote: > Anyone knows how having the IP address of a host on the lan could I get > the mac address of that hosr? > > p/d: Parsing the output of arp -a is not an option. But the ARP table is exactly what you need to access. This is probably system-specific. You could also try to

Re: text adventure game problem

2008-04-14 Thread Gabriel Genellina
En Fri, 11 Apr 2008 11:21:17 -0300, <[EMAIL PROTECTED]> escribió: > On Apr 11, 10:16 am, [EMAIL PROTECTED] wrote: >> On Apr 11, 1:40 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> >> > On Thu, 10 Apr 2008 05:06:42 -0700 (PDT), [EMAIL PROTECTED] >> > declaimed the following in comp.lang.python:

Re: Game design : Making computer play

2008-04-14 Thread v4vijayakumar
On Apr 14, 1:00 pm, v4vijayakumar <[EMAIL PROTECTED]> wrote: ... > I can post initial version of the game (implemented using html/ > javascript) in couple of hours here. The game is here, http://v4vijayakumar.googlepages.com/goats-and-tigers.html -- http://mail.python.org/mailman/listinfo/pyth

Sybase module 0.39 released

2008-04-14 Thread Sébastien Sablé
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is available here: http://downloads.sourceforge.net/python-sybase/python-sybase-0.39.tar.gz The module home pa

Re: Remote mac address

2008-04-14 Thread Huzaifa Sidhpurwala
Michael Stro"der wrote: > Matias Surdi wrote: > >> Anyone knows how having the IP address of a host on the lan could I get >> the mac address of that hosr? >> >> p/d: Parsing the output of arp -a is not an option. >> > > Any reason why arp is not an option? > But the ARP table is exac

Re: 答复: Java or C++?

2008-04-14 Thread Marco Mariani
Penny Y. wrote: > Javascript is different from Java at all. I think even rocks know that. Yet, some use of closure and prototype-based inheritance might be interesting to the OP. > Why not Perl? Come on, learning Perl after two years of Python? How harsh. > Perl is a functional language, And

Re: Game design : Making computer play

2008-04-14 Thread skanemupp
On 14 Apr, 09:13, v4vijayakumar <[EMAIL PROTECTED]> wrote: > In computer based, two player, board games, how to make computer play? > Are there any formal ways to _teach_ computer, to choose best possible > move? > > I know this is kind of off-topic here. Please redirect me, if there > are more app

Re: 答复: Java or C++?

2008-04-14 Thread Robert Bossy
Penny Y. wrote: > Perl is a functional language I guess you mean functional in the sense it works. RB -- http://mail.python.org/mailman/listinfo/python-list

Re: Java or C++?

2008-04-14 Thread lbonafide
On Apr 14, 2:24 am, bdsatish <[EMAIL PROTECTED]> wrote: > On Apr 14, 12:21 pm, Bob Martin <[EMAIL PROTECTED]> wrote: > > > in 342367 20080414 074410 [EMAIL PROTECTED] wrote: > > > >Hello, I was hoping to get some opinions on a subject. I've been > &g

Re: Game design : Making computer play

2008-04-14 Thread Richard Heathfield
[EMAIL PROTECTED] said: > On 14 Apr, 09:13, v4vijayakumar <[EMAIL PROTECTED]> > wrote: >> In computer based, two player, board games, how to make computer play? >> Are there any formal ways to _teach_ computer, to choose best possible >> move? >> >> I know this is kind of off-topic here. Please re

Re: Java or C++?

2008-04-14 Thread lbonafide
On Apr 14, 1:44 am, [EMAIL PROTECTED] wrote: > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure wh

Re: py2exe, program has stoped working!?

2008-04-14 Thread John Machin
On Apr 14, 7:24 pm, [EMAIL PROTECTED] wrote: > > Is it a console program or a gui program? > GUI > > What happens when you run it without py2exe? > > it works perfectly, both from within python and launching from > "windows" > > > Have you searched for "has stopped working" in > > (a) your source c

Re: Game design : Making computer play

2008-04-14 Thread Willem
Richard wrote: ) Here's the board (which bears only a slight resemblance to one I'd seen on ) the Web): ) ) +---+ ) | HORN $ | ) +---+---+---+---+---+---+ ) |L W| | $ | $ | |R W| ) +E-I+--CHEST+---+---+I-I+ ) |F N| | | | |G N| ) +T-G+---+---+---+-

Re: urllib working differently when run from crontab

2008-04-14 Thread Matthew Woodcraft
In article <[EMAIL PROTECTED]>, VictorMiller <[EMAIL PROTECTED]> wrote: > I've written a python script which, using urllib, and urllib2 will > fetch a number of files that that I'm interested in from various > websites (they're updated everyday). When I run the script from my > command line every

Process multiple files

2008-04-14 Thread Doran, Harold
Say I have multiple text files in a single directory, for illustration they are called "spam.txt" and "eggs.txt". All of these text files are organized in exactly the same way. I have written a program that parses each file one at a time. In other words, I need to run my program each time I want to

Re: Process multiple files

2008-04-14 Thread Paul Anton Letnes
Funny, I'm just doing exactly this: import os def main(): dataFolder = 'data/' fileList = os.listdir(dataFolder) for file in fileList: inFile = open(dataFolder + file, 'r') print 'read inFile & do something useful here' Clear as an... egg?

Re: Process multiple files

2008-04-14 Thread Robert Bossy
Doran, Harold wrote: > Say I have multiple text files in a single directory, for illustration > they are called "spam.txt" and "eggs.txt". All of these text files are > organized in exactly the same way. I have written a program that parses > each file one at a time. In other words, I need to run m

Re: Process multiple files

2008-04-14 Thread Tim Chase
> new_file = open('filename.txt', 'w') > params = open('eggs.txt', 'r') > do all the python stuff here > new_file.close() > > If these files followed a naming convention such as 1.txt and 2.txt I > can easily see how these could be parsed consecutively in a loop. > However, they are not and

pgdb: Debugging Python extensions made easier

2008-04-14 Thread SteveD
Hi guys, http://luaforge.net/frs/?group_id=327 pgdb.zip is an addition to scite-debug, which adds source debugging to the popular SciTE programmer's editor. gdbpy.zip is a standalone version which can be run from Emacs. These allow you to single-step from Python to C code in a debugger session.

Re: Process multiple files

2008-04-14 Thread Duncan Booth
"Doran, Harold" <[EMAIL PROTECTED]> wrote: > If these files followed a naming convention such as 1.txt and 2.txt I > can easily see how these could be parsed consecutively in a loop. > However, they are not and so is it possible to modify this code such > that I can tell python to parse all .txt f

Python GUI programming and boa or better ?

2008-04-14 Thread bvidinli
I program in python for about 2-3 monthos. I just started/tested gui programming with many tools. i tested boa last, it is the closest tool to delphi in tui tools that i used. I managed to play with it a bit. If you have any other tool which you know better than Boa Constructor, please write in h

Python GUI programming and boa or better ?

2008-04-14 Thread bvidinli
I program in python for about 2-3 monthos. I just started/tested gui programming with many tools. i tested boa last, it is the closest tool to delphi in GUI tools that i used. I managed to play with it a bit. If you have any other tool which you know better than Boa Constructor, please write

Re: String Literal to Blob

2008-04-14 Thread Victor Subervi
Thanks to all, especially Gabriel. The base64 is a good idea, but you state a definite problem. I will look at your code at home (offline)...thank you very much! It looks like the kicker is this line here: " % (picid, cgi.escape(title)) Now, why didn´t you share that before? I can see how cal

A Question

2008-04-14 Thread smithy
Werdle? -- http://mail.python.org/mailman/listinfo/python-list

A Question

2008-04-14 Thread bvidinli
Fertler? -- http://mail.python.org/mailman/listinfo/python-list

How to make python run faster

2008-04-14 Thread 一首诗
I read this article on http://kortis.to/radix/python_ext/ And I decided to try if it's true. I write the program in 4 ways: 1. Pure C 2. Python using C extension 3. Python using psycho 4. Pure Python And then I used timeit to test the speed of these 4. Unsurprisingly, the time they cost were:

Re: How to make python run faster

2008-04-14 Thread lbonafide
On Apr 14, 8:48 am, 一首诗 <[EMAIL PROTECTED]> wrote: > But, it is still not as fast as 1. So if speed is the #1 design goal, use pure C. If not, develop in pure Python and, if the application is too slow, profile the code and look for bottlenecks that can be optimized. There's a good chance that

Re: Compiling Python 2.5.2 on AIX 5.2

2008-04-14 Thread M.-A. Lemburg
On 2008-04-13 18:57, [EMAIL PROTECTED] wrote: > I'm investigating the possible use of Mecurial SCM as a replacement > for CVS. Mecurial is written in Python. I have a background in GNU/ > Linux, Solaris, sparc and Perl. However AIX, powerpc and Python are > new to me. On AIX 5.3, Python 2.5.2 s

Re: String Literal to Blob

2008-04-14 Thread Steve Holden
Victor Subervi wrote: > Thanks to all, especially Gabriel. The base64 is a good idea, but you > state a definite problem. I will look at your code at home > (offline)...thank you very much! It looks like the kicker is this line here: > > " % (picid, cgi.escape(title)) > > Now, why didn´t you

Re: Python GUI programming and boa or better ?

2008-04-14 Thread Mike Driscoll
On Apr 14, 8:20 am, bvidinli <[EMAIL PROTECTED]> wrote: > I program in python for about 2-3 monthos. > I just started/tested gui programming with many tools. > i tested boa last, it is the closest tool to delphi in tui tools that i used. > > I managed to play with it a bit. > > If you have any othe

Python-URL! - weekly Python news and links (Apr 14)

2008-04-14 Thread Gabriel Genellina
QOTW: "This for me is Python's chief selling point: dir()dir() and help(). Python's two selling points are dir(), help(), and very readable code. Python's *three* selling points are dir(), help(), very readable code, and an almost fanatical devotion to the BFDL. Amongst Python's selling p

Re: Python Workshop

2008-04-14 Thread Twayne
> Hi, > > We are to hold a workshop about python (introduction). It will be two > one hour and half sessions. > I wanted to know which subjects do you suggest to be presented and is > there a good presentation file (powerpoint or ...) about this on the > net. > We thought that it may be good that f

pyOpenSSL 0.7

2008-04-14 Thread Jean-Paul Calderone
pyOpenSSL is a wrapper around a subset of the OpenSSL API, including support for X509 certificates, public and private keys, and and SSL connections. pyOpenSSL 0.7 fixes a number of memory leaks and memory corruption issues. It also exposes several new OpenSSL APIs to Python: * SSL_get_shutdow

Re: Game design : Making computer play

2008-04-14 Thread dgates
On Mon, 14 Apr 2008 12:13:20 + (UTC), Willem <[EMAIL PROTECTED]> wrote: >Richard wrote: >) Here's the board (which bears only a slight resemblance to one I'd seen on >) the Web): >) >) +---+ >) | HORN $ | >) +---+---+---+---+---+---+ >) |L W| | $ | $ | |R

Re: Java or C++?

2008-04-14 Thread Grzegorz Słodkowicz
> Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure which. Which one do you think > is a softer tr

Re: Rounding a number to nearest even

2008-04-14 Thread [EMAIL PROTECTED]
On Apr 11, 4:14 am, bdsatish <[EMAIL PROTECTED]> wrote: > I'm interested in rounding numbers of the form "x.5" depending upon > whether x is odd or even. Any idea about how to implement it ? Side note: A specialized use for this is in the US Field Artillery, where it's called "artillery expressio

Re: pygtk + threading.Timer

2008-04-14 Thread Dmitry Teslenko
2008/4/14 Jarek Zgoda <[EMAIL PROTECTED]>: > > I have simple chat application with pygtk UI. I want some event (for > > example update user list) to have place every n seconds. > > What's the best way to archive it? > > I tried threading.Timer but result is following: all events wait till > >

Re: Remote mac address

2008-04-14 Thread Frank Stutzman
Matias Surdi <[EMAIL PROTECTED]> wrote: > Anyone knows how having the IP address of a host on the lan could I get > the mac address of that hosr? > p/d: Parsing the output of arp -a is not an option. What kind of system? On linux and probably several other unix-like systems you could (if you

Re: Java or C++?

2008-04-14 Thread Carl Banks
On Apr 14, 2:44 am, [EMAIL PROTECTED] wrote: > Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure wh

eval modifies passed dict

2008-04-14 Thread Janto Dreijer
It seems eval is modifying the passed in locals/globals. This is behaviour I did not expect and is really messing up my web.py app. Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license"

[ANN] PyStructure: Structure and Dependency Analyser for Python Projects

2008-04-14 Thread Robin Stocker
Hi Python developers, We are happy to announce our first release of PyStructure, a structure and dependency analyser for Python code (written in Java). It is now in a state where it can parse and analyse real-world projects (with limitations, see below) and show the results in Structure101g, a

Re: eval modifies passed dict

2008-04-14 Thread Janto Dreijer
On Apr 14, 5:48 pm, [EMAIL PROTECTED] wrote: > On 14 avr, 17:23, Janto Dreijer <[EMAIL PROTECTED]> wrote: > > > It seems eval is modifying the passed in locals/globals. This is > > behaviour I did not expect and is really messing up my web.py app. > > > Python 2.5.1 (r251:54863, Mar  7 2008, 04:10:

Re: eval modifies passed dict

2008-04-14 Thread colas . francis
On 14 avr, 17:23, Janto Dreijer <[EMAIL PROTECTED]> wrote: > It seems eval is modifying the passed in locals/globals. This is > behaviour I did not expect and is really messing up my web.py app. > > Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) > [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16

Re: Compiling Python 2.5.2 on AIX 5.2

2008-04-14 Thread Randy Galbraith
On Apr 14, 7:01 am, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: > On AIX 5.3, Python 2.5.2 should build out of the box using gcc. > > We've successfully build Python 2.3, 2.4 and 2.5 on AIX 5.3 > using the gcc compiler suite and tools installed from the > AIX Linux Toolbox: > > http://www-03.ibm.co

Re: eval modifies passed dict

2008-04-14 Thread colas . francis
On 14 avr, 18:05, Duncan Booth <[EMAIL PROTECTED]> wrote: > Janto Dreijer <[EMAIL PROTECTED]> wrote: > > It seems eval is modifying the passed in locals/globals. This is > > behaviour I did not expect and is really messing up my web.py app. > > > Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) > >

Re: eval modifies passed dict

2008-04-14 Thread Arnaud Delobelle
On Apr 14, 4:23 pm, Janto Dreijer <[EMAIL PROTECTED]> wrote: > It seems eval is modifying the passed in locals/globals. This is > behaviour I did not expect and is really messing up my web.py app. Reading the documentation would be a good start: >From http://docs.python.org/lib/built-in-funcs.htm

Re: eval modifies passed dict

2008-04-14 Thread Duncan Booth
Janto Dreijer <[EMAIL PROTECTED]> wrote: > It seems eval is modifying the passed in locals/globals. This is > behaviour I did not expect and is really messing up my web.py app. > > Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) > [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on lin

Re: Java or C++?

2008-04-14 Thread 王宁
My idea, if you really love Python and never think about erasing it from your mind, go for C (not C++). A script language plus C can solve every problem you need to solve. Also Python works pretty fine with C. If you want a better job, maybe Java. Not sure though. If you want to educate yourself a

Re: Different times between Python and System

2008-04-14 Thread Terry Reedy
"Josh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hmm... That didn't work out so well that time. I feel like an | idiot. Previously there has been an hour difference between the | system time and the time that python reports. That suggests a (temporary?) problem with standa

Re: py2exe, program has stoped working!?

2008-04-14 Thread Steve Holden
John Machin wrote: > On Apr 14, 7:24 pm, [EMAIL PROTECTED] wrote: >>> Is it a console program or a gui program? >> GUI >>> What happens when you run it without py2exe? >> it works perfectly, both from within python and launching from >> "windows" >> >>> Have you searched for "has stopped working" i

Re: 答复: Java or C++?

2008-04-14 Thread Steve Holden
Marco Mariani wrote: > Penny Y. wrote: > >> Javascript is different from Java at all. > > I think even rocks know that. Yet, some use of closure and > prototype-based inheritance might be interesting to the OP. > >> Why not Perl? > > Come on, learning Perl after two years of Python? How harsh.

Re: 有中国人乎?

2008-04-14 Thread Steve Holden
Penny Y. wrote: > Steve Holden 写道: > >> 但学会从未是立即, 和将需要一点时间。 >> > > What do you mean? > If I understand you correctly, maybe it should be, > > 学习python不可一日而成,需要循序渐进. > > Am I right? I have no idea. Babelfish (from which I obtained my reply as well as whatever understanding I had of the origina

Re: Game design : Making computer play

2008-04-14 Thread John Bailey
On Mon, 14 Apr 2008 00:13:56 -0700 (PDT), v4vijayakumar <[EMAIL PROTECTED]> wrote: >In computer based, two player, board games, how to make computer play? >Are there any formal ways to _teach_ computer, to choose best possible >move? > >I know this is kind of off-topic here. Please redirect me, if

Re: Python Workshop

2008-04-14 Thread m.moghimi
On Apr 14, 5:15 pm, "Twayne" <[EMAIL PROTECTED]> wrote: > > Hi, > > > We are to hold a workshop about python (introduction). It will be two > > one hour and half sessions. > > I wanted to know which subjects do you suggest to be presented and is > > there a good presentation file (powerpoint or ...

Re: 有中国人乎?

2008-04-14 Thread John Henry
On Apr 14, 11:17 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Penny Y. wrote: > > Steve Holden 写道: > > >> 但学会从未是立即, 和将需要一点时间。 > > > What do you mean? > > If I understand you correctly, maybe it should be, > > > 学习python不可一日而成,需要循序渐进. > > > Am I right? > > I have no idea. Babelfish (from which I ob

Re: How to make python run faster

2008-04-14 Thread J Sisson
2008/4/14 <[EMAIL PROTECTED]>: > On Apr 14, 8:48 am, 一首诗 <[EMAIL PROTECTED]> wrote: > > > But, it is still not as fast as 1. > > > So if speed is the #1 design goal, use pure C. If not, develop in > pure Python and, if the application is too slow, profile the code and > look for bottlenecks that

Re: How to make python run faster

2008-04-14 Thread king kikapu
On 14 Απρ, 16:48, 一首诗 <[EMAIL PROTECTED]> wrote: > I read this article onhttp://kortis.to/radix/python_ext/ > > And I decided to try if it's true. > > I write the program in 4 ways: > > 1. Pure C > 2. Python using C extension > 3. Python using psycho > 4. Pure Python > > And then I used timeit to t

Re: Tremendous slowdown due to garbage collection

2008-04-14 Thread Aaron Watters
> A question often asked--and I am not a big a fan of these sorts of > questions, but it is worth thinking about--of people who are creating > very large data structures in Python is "Why are you doing that?" > That is, you should consider whether some kind of database solution > would be better.

Re: Python GUI programming and boa or better ?

2008-04-14 Thread king kikapu
On 14 Απρ, 16:20, bvidinli <[EMAIL PROTECTED]> wrote: > I program in python for about 2-3 monthos. > I just started/tested gui programming with many tools. > i tested boa last, it is the closest tool to delphi in tui tools that i used. > > I managed to play with it a bit. > > If you have any other

What parts of string module will disappear in Python 3.0?

2008-04-14 Thread python
I understand that many portions of the string module are redundant with the native methods of strings and will removed in Python 3.0. Makes sense to me. But what will happen to the portions of the string module that are not covered by native string methods - like the following: - string constants

Re: What parts of string module will disappear in Python 3.0?

2008-04-14 Thread Christian Heimes
[EMAIL PROTECTED] schrieb: > I understand that many portions of the string module are redundant with > the native methods of strings and will removed in Python 3.0. Makes > sense to me. > > But what will happen to the portions of the string module that are not > covered by native string methods -

Re: mod_python

2008-04-14 Thread Daniel Fetchinson
> I want to rewrite a request url under apache2.0 based on its special > header, like, the "Accept-Encoding:" one. > > With C I think I can do it, but since I get begin with python,so I ask > that can I do it under mod_python? what's the guide? The guide is this: http://modpython.org/live/current/

Re: py2exe, program has stoped working!?

2008-04-14 Thread John Machin
On Apr 15, 4:08 am, Steve Holden <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > > By the way, "popup" is what you get in a web browser. What did this > > "popup" look like: a panel from your GUI software? A Windows message > > box? Did it have a title across the top? What was the exact text in

Re: Game design : Making computer play

2008-04-14 Thread Carl G.
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 14 Apr 2008 00:13:56 -0700, v4vijayakumar wrote: > >> In computer based, two player, board games, how to make computer play? >> Are there any formal ways to _teach_ computer, to choose best possible >

Re: Confused about Boost.Python & bjam

2008-04-14 Thread Neil Hodgson
Till Kranz: > I tried to get started with Boost.Python. unfortunately I never used the > bjam build system before. As it is explained in the documentation I > tried to adapt the the files form the examples directory. I copied > 'Jamroot', 'boost_build.jam' and 'extending.cpp' to '~/test/'. But

py3k s***s

2008-04-14 Thread Sverker Nilsson
do i dare to open a thread about this? come on you braver men we are at least not bought by g***le but why? others have said it so many times i think :- but why? a few syntactic 'cleanups' for the cost of a huge rewrite of all the code that have been builtup from all the beginning when th

  1   2   >