Re: python simply not scaleable enough for google?

2009-11-14 Thread Vincent Manis
On 2009-11-13, at 23:20, Robert Brown wrote, quoting me: > On 2009-11-13, at 17:42, Robert Brown wrote, quoting me: > >>> ... Python *the language* is specified in a way that >>> makes executing Python programs quickly very very difficult. > >> That is untrue. I have mentioned before that opti

Re: python simply not scaleable enough for google?

2009-11-14 Thread sturlamolden
On 12 Nov, 18:33, J Kenneth King wrote: > Where Python might get hit *as a language* is that the Python programmer > has to drop into C to implement optimized data-structures for dealing > with the kind of IO that would slow down the Python interpreter.  That's > why we have numpy, scipy, etc. T

Re: python simply not scaleable enough for google?

2009-11-14 Thread Paul Rubin
sturlamolden writes: > With Cython we can get "Python" to run at "the speed of C" just by > adding in optional type declarations for critical variables (most need > not be declared). I think there are other semantic differences too. For general thoughts on such differences (Cython is not mention

Re: python simply not scaleable enough for google?

2009-11-14 Thread Vincent Manis
On 2009-11-13, at 23:39, Robert Brown wrote, quoting me: > Common Lisp blends together features of previous Lisps, which were designed to > be executed efficiently. Operating systems were written in these variants. > Execution speed was important. The Common Lisp standardization committee > inclu

Re: python simply not scaleable enough for google?

2009-11-14 Thread Alf P. Steinbach
* Vincent Manis: On 2009-11-13, at 22:51, Alf P. Steinbach wrote: It's sort of hilarious. It really is, see below. So no, it's not a language that is slow, it's of course only concrete implementations that may have slowness flavoring. And no, not really, they don't, because it's just parti

python-daemon and upstart

2009-11-14 Thread Ben Finney
Paul Rudin writes: > I'm experimenting with the daemon module > and upstart > . First: Thank you for using ‘python-daemon’; it's getting more widespread use all the time, which is really helping to find all the quirks of AP

Re: QuerySets in Dictionaries

2009-11-14 Thread Diez B. Roggisch
scoopseven schrieb: On Nov 12, 8:55 pm, Steven D'Aprano wrote: On Thu, 12 Nov 2009 10:39:33 -0800, scoopseven wrote: I need to create a dictionary of querysets. I have code that looks like: query1 = Myobject.objects.filter(status=1) query2 = Myobject.objects.filter(status=2) query3 = Myobject

Re: python simply not scaleable enough for google?

2009-11-14 Thread Vincent Manis
On 2009-11-14, at 00:22, Alf P. Steinbach wrote, in response to my earlier post. > Anyways, it's a good example of focusing on irrelevant and meaningless > precision plus at the same time utilizing imprecision, higgedly-piggedly as > it suits one's argument. Mixing hard precise logic with imprec

Re: python simply not scaleable enough for google?

2009-11-14 Thread sturlamolden
On 12 Nov, 18:32, "Alf P. Steinbach" wrote: > Of course Python is slow: if you want speed, pay for it by complexity. Python is slow is really a misconception. Python is used for scientific computing at HPC centres around the world. NumPy's predecessor numarray was made by NASA for the Hubble spa

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Diez B. Roggisch
kj schrieb: ...just bit me in the "fuzzy posterior". The best I can come up with is the hideous lol = [[] for _ in xrange(500)] If you call that hideous, I suggest you perform the same exercise in Java or C++ - and then come back to python and relax Diez -- http://mail.python.org/ma

Re: python simply not scaleable enough for google?

2009-11-14 Thread Alf P. Steinbach
* sturlamolden: On 12 Nov, 18:32, "Alf P. Steinbach" wrote: Of course Python is slow: if you want speed, pay for it by complexity. Python is slow is really a misconception. Sorry, no, I don't think so. But we can't know that without ESP powers. Which seem to be in short supply. Python

Re: python simply not scaleable enough for google?

2009-11-14 Thread sturlamolden
On 12 Nov, 18:32, "Alf P. Steinbach" wrote: > Hm, this seems religious. > > Of course Python is slow: if you want speed, pay for it by complexity. Not really. The speed problems of Python can to a large extent be attributed to a sub-optimal VM. Perl tends to be much faster than Python. Certain

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Paul Rubin
kj writes: > lol = [None] * 500 > for i in xrange(len(lol)): > lol[i] = [] lol = map(list, [()] * 500) -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-14 Thread Alf P. Steinbach
* Vincent Manis: On 2009-11-14, at 00:22, Alf P. Steinbach wrote, in response to my earlier post. Anyways, it's a good example of focusing on irrelevant and meaningless precision plus at the same time utilizing imprecision, higgedly-piggedly as it suits one's argument. Mixing hard precise logic

Re: python simply not scaleable enough for google?

2009-11-14 Thread Alf P. Steinbach
* sturlamolden: On 12 Nov, 18:32, "Alf P. Steinbach" wrote: Hm, this seems religious. Of course Python is slow: if you want speed, pay for it by complexity. Not really. The speed problems of Python can to a large extent be attributed to a sub-optimal VM. Perl tends to be much faster than P

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Brian J Mingus
On Sat, Nov 14, 2009 at 1:50 AM, Paul Rubin wrote: > kj writes: > > lol = [None] * 500 > > for i in xrange(len(lol)): > > lol[i] = [] > > lol = map(list, [()] * 500) Could someone explain what the deal is with this thread? Thanks. [[]]*500 -- http://mai

Re: python simply not scaleable enough for google?

2009-11-14 Thread Vincent Manis
On 2009-11-14, at 01:11, Alf P. Steinbach wrote: >> OK, now we've reached a total breakdown in communication, Alf. You appear >> to take exception to distinguishing between a language and its >> implementation. > > Not at all. > > But that doesn't mean that making that distinction is always mean

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Vlastimil Brom
2009/11/14 Brian J Mingus : > > > On Sat, Nov 14, 2009 at 1:50 AM, Paul Rubin > wrote: >> >> kj writes: >> >   lol = [None] * 500 >> >   for i in xrange(len(lol)): >> >       lol[i] = [] >> >> lol = map(list, [()] * 500) > > Could someone explain what the deal is wit

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Brian J Mingus
On Sat, Nov 14, 2009 at 2:50 AM, Vlastimil Brom wrote: > 2009/11/14 Brian J Mingus : > > > > > > On Sat, Nov 14, 2009 at 1:50 AM, Paul Rubin @nospam.invalid> > > wrote: > >> > >> kj writes: > >> > lol = [None] * 500 > >> > for i in xrange(len(lol)): > >> > lol[i] = [] >

Re: python simply not scaleable enough for google?

2009-11-14 Thread sturlamolden
On 14 Nov, 09:47, "Alf P. Steinbach" wrote: > > Python is slow is really a misconception. > > Sorry, no, I don't think so. No, i really think a lot of the conveived slowness in Python comes from bad programming practices. Sure we can deomstrate that C or LuaJIT is faster by orders of magnitude f

Re: python simply not scaleable enough for google?

2009-11-14 Thread Roel Schroeven
Vincent Manis schreef: > On 2009-11-14, at 01:11, Alf P. Steinbach wrote: >>> OK, now we've reached a total breakdown in communication, Alf. You appear >>> to take exception to distinguishing between a language and its >>> implementation. >> Not at all. >> >> But that doesn't mean that making that

Re: python simply not scaleable enough for google?

2009-11-14 Thread Alf P. Steinbach
* Vincent Manis: On 2009-11-14, at 01:11, Alf P. Steinbach wrote: OK, now we've reached a total breakdown in communication, Alf. You appear to take exception to distinguishing between a language and its implementation. Not at all. But that doesn't mean that making that distinction is always me

Re: python simply not scaleable enough for google?

2009-11-14 Thread Roel Schroeven
Vincent Manis schreef: > I notice you've weakened your claim. Now we're down to `hard to execute > quickly'. That I would agree with you on, in that building an efficient > Python system would be a lot of work. However, my claim is that that work > is engineering, not research: most of the bits

Help with database planning

2009-11-14 Thread Juliano
Hello, everybody. I'm a linguist with practical skills on computers/programming. We've been working with an ontology at my department, and now I need to create a GUI viewer for the flat file we have. I tried to write an Ontology class which manages the data read and parsed from the flat file, but

Re: Python & Go

2009-11-14 Thread kj
In <7xpr7lixnn@ruckus.brouhaha.com> Paul Rubin writes: >It seems a little weird to me that they (Google) are concerned with >the speed of the compiler, indicating that they plan to write enormous >programs in the language. Fast compilation also means that Go ca

Re: Python & Go

2009-11-14 Thread kj
In <129a67e4-328c-42b9-9bf3-152f1b76f...@k19g2000yqc.googlegroups.com> Michele Simionato writes: >It does not look so primitive to me, compared to commonly used >languages. >I am pretty sure that they are "missing a lot of the latest ideas" on >purpose. If they want to succeed and make Go a popu

Re: A "terminators' club" for clp

2009-11-14 Thread r
On Nov 14, 4:59 am, kj wrote: > But, as I already showed, I'm out of my depth here, > so I'd better shut up. Don't give up so easy! The idea is great, what Paul is saying is that most people who read this group use newsreaders and that has nothing to do with google groups. These guy's have kill f

Re: How to specify Python version in script?

2009-11-14 Thread kj
In <77b812a9-d82c-4aaa-8037-ec30366fc...@h34g2000yqm.googlegroups.com> Yinon Ehrlich writes: >> Is there some way to specify at the very beginning of the script >> the acceptable range of Python versions? >sys.hexversion, >see http://mail.python.org/pipermail/python-list/2009-June/185939.html

Re: Help with database planning

2009-11-14 Thread Himanshu
2009/11/14 Juliano : > Hello, everybody. > > I'm a linguist with practical skills on computers/programming. > > We've been working with an ontology at my department, and now I need > to create a GUI viewer for the flat file we have. > I tried to write an Ontology class which manages the data read a

Re: Help with database planning

2009-11-14 Thread Ken Seehart
Good idea to use Django. I've just started using it and I really like it. However, I should give you a heads-up: You will probably want to use a Django migration tool (I'm using South) because the alternative is basically to rebuild your database each time your model changes. Unfortunately,

Re: Help with database planning

2009-11-14 Thread Ken Seehart
Oops, forgot the blank arg. Anyway, this is of course untested code... # Only one of the following is used. The other two are blank. concept = models.ForeignKey(Concept, blank=True) slot = models.ForeignKey(Slot, blank=True) filler = models.ForeignKey(Filler, blank=True) Ken Seehart wr

Re: Python & Go

2009-11-14 Thread sturlamolden
On 12 Nov, 01:53, kj wrote: > I'm just learning about Google's latest: the GO (Go?) language. > (e.g.http://golang.orgorhttp://www.youtube.com/watch?v=rKnDgT73v8s). > There are some distinctly Pythonoid features to the syntax, such > as "import this_or_that", the absence of parentheses at the top

Re: Choosing GUI Module for Python

2009-11-14 Thread sturlamolden
On 9 Nov, 05:49, Antony wrote: >    I just wanted to know which module is best for developing designing > interface in python . I personally feel the wxPython support in the 3.1 beta of wxFormBuilder makes the choise rather simple. It generates a Python file with classes for all WYSIWYG GUI form

Re: the unicode saga continues...

2009-11-14 Thread Martin v. Löwis
> Can anybody clue me in to what's going on here? It's as Mark says: the console encoding is cp437 on your system, cp1252. Windows has *two* default code pages at any point in time: the OEM code page, and the ANSI code page. Either one depends on the Windows release (Western, Japanese, etc.), and

Re: Help with database planning

2009-11-14 Thread Ben Finney
Juliano writes: > We've been working with an ontology at my department […] I have been > being pushed towards changing the basic plan and build a DB so that > data access will be faster and easier for both the desktop GUI and the > web app. Right now, I'm trying to work with sqlite, since it can

COM Server wirh MS Excel

2009-11-14 Thread Cannonbiker
Hi, I would lake use win32com with Excel. I tried to use python COM example from 'The Quick Python Book' on page 250 but without success. The COM Module is successfully registetred but MS Excel reported this message http://home.tiscali.cz/fotogalerie7/Error80004005.gif I tried omitted following st

Re: A "terminators' club" for clp

2009-11-14 Thread gil_johnson
On Nov 13, 5:29 pm, kj wrote: [...] > Or it could be set up so that at least n > 1 "delete" votes and no > "keep" votes are required to get something nixed.  Etc. > > This seems simpler than all-out moderation. > > ("all-out moderation"? now, there's an oxymoron for ya!) > How about using a "rank

Re: COM Server wirh MS Excel

2009-11-14 Thread Chris Withers
Cannonbiker wrote: Hi, I would lake use win32com with Excel. I tried to use python COM example from 'The Quick Python Book' on page 250 but without success. I suggest you have a good read of http://www.python-excel.org. You may well find you don't need to use COM at all...# Chris -- Simplist

More Python versions on an XP machine

2009-11-14 Thread Gabor Urban
Hi guys, this a very MS specific question. I do use a rather old Python version, because we have a couple of applications written for that. Porting them to a newer Python is not allowed by the bosses. Now we will start a new project with latest stable Python. Can I have them both on my computer, a

Re: COM Server wirh MS Excel

2009-11-14 Thread Cannonbiker
On 14 lis, 14:24, Cannonbiker wrote: The ServerCOM file is here http://home.tiscali.cz/fotogalerie7/ServerCOM.py -- http://mail.python.org/mailman/listinfo/python-list

Re: A "terminators' club" for clp

2009-11-14 Thread Alf P. Steinbach
* gil_johnson: On Nov 13, 5:29 pm, kj wrote: [...] Or it could be set up so that at least n > 1 "delete" votes and no "keep" votes are required to get something nixed. Etc. This seems simpler than all-out moderation. ("all-out moderation"? now, there's an oxymoron for ya!) How about using

Re: More Python versions on an XP machine

2009-11-14 Thread Diez B. Roggisch
Gabor Urban schrieb: Hi guys, this a very MS specific question. I do use a rather old Python version, because we have a couple of applications written for that. Porting them to a newer Python is not allowed by the bosses. Now we will start a new project with latest stable Python. Can I have them

Re: python simply not scaleable enough for google?

2009-11-14 Thread Willem Broekema
On Nov 14, 8:55 am, Vincent Manis wrote: > On 2009-11-13, at 23:20, Robert Brown wrote, quoting me: > > Please look atCLPython. [...] > Ah, that does explain it. I bet you didn't even look at it. FWIW, I'm the author of CLPython. > CLOS is most definitely the wrong vehicle for implementing > Pyt

Re: COM Server wirh MS Excel

2009-11-14 Thread Cannonbiker
On 14 lis, 14:34, Chris Withers wrote: > Cannonbiker wrote: > > Hi, > > I would lake use win32com with Excel. I tried to use python COM > > example from 'The Quick Python Book' on page 250 but without success. > > I suggest you have a good read ofhttp://www.python-excel.org. > > You may well find

Re: Choosing GUI Module for Python

2009-11-14 Thread Dietmar Schwertberger
sturlamolden schrieb: I personally feel the wxPython support in the 3.1 beta of wxFormBuilder makes the choise rather simple. It generates a Python file with classes for all WYSIWYG GUI forms/windows/dialogs. Then in our Python code, we just import and inherit the form, and implement the event ha

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Ulrich Eckhardt
Diez B. Roggisch wrote: > kj schrieb: >> lol = [[] for _ in xrange(500)] > > If you call that hideous, I suggest you perform the same exercise in > Java or C++ - and then come back to python and relax I might be missing something that's not explicitly mentioned here, but I'd say that all n

ANN: PyGUI 2.1

2009-11-14 Thread Greg Ewing
PyGUI 2.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Highlights of this version: * Win32: Fixed bug preventing PyGUI apps from working under pythonw Fixed incorrect mouse coordinates in ScrollableView Added more standard cursors * MacOSX:

Re: run all scripts in sub-directory as subroutines?

2009-11-14 Thread Dave Angel
Tobiah wrote: This works fine, but in the sub-modules the sys.path appropriately returns the same as from the parent, I want them to know their own file names. How?? I can pass it to them, but wondered if there is a more self-sufficient way for a module to know from where it was invoked.

Re: feedback on function introspection in argparse

2009-11-14 Thread Chris Withers
Yuv wrote: On Nov 8, 1:33 am, Carl Banks wrote: Is the docstring expected to be formatted according to some convention? We tried to comply to PEP 257 and we're open to suggestions on this. I'd suggest at the very least supporting Sphinx docstrings that have the parameters in them... Chri

Anything better than shutil?

2009-11-14 Thread Roy Smith
I'm converting some old bash scripts to python. There's lots of places where I'm doing things like "rm $source_dir/*.conf". The best way I can see to convert this into python is: configs = glob.glob(os.path.join(source_dir, '*.conf')) for conf_file in configs: shutil.copy(conf_fi

Re: Anything better than shutil?

2009-11-14 Thread Chris Withers
Roy Smith wrote: The idea interface I see would be one like: shutil.copy([source_dir, '*.conf'], conf_dir) the idea is that if the first argument is a list (or maybe any iterable other than a string?), it would automatically get run through os.path.join(). And, the result would always get pa

How to know if a file is a text file

2009-11-14 Thread Luca Fabbri
Hi all. I'm looking for a way to be able to load a generic file from the system and understand if he is plain text. The mimetype module has some nice methods, but for example it's not working for file without extension. Any suggestion? -- -- luca -- http://mail.python.org/mailman/listinfo/pyth

Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-14 Thread DreiJane
Hello, this page http://docs.python.org/3.1/c-api/typeobj.html has a bad error: " PyTypeObject* PyObject.ob_type This is the type’s type, in other words its metatype. It is initialized by the argument to the PyObject_HEAD_INIT macro, and its value should normally be &PyType_Type. However, for dy

Re: __import__ returns module without it's attributes?

2009-11-14 Thread Dave Angel
Zac Burns wrote: I've overloaded __import__ to modify modules after they are imported... but running dir(module) on the result only returns __builtins__, __doc__, __file__, __name__, __package__, and __path__. Why is this? More importantly, where can I hook in that would allow me to see the co

Re: python-daemon and upstart

2009-11-14 Thread Paul Rudin
Ben Finney writes: > Paul Rudin writes: > >> I'm experimenting with the daemon module >> and upstart >> . > > First: Thank you for using ‘python-daemon’; it's getting more widespread > use all the time, which is really help

Re: More Python versions on an XP machine

2009-11-14 Thread DreiJane
Hi, there are several ways to do that besides starting python scripts with a double-click on a desktop icon (that can only work with the one and only python version of the registry). One is to start the new python version directly from a "DosBox". You could copy python.exe or pythonw.exe from the

Re: bootstrapping on machines without Python

2009-11-14 Thread Jonathan Hartley
On Nov 13, 1:57 pm, Tim Golden wrote: > Jonathan Hartley wrote: > > While examining py2exe et al of late, my thoughts keep returning to > > the idea of writing, in C or similar, a compiled stand-alone > > executable 'bootstrapper', which: > > 1) downloads and install a Python interpreter if none e

Re: Python & Go

2009-11-14 Thread Michele Simionato
On Nov 14, 12:26 pm, kj wrote: > > The two goals of replacing C with "something more modern" and at > the same time have a "nearly zero learning curve" seem to me mutually > negating.  The closer to zero the learning curve is, the closer to > C/C++, and therefore the less modern, that language wil

Re: Choosing GUI Module for Python

2009-11-14 Thread sturlamolden
On 14 Nov, 15:35, Dietmar Schwertberger wrote: >    self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY ) >    self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton", > wx.DefaultPosition, wx.DefaultSize, 0 ) >    m_toolBar1.AddControl( m_button1 ) > > (i.e. "self." is

Re: bootstrapping on machines without Python

2009-11-14 Thread Jonathan Hartley
On Nov 13, 10:25 pm, mma...@gmx.net wrote: > On Fri, 13 Nov 2009 02:40:28 -0800 (PST) > > Jonathan Hartley wrote: > > Even my very limited understanding of the issues is enough to see that > > the idea is far from trivial. Thanks heaps for the input from everyone. Martin Lemburg's 'chained' appr

Re: python-daemon and upstart

2009-11-14 Thread Paul Rudin
Paul Rudin writes: > Ben Finney writes: > >> Paul Rudin writes: >>> description "test daemon" >>> expect daemon >>> chdir /tmp >>> exec /tmp/testdaemon.py Further experimentation reveals that by omitting the "expect daemon" stanza everything works fine. But I'm still a confused - the manpage

Re: How to know if a file is a text file

2009-11-14 Thread Philip Semanchuk
On Nov 14, 2009, at 11:02 AM, Luca Fabbri wrote: Hi all. I'm looking for a way to be able to load a generic file from the system and understand if he is plain text. The mimetype module has some nice methods, but for example it's not working for file without extension. Hi Luca, You have to de

Re: Choosing GUI Module for Python

2009-11-14 Thread Dietmar Schwertberger
sturlamolden schrieb: On 14 Nov, 15:35, Dietmar Schwertberger wrote: self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY ) self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton", wx.DefaultPosition, wx.DefaultSize, 0 ) m_toolBar1.AddControl( m_button1 ) (i.

Re: Python & Go

2009-11-14 Thread John Nagle
sturlamolden wrote: On 12 Nov, 01:53, kj wrote: I'm just learning about Google's latest: the GO (Go?) language. It's interesting. The semantics are closer to Java than any other mainstream language. While Java usually is run with a "virtual machine", Go is more like Java hard-compiled (

Re: A "terminators' club" for clp

2009-11-14 Thread r
On Nov 14, 7:28 am, gil_johnson wrote: > How about using a "rank this post" feature? Anybody could rank a post > as spam, and a sufficiently large number of negatives would quickly > draw the attention of someone with the power to kill the message. I > suppose even this is subject to abuse, allow

Re: python simply not scaleable enough for google?

2009-11-14 Thread Paul Rubin
sturlamolden writes: > Python on a better VM (LuaJIT, Parrot, LLVM, several > JavaScript) will easily outperform CPython by orders of magnitide. Maybe Python semantics make it more difficult to optimize than those other languages. For example, in a = foo.bar(1) b = muggle() c = foo.bar(2)

Re: Psyco on 64-bit machines

2009-11-14 Thread Diez B. Roggisch
Russ P. schrieb: I have a Python program that runs too slow for some inputs. I would like to speed it up without rewriting any code. Psyco seemed like exactly what I need, until I saw that it only works on a 32-bit architecture. I work in an environment of Sun Ultras that are all 64- bit. However

Re: The ol' [[]] * 500 bug...

2009-11-14 Thread Paul Rubin
Ulrich Eckhardt writes: > That said, [[]]*500 is IMHO more readable. But the issue in the thread is that it does the wrong thing. -- http://mail.python.org/mailman/listinfo/python-list

Re: A "terminators' club" for clp

2009-11-14 Thread Paul Rubin
"Alf P. Steinbach" writes: > The problem with moderation isn't getting rid of spam and trolls etc., > but turnaround time. There is automatic moderation software that auto-approves any post from an address that has had one or two posts manually approved. While that's susceptible to address forger

Re: Python & Go

2009-11-14 Thread Paul Rubin
sturlamolden writes: > And looking at Go, I cannot understand why Google prefer this over > e.g. Lua. I thought Lua had no type system and no concurrency. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & Go

2009-11-14 Thread Paul Rubin
kj writes: > One more thing: I found Rob Pike's mutterings on generics (towards > the end of his rollout video) rather offputting, because he gave > the impression that some important aspects of the language were > not even considered before major decisions for it were set in stone. > It looks lik

Re: python simply not scaleable enough for google?

2009-11-14 Thread Grant Edwards
On 2009-11-14, David Robinow wrote: > On Fri, Nov 13, 2009 at 3:32 PM, Paul Rubin > wrote: >> ... ?This is Usenet so >> please stick with Usenet practices. ?If you want a web forum there are >> plenty of them out there. > Actually this is python-list@python.org Actu

Run a external program.

2009-11-14 Thread Yasser Almeida Hernández
Hi all!! I'm writing a script where i call a external program which receive some arguments. One of this arguments is stored in a variable, that is passed as argument as well: import os ... f = open(file1, 'r') s = 'command $f -i file2 -w 1.4 -o file3.out' os.system(s) ... When i run the sc

Re: Run a external program.

2009-11-14 Thread MRAB
Yasser Almeida Hernández wrote: Hi all!! I'm writing a script where i call a external program which receive some arguments. One of this arguments is stored in a variable, that is passed as argument as well: import os ... f = open(file1, 'r') s = 'command $f -i file2 -w 1.4 -o file3.out' os.s

Re: Choosing GUI Module for Python

2009-11-14 Thread sturlamolden
On 14 Nov, 19:02, Dietmar Schwertberger wrote: > 08/23/2009 Version 3.01.63 (Beta) > 08/19/2009 Version 3.01.62 (Beta) > > I tried 3.01.63. > I can see in the Python window already that the code is not correct. 3.01.63 Did you remember to install the wxAdditions? Could you send me an .fbp file

Re: Run a external program.

2009-11-14 Thread Mark Tolonen
"Yasser Almeida Hernández" wrote in message news:20091114142611.sj45qput2c84s...@correo.fenhi.uh.cu... Hi all!! I'm writing a script where i call a external program which receive some arguments. One of this arguments is stored in a variable, that is passed as argument as well: import os

Re: Run a external program.

2009-11-14 Thread Yasser Almeida Hernández
So, how can i pass an argument as a variable in this context...? Quoting MRAB : Yasser Almeida Hernández wrote: Hi all!! I'm writing a script where i call a external program which receive some arguments. One of this arguments is stored in a variable, that is passed as argument as well:

Re: python-daemon and upstart

2009-11-14 Thread Paul Rudin
Paul Rudin writes: > > So I would have expected it to be necessary in this case. Maybe this is > more an upstart issue than a python-daemon one - not sure. Aha - so I discover that if detach_process is not explicitly passed to the DaemonContext initialiser it tries to guess whether it ne

Re: Python & Go

2009-11-14 Thread sturlamolden
On 14 Nov, 19:18, John Nagle wrote: > Syntax for queues is a minor win. No, that's syntax bloat. The go keyword could be a problem as well. I suspect it could infringe on Cilk++ patents. Perhaps Go cannot be used without a licence from Cilk Arts? -- http://mail.python.org/mailman/listinfo

Re: Python & Go

2009-11-14 Thread Paul Rubin
sturlamolden writes: > The go keyword could be a problem as well. I suspect it could infringe > on Cilk++ patents. Perhaps Go cannot be used without a licence from > Cilk Arts? Also as somebody said, if after a while they decide to make a new version of the language, they'll have to call it Go2,

Re: Run a external program.

2009-11-14 Thread Chris Rebert
> Quoting MRAB : >> Yasser Almeida Hernández wrote: >>> >>> Hi all!! >>> >>> I'm writing a script where i call a external program which receive  some >>> arguments. >>> One of this arguments is stored in a variable, that is passed as >>>  argument as well: >>> >>> import os >>> ... >>> f = open(fil

Re: Run a external program.

2009-11-14 Thread MRAB
Yasser Almeida Hernández wrote: So, how can i pass an argument as a variable in this context...? You can't pass arbitrary values on a command line. In this case, why not just pass the path of the file? s = 'command "%s" -i file2 -w 1.4 -o file3.out' % file1 Quoting MRAB : Yasser Almeida H

Re: Run a external program.

2009-11-14 Thread Yasser Almeida Hernández
All ran ok!! Thanks a lot Quoting MRAB : Yasser Almeida Hernández wrote: So, how can i pass an argument as a variable in this context...? You can't pass arbitrary values on a command line. In this case, why not just pass the path of the file? s = 'command "%s" -i file2 -w 1.4 -o file3.ou

Re: Help with database planning

2009-11-14 Thread Rob Williscroft
Juliano wrote in news:0e64893a-af82-4004-bf3c-f397f2022...@g22g2000prf.googlegroups.com in comp.lang.python: [snip] > So, for ONE *concept*, we have, usually, MANY *slots*, each *slot* has > ONE *facet*, and each *facet* can have MORE THAN ONE *filler*. > Besides, some *slots* and *fillers* are

Re: 3.x and 2.x on same machine (is this info at Python.org??)

2009-11-14 Thread Nobody
On Fri, 13 Nov 2009 06:05:48 -0500, Dave Angel wrote: >>> Currently i am using 2.6 on Windows and need to start writing code in >>> 3.0. I cannot leave 2.x yet because 3rd party modules are still not >>> converted. So i want to install 3.0 without disturbing my current >>> Python2.x. What i'm afra

Re: python simply not scaleable enough for google?

2009-11-14 Thread Terry Reedy
sturlamolden wrote: - For the few cases where a graphics program really need C, we can always resort to using ctypes, f2py or Cython. Gluing Python with C or Fortran is very easy using these tools. That is much better than keeping it all in C++. In case anyone thinks resorting to C or Fortran

Re: Python & Go

2009-11-14 Thread Terry Reedy
Paul Rubin wrote: Mark Chu-Carroll has a new post about Go: http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php In a couple of minutes, I wrote his toy prime filter example in Python, mostly from the text rather than the code, which I can barely stand to read. It r

Re: python simply not scaleable enough for google?

2009-11-14 Thread Edward A. Falk
In article , Terry Reedy wrote: > >I can imagine a day when code compiled from Python is routinely >time-competitive with hand-written C. I can't. Too much about the language is dynamic. The untyped variables alone are a killer. int a,b,c; ... a = b + c; In C, this c

Re: Python & Go

2009-11-14 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy wrote: > Paul Rubin wrote: > > Mark Chu-Carroll has a new post about Go: >> >> >> http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php >> > > In a couple of minutes, I wrote his toy prime filter example in Python, > mostly from

Re: python simply not scaleable enough for google?

2009-11-14 Thread Terry Reedy
Willem Broekema wrote: It might have gotten a bit better, but the central message still stands: Python has made design choices that make efficient compilation hard. OK, let me try this again. My assertion is that with some combination of JITting, reorganization of the Python runtime, and opti

Re: A "terminators' club" for clp

2009-11-14 Thread Terry Reedy
r wrote: On Nov 14, 4:59 am, kj wrote: But, as I already showed, I'm out of my depth here, so I'd better shut up. Don't give up so easy! The idea is great, what Paul is saying is that most people who read this group use newsreaders and that has nothing to do with google groups. These guy's ha

Re: Psyco on 64-bit machines

2009-11-14 Thread Russ P.
On Nov 14, 10:15 am, "Diez B. Roggisch" wrote: > Russ P. schrieb: > > > I have a Python program that runs too slow for some inputs. I would > > like to speed it up without rewriting any code. Psyco seemed like > > exactly what I need, until I saw that it only works on a 32-bit > > architecture. I

Re: python simply not scaleable enough for google?

2009-11-14 Thread Robert Brown
Vincent Manis writes: > The false statement you made is that `... Python *the language* is specified > in a way that makes executing Python programs quickly very very difficult. > I refuted it by citing several systems that implement languages with > semantics similar to those of Python, and do s

Re: A "terminators' club" for clp

2009-11-14 Thread Paul Rubin
Terry Reedy writes: > To post from g.c.p.g, one must use a real email address and respond > once to an email sent to that address. > > So, the only reason to use c.l.p is if one wants to post anonymously, > like the spammers do ;-). No I don't think so. "Unwilling to disclose email address or e

