Cross platform desktop operations in Python

2008-11-30 Thread [EMAIL PROTECTED]
Hi I'm looking for a cross platform (Linux/Win/Mac) solution of common desktop operations like: * Getting system icon theme (icons for files, folders etc.) * Determine mimetype (better than mimetypes using mapped extension to mime) Under Unix/Linux there are freedesktop.org standards and pyxdg th

Re: Mathematica 7 compares to other languages

2008-11-30 Thread Xah Lee
On Nov 30, 7:30 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > Wolfram Research's Mathematica Version 7 has just been released. > > See: http://www.wolfram.com/products/mathematica/index.html > > Among it's marketing material, it has a section on how mathematica > compares to competitors. http://www.wolf

Re: Emacs vs. Eclipse vs. Vim

2008-11-30 Thread Paul Rudin
Clay Hobbs <[EMAIL PROTECTED]> writes: > It has key commands with key modifiers to do simple tasks (such as > moving the cursor to the left). Err - you move the cursor to the left by pressing the left arrow key (as you do with virtually every other editor), unless you've made some strange key bi

Re: Python surpasses Perl in popularity?

2008-11-30 Thread Stephane CHAZELAS
2008-12-1, 01:10(+01), Sven Mascheck: > In comp.unix.shell Stephane CHAZELAS wrote: > >> The Bourne shell, as can still be found on some systems either in some >> non-standard place (/bin on Solaris, /usr/old/bin on HPUX) or named >> differently [...] > > What do you mean with "non-standard place"

Re: How to distribute a Python app together with its dependencies?

2008-11-30 Thread Alessio Pace
On 1 Dic, 05:23, Lev Elbert <[EMAIL PROTECTED]> wrote: > If Python for Windows you can use Py2Exe package. It works very well > in simple cases and requires a few tweaks to make it recognize some > dependencies. As I was saying above, the destination machines are all Unix. Thank you anyway for yo

Re: incorrect line reported in traceback

2008-11-30 Thread Patrick Stinson
No, I've embedded the interpreter and an editor in my app, which might have something to do with it. I can't run the scripts at the command line because my app provides an API to built-ins that isn't availbel in the standard interpreter. I am simply calling a python method in the script module usin

Re: incorrect line reported in traceback

2008-11-30 Thread John Machin
On Dec 1, 4:47 pm, "Patrick Stinson" <[EMAIL PROTECTED]> wrote: > Is there any reason why the last item in the traceback is one frame > below the top of the stack? It would be great to show the real line in > my editor... Maybe your anonymous [HINT!] editor is confused. Do you get the same problem

incorrect line reported in traceback

2008-11-30 Thread Patrick Stinson
Is there any reason why the last item in the traceback is one frame below the top of the stack? It would be great to show the real line in my editor... -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about class relationships

2008-11-30 Thread John O'Hagan
On Sat, 29 Nov 2008, Carl Banks wrote: > On Nov 26, 11:20 pm, John O'Hagan <[EMAIL PROTECTED]> wrote: [...] > > > > class Bar(list): > > > >         def __init__(self, a_bar, args, engine): > >                 list.__init__ (self, a_bar) > >                 self[:] = a_bar         > >              

Re: Beautiful soup tag attributes - Dictionary?

2008-11-30 Thread Chris Rebert
On Sun, Nov 30, 2008 at 8:51 PM, killsto <[EMAIL PROTECTED]> wrote: > The documentation says I can find attributes of tags by using it as a > dictionary. Ex: > > product = p.findAll('dd') .findAll() produces a *list* of tags The example in the docs is: firstPTag, secondPTag = soup.findAll('p') w

Beautiful soup tag attributes - Dictionary?

2008-11-30 Thread killsto
The documentation says I can find attributes of tags by using it as a dictionary. Ex: product = p.findAll('dd') print product['id'] However, when I try that python thinks I am slicing it. When I print product, it works but is a list. I am pretty sure I have the latest version. Any ideas? Refere

Re: How to distribute a Python app together with its dependencies?

2008-11-30 Thread Lev Elbert
If Python for Windows you can use Py2Exe package. It works very well in simple cases and requires a few tweaks to make it recognize some dependencies. -- http://mail.python.org/mailman/listinfo/python-list

Mathematica 7 compares to other languages

2008-11-30 Thread Xah Lee
Wolfram Research's Mathematica Version 7 has just been released. See: http://www.wolfram.com/products/mathematica/index.html Among it's marketing material, it has a section on how mathematica compares to competitors. http://www.wolfram.com/products/mathematica/analysis/ And on this page, there

