[ANN] Builds of PyWebkitGtk and Webkit-Glib-Gtk (r39359+#16401.master) for Debian i386, Debian AMD64 and Macports MacOSX 10.4

2009-01-01 Thread Luke Kenneth Casson Leighton
webkit-glib-gtk provides gobject bindings to webkit's DOM model. pywebkitgtk provides python bindings to the gobject bindings of webkit's DOM model. files are available for download at: https://sourceforge.net/project/showfiles.php?group_id=236659package_id=290457release_id=650548 separate

Re: Why not Ruby?

2009-01-01 Thread Jason Rumney
On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see much evidence of that in the sometimes never- ending threads that frequently follow his postings. But it is good

idle 3.0 unicode

2009-01-01 Thread Pavel Kosina
As for unicode in Python 2.5 everything works fine in program running either in IDLE or under Command line: # -*- coding: utf-8 -*- print uěščřžýáíé In 3.0 there is an error. The same program, moved to 3.0 syntax, in IDLE editor : # -*- coding: utf-8 -*- print (ěščřžýáíé) prints:

Re: select.select and socket.setblocking

2009-01-01 Thread Francesco Bochicchio
Can you post an example program that exhibits the behavior you describe? I was forgetting about the MSG_WAITALL flag ... When I started programming with sockets, it was on a platform (IIRC Solaris) that by default behaved like MSG_WAITALL was set by default (actually, I don't remember it

pygtkspell-help

2009-01-01 Thread S.Selvam Siva
Hello, i am in a process of writing spell checker for my local language(Tamil). I wrote a plugin for gedit with pygtk for gui.Recently i came to know about pygtkspell ,that can be used for spell checking and suggestion offering. I am bit congused about it and could not able to get useful info by

Re: Videocapture in python

2009-01-01 Thread alex goretoy
Can you post your code or a code segment? I would be interested in seeing how this works. On Thu, Jan 1, 2009 at 3:29 AM, koranth...@gmail.com wrote: I face issues in videocapture in python. Cant find anyplace where we can raise bug reports, so mentioning here. Also help required if somebody

Re: Creating an application for Linux

2009-01-01 Thread alex goretoy
I found a great video on how to do this last night. I wasn't even looking for it. Check it out. It's really good. Makes me want to start making videos as well. Thanks. Ubuntu: Making a .deb package out of a python program (English) tutorial video - Ubuntu: Making a .deb package out of a python

Re: folder extraction

2009-01-01 Thread r . grimm
On Dec 30 2008, 4:30 pm, ibpe...@gmail.com wrote: how do i get along with this task of extracting multiples folder and generating their names individually in a their respective files as they were generated. Hallo, I hope, that I interpret your question in the right way. You can use the

Re: Pass by reference

2009-01-01 Thread alex goretoy
I recently conquered this pass by ref thing. This is how I did it. Python 2.4.3 (#1, Apr 3 2006, 14:02:53) [GCC 3.4.6] on linux2 Type help, copyright, credits or license for more information. def f1(v): ... v=asdf ... def f2(v): ... v=[asdf] ... def f3(v): ... v.append(asdf) ...

Re: idle 3.0 unicode

2009-01-01 Thread 小楼
On 1月1日, 下午4时11分, Pavel Kosina g...@post.cz wrote: As for unicode in Python 2.5 everything works fine in program running either in IDLE or under Command line: # -*- coding: utf-8 -*- print uěščřžýáíé In 3.0 there is an error.  The same program, moved to 3.0 syntax, in IDLE editor : # -*-

Re: Parsing Excel spreadsheets

2009-01-01 Thread Joshua Moore
On Dec 30 2008, 8:07 am, andyh...@gmail.com andyh...@gmail.com wrote: Hi, Can anybody recommend an approach for loading and parsing Excel spreadsheets in Python. Any well known/recommended libraries for this? The only thing I found in a brief search

Re: folder extraction

2009-01-01 Thread John Machin
On Jan 1, 8:23 pm, r.gr...@science-computing.de wrote: On Dec 30 2008, 4:30 pm, ibpe...@gmail.com wrote: how do i get along with this task of extracting multiples folder and generating their names individually in a their respective files as they were generated. Hallo, I hope, that I

Re: idle 3.0 unicode

2009-01-01 Thread Pavel Kosina
小楼 napsal(a), dne 1.1.2009 10:32: #coding=utf-8 #中国 print('a') saved in utf8 alt+x,destroyed IDLE... me too,why? Are you sure? Run (F5) with print('a') is OK here. Maybe you have redefined key bindings in IDLE ... -- geon Pavel Kosina --

Re: Why not Ruby?

2009-01-01 Thread Randal L. Schwartz
r == r rt8...@gmail.com writes: r Xah, I been watching your posts for sometime and it looks like you r have been around for a while. Your profile shows one star 410 r ratings. I have only been in usenet for 2 month and i have one star r and 253 ratings(that will grow to much more after this

Re: Easy-to-use Python GUI

2009-01-01 Thread Stef Mientki
Gerhard Häring wrote: Dotan Cohen wrote: I have been following this thread with interest. Is there a way to build Qt apps with relative easy? I use KDE and would prefer the Qt toolkit for my GUI apps. Thanks. A few years ago, I've had bad experiences with wxPython (random things not actually

Re: Videocapture in python

2009-01-01 Thread koranthala
On Jan 1, 1:58 pm, alex goretoy aleksandr.gore...@gmail.com wrote: Can you post your code or a code segment? I would be interested in seeing how this works. On Thu, Jan 1, 2009 at 3:29 AM, koranth...@gmail.com wrote: I face issues in videocapture in python. Cant find anyplace where we

initialization in python

2009-01-01 Thread koranthala
How does an average product handle initialization in python? I am facing lot of issues in handling initialization, especially if I import specific variables, due to the variables not getting updated. For example - taking a sqlalchemy based product: Module database: ^^^ Session =

Re: Creating an application for Linux

2009-01-01 Thread lkcl
On Dec 31 2008, 9:54 pm, Mike Driscoll kyoso...@gmail.com wrote: On Dec 31, 3:36 pm,lkclluke.leigh...@googlemail.com wrote: hiya mike: where do i know you from? i've heard your name somewhere and for the life of me can't remember where! anyway... onwards. I don't know...while your

Re: initialization in python

2009-01-01 Thread John Machin
On Jan 1, 11:44 pm, koranth...@gmail.com wrote: How does an average product handle initialization in python? I am facing lot of issues in handling initialization, especially if I import specific variables, due to the variables not getting updated. For example - taking a sqlalchemy based

Re: Videocapture in python

2009-01-01 Thread Marc 'BlackJack' Rintsch
On Thu, 01 Jan 2009 04:28:21 -0800, koranthala wrote: Please let me know if you need any more information. Where does `videocapture.py` coming from? It's not part of the standard library. And which operating system are we talking about? Ciao, Marc 'BlackJack' Rintsch --

Re: SQL, lite lite lite

2009-01-01 Thread Bruno Desthuilliers
Aaron Brady a écrit : On Dec 30, 2:52 pm, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Aaron Brady a écrit : On Dec 30, 11:16 am, prueba...@latinmail.com wrote: (snip) You really do like to reinvent the wheels do you? :-) Nothing wrong with that. Just be aware that

Re: Videocapture in python

2009-01-01 Thread David
Marc 'BlackJack' Rintsch wrote: On Thu, 01 Jan 2009 04:28:21 -0800, koranthala wrote: Please let me know if you need any more information. Where does `videocapture.py` coming from? It's not part of the standard library. And which operating system are we talking about? Ciao, Marc

Re: initialization in python

2009-01-01 Thread koranthala
On Jan 1, 6:54 pm, John Machin sjmac...@lexicon.net wrote: On Jan 1, 11:44 pm, koranth...@gmail.com wrote: How does an average product handle initialization in python? I am facing lot of issues in handling initialization, especially if I import specific variables, due to the variables

Re: Videocapture in python

2009-01-01 Thread koranthala
On Jan 1, 7:26 pm, Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: On Thu, 01 Jan 2009 04:28:21 -0800, koranthala wrote: Please let me know if you need any more information. Where does `videocapture.py` coming from?  It's not part of the standard library.  And which operating system are we

How to find the beginning of last line of a big text file ?

2009-01-01 Thread Barak, Ron
Hi, I have a very big text file: I need to find the place where the last line begins (namely, the offset of the one-before-the-last '\n' + 1). Could you suggest a way to do that without getting all the file into memory (as I said, it's a big file), or heaving to readline() all lines (ditto) ?

Iowa Python Users Group Meeting (Jan. 5, 2008)

2009-01-01 Thread Mike Driscoll
Hi, The next Iowa Python Users Group meeting is Monday, January 5th, 2008, barring bad weather. We will be meeting from 7-9 p.m. at the following location: Marshall County Sheriff's Office 2369 Jessup Ave Marshalltown, IA 50158 Currently we have one tentative speaker scheduled and a workshop

Re: Iowa Python Users Group Meeting (Jan. 5, 2008)

2009-01-01 Thread Mike Driscoll
On Jan 1, 10:36 am, Mike Driscoll kyoso...@gmail.com wrote: Hi, The next Iowa Python Users Group meeting is Monday, January 5th, 2008, barring bad weather. We will be meeting from 7-9 p.m. at the following location: Marshall County Sheriff's Office 2369 Jessup Ave Marshalltown, IA 50158

Re: Creating an application for Linux

2009-01-01 Thread Mike Driscoll
On Jan 1, 7:47 am, lkcl luke.leigh...@googlemail.com wrote: On Dec 31 2008, 9:54 pm, Mike Driscoll kyoso...@gmail.com wrote: On Dec 31, 3:36 pm,lkclluke.leigh...@googlemail.com wrote: hiya mike: where do i know you from?  i've heard your name somewhere and for the life of me can't

Re: How to find the beginning of last line of a big text file ?

2009-01-01 Thread Sebastian Bassi
On Thu, Jan 1, 2009 at 2:19 PM, Barak, Ron ron.ba...@lsi.com wrote: I have a very big text file: I need to find the place where the last line begins (namely, the offset of the one-before-the-last '\n' + 1). Could you suggest a way to do that without getting all the file into memory (as I said,

Re: Desktop/File management support on MS Windows

2009-01-01 Thread Thorsten Kampe
* riklau...@gmail.com (Wed, 31 Dec 2008 09:08:46 -0800 (PST)) Are there any Python libraries that can trash files (move to Trash, not delete) or for example return a list of applications that can open given file? I can't find anything related to this for Windows.

Re: Why not Ruby?

2009-01-01 Thread Kenneth Tilton
s...@netherlands.com wrote: On Wed, 31 Dec 2008 23:16:41 -0500, Kenneth Tilton kentil...@gmail.com wrote: Xah Lee wrote: Just spent 3 hours looking into Ruby today. Here's my short impression for those interested. * Why Not Ruby? http://xahlee.org/UnixResource_dir/writ/why_not_Ruby.html

Re: How to find the beginning of last line of a big text file ?

2009-01-01 Thread MRAB
Barak, Ron wrote: Hi, I have a _very_ big text file: I need to find the place where the last line begins (namely, the offset of the one-before-the-last '\n' + 1). Could you suggest a way to do that without getting all the file into memory (as I said, it's a big file), or heaving to

Re: Why not Ruby?

2009-01-01 Thread Stanisław Halik
In comp.lang.lisp r rt8...@gmail.com wrote: Face it, the world needs people like Xah. Go check out his site, his insights of languages and tech is fascinating. The man lives in a world driven by common sense, and you know what they say --Common sense is the least most common thing-- just look

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 2:05 am, Jason Rumney jasonrum...@gmail.com wrote: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see much evidence of that in the sometimes never-

Re: If your were going to program a game...

2009-01-01 Thread janislaw
On 1 Sty, 12:37, Tokyo Dan huff...@tokyo.email.ne.jp wrote: If your were going to program a game in python what technologies would you use? The game is a board game with some piece animations, but no movement animation...think of a chess king exploding. The game runs in a browser in a window

Re: Videocapture in python

2009-01-01 Thread Terry Reedy
koranth...@gmail.com wrote: It is taken from http://videocapture.sourceforge.net/, - a very good tool for webcam capture in Win32. Hi David, I am in Windows. And there is a possibility that I might be using device 0 or 1. So, I am using the excellent VideoCapture tool created by Markus

Re: How to find the beginning of last line of a big text file ?

2009-01-01 Thread Tim Chase
Sebastian Bassi wrote: On Thu, Jan 1, 2009 at 2:19 PM, Barak, Ron ron.ba...@lsi.com wrote: I have a very big text file: I need to find the place where the last line begins (namely, the offset of the one-before-the-last '\n' + 1). Could you suggest a way to do that without getting all the file

python and gloox

2009-01-01 Thread gliderman
Hi I am trying to use a python version of gloox (XMPP client library written in C++). The python binding is done using SWIG (provided by the author of gloox). I am trying to adapt first a c++ example to python. The code below fails with Traceback (most recent call last): File tutu.py,

Re: initialization in python

2009-01-01 Thread Terry Reedy
koranth...@gmail.com wrote: Module database: ^^^ Session = None 'Initializing' names is not necessary. Delete this. Without it, your error would be more obvious. def init(dbname): engine = create_engine('sqlite:///%s' %dbname) ... global Session Session =

Is this a bug in Python or something I do not understand.

2009-01-01 Thread davidalvi
Consider these two lists comprehensions: L1=[[1 for j in range(3)] for i in range(3)] L2=[[1]*3]*3 print L1 print L2 print L1==L2 The result is: [[1, 1, 1], [1, 1, 1], [1, 1, 1]] [[1, 1, 1], [1, 1, 1], [1, 1, 1]] True So far, everything is OK, but let us now modify the lists' contents in the

Testing if an index is in a slice

2009-01-01 Thread mmanns
Hi I would like to check if an index is in a slice or not without iterating over the slice. Something like: isinslice(36, slice(None, 34, -1)) True I would like to use the batteries if possible. However, I looked in the docs, pypi and in Usenet without luck. Does anyone have a solution?

Testing if an index is in a slice

2009-01-01 Thread mmanns
Hi I would like to check if an index is in a slice or not without iterating over the slice. Something like: isinslice(36, slice(None, 34, -1)) True I would like to use the batteries if possible. However, I looked in the docs, pypi and in Usenet without luck. Does anyone have a solution?

Re: Is this a bug in Python or something I do not understand.

2009-01-01 Thread Miles
On Thu, Jan 1, 2009 at 1:13 PM, davida...@gmail.com wrote: Consider these two lists comprehensions: L1=[[1 for j in range(3)] for i in range(3)] L2=[[1]*3]*3 [snip] It seems a misbehaviour in Python, or there is something I do not understand in the syntax It's not a Python bug.

Re: Pass by reference

2009-01-01 Thread Terry Reedy
alex goretoy wrote: I recently conquered this pass by ref thing. This is how I did it. What you did was to pass a mutable object and mutate it. Absolutely standard practice in Python. I am glad you learned it, but also learning and using the standard terminology will also help. Hope you

How to run Python in Windows w/o popping a DOS box?

2009-01-01 Thread Geert Vancompernolle
I know it's been a long while since this thread has been handled, but maybe this is a final solution to your problem (if not yet resolved): http://www.py2exe.org/index.cgi/SingleFileExecutable Especially the last setup.py file results in only one exe which contains *all* the necessary stuff

Re: Why not Ruby?

2009-01-01 Thread r
Xah Lee, I also didn't like the fact that ruby uses keyword end to indicate code block much as Pascal and Visual Basic, Logo, do. I don't like that. You could not be more right Xah, the use of end in a language as high level as Ruby is redundant, and idiotic. There are a few things about Ruby

Re: How to run Python in Windows w/o popping a DOS box?

2009-01-01 Thread GeertVc
On Jan 1, 7:05 pm, Geert Vancompernolle geert.discussi...@gmail.com wrote: I know it's been a long while since this thread has been handled, but maybe this is a final solution to your problem (if not yet resolved): http://www.py2exe.org/index.cgi/SingleFileExecutable Especially the last

Re: idle 3.0 unicode

2009-01-01 Thread Mark Tolonen
Pavel Kosina g...@post.cz wrote in message news:495c7ac6.1000...@post.cz... As for unicode in Python 2.5 everything works fine in program running either in IDLE or under Command line: # -*- coding: utf-8 -*- print uěščřžýáíé In 3.0 there is an error. The same program, moved to 3.0 syntax,

Re: Why not Ruby?

2009-01-01 Thread Tomasz Rola
On Thu, 1 Jan 2009, s...@netherlands.com wrote: On Wed, 31 Dec 2008 23:16:41 -0500, Kenneth Tilton kentil...@gmail.com wrote: Xah Lee wrote: Just spent 3 hours looking into Ruby today. Here's my short impression for those interested. Be carefull what you say. If they pay me I

Re: Testing if an index is in a slice

2009-01-01 Thread ajaksu
On Jan 1, 4:12 pm, mma...@gmx.net wrote: I would like to check if an index is in a slice or not without iterating over the slice. Something like: isinslice(36, slice(None, 34, -1)) True I think it'd be feasible for slices that can be mapped to ranges[1], but slices are more flexible than

Re: If your were going to program a game...

2009-01-01 Thread excord80
On Jan 1, 2:37 pm, Kay Schluehr kay.schlu...@gmx.net wrote: There is no solution to this problem from a Python perspective. Do what everyone does right now: [snip] It still surprises me that no one has implemented the solution for this yet. Maybe it's harder than it seems, but it *seeems*

Release of PyGreSQL 4.0

2009-01-01 Thread D'Arcy J.M. Cain
We are please to announce the release of PyGreSQL 4.0. his is a major release and you should check it carefully before using in existing applications. There may be some incompatibilities. PyGreSQL is a Python module that interfaces to a PostgreSQL database. It embeds the PostgreSQL query

Re: Chart libs for python

2009-01-01 Thread excord80
You might start by having a look at the wiki: http://wiki.python.org/moin/NumericAndScientific/Plotting -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not Ruby?

2009-01-01 Thread Paul Rubin
r rt8...@gmail.com writes: I am beginning to think the perfect high level language would take the best for Ruby and Python. The ultimate language with speed in mind, pythons clear syntax, but with shortcuts for gurus. You might like Tim Sweeney's POPL talk:

Re: If your were going to program a game...

2009-01-01 Thread Chris Rebert
On Thu, Jan 1, 2009 at 12:24 PM, excord80 excor...@gmail.com wrote: On Jan 1, 2:37 pm, Kay Schluehr kay.schlu...@gmx.net wrote: There is no solution to this problem from a Python perspective. Do what everyone does right now: [snip] It still surprises me that no one has implemented the

Re: Is this a bug in Python or something I do not understand.

2009-01-01 Thread Chris Rebert
On Thu, Jan 1, 2009 at 10:13 AM, davida...@gmail.com wrote: Consider these two lists comprehensions: L1=[[1 for j in range(3)] for i in range(3)] L2=[[1]*3]*3 snip So far, everything is OK, but let us now modify the lists' contents in the following way: snip It seems a misbehaviour in

Re: Is this a bug in Python or something I do not understand.

2009-01-01 Thread Casey
L1 is a list of three different lists, although each list holds the same values. L2 is a list of three references to the same list (the '*' operator doesn't do a deep copy). So when you modify any of the referenced lists, you modify all of them. Try this: q = [1, 1, 1] r = [q, q, q] r [[1,

Re: Why not Ruby?

2009-01-01 Thread Fuzzyman
On Jan 1, 8:32 pm, Paul Rubin http://phr...@nospam.invalid wrote: [snip...] Of course pythons list, dict, strings in my opinion just can't be beat, On many occasions I've wished for a functional dictionary implementation in Python, like Haskell's Data.Map.  One of these years I'll get around

Re: If your were going to program a game...

2009-01-01 Thread Fuzzyman
On Jan 1, 8:55 pm, Chris Rebert c...@rebertia.com wrote: On Thu, Jan 1, 2009 at 12:24 PM, excord80 excor...@gmail.com wrote: On Jan 1, 2:37 pm, Kay Schluehr kay.schlu...@gmx.net wrote: There is no solution to this problem from a Python perspective. Do what everyone does right now: [snip]

Re: game engine (as in rules not graphics)

2009-01-01 Thread Aaron Brady
On Dec 29 2008, 8:52 am, Aaron Brady castiro...@gmail.com wrote: On Dec 29, 4:14 am, Martin mar...@marcher.name wrote: Hi, 2008/12/29 Phil Runciman ph...@aspexconsulting.co.nz: See: Chris Moss, Prolog++: The Power of Object-Oriented and Logic Programming (ISBN 0201565072) This

Re: SQL, lite lite lite

2009-01-01 Thread Aaron Brady
On Jan 1, 7:43 am, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Aaron Brady a écrit : On Dec 30, 2:52 pm, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Aaron Brady a écrit : On Dec 30, 11:16 am, prueba...@latinmail.com wrote: (snip) You

Re: If your were going to program a game...

2009-01-01 Thread Aaron Brady
On Jan 1, 2:55 pm, Chris Rebert c...@rebertia.com wrote: On Thu, Jan 1, 2009 at 12:24 PM, excord80 excor...@gmail.com wrote: On Jan 1, 2:37 pm, Kay Schluehr kay.schlu...@gmx.net wrote: There is no solution to this problem from a Python perspective. Do what everyone does right now: [snip]

Re: OpenOpt 0.21 (free optimization framework)

2009-01-01 Thread larrydag
On Dec 15 2008, 4:32 pm, dmitrey dmitrey.kros...@scipy.org wrote: Hi all, OpenOpt 0.21, free optimization framework (license: BSD) with some own solvers and connections to tens of 3rd party ones, has been released. All details here:

Re: Testing if an index is in a slice

2009-01-01 Thread Aaron Brady
On Jan 1, 12:12 pm, mma...@gmx.net wrote: Hi I would like to check if an index is in a slice or not without iterating over the slice. Something like: isinslice(36, slice(None, 34, -1)) True I would like to use the batteries if possible. However, I looked in the docs, pypi and in

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Jason Rumney jasonrum...@gmail.com writes: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see much evidence of that in the sometimes never- ending threads that

Re: If your were going to program a game...

2009-01-01 Thread Fuzzyman
On Jan 1, 10:24 pm, Aaron Brady castiro...@gmail.com wrote: On Jan 1, 2:55 pm, Chris Rebert c...@rebertia.com wrote: On Thu, Jan 1, 2009 at 12:24 PM, excord80 excor...@gmail.com wrote: On Jan 1, 2:37 pm, Kay Schluehr kay.schlu...@gmx.net wrote: There is no solution to this problem

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
r rt8...@gmail.com writes: On Jan 1, 2:05 am, Jason Rumney jasonrum...@gmail.com wrote: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see much evidence of

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tim Greer t...@burlyhost.com writes: Giampaolo Rodola' wrote: This is not a Ruby group. I recommend you to go waste your time there. That poster has a frequent habit of cross posting to multiple, irrelevant news groups. There's no rhyme or reason to it. It's best to just filter the

Re: Why not Ruby?

2009-01-01 Thread Tamas K Papp
On Thu, 01 Jan 2009 23:28:08 +0100, Richard Riley wrote: posts controversial but always interesting. His ELisp tutorial is far and away better than anything else out there for the programmer moving to Elisp IMO. He backs up his points with reasons and supportive Programmers don't move to

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tamas K Papp tkp...@gmail.com writes: On Thu, 01 Jan 2009 23:28:08 +0100, Richard Riley wrote: posts controversial but always interesting. His ELisp tutorial is far and away better than anything else out there for the programmer moving to Elisp IMO. He backs up his points with reasons and

Re: type conversion

2009-01-01 Thread Robert Kern
Hamish McKenzie wrote: sometimes I want to be able to initialize an instance with a variety of different data types. as an obvious example I might want to initialize a 4x4 matrix with either 16 floats, a list/tuple or 16 floats, another matrix or a quaternion. is there any other way to do it

Re: OpenOpt 0.21 (free optimization framework)

2009-01-01 Thread skip
Larry I suggest you may want to make an announcement at the Larry comp.lang.python Usenet group. You could probably get some Larry interest in python development from that group. Larry, Apparently you read the python-list@python.org mailing list. That list is bidirectionally

Re: Why not Ruby?

2009-01-01 Thread Raymond Wiker
Richard Riley rileyrg...@gmail.com writes: Tamas K Papp tkp...@gmail.com writes: On Thu, 01 Jan 2009 23:28:08 +0100, Richard Riley wrote: posts controversial but always interesting. His ELisp tutorial is far and away better than anything else out there for the programmer moving to Elisp

Re: Why not Ruby?

2009-01-01 Thread Benjamin Kaplan
On Thu, Jan 1, 2009 at 5:28 PM, Richard Riley rileyrg...@gmail.com wrote: Jason Rumney jasonrum...@gmail.com writes: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general

RE: type conversion

2009-01-01 Thread Hamish McKenzie
You could also use a dict with type:method key/value pairings. This is closer to a switch/case than an if...elif chain is. of course, that's a great idea... thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: If your were going to program a game...

2009-01-01 Thread Benjamin Kaplan
On Thu, Jan 1, 2009 at 3:24 PM, excord80 excor...@gmail.com wrote: On Jan 1, 2:37 pm, Kay Schluehr kay.schlu...@gmx.net wrote: There is no solution to this problem from a Python perspective. Do what everyone does right now: [snip] It still surprises me that no one has implemented the

Re: Why not Ruby?

2009-01-01 Thread Tim Greer
Richard Riley wrote: Tim Greer t...@burlyhost.com writes: Giampaolo Rodola' wrote: This is not a Ruby group. I recommend you to go waste your time there. That poster has a frequent habit of cross posting to multiple, irrelevant news groups. There's no rhyme or reason to it. It's

yacc statement recognition

2009-01-01 Thread Slafs
Hi ALL! I have to write in yacc an acceptor of files with lines matching this regexp: '[0-9],[0-9]' and I don't know what I am doing wrong beacuse this: tokens = ( 'NUMBER', ) literals = [','] t_NUMBER = r'\d' ... def p_statement_exp(p): '''statement : NUMBER ',' NUMBER

Re: Why not Ruby?

2009-01-01 Thread Tim Greer
Richard Riley wrote: Jason Rumney jasonrum...@gmail.com writes: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see much evidence of that in the sometimes

Re: Why not Ruby?

2009-01-01 Thread Kenneth Tilton
Richard Riley wrote: Jason Rumney jasonrum...@gmail.com writes: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see much evidence of that in the sometimes never-

Re: why cannot assign to function call

2009-01-01 Thread Tim Roberts
Aaron Brady castiro...@gmail.com wrote: I agree that the form of the 4th fragment is 'X and Y are' in general. However, native speakers don't often use the form 'X and X are'. This is the source of my protest, because X = the Morning Star = the Evening Star. We don't say, 'G.H.W. Bush and the

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Raymond Wiker r...@rawmbp.local writes: Richard Riley rileyrg...@gmail.com writes: Tamas K Papp tkp...@gmail.com writes: On Thu, 01 Jan 2009 23:28:08 +0100, Richard Riley wrote: posts controversial but always interesting. His ELisp tutorial is far and away better than anything else out

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tim Greer t...@burlyhost.com writes: Richard Riley wrote: Tim Greer t...@burlyhost.com writes: Giampaolo Rodola' wrote: This is not a Ruby group. I recommend you to go waste your time there. That poster has a frequent habit of cross posting to multiple, irrelevant news groups.

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Kenneth Tilton kentil...@gmail.com writes: Richard Riley wrote: Jason Rumney jasonrum...@gmail.com writes: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general populace. I don't see

Re: Why not Ruby?

2009-01-01 Thread J�rgen Exner
Richard Riley rileyrg...@gmail.com wrote: discussion about alternative languages for modern development? Most news readers feature a kill thread command if you are not interested in the content. Certainly less extreme or ignorant than killing all posts from someone Thank you for reminding me

Re: Why not Ruby?

2009-01-01 Thread J�rgen Exner
Kenneth Tilton kentil...@gmail.com wrote: Xah has something to say about technology, like what he says or not. Unfortunately it's unrelated to the topics the NGs he is spamming. *PLONK* jue -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not Ruby?

2009-01-01 Thread Steven D'Aprano
On Thu, 01 Jan 2009 12:32:53 -0800, Paul Rubin wrote: On many occasions I've wished for a functional dictionary implementation in Python, like Haskell's Data.Map. One of these years I'll get around to writing one. You don't think Python's dict implementation is functional? That's pretty

Re: Why not Ruby?

2009-01-01 Thread Tim Greer
Richard Riley wrote: Tim Greer t...@burlyhost.com writes: Richard Riley wrote: Tim Greer t...@burlyhost.com writes: Giampaolo Rodola' wrote: This is not a Ruby group. I recommend you to go waste your time there. That poster has a frequent habit of cross posting to multiple,

Re: Why not Ruby?

2009-01-01 Thread Fuzzyman
On Jan 2, 12:16 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 01 Jan 2009 12:32:53 -0800, Paul Rubin wrote: On many occasions I've wished for a functional dictionary implementation in Python, like Haskell's Data.Map.  One of these years I'll get around to writing

Re: why cannot assign to function call

2009-01-01 Thread Fuzzyman
On Dec 29 2008, 9:34 am, John Machin sjmac...@lexicon.net wrote: On Dec 29, 5:01 pm, scsoce scs...@gmail.com wrote: I have a function return a reference, Stop right there. You don't have (and can't have, in Python) a function which returns a reference that acts like a pointer in C or C+ +.

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 5:34 pm, Kenneth Tilton kentil...@gmail.com wrote: Richard Riley wrote: Jason Rumney jasonrum...@gmail.com writes: On Jan 1, 3:12 pm, r rt8...@gmail.com wrote: The man lives in a world driven by common sense Common sense suggests that his views are shared among the general

Re: Testing if an index is in a slice

2009-01-01 Thread mmanns
On Thu, 1 Jan 2009 11:34:53 -0800 (PST) ajaksu aja...@gmail.com wrote: http://article.gmane.org/gmane.comp.python.python-3000.devel/8732 I will build upon this code. Thanks for your help Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-01 Thread MRAB
Fuzzyman wrote: On Dec 29 2008, 9:34 am, John Machin sjmac...@lexicon.net wrote: On Dec 29, 5:01 pm, scsoce scs...@gmail.com wrote: I have a function return a reference, Stop right there. You don't have (and can't have, in Python) a function which returns a reference that acts like a pointer

Re: Videocapture in python

2009-01-01 Thread Tim Roberts
koranth...@gmail.com wrote: On using videocapture (python 2.4), I am facing the following issues while creating a video sort of application. - Pull out the usb cable : Videocapture gets the data stored initially in the buffer and returns always. The images are not updated - but also there is no

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 6:16 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 01 Jan 2009 12:32:53 -0800, Paul Rubin wrote: On many occasions I've wished for a functional dictionary implementation in Python, like Haskell's Data.Map.  One of these years I'll get around to writing

Re: Why not Ruby?

2009-01-01 Thread Steven D'Aprano
On Thu, 01 Jan 2009 10:35:54 -0800, r wrote: the use of end in a language as high level as Ruby is redundant, and idiotic. There are a few things about Ruby i really like, but this end business is blasphemy. Blasphemy? You really are an idiot. Programming languages are not religions. Step

mod_pylite?

2009-01-01 Thread excord80
Just read this interesting post by chromatic on what features Perl 5 needs right now http://broadcast.oreilly.com/2008/12/five-features-perl-5-needs-now.html and he mentions a neat-looking project called ``mod_perlite``. It sounds like it will be very handy. Anyone working on a ``mod_pylite``?

Re: mod_pylite?

2009-01-01 Thread skip
http://broadcast.oreilly.com/2008/12/five-features-perl-5-needs-now.html and he mentions a neat-looking project called ``mod_perlite``. It sounds like it will be very handy. Anyone working on a ``mod_pylite``? Has it been done before, maybe under a different name? It's

Re: Understanding search queries, semantics, and Meaning ...aren't we all looking for meaning?

2009-01-01 Thread Jonathan Gardner
On Dec 30 2008, 3:25 pm, 5lvqbw...@sneakemail.com wrote: In a typical SQL database, when you type in SELECT foo FROM bar WHERE baz='bo', you are not writing a program, at least not in the sense of Python or C or Java or Perl where you give instructions on HOW to run the program. You are

Re: Why not Ruby?

2009-01-01 Thread Marek Kubica
On Thu, 01 Jan 2009 13:13:19 -0800, Fuzzyman wrote: Care to save me the effort of looking it up and tell me what Data.Map does that Python's dict doesn't? I guess if it is functional then every mutation must copy and return a new data structure? (Which will be much more efficient in Haskell

  1   2   >