Re: type conversion

2009-01-01 Thread r
On Jan 1, 4:40 pm, Robert Kern wrote: > 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 m

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 7:38 pm, Steven D'Aprano wrote: > 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 reall

Switching user in a SSH connection

2009-01-01 Thread Shah Sultan Alam
Hi Group, I am trying to connect to a Linux maching using paramiko. and able to run a command like "ls -l" Now I want to switch user being in the connection ( eg running something like "su -" ) Will you please let me know how to do that. Regds Shah -- http://mail.python.org/mailman/listinfo/p

Re: initialization in python

2009-01-01 Thread koranthala
On Jan 1, 11:14 pm, Terry Reedy wrote: > 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_en

Re: mod_pylite?

2009-01-01 Thread Graham Dumpleton
On Jan 2, 2:28 pm, excord80 wrote: > On Jan 1, 9:12 pm, s...@pobox.com wrote: > > >     > > >>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. Anyon

Re: Why not Ruby?

2009-01-01 Thread Paul Rubin
Marek Kubica writes: > > I guess if it is functional then every mutation must copy and return a > > new data structure? Yes. > > (Which will be much more efficient in Haskell than > > in Python - Haskell can share most of the underlying data whereas Python > > would have to create a new dict ev

Re: Why not Ruby?

2009-01-01 Thread Paul Rubin
Steven D'Aprano writes: > You don't think Python's dict implementation is functional? I'm using the term "functional" in the sense of Chris Okasaki's book "Purely Functional Data Structures". Basically a functional dictionary is an immutable dictionary that supports fast "update" operations by

Re: mod_pylite?

2009-01-01 Thread excord80
On Jan 1, 9:12 pm, s...@pobox.com wrote: >     >>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 bee

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 Has

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. Y

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 >> na

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``? Ha

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.

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 6:16 pm, Steven D'Aprano 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 one. > > You don't think Pytho

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 i

Re: why cannot assign to function call

2009-01-01 Thread MRAB
Fuzzyman wrote: On Dec 29 2008, 9:34 am, John Machin wrote: On Dec 29, 5:01 pm, scsoce 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+ +. Please tell us what ma

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 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 not Ruby?

2009-01-01 Thread r
On Jan 1, 5:34 pm, Kenneth Tilton wrote: > Richard Riley wrote: > > Jason Rumney writes: > > >> On Jan 1, 3:12 pm, r 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 o

Re: why cannot assign to function call

2009-01-01 Thread Fuzzyman
On Dec 29 2008, 9:34 am, John Machin wrote: > On Dec 29, 5:01 pm, scsoce 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+ > +. Please tell us what manual,

Re: Why not Ruby?

2009-01-01 Thread Fuzzyman
On Jan 2, 12:16 am, Steven D'Aprano 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 one. > > You don't think Pyth

Re: Why not Ruby?

2009-01-01 Thread Tim Greer
Richard Riley wrote: > Tim Greer writes: > >> Richard Riley wrote: >> >>> >>> Tim Greer 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 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 s

Re: Why not Ruby?

2009-01-01 Thread J�rgen Exner
Kenneth Tilton 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 J�rgen Exner
Richard Riley 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 *PLONK* jue -- http

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Kenneth Tilton writes: > Richard Riley wrote: >> Jason Rumney writes: >> >>> On Jan 1, 3:12 pm, r 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 someti

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Tim Greer writes: > Richard Riley wrote: > >> >> Tim Greer 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

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Raymond Wiker writes: > Richard Riley writes: > >> Tamas K Papp 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

Re: why cannot assign to function call

2009-01-01 Thread Tim Roberts
Aaron Brady 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 President >are..

Re: Why not Ruby?

2009-01-01 Thread Kenneth Tilton
Richard Riley wrote: Jason Rumney writes: On Jan 1, 3:12 pm, r 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 follo

Re: Why not Ruby?

2009-01-01 Thread Tim Greer
Richard Riley wrote: > Jason Rumney writes: > >> On Jan 1, 3:12 pm, r 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

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: > > Tim Greer 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 bes

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 wrote: > On Jan 1, 2:37 pm, Kay Schluehr 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

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: Why not Ruby?

2009-01-01 Thread Benjamin Kaplan
On Thu, Jan 1, 2009 at 5:28 PM, Richard Riley wrote: > Jason Rumney writes: > > > On Jan 1, 3:12 pm, r 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 t

Re: Why not Ruby?

2009-01-01 Thread Raymond Wiker
Richard Riley writes: > Tamas K Papp 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 poi

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 gat

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: Why not Ruby?

2009-01-01 Thread Richard Riley
Tamas K Papp 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 supportive

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
Tim Greer 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 guy's posts.

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
r writes: > On Jan 1, 2:05 am, Jason Rumney wrote: >> On Jan 1, 3:12 pm, r 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

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

2009-01-01 Thread Fuzzyman
On Jan 1, 10:24 pm, Aaron Brady wrote: > On Jan 1, 2:55 pm, "Chris Rebert" wrote: > > > > > On Thu, Jan 1, 2009 at 12:24 PM, excord80 wrote: > > > On Jan 1, 2:37 pm, Kay Schluehr wrote: > > > >> There is no solution to this problem from a Python perspective. Do > > >> what everyone does right n

Re: Why not Ruby?

2009-01-01 Thread Richard Riley
Jason Rumney writes: > On Jan 1, 3:12 pm, r 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 posti

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, p

Re: OpenOpt 0.21 (free optimization framework)

2009-01-01 Thread larrydag
On Dec 15 2008, 4:32 pm, dmitrey 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: > > http://openopt.blogspot.com/2008/12/openopt-release-021.html > > Regards, Ope

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

2009-01-01 Thread Aaron Brady
On Jan 1, 2:55 pm, "Chris Rebert" wrote: > On Thu, Jan 1, 2009 at 12:24 PM, excord80 wrote: > > On Jan 1, 2:37 pm, Kay Schluehr 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 i

Re: SQL, lite lite lite

2009-01-01 Thread Aaron Brady
On Jan 1, 7:43 am, Bruno Desthuilliers wrote: > Aaron Brady a écrit : > > > > > On Dec 30, 2:52 pm, Bruno Desthuilliers > > 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? :-) Nothin