Re: how to find help/doc files ?

2008-11-30 Thread Gabriel Genellina
En Sat, 29 Nov 2008 19:30:50 -0200, Stef Mientki <[EMAIL PROTECTED]> escribió: For an IDE, I want to find the installed help files, either in the form of chm or html files. I'm specially interested in the files for: - python - wxpython - vpython but I fact I want link to all installed docs. I

Re: Emacs vs. Eclipse vs. Vim

2008-11-30 Thread Roy Smith
Clay Hobbs <[EMAIL PROTECTED]> wrote: > The first real text editor I used was Vim, which I actually started > using about a year ago. I've looked at Emacs and it just looks > confusing. I've been using emacs for so many years (um let's see, it's got to be close to 25 years now; first saw it on C

Re: Python Library to display detail hardware information

2008-11-30 Thread Chris Rebert
On Fri, Nov 28, 2008 at 7:51 AM, Hanny Wibisono <[EMAIL PROTECTED]> wrote: > Is there any python library that display very detailed hardware information > and it must run in linux environtment ? It's not Python, but you could run it using the `subprocess` module from Python: http://ezix.org/projec

Re: pydoc enforcement.

2008-11-30 Thread r
I support any idea that supports python. You have my vote friend! -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs vs. Eclipse vs. Vim

2008-11-30 Thread Clay Hobbs
On Sat, 2008-11-29 at 12:44 -0800, Josh wrote: > If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? > > I know this topic has been smashed around a bit already, but 'learning > curve' always seems

Re: end of print = lower productivity ?

2008-11-30 Thread Tim Roberts
Lie Ryan <[EMAIL PROTECTED]> wrote: >On Sat, 2008-11-29 at 17:51 -0600, Tim Chase wrote: >> >> It's not so much "ridiculous" as a failure of your editor to >> >> assist you. In Vim (my editor-of-choice), I'd do something >> >> like >> > >> > seriously, I don't think anyone in Windows uses vim >>

Re: Do more imported objects affect performance

2008-11-30 Thread MRAB
Filip Gruszczyński wrote: I have following question: if I use from module import * instead from module import Class am I affecting performance of my program? I believe, that all those names must be stored somewhere, when they are imported and then browsed when one of them is called. So am I p

Re: HELP!...Google SketchUp needs a Python API

2008-11-30 Thread r
Aaron Brady wrote: > That's circular: Sketchup is the first step within the Sketchup > movement. Dear God...I have entered the twilight zone! This is the Python movement(comp.lang.python)? get it? To move you must first take a step. Lest you never move. "I" am the BDFL of the SketchUp-Python int

Re: pydoc enforcement.

2008-11-30 Thread Filip Gruszczyński
Hey! If you are interested, I have written a small tool for declaring variables and attributes. It's not very sophisticated, because I have written it solely for own use. It might be useful though. You can download it from you: http://code.google.com/p/pyver/downloads/list For a small example, it

Google App Engine Code Challenge - write a tetris playing algorithm

2008-11-30 Thread russ.au
Hi all, Here's my attempt to learn App Engine / python. It's a tetris code challenge, you write a tetris playing algorithm, and the app challenges your algorithm. You can write the algorithm in anything that can do cgi: php, asp.net, jsp, etc. I've provided a sample client that you can easily h

Re: Project structure - Best practices

2008-11-30 Thread Martin P. Hellwig
Aaron Watters wrote: On Nov 30, 11:55 am, "Filip Gruszczyński" <[EMAIL PROTECTED]> wrote: http://jcalderone.livejournal.com/39794.html That's exactly what I have read before posting here ;-) -- Filip Gruszczyński I too would like to see a meatier discussion of best practices for python packa

pydoc enforcement.

2008-11-30 Thread [EMAIL PROTECTED]
I've been thinking about implementing (although no idea yet *HOW*) the following features/extension for the python compile stage and would be interested in any thoughts/comments/flames etc. Basically I'm interested adding a check to see if: 1) pydoc's are written for every function/method. 2)

Do more imported objects affect performance

2008-11-30 Thread Filip Gruszczyński
I have following question: if I use from module import * instead from module import Class am I affecting performance of my program? I believe, that all those names must be stored somewhere, when they are imported and then browsed when one of them is called. So am I putting a lot of "garbage" to

Re: Python surpasses Perl in popularity?

2008-11-30 Thread Sven Mascheck
In comp.unix.shell Stephane CHAZELAS wrote: > The Bourne shell, as can still be found on some systems either in some > non-standard place (/bin on Solaris, /usr/old/bin on HPUX) or named > differently [...] What do you mean with "non-standard place" here? -- http://mail.python.org/mailman/listinf

