Re: Non Sequitur: Re: Python Forum

2010-06-06 Thread Steven D'Aprano
On Sun, 06 Jun 2010 21:45:44 -0700, Dennis Lee Bieber wrote: > On Mon, 07 Jun 2010 11:29:59 +1000, Ben Finney > declaimed the following in > gmane.comp.python.general: > >> claim to the word. The existing forums are still forums. >> > I favor "fora" I see your smiley, but the Oxford dict

Re: Importing modules

2010-06-06 Thread Chris Rebert
On Sun, Jun 6, 2010 at 10:25 PM, Anthony Papillion wrote: > On Jun 6, 10:33 pm, Chris Rebert wrote: >> On Sun, Jun 6, 2010 at 8:16 PM, Ben Finney >> wrote: >> > Anthony Papillion writes: >> >> >> import os >> >> >> os.path.append('$HOME/gsutils/boto') >> >> >> thinking I could then successfull

Re: Importing modules

2010-06-06 Thread Anthony Papillion
On Jun 6, 10:33 pm, Chris Rebert wrote: > On Sun, Jun 6, 2010 at 8:16 PM, Ben Finney wrote: > > Anthony Papillion writes: > > >> import os > > >> os.path.append('$HOME/gsutils/boto') > > >> thinking I could then successfully do the import boto statement. > >> Nope. > > > You'll need to give the

Re: GUIs - A Modest Proposal

2010-06-06 Thread Carl Banks
On Jun 6, 3:55 pm, ant wrote: > I obviously didn't make my main point clearly enough; I think you did make your point clearly enough, it's just that not many agreed with you. But I'll play along. > I'll restate it > with a different emphasis: > The default GUI shipped with Python is Tkinter. >

Re: RE - Parsing ipconfig /all output - question

2010-06-06 Thread joblack
Great - seems to work =) ... -- http://mail.python.org/mailman/listinfo/python-list

Re: RE - Parsing ipconfig /all output - question