Simple object reference

2009-11-14 Thread AON LAZIO
Hi, I have some problem with object reference Say I have this code a = b = c = None slist = [a,b,c] for i in range(len(slist)): slist[i] = 5 print slist print a,b,c I got this [5, 5, 5] None None None Question is how can I got all a,b,c variable to have value 5 also? Thanks in advance --

Re: Simple object reference

2009-11-14 Thread Chris Rebert
On Sat, Nov 14, 2009 at 3:25 PM, AON LAZIO wrote: > Hi, I have some problem with object reference > Say I have this code > > a = b = c = None > slist = [a,b,c] Values are stored in the list, not references to names. Modifying the list does not change what values the names a, b, and c have. There

Re: Psyco on 64-bit machines

2009-11-14 Thread Russ P.
On Nov 12, 12:06 pm, "Russ P." wrote: > I have a Python program that runs too slow for some inputs. I would > like to speed it up without rewriting any code. Psyco seemed like > exactly what I need, until I saw that it only works on a 32-bit > architecture. I work in an environment of Sun Ultras t

Re: A "terminators' club" for clp

2009-11-14 Thread r
On Nov 14, 4:52 pm, Terry Reedy wrote: > So, the only reason to use c.l.p is if one wants to post anonymously, > like the spammers do ;-). I don't think that completely correct. Lots of people find GG's to be more suited to their news reading pleasures, i am one of them. I hate to have an email j

Easy way to play single musical notes in Python

2009-11-14 Thread James Harris
Is there a simple way to play musical notes in Python? Something like voice.play("c4") to play C in octave 4 would be ideal. I included a voice parameter as I'd like to play proper notes, not just beeps. This is for recognition of pitch. For example, the program plays a note and the user tries

Re: A "terminators' club" for clp

2009-11-14 Thread Ben Finney
Terry Reedy writes: > So, the only reason to use c.l.p is if one wants to post anonymously, > like the spammers do ;-). Or if one has an ISP who provides a Usenet feed, like mine does. A pox upon Andrew Cuomo for bashing ISPs in the USA with the stick of “child pornography” (which he discovered

  1   2   >