Re: HELP!...Google SketchUp needs a Python API

2008-11-30 Thread Aaron Brady
> > r, i am with you! i will back Python!!! we MUST spread > > Python throughout the world! sketchup is the first step, > > only the first step. > > First step? Really? AFAIK, Python is already used in: OpenOffice.Org, > Blender, GIMP, Inkscape, Scribus, etc. I've never used these tools, > but I

Re: Project structure - Best practices

2008-11-30 Thread Aaron Watters
On Nov 30, 11:55 am, "Filip Gruszczyński" <[EMAIL PROTECTED]> wrote: > >http://jcalderone.livejournal.com/39794.html > > That's exactly what I have read before posting here ;-) > > -- > Filip Gruszczyński I too would like to see a meatier discussion of best practices for python packagizing. I par

Re: noob needs help

2008-11-30 Thread Benjamin Kaplan
On Sun, Nov 30, 2008 at 1:00 PM, packet <[EMAIL PROTECTED]>wrote: > What i would use is emacs is better i think. > Why are you telling a beginning programmer to use emacs? It takes more time to learn to use emacs (or vim) than it does to learn to program python. > > > On Sun, Nov 30, 2008 at 1

Re: RE multiline

2008-11-30 Thread Diez B. Roggisch
Guy Doune schrieb: Hi, I try to figure out what gonna be the equivalent of : (.*?) For the same purpose on multiline basis. I would like completed the variable part of elements that I searching for. Example : align="center"> Is the begining of the variable element that I wanna completed..

RE multiline

2008-11-30 Thread Guy Doune
Hi, I try to figure out what gonna be the equivalent of : (.*?) For the same purpose on multiline basis. I would like completed the variable part of elements that I searching for. Example : align="center"> Is the begining of the variable element that I wanna completed... Is the end of t

Re: noob needs help

2008-11-30 Thread Peter Pearson
On Sun, 30 Nov 2008 09:50:32 -0800 (PST), toveysnake wrote: [snip] > I used kate to create this program and save it as > helloworld.py. I then entered the command python > helloworld.py into the terminal(I am using ubuntu 8.10) > and I get this error: > > [EMAIL PROTECTED]:~$ python helloworld.py >

Re: segfault calling SSE enabled library from ctypes

2008-11-30 Thread Olivier Grisel
I found an even simpler solution: use the -mstackrealign GCC option to build the shared library. -- Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode and hashlib

2008-11-30 Thread Scott David Daniels
Jeff H wrote: ... > decode vs encode You decode from on character set to a unicode object You encode from a unicode object to a specifed character set Pretty close: encode: Think of characters a "conceptual" -- you encode a character string into a bunch of bytes (unicode -> bytes) in ord

Re: noob needs help

2008-11-30 Thread Kevin Kelley
Try "python documents/helloworld.py" or "cd documents" before "python helloworld.py". Kevin On Sun, Nov 30, 2008 at 11:50 AM, toveysnake <[EMAIL PROTECTED]> wrote: > I decided that I want to learn python, and have no previous > programming experience. I was reading the guide A byte of python and

Re: noob needs help

2008-11-30 Thread packet
What i would use is emacs is better i think. On Sun, Nov 30, 2008 at 11:50 AM, toveysnake <[EMAIL PROTECTED]> wrote: > I decided that I want to learn python, and have no previous > programming experience. I was reading the guide A byte of python and > got to the part where you create and run t

noob needs help

2008-11-30 Thread toveysnake
I decided that I want to learn python, and have no previous programming experience. I was reading the guide A byte of python and got to the part where you create and run the program helloworld.py I used kate to create this program and save it as helloworld.py. I then entered the command python hell

Re: hello from colombia

2008-11-30 Thread Tim Rowe
2008/11/27 fel <[EMAIL PROTECTED]>: > that's a lot of bytes for "do your own homework" > but thanks, I'll do it. It also included "You haven't defined the issue precisely enough" :-) -- Tim Rowe -- http://mail.python.org/mailman/listinfo/python-list

Re: Project structure - Best practices

2008-11-30 Thread Filip Gruszczyński
> http://jcalderone.livejournal.com/39794.html That's exactly what I have read before posting here ;-) -- Filip Gruszczyński -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with capturing error

2008-11-30 Thread tekion
Yes, you are absolutely right. I had open a file earlier and when it reach end of line with no new idea; it seems to have closed the file. I am not sure if this because I am using my own class to open and read a file or just a python behavior. I plan to test this out. On another note, is there a w

Re: HELP!...Google SketchUp needs a Python API

2008-11-30 Thread r
The "first step" simply meant..."within this movement"...Not that there exist no "other" Python API's. -- http://mail.python.org/mailman/listinfo/python-list

Re: Project structure - Best practices

2008-11-30 Thread Jean-Paul Calderone
On Sun, 30 Nov 2008 17:43:46 +0100, Filip Gruszczyński <[EMAIL PROTECTED]> wrote: This is first time that I am building python application that is larger than a single module and I would like to do it right. I google it a bit, finding some stuff about not using src directory (which I have seen s

Project structure - Best practices

2008-11-30 Thread Filip Gruszczyński
This is first time that I am building python application that is larger than a single module and I would like to do it right. I google it a bit, finding some stuff about not using src directory (which I have seen so many times, that I believed it be standard) and using packages. Still, there are fe

Re: Exhaustive Unit Testing

2008-11-30 Thread James Harris
On 27 Nov, 16:32, "Emanuele D'Arrigo" <[EMAIL PROTECTED]> wrote: > On Nov 27, 5:00 am, Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > > Refactor until your code is simple enough to unit-test effectively, then > > unit-test effectively. > > Ok, I've taken this wise suggestion on board and of cours

Re: a regual expression problem

2008-11-30 Thread Roy Smith
In article <[EMAIL PROTECTED]>, lookon <[EMAIL PROTECTED]> wrote: > I have a url of image, and I want to get the filename and extension of > the image. How to write in python? > > for example, the url is http://a.b.com/aaa.jpg?version=1.1 > > how can I get aaa and jpg by python? Despite the s

How to distribute a Python app together with its dependencies?

2008-11-30 Thread Alessio Pace
Hi, I have to distribute a Python application which relies on an external library, and I'm not very fluent in this kind of stuff with Python (I come from the Java world where I would have used the Maven build tool to create an "assembly with dependencies" of all it is needed to run the app), so I

Re: Python surpasses Perl in popularity?

2008-11-30 Thread Stephane Chazelas
2008-11-30, 06:11(+00), Tam Ha: > Stephane CHAZELAS wrote: >> There's a common confusion in this in the nature of /bin/sh. >> There's no standard (neither POSIX nor Unix) that specifies that >> /bin/sh should be any variant of the Bourne shell. > > Sure there is, POSIX. [...] And on this. First, P

Re: Pycon 2009

2008-11-30 Thread Jeremiah Dodds
On Sat, Nov 29, 2008 at 1:59 AM, r <[EMAIL PROTECTED]> wrote: > do you have any suggestions where? I am not as versed as you in Usenet. > -- > http://mail.python.org/mailman/listinfo/python-list > Try comp.lang.lisp -- http://mail.python.org/mailman/listinfo/python-list

Re: a regual expression problem

2008-11-30 Thread Jon Clements
On Nov 30, 9:10 am, lookon <[EMAIL PROTECTED]> wrote: > I have a url of image, and I want to get the filename and extension of > the image. How to write in python? > > for example, the url ishttp://a.b.com/aaa.jpg?version=1.1 > > how can I get aaa and jpg by python? Something like... >>> from url

Unofficial Phone, , the most cheap mobile phones from china , 30 kinds today

2008-11-30 Thread [EMAIL PROTECTED]
Unofficial Phone, ,the most cheap mobile phones from china ,30 kinds today http://www.unofficialphone.cn/2008/11/android-phone-cottage-sciphone-dream-g2.html http://www.unofficialphone.cn/2008/11/unofficial-phone.html http://www.unofficialphone.cn/2008/11/amanilan.html http://www.unofficialphone.

Re: Emacs vs. Eclipse vs. Vim

2008-11-30 Thread Jeremiah Dodds
There is, as other people have pointed out, no "correct" answer to this question, other that "use a few different editors, and settle on what you like". I personally use emacs. In fact, I use emacs for a lot more than just editing code. The reason I found myself really liking emacs was because I'

Re: a regual expression problem

2008-11-30 Thread Arnaud Delobelle
Arnaud Delobelle <[EMAIL PROTECTED]> writes: > lookon <[EMAIL PROTECTED]> writes: > >> I have a url of image, and I want to get the filename and extension of >> the image. How to write in python? >> >> for example, the url is http://a.b.com/aaa.jpg?version=1.1 >> >> how can I get aaa and jpg by py

Re: Is there any library that can convert RGB colors to ANSI colors?

2008-11-30 Thread John Machin
On Nov 30, 8:04 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Nov 30, 4:39 pm, ZelluX <[EMAIL PROTECTED]> wrote: > > > Convert RGB colors to the closest ANSI colors. For example, given RGB > > color FF, it should print [31m. > > Maybe ... but you could write it yourself quickly enough; the co

Re: a regual expression problem

2008-11-30 Thread Arnaud Delobelle
lookon <[EMAIL PROTECTED]> writes: > I have a url of image, and I want to get the filename and extension of > the image. How to write in python? > > for example, the url is http://a.b.com/aaa.jpg?version=1.1 > > how can I get aaa and jpg by python? Without res: >>> url=" http://a.b.com/aaa.jpg?v

Re: Python surpasses Perl in popularity?

2008-11-30 Thread Stephane CHAZELAS
2008-11-30, 06:11(+00), Tam Ha: > Stephane CHAZELAS wrote: >> There's a common confusion in this in the nature of /bin/sh. >> There's no standard (neither POSIX nor Unix) that specifies that >> /bin/sh should be any variant of the Bourne shell. > > Sure there is, POSIX. Or rather their Austin Grou

Re: Emacs vs. Eclipse vs. Vim

2008-11-30 Thread Ant
On Nov 29, 8:44 pm, Josh <[EMAIL PROTECTED]> wrote: > If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? Personally I'd choose Vim for the following reasons: 1) Vim is ubiquitous on Linux/Unix server

Re: HELP!...Google SketchUp needs a Python API

2008-11-30 Thread Lie
On Nov 28, 1:52 pm, [EMAIL PROTECTED] wrote: > On Nov 27, 10:28 pm, r <[EMAIL PROTECTED]> wrote: > > > To think...that I would preach freedom to the slaves and be lynched > > for it...IS MADNESS! > > > Not one vote for Python, not a care. I think everyone here should look > > deep within their self

Re: Exhaustive Unit Testing

2008-11-30 Thread Roel Schroeven
Steven D'Aprano schreef: [..] Thank you for elaborate answer, Steven. I think I'm really starting to get it now. -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven -- http://mail.python.org/mailman/l

Re: HELP!...Google SketchUp needs a Python API

2008-11-30 Thread Lie
On Nov 28, 12:28 pm, r <[EMAIL PROTECTED]> wrote: > To think...that I would preach freedom to the slaves and be lynched > for it...IS MADNESS! > > Not one vote for Python, not a care. I think everyone here should look > deep within their self and realize the damage that has been done > today! I hop

a regual expression problem

2008-11-30 Thread lookon
I have a url of image, and I want to get the filename and extension of the image. How to write in python? for example, the url is http://a.b.com/aaa.jpg?version=1.1 how can I get aaa and jpg by python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any library that can convert RGB colors to ANSI colors?

2008-11-30 Thread John Machin
On Nov 30, 4:39 pm, ZelluX <[EMAIL PROTECTED]> wrote: > Convert RGB colors to the closest ANSI colors. For example, given RGB > color FF, it should print [31m. Maybe ... but you could write it yourself quickly enough; the code is a trivial loop over a list of the RGB values of the 8 possible c

Re: Is there any project whose patches are all available?

2008-11-30 Thread Lie
On Nov 28, 1:57 pm, ZelluX <[EMAIL PROTECTED]> wrote: > Hi, all > > I want to write a version-tracking tool for Python projects, and need > some sample projects whose even smallest modifications can be > downloaded from the internet. > > Could you recommend some to me? > Thanks for your reply When

Re: end of print = lower productivity ?

2008-11-30 Thread Lie Ryan
On Sat, 2008-11-29 at 17:51 -0600, Tim Chase wrote: > >> It's not so much "ridiculous" as a failure of your editor to > >> assist you. In Vim (my editor-of-choice), I'd do something > >> like > > > > seriously, I don't think anyone in Windows uses vim > > Are you just guessing, or do you have an

Re: Pyhon (with wxPython) on Windows' cygwin: can it be done fully ?

2008-11-30 Thread Carl Banks
On Nov 29, 3:31 pm, Lie <[EMAIL PROTECTED]> wrote: > Python's learning > curve shouldn't raise with time, it should get lower so more people > can join in the board. print function should give a newbie less to learn than a print statement, since statements have their own syntax (and the print sta

Re: Emacs vs. Eclipse vs. Vim

2008-11-30 Thread Francesco Bochicchio
On Sat, 29 Nov 2008 12:44:14 -0800, Josh wrote: > If you were a beginning programmer and willing to make an investment in > steep learning curve for best returns down the road, which would you pick? > Honestly, I would invest my time and energy in someting more significant than editor skills. I