2010-06-06 Thread Tim Pinkawa
On Sun, Jun 6, 2010 at 10:47 PM, joblack wrote: > I'm trying to get the first MAC address from the ipconfig /all output. > Unfortunately you can't just search for Physical Address because the > name is only valid in the English Windows version. > Any ideas? (accidentally sent original to Johanne

ODFPY

2010-06-06 Thread Lawrence D'Oliveiro
Very handy library for creating and manipulating ODF documents without any dependency on OpenOffice.org . I’ve been looking at using it for automating the generation of the invoices I send out at the end of each month. So far, it’s been a lot easier than trying to figu

Re: Python Forum

2010-06-06 Thread Aahz
In article <87r5kj8zmk@benfinney.id.au>, Ben Finney wrote: > >So you say. For the interface to be "better" it needs to keep the good >features of the existing interface. I include among the good features of >Usenet: > > [...] You skipped over the crowning glories of Usenet: * Threaded mess

Re: GUIs - A Modest Proposal

2010-06-06 Thread Aahz
In article <80a7b823-6acb-4ac9-a273-525054265...@k25g2000prh.googlegroups.com>, ant wrote: > >My concern is simple: I think that Python is doomed to remain a minor >language unless we crack this problem. Where's your proof that Python is a minor language? -- Aahz (a...@pythoncraft.com)

RE - Parsing ipconfig /all output - question

2010-06-06 Thread joblack
I'm trying to get the first MAC address from the ipconfig /all output. Unfortunately you can't just search for Physical Address because the name is only valid in the English Windows version. Here a test which isn't working: import subprocess import re p = subprocess.Popen('ipconfig /all', shell =

Re: GUIs - A Modest Proposal

2010-06-06 Thread Carl Banks
On Jun 5, 7:22 pm, ant wrote: > I get the strong feeling that nobody is really happy with the state of > Python GUIs. > Tkinter is not widely liked, but is widely distributed. WxPython and > PyGtk are both > powerful, but quirky in different ways. PyQt is tied to one platform. > And there are > do

Re: Importing modules

2010-06-06 Thread Chris Rebert
On Sun, Jun 6, 2010 at 8:16 PM, Ben Finney wrote: > Anthony Papillion writes: > >> import os >> >> os.path.append('$HOME/gsutils/boto') >> >> thinking I could then successfully do the import boto statement. >> Nope. > > You'll need to give the literal path. Substitution of environment > variables

Re: GUIs - A Modest Proposal

2010-06-06 Thread Lie Ryan
On 06/07/10 12:18, Adam Tauno Williams wrote: > On Mon, 2010-06-07 at 11:11 +1000, Lie Ryan wrote: >> On 06/07/10 10:48, Adam Tauno Williams wrote: >>> On Sun, 2010-06-06 at 17:03 -0700, AD. wrote: On Jun 7, 10:55 am, ant wrote: > My concern is simple: I think that Python is doomed to rem

Re: Importing modules

2010-06-06 Thread Ben Finney
Anthony Papillion writes: > import os > > os.path.append('$HOME/gsutils/boto') > > thinking I could then successfully do the import boto statement. > Nope. You'll need to give the literal path. Substitution of environment variables isn't performed implicitly in strings. -- \ “When we

Importing modules

2010-06-06 Thread Anthony Papillion
Hello Everyone, I'm brand new to Python and have been finding it really easy to get into. But I've run into my very first problem that I'm hoping someone here might be able to help me with. I'm working with the Google Storage API and all of their Python library is under a directory called $HOME/g

Re: GUIs - A Modest Proposal

2010-06-06 Thread Adam Tauno Williams
On Mon, 2010-06-07 at 11:11 +1000, Lie Ryan wrote: > On 06/07/10 10:48, Adam Tauno Williams wrote: > > On Sun, 2010-06-06 at 17:03 -0700, AD. wrote: > >> On Jun 7, 10:55 am, ant wrote: > >>> My concern is simple: I think that Python is doomed to remain a minor > >>> language unless we crack this p

Re: Python Forum

2010-06-06 Thread Ben Finney
"D'Arcy J.M. Cain" writes: > On Mon, 07 Jun 2010 11:02:21 +1000 > Lie Ryan wrote: > > I think Ben Finney was making comparison between Usenet/Mailing-List > > vs Forum. The argument basically sums up to Distributed vs. > > Centralized. > > I don't know what Ben was thinking so I was just making

Re: save xls to csv/dbf without Excel/win32com.client

2010-06-06 Thread Tim Chase
On 06/06/2010 06:59 PM, noydb wrote: On Jun 5, 9:31 pm, Tim Chase wrote: [1]http://pypi.python.org/pypi/xlrd/ Many thanks Tim, this worked well! In the interest of learning, anyone have a XLS to DBF solution? This becomes considerably trickier unless you're willing to have all your DBF fi

Re: map is useless!

2010-06-06 Thread Terry Reedy
On 6/6/2010 7:20 PM, Steven D'Aprano wrote: On Sun, 06 Jun 2010 08:16:02 -0700, rantingrick wrote: Everyone knows i'm a Python fanboy so nobody can call me a troll for this... The first rule of trolling is, always deny being a troll, no matter how obvious the trolling. Such as the exagerate

Re: Python Forum

2010-06-06 Thread Ben Finney
"D'Arcy J.M. Cain" writes: > On Mon, 07 Jun 2010 10:17:39 +1000 > Ben Finney wrote: > > So you say. For the interface to be “better” it needs to keep the good > > features of the existing interface. I include among the good features of > > Usenet: > > That's a great list of features. But they al

Re: Python Forum

2010-06-06 Thread D'Arcy J.M. Cain
On Mon, 07 Jun 2010 11:02:21 +1000 Lie Ryan wrote: > On 06/07/10 10:45, D'Arcy J.M. Cain wrote: > > That's a great list of features. But they all apply to mailing lists as > > well. > > I think Ben Finney was making comparison between Usenet/Mailing-List vs > Forum. The argument basically sums u

Re: GUIs - A Modest Proposal

2010-06-06 Thread Lie Ryan
On 06/07/10 10:48, Adam Tauno Williams wrote: > On Sun, 2010-06-06 at 17:03 -0700, AD. wrote: >> On Jun 7, 10:55 am, ant wrote: >>> My concern is simple: I think that Python is doomed to remain a minor >>> language unless we crack this problem. >> I'm curious why you think fragmented GUI choices i

Re: Python Forum

2010-06-06 Thread Lie Ryan
On 06/07/10 10:45, D'Arcy J.M. Cain wrote: > On Mon, 07 Jun 2010 10:17:39 +1000 > Ben Finney wrote: >> So you say. For the interface to be “better” it needs to keep the good >> features of the existing interface. I include among the good features of >> Usenet: > > That's a great list of features.

Re: map is useless!

2010-06-06 Thread Carl Banks
On Jun 6, 8:16 am, rantingrick wrote: > Everyone knows i'm a Python fanboy so nobody can call me a troll for > this... 1. I don't remember you so I don't know if you're a Python fanboy or not 2. If you act like a troll I'll call you one even if you are Python fanboy Actually, your post only came

Re: map is useless!

2010-06-06 Thread D'Arcy J.M. Cain
On Mon, 07 Jun 2010 10:16:19 +1000 Lie Ryan wrote: > On 06/07/10 09:56, D'Arcy J.M. Cain wrote: > > Show me the unit test that defines the problem. > > that you must use foo() and you can't change foo() (since foo is very > complex), and you give the same result as the original solution. I rejec

Re: GUIs - A Modest Proposal

2010-06-06 Thread Adam Tauno Williams
On Sun, 2010-06-06 at 15:55 -0700, ant wrote: > On Jun 6, 2:22 pm, ant wrote: > > I get the strong feeling that nobody is really happy with the state of > > Python GUIs. > > What an interesting set of responses I got! > And - even more interesting - how few of them actually seem to think > there

Re: GUIs - A Modest Proposal

2010-06-06 Thread Adam Tauno Williams
On Sun, 2010-06-06 at 17:03 -0700, AD. wrote: > On Jun 7, 10:55 am, ant wrote: > > My concern is simple: I think that Python is doomed to remain a minor > > language unless we crack this problem. > I'm curious why you think fragmented GUI choices is a particular > problem for Python compared to ot

Re: Python Forum

2010-06-06 Thread D'Arcy J.M. Cain
On Mon, 07 Jun 2010 10:17:39 +1000 Ben Finney wrote: > So you say. For the interface to be “better” it needs to keep the good > features of the existing interface. I include among the good features of > Usenet: That's a great list of features. But they all apply to mailing lists as well. > * No

Re: map is useless!

2010-06-06 Thread Lie Ryan
On 06/07/10 09:56, D'Arcy J.M. Cain wrote: > On Mon, 07 Jun 2010 05:59:02 +1000 > Lie Ryan wrote: >>> foo = lambda x: [y + 1 for y in x] >>> [foo(x) for x in [[4, 6, 3], [6, 3, 2], [1, 3, 5]]] >>> >>> Didn't seem like such a long walk. >>> >> >> that's because you're simplifying the problem, the c

Re: Python Forum

2010-06-06 Thread Ben Finney
rantingrick writes: > There has been many arguments here for and against Usenet. Personally > I say the rein of Usenet is coming to its logical conclusion. Dead as > a clavo! Much better interfaces abound. So you say. For the interface to be “better” it needs to keep the good features of the exi

Re: GUIs - A Modest Proposal

2010-06-06 Thread AD.
On Jun 7, 10:55 am, ant wrote: > My concern is simple: I think that Python is doomed to remain a minor > language unless we crack this problem. I'm curious why you think fragmented GUI choices is a particular problem for Python compared to other languages? Or why this is the main issue holding Py

Re: save xls to csv/dbf without Excel/win32com.client

2010-06-06 Thread noydb
On Jun 5, 9:31 pm, Tim Chase wrote: > On 06/05/2010 06:47 PM, noydb wrote: > > > Is there a way to save a .xls file (the first worksheet) as a .dbf > > or .csv without opening an instance of Excel with win32com.client > > (been awhile, is this the best module these days for v2.5)?  In case a > > c

Re: map is useless!

2010-06-06 Thread D'Arcy J.M. Cain
On Mon, 07 Jun 2010 05:59:02 +1000 Lie Ryan wrote: > > foo = lambda x: [y + 1 for y in x] > > [foo(x) for x in [[4, 6, 3], [6, 3, 2], [1, 3, 5]]] > > > > Didn't seem like such a long walk. > > > > that's because you're simplifying the problem, the correct walk is: Well, since it gives the same

Re: map is useless!

2010-06-06 Thread Steven D'Aprano
On Sun, 06 Jun 2010 08:16:02 -0700, rantingrick wrote: > Everyone knows i'm a Python fanboy so nobody can call me a troll for > this... The first rule of trolling is, always deny being a troll, no matter how obvious the trolling. But on the chance I'm wrong, and for the benefit of others, your

Re: GUIs - A Modest Proposal

2010-06-06 Thread geremy condra
On Sun, Jun 6, 2010 at 3:55 PM, ant wrote: > On Jun 6, 2:22 pm, ant wrote: >> I get the strong feeling that nobody is really happy with the state of >> Python GUIs. > > > What an interesting set of responses I got! > And - even more interesting - how few of them actually seem to think > there is

Re: GUIs - A Modest Proposal

2010-06-06 Thread ant
On Jun 6, 2:22 pm, ant wrote: > I get the strong feeling that nobody is really happy with the state of > Python GUIs. What an interesting set of responses I got! And - even more interesting - how few of them actually seem to think there is a problem, let alone make any attempt to move the situat

Re: GUIs - A Modest Proposal

2010-06-06 Thread Kevin Walzer
On 6/5/10 10:22 PM, ant wrote: I get the strong feeling that nobody is really happy with the state of Python GUIs. Says who? Tkinter is not widely liked, but is widely distributed. I'm a strong advocate of Tkinter--there is very little that it cannot do. WxPython and PyGtk are both powerf

Re: map is useless!

2010-06-06 Thread Terry Reedy
On 6/6/2010 11:16 AM, rantingrick wrote: Everyone knows i'm a Python fanboy so nobody can call me a troll for this... Non sequitor. It depends on your intention in posting this... Python map is just completely useless. For one it so damn slow Posting invalid speed comparisons stacked agains

Re: GUIs - A Modest Proposal

2010-06-06 Thread rantingrick
On Jun 6, 2:06 pm, Mark Lawrence wrote: > On 06/06/2010 16:31, rantingrick wrote: > > > > > On Jun 5, 9:22 pm, ant  wrote: > > >> I ask the group; should we try to create a new GUI for Python, with > >> the following > >> properties?: > > >> - Pythonic > >> - The default GUI (so it replaces Tkinte

Re: map is useless!

2010-06-06 Thread rantingrick
On Jun 6, 2:48 pm, Richard Thomas wrote: > Python's map has the useful feature that nobody is in any doubt about > what it does. I don't know much about Ruby I have to say but looking > at that piece of syntax you gave I had no idea how to interpret it. > Anyway, I looked it up. Well Ruby likes t

Re: map is useless!

2010-06-06 Thread Lie Ryan
On 06/07/10 05:54, D'Arcy J.M. Cain wrote: > On Mon, 07 Jun 2010 05:27:43 +1000 > Lie Ryan wrote: >> In the most naive uses, map appears to have no advantage over list >> comprehension; but one thing that map can do that list comprehension >> still can't do without a walk around the park: >> >> de

Re: Replace in large text file ?

2010-06-06 Thread Nobody
On Sat, 05 Jun 2010 16:35:42 +0100, MRAB wrote: >>> In plain language what I wish to do is: >>> >>> Remove all comma's >>> Replace all @ with comma's >> input_file = open("some_huge_file.txt", "r") >> output_file = open("newfilename.txt", "w") >> for line in input_file: > I'd probably process it

Re: map is useless!

2010-06-06 Thread D'Arcy J.M. Cain
On Mon, 07 Jun 2010 05:27:43 +1000 Lie Ryan wrote: > In the most naive uses, map appears to have no advantage over list > comprehension; but one thing that map can do that list comprehension > still can't do without a walk around the park: > > def foo(func, args): > g = lambda x: x+1 > re

Re: map is useless!

2010-06-06 Thread Richard Thomas
Python's map has the useful feature that nobody is in any doubt about what it does. I don't know much about Ruby I have to say but looking at that piece of syntax you gave I had no idea how to interpret it. Anyway, I looked it up. Calling an method on each of a collection of objects is best accomp

Re: Drop Table w/ MySQLdb?

2010-06-06 Thread Thomas Jollans
On 06/06/2010 05:07 PM, Victor Subervi wrote: > Hi; > I tried this: > > cursor.execute('drop table tmp%s', tmpTable) It looks like you're trying to %s-insert *part* of the table name. I doubt any DB interface allows that. cursor.execute('drop table %s', table_name) might work, otherwise, you'l

Re: map is useless!

2010-06-06 Thread Thomas Jollans
On 06/06/2010 05:16 PM, rantingrick wrote: > So can anyone explain this poor excuse for a map function? Maybe GVR > should have taken it out in 3.0? *scratches head* > > Speaking of Py3k: map no longer builds lists. What once was map is no more, what once was itertools.imap is now map. Sometim

Re: [RELEASE] Python 2.7 release candidate 1 released

2010-06-06 Thread Lie Ryan
On 06/07/10 00:05, Franck Ditter wrote: > Just an advice as I see that "old" Python is maintained. > When starting with Python (simple programs and GUIs) should I start > with Python 3.x ? If it has a decent implementation on Mac/Linux/Windows of > course... I say, if you're learning the language

Re: map is useless!

2010-06-06 Thread Lie Ryan
On 06/07/10 03:22, rantingrick wrote: > On Jun 6, 12:02 pm, Alain Ketterlin > wrote: >> rantingrick writes: >> I've not used map since I learned about list comprehensions. > > Thats has been my experienced also. Actually i've been at Python for > O... about 2 years now and i don't think i've eve

Re: GUIs - A Modest Proposal

2010-06-06 Thread Mark Lawrence
On 06/06/2010 16:31, rantingrick wrote: On Jun 5, 9:22 pm, ant wrote: I ask the group; should we try to create a new GUI for Python, with the following properties?: - Pythonic - The default GUI (so it replaces Tkinter) - It has the support of the majority of the Python community - Simple and

Re: Python Forum

2010-06-06 Thread Aahz
In article , Monte Milanuk wrote: >On 6/6/10 9:46 AM, Aahz wrote: >> >> but I prefer to rely on someone else's sysadmin and I >> really don't want to allow remote connections into my home network. > >To each their own... while Panix is fairly relaxed as a shell host, I >prefer to not have someon

Re: GUIs - A Modest Proposal

2010-06-06 Thread Petite Abeille
On Jun 6, 2010, at 7:36 PM, rantingrick wrote: > Oh Please lets not help user in the age of "take-over-my-puter--all-my- > data, and-my-freedoms, and-then-force-me-to-be-a-slave-to-you-just-so- > i-can-use-my-data, with-your-permission, master!" era. Yes i have seen > these GUI, HTML, CSS, Javasc

Re: GUIs - A Modest Proposal

2010-06-06 Thread rantingrick
On Jun 6, 10:51 am, "Alf P. Steinbach" wrote: > * pyt...@bdurham.com, on 06.06.2010 17:17: > > > Why not a GUI based on HTML, CSS and Javascript? > > > To paraphrase another poster and to borrow from SQLite: > > > Pick any *THREE*: > > - Simple > > - Beautiful > > - Cross-platform > > I'm not sure

Re: Python Forum

2010-06-06 Thread Monte Milanuk
On 6/6/10 9:46 AM, Aahz wrote: but I prefer to rely on someone else's sysadmin and I really don't want to allow remote connections into my home network. To each their own... while Panix is fairly relaxed as a shell host, I prefer to not have someone else telling me what I can and can't install

Re: map is useless!

2010-06-06 Thread rantingrick
On Jun 6, 12:02 pm, Alain Ketterlin wrote: > rantingrick writes: > I've not used map since I learned about list comprehensions. Thats has been my experienced also. Actually i've been at Python for O... about 2 years now and i don't think i've ever used map in a script even one time until a month

Re: Python Forum

2010-06-06 Thread rantingrick
On Jun 2, 3:04 am, pyDev wrote: > Hello, > > I would like to let the community know that there is a new web-based > forum for Python enthusiasts over at PythonForum.org (http:// > pythonforum.org). There has been many arguments here for and against Usenet. Personally I say the rein of Usenet is

Re: What's a good XSL to translate xmlrunner.py output into a test report?

2010-06-06 Thread Phlip
On Jun 3, 9:47 am, Phlip wrote: > Hypo Nt: > > Here's xmlrunner.py: > >  http://www.rittau.org/python/xmlrunner.py > > you attach it to your developer tests, and it emits a file called > "TEST-unittest.TestSuite.xml", containing auspicious wackiness like > this: > >   classname="tests.unit.gatewa

Re: map is useless!

2010-06-06 Thread Shashwat Anand
map is not needed. LC is great :D On Sun, Jun 6, 2010 at 10:32 PM, Alain Ketterlin < al...@dpt-info.u-strasbg.fr> wrote: > rantingrick writes: > > > Python map is just completely useless. [...] > > import time > def test1(): > > l = range(1) > > t1 = time.time() > >

Re: map is useless!

2010-06-06 Thread Alain Ketterlin
rantingrick writes: > Python map is just completely useless. [...] import time def test1(): > l = range(1) > t1 = time.time() > map(lambda x:x+1, l) > t2= time.time() > print t2-t1 def test2(): > l = range(1) > t1 = time.time() >

Re: Python Forum

2010-06-06 Thread Aahz
In article , Monte Milanuk wrote: >On 6/5/10 10:11 PM, Aahz wrote: >> In article, >> Monte Milanuk wrote: >>> >>> Decent NNTP access is harder to find. Not impossible, but no longer >>> a 'free' part of most standard ISP access any more. >> >> This seems like a good time to promote my ISP: pani

Re: store .png file in a script

2010-06-06 Thread Adam Tauno Williams
Just base64 encode the file, store it as a string in the file, and decode it to a byte-stream when you need the image. Everything required to do that is in the standard library. >Would you please let me know that how can I >store a .png or .gif or .jpg file, in a python script? -- http://mail

Re: map is useless!

2010-06-06 Thread Duncan Booth
rantingrick wrote: > Python map is just completely useless. For one it so damn slow why > even bother putting it in the language? And secondly, the total "girl- > man" weakness of lambda renders it completely mute! Do you realise that you don't have to use lambda? If you need more than a single

Re: map is useless!

2010-06-06 Thread Roald de Vries
On Jun 6, 2010, at 5:16 PM, rantingrick wrote: Everyone knows i'm a Python fanboy so nobody can call me a troll for this... Python map is just completely useless. For one it so damn slow why even bother putting it in the language? And secondly, the total "girl- man" weakness of lambda renders it

Re: Python Forum

2010-06-06 Thread Monte Milanuk
On 6/5/10 10:11 PM, Aahz wrote: In article, Monte Milanuk wrote: Decent NNTP access is harder to find. Not impossible, but no longer a 'free' part of most standard ISP access any more. This seems like a good time to promote my ISP: panix.com Used to have an account with them... but of les

Re: Missing DLL in win98

2010-06-06 Thread Martin v. Loewis
Am 04.06.2010 14:38, schrieb Spyder42: I hope this is the right place to ask this, and appologise if it's not. I'm trying to install 2.6.5 in Win98 se final. It says "a required dll could not be run". Do I have to upgrade my whole OS just to install this, or is there a fix I can apply to 98 to ma

Re: GUIs - A Modest Proposal

2010-06-06 Thread Alf P. Steinbach
* pyt...@bdurham.com, on 06.06.2010 17:17: Why not a GUI based on HTML, CSS and Javascript? To paraphrase another poster and to borrow from SQLite: Pick any *THREE*: - Simple - Beautiful - Cross-platform I'm not sure what this discussion is about, but anyway, modern GUI frameworks /are/ base

Re: Drop Table w/ MySQLdb?

2010-06-06 Thread James Mills
On Mon, Jun 7, 2010 at 1:40 AM, MRAB wrote: > As has been explained already, SQL might not (and here it clearly does > not) let you use placeholders for table or column names, only for > values. Yes I should have stated that '?' place-holders are used only for "values" :) *sigh* --James -- http

Re: Drop Table w/ MySQLdb?

2010-06-06 Thread Victor Subervi
On Sun, Jun 6, 2010 at 11:40 AM, MRAB wrote: > As has been explained already, SQL might not (and here it clearly does > not) let you use placeholders for table or column names, only for > values. > Oops. Sorry. Thanks. beno -- http://mail.python.org/mailman/listinfo/python-list

Re: Drop Table w/ MySQLdb?

2010-06-06 Thread MRAB
Victor Subervi wrote: Hi; I tried this: cursor.execute('drop table tmp%s', tmpTable) and got this error: Traceback (most recent call last): File "/var/www/html/angrynates.com/cart/cart.py ", line 196, in ? cart() File "/var/www/html/angrynates.

Re: GUIs - A Modest Proposal

2010-06-06 Thread rantingrick
On Jun 5, 9:22 pm, ant wrote: > I ask the group; should we try to create a new GUI for Python, with > the following > properties?: > > - Pythonic > - The default GUI (so it replaces Tkinter) > - It has the support of the majority of the Python community > - Simple and obvious to use for simple th

Re: map is useless!

2010-06-06 Thread James Mills
On Mon, Jun 7, 2010 at 1:16 AM, rantingrick wrote: > So can anyone explain this poor excuse for a map function? Maybe GVR > should have taken it out in 3.0?  *scratches head* Let me get this straight... You're complaining about some trivial code you've written and a 0.002 or less execution time ?

Re: Drop Table w/ MySQLdb?

2010-06-06 Thread James Mills
On Mon, Jun 7, 2010 at 1:07 AM, Victor Subervi wrote: > Hi; > I tried this: > >     cursor.execute('drop table tmp%s', tmpTable) > > and got this error: > > Traceback (most recent call last): >   File "/var/www/html/angrynates.com/cart/cart.py", line 196, in ? >     cart() >   File "/var/www/html/

map is useless!

2010-06-06 Thread rantingrick
Everyone knows i'm a Python fanboy so nobody can call me a troll for this... Python map is just completely useless. For one it so damn slow why even bother putting it in the language? And secondly, the total "girl- man" weakness of lambda renders it completely mute! Ruby has a very nice map >>>

Re: GUIs - A Modest Proposal

2010-06-06 Thread python
> Yes, just wait until somebody builds a web-browser that runs in your > web-browser! ? Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-06 Thread python
Why not a GUI based on HTML, CSS and Javascript? To paraphrase another poster and to borrow from SQLite: Pick any *THREE*: - Simple - Beautiful - Cross-platform Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Sniffer Linux with Raw Socket

2010-06-06 Thread Giampaolo Rodolà
RAW sockets are not recommended for doing such kind of things. It is a lot easier and portable using libpcap. Python has a lot of libpcap bindings you can use (pcapy, pypcap, etc...). Just google for it. --- Giampaolo http://code.google.com/p/pyftpdlib http://code.google.com/p/psutil 2010/6/6 ca

Drop Table w/ MySQLdb?

2010-06-06 Thread Victor Subervi
Hi; I tried this: cursor.execute('drop table tmp%s', tmpTable) and got this error: Traceback (most recent call last): File "/var/www/html/angrynates.com/cart/cart.py", line 196, in ? cart() File "/var/www/html/angrynates.com/cart/cart.py", line 189, in cart cursor.execute('drop t

Sniffer Linux with Raw Socket

2010-06-06 Thread castor91
Hi all, i try to make a python sniffer for linux using raw socket and not pcap or scapy.. But i have a lot of problems.. I use the code that i found here: http://docs.python.org/library/socket.html import socket # the public network interfaceHOST = sock

Re: store .png file in a script

2010-06-06 Thread Ian Kelly
On Sun, Jun 6, 2010 at 8:28 AM, Navid Parvini wrote: > > Dear All, > > Would you please let me know that how can I store a .png or .gif or .jpg > file, in a python script? > > Thank you in advance. > > Navid Encode it in base64 and store it in a triple-quoted string literal: import base64 png_

Forcing any output (file / stdout) to UTF-8

2010-06-06 Thread News123
Hi, I'm having a small python script printing out UTF-8 characters. # -*- coding: utf-8 -*- print sys.stdout.encoding s=u"abcdéfg" # string containing one non ASCII character # just in case nntp kills it for c in s: print c It work perfectly fine on my utf-8 capable terminal.

Re: [RELEASE] Python 2.7 release candidate 1 released

2010-06-06 Thread Aahz
In article , Franck Ditter wrote: > >When starting with Python (simple programs and GUIs) should I start >with Python 3.x ? That depends on the extent to which you rely strictly on the standard Python library. If there's any likelihood that you will want to use random third-party libraries, yo

store .png file in a script

2010-06-06 Thread Navid Parvini
Dear All, Would you please let me know that how can I store a .png or .gif or .jpg file, in a python script? Thank you in advance. Navid -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-06 Thread Joshua Kordani
"Yo dawg I heard you like browsers, so we put a browser in your browser so you can browse while you browse!" -- Xibit On 6/6/2010 8:52 AM, Irmen de Jong wrote: On 6-6-2010 14:32, Lie Ryan wrote: On 06/06/10 22:09, Petite Abeille wrote: On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote: Y

Re: [RELEASE] Python 2.7 release candidate 1 released

2010-06-06 Thread Franck Ditter
Just an advice as I see that "old" Python is maintained. When starting with Python (simple programs and GUIs) should I start with Python 3.x ? If it has a decent implementation on Mac/Linux/Windows of course... Thanks, franck -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-06 Thread Colin J. Williams
On 05-Jun-10 23:03 PM, Benjamin Peterson wrote: ant uklinux.net> writes: PyQt is tied to one platform. What do you mean one platform? Source Packages This is the latest stable version of PyQt4. PyQt-x11-gpl-4.7.3.tar.gz Linux, UNIX source PyQt-win-gpl-4.7.3.zip Windows source

Re: Where's the List?

2010-06-06 Thread Victor Subervi
On Sat, Jun 5, 2010 at 4:52 PM, Stephen Hansen wrote: > > cur.execute(sql, [pkg, prodid, tmpTable, quantity] + > list(option_values)) > > Or: > >cur.execute(sql, (pkg, prodid, tmpTable, quantity) + option_values) > > I removed the explicit conversion-to-tuple in the first, because... you >

Re: GUIs - A Modest Proposal

2010-06-06 Thread Irmen de Jong
On 6-6-2010 14:32, Lie Ryan wrote: On 06/06/10 22:09, Petite Abeille wrote: On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote: Yes, just wait until somebody builds a web-browser that runs in your web- browser! There you go: "A good browser should be able to reproduce itself. Safari 4, bui

Re: GUIs - A Modest Proposal

2010-06-06 Thread Lie Ryan
On 06/06/10 22:09, Petite Abeille wrote: > > On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote: > >> Yes, just wait until somebody builds a web-browser that runs in your web- >> browser! > > There you go: > > "A good browser should be able to reproduce itself. Safari 4, built entirely > with

Re: GUIs - A Modest Proposal

2010-06-06 Thread Petite Abeille
On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote: > Yes, just wait until somebody builds a web-browser that runs in your web- > browser! There you go: "A good browser should be able to reproduce itself. Safari 4, built entirely with valid HTML5 and CSS3." http://general-metrics.com/Safari/

Re: Replace in large text file ?

2010-06-06 Thread Eknath Venkataramani
On Sat, Jun 5, 2010 at 1:23 PM, Steve wrote: > > Remove all comma's > Replace all @ with comma's > Save as a new file. > Why don't you use 'sed'. It'd be way faster -- Eknath Venkataramani -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-06 Thread Steven D'Aprano
On Sun, 06 Jun 2010 12:42:30 +0200, Stef Mientki wrote: > Aren't all programms going webbased in the near future ? Yes, just wait until somebody builds a web-browser that runs in your web- browser! -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-06 Thread Stef Mientki
Aren't all programms going webbased in the near future ? And if so, wouldn't it be better to hook to GWT or something like that (I can't oversee all the conesquences)? cheers, Stef Mientki On 06-06-2010 04:22, ant wrote: > I get the strong feeling that nobody is really happy with the state of > Py

Re: Py_single_input and the side-effects...

2010-06-06 Thread moerchendiser2k3
thx, thats it! :) -- http://mail.python.org/mailman/listinfo/python-list

ANN: PiCloud cloud library 1.9 release

2010-06-06 Thread Ken Elkabany
PiCloud, a cloud computing platform for the Python Programming Language, has released version 1.9 of its client library, cloud. PiCloud enables Python users to leverage the power of an on-demand, high performance, and auto scaling compute cluster with as few as three lines of code! No server manage

Re: GUIs - A Modest Proposal

2010-06-06 Thread Lie Ryan
On 06/06/10 12:22, ant wrote: > I get the strong feeling that nobody is really happy with the state of > Python GUIs. > Tkinter is not widely liked, but is widely distributed. WxPython and > PyGtk are both > powerful, but quirky in different ways. PyQt is tied to one platform. > And there are > doz

Re: GUIs - A Modest Proposal

2010-06-06 Thread Gabriele Lanaro
I'd really like to s/tkinter/WxWidgets/g, the multiplatformness is (almost) the same but wx looks infinitely better. IMHO a good intention is to best the API of wx. Anyway, GUI programmers usually choose the toolkit (often 3rd party) more appropriate for the situation, wether it is or not in the st