Re: game engine (as in rules not graphics)

2009-01-01 Thread Aaron Brady
On Dec 29 2008, 8:52 am, Aaron Brady wrote: > On Dec 29, 4:14 am, Martin wrote: > > > Hi, > > > 2008/12/29 Phil Runciman : > > > > See: Chris Moss, Prolog++: The Power of Object-Oriented and Logic > > > Programming (ISBN 0201565072) > > > > This book is a pretty handy intro to an OO version Prol

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

2009-01-01 Thread Fuzzyman
On Jan 1, 8:55 pm, "Chris Rebert" wrote: > On Thu, Jan 1, 2009 at 12:24 PM, excord80 wrote: > > On Jan 1, 2:37 pm, Kay Schluehr 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 i

Re: Why not Ruby?

2009-01-01 Thread Fuzzyman
On Jan 1, 8:32 pm, Paul Rubin 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 g

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] >>>

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, wrote: > Consider these two lists comprehensions: > > L1=[[1 for j in range(3)] for i in range(3)] > L2=[[1]*3]*3 > So far, everything is OK, but let us now modify the lists' contents in > the following way: > It seems a misbehaviour in Python, or there is somet

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 wrote: > On Jan 1, 2:37 pm, Kay Schluehr 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

Re: Why not Ruby?

2009-01-01 Thread Paul Rubin
r 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: http://www.st.cs.uni-saarland.de/edu/seminare

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

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 library

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

2009-01-01 Thread excord80
On Jan 1, 2:37 pm, Kay Schluehr 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* like it's just a matte

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 fle

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 > 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 would ri

Re: idle 3.0 unicode

2009-01-01 Thread Mark Tolonen
"Pavel Kosina" 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, in IDLE e

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 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 setup.py file results in

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

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: 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 e

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, 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. Does this help

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? M

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? M

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 f

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 = sess

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", li

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 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 s

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 Gri

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

2009-01-01 Thread janislaw
On 1 Sty, 12:37, Tokyo Dan 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 of a social site bu

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 2:05 am, Jason Rumney wrote: > On Jan 1, 3:12 pm, r 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

Re: Why not Ruby?

2009-01-01 Thread Stanisław Halik
In comp.lang.lisp r 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 around at

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 readline

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 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 plain text version fo

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. http://timgolden.me.uk/pyt

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 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, it's a big fi

Re: Creating an application for Linux

2009-01-01 Thread Mike Driscoll
On Jan 1, 7:47 am, lkcl wrote: > On Dec 31 2008, 9:54 pm, Mike Driscoll wrote: > > > On Dec 31, 3:36 pm,lkcl 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 u

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

2009-01-01 Thread Mike Driscoll
On Jan 1, 10:36 am, Mike Driscoll 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 > > Current

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 pla

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) ?

Re: Videocapture in python

2009-01-01 Thread koranthala
On Jan 1, 7:26 pm, 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 abo

Re: initialization in python

2009-01-01 Thread koranthala
On Jan 1, 6:54 pm, John Machin 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 not getting u

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: SQL, lite lite lite

2009-01-01 Thread Bruno Desthuilliers
Aaron Brady a écrit : On Dec 30, 2:52 pm, Bruno Desthuilliers 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 most people that really need what you are p

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 -- http://mail.

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 p

Re: Creating an application for Linux

2009-01-01 Thread lkcl
On Dec 31 2008, 9:54 pm, Mike Driscoll wrote: > On Dec 31, 3:36 pm,lkcl 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 username looks vaguely familiar, I don't > th

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 = No

Re: Videocapture in python

2009-01-01 Thread koranthala
On Jan 1, 1:58 pm, "alex goretoy" 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, wrote: > > I face issues in videocapture in python. Cant find anyplace where we > > can raise bug reports, so mentioning h

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: Why not Ruby?

2009-01-01 Thread Randal L. Schwartz
> "r" == r 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 post),

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 -- http://mail.python.org/mailman/listinfo/python-li

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,

Re: Parsing Excel spreadsheets

2009-01-01 Thread Joshua Moore
On Dec 30 2008, 8:07 am, "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 > washttp://www.lexicon.net/sjmachin/xlrd.htm, > but

Re: idle 3.0 unicode

2009-01-01 Thread 小楼
On 1月1日, 下午4时11分, Pavel Kosina 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 : > # -*- codi

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): ...

  1   2   >