Re: no cleanup on TERM signal

2008-05-01 Thread Marc 'BlackJack' Rintsch
On Fri, 02 May 2008 04:36:06 +, Yves Dorfsman wrote: > x.del() gets executed if: > -I del x, then run gc.collect() > -simply exit the script > -get the script to abort on an exception > > But if I kill it with the default signal TERM, the script dies, but I don't > get the message, so I am a

Re: help with list comprehension

2008-05-01 Thread Matimus
On May 1, 10:50 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On May 1, 11:46 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > > > > > Yves Dorfsman wrote: > > > > In the following script, m1() and m2() work fine. I am assuming m2() is > > > faster although I haven't checked that (loops through the

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Ben Finney
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > On Fri, 02 May 2008 13:24:01 +1000 > Ben Finney <[EMAIL PROTECTED]> wrote: > > I much prefer "#! /usr/bin/python" because I want my Python > > programs to, by default, be run with the default Python, and > > depend on Python being installed by the o

Re: help with list comprehension

2008-05-01 Thread George Sakkis
On May 1, 11:46 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > Yves Dorfsman wrote: > > > In the following script, m1() and m2() work fine. I am assuming m2() is > > faster although I haven't checked that (loops through the list twice > > instead of once). > > Well, let's check it: > > $ python -m

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Ben Finney
Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> writes: > -On [20080502 05:26], Ben Finney ([EMAIL PROTECTED]) wrote: > >I've never clearly understood why people want to use "#! > >/usr/bin/env python", which is prone to finding a different Python > >from the one installed by the operating syste

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Tim Roberts
Yves Dorfsman <[EMAIL PROTECTED]> wrote: > >On UNIX, some people use >#!/usr/bin/env python > >While other use >#!/usr/bin/python > >Why is one preferred over the other one ? The /usr/bin/env solution finds the Python interpreter anywhere on the PATH, whether it be /usr/bin or /usr/local/bin, or w

Re: portable fork+exec/spawn

2008-05-01 Thread Brendan Miller
On Fri, 02 May 2008 13:25:55 +1000, Ben Finney wrote: > URL:http://docs.python.org/lib/module-subprocess.html Awesome. This is exactly what I was hoping existed. -- http://mail.python.org/mailman/listinfo/python-list

Re: help with list comprehension

2008-05-01 Thread Karthik Gurusamy
On May 1, 8:01 pm, Yves Dorfsman <[EMAIL PROTECTED]> wrote: > In the following script, m1() and m2() work fine. I am assuming m2() is > faster although I haven't checked that (loops through the list twice instead > of once). > > Now what I am trying to do is something like m3(). As currently writte

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Jeroen Ruigrok van der Werven
-On [20080502 05:26], Ben Finney ([EMAIL PROTECTED]) wrote: >I've never clearly understood why people want to use "#! /usr/bin/env >python", which is prone to finding a different Python from the one >installed by the operating system. I'd be interested to see what >responses are in favour of it, an

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote: > >> [...] >> >> In contrast to many other areas of software, configuration files >> needn't be compatible with anything except the user's brain. So >> even if the rest of the world uses config forma

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread D'Arcy J.M. Cain
On Fri, 02 May 2008 13:24:01 +1000 Ben Finney <[EMAIL PROTECTED]> wrote: > I much prefer "#! /usr/bin/python" because I want my Python programs > to, by default, be run with the default Python, and depend on Python > being installed by the operating system's package manager. On systems > that use s

no cleanup on TERM signal

2008-05-01 Thread Yves Dorfsman
I did a few tests with this script: class byebye: def __del__(self): print 'Bye, bye...' x = byebye() x.del() gets executed if: -I del x, then run gc.collect() -simply exit the script -get the script to abort on an exception But if I kill it with the default signal TERM, the script di

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > I've never clearly understood why people want to use "#! /usr/bin/env > python", which is prone to finding a different Python from the one > installed by the operating system. I'd be interested to see what > responses are in

Re: help with list comprehension

2008-05-01 Thread Carsten Haese
Yves Dorfsman wrote: In the following script, m1() and m2() work fine. I am assuming m2() is faster although I haven't checked that (loops through the list twice instead of once). Well, let's check it: $ python -m timeit -s "import x" "x.m1()" 10 loops, best of 3: 6.43 usec per loop $

Re: how to pass C++ object to another C++ function via Python function

2008-05-01 Thread grbgooglefan
On Apr 22, 7:54 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > If you have a C function that receives a PyCObject, just include the   > relevant headers (cobject.h) and you can retrieve the original pointer   > using PyCObject_AsVoidPtr: > > void foo(PyObject *pyobj) > { >    TOriginalType

Re: portable fork+exec/spawn

2008-05-01 Thread Ben Finney
Brendan Miller <[EMAIL PROTECTED]> writes: > Is there an actual portable means of asynchronously spawning a > process and getting a handle to it, being able to write stdin and > read stdout, or does everyone just write their own wrapper for fork > and spawn? You're looking for the 'subprocess' mo

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Ben Finney
Yves Dorfsman <[EMAIL PROTECTED]> writes: > On UNIX, some people use > #!/usr/bin/env python > > While other use > #!/usr/bin/python You haven't indicated your understanding of what the difference in meaning is, so I'll explain it for those who might not know. The shebang line (the initial line

help with list comprehension

2008-05-01 Thread Yves Dorfsman
In the following script, m1() and m2() work fine. I am assuming m2() is faster although I haven't checked that (loops through the list twice instead of once). Now what I am trying to do is something like m3(). As currently written it does not work, and I have tried different ways, but I have

Re: #!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread J Sisson
The first method allows python to be installed in an alternate location (i.e. /usr/local/bin). "env" in this case is being used to launch python from whatever location python is installed to. I like to think of it as an "abstraction" of the python location to make it "multiplatform-friendly" sinc

portable fork+exec/spawn

2008-05-01 Thread Brendan Miller
I want to spawn a child process based on an external executable that I have the path for. I then want to wait on that executable, and capture it's output. In the os module, fork is only supported on unix, but spawn is only supported on windows. The os.system call is implemented by calling the C s

#!/usr/bin/env python vs. #!/usr/bin/python

2008-05-01 Thread Yves Dorfsman
On UNIX, some people use #!/usr/bin/env python While other use #!/usr/bin/python Why is one preferred over the other one ? Thanks. -- Yves. http://www.SollerS.ca -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'

2008-05-01 Thread Ben Finney
"Jordan Harry" <[EMAIL PROTECTED]> writes: > I'm trying to write a simple program to calculate permutations. I > created a file called "mod.py" and put the following in it: > > def factorial(n): > a = n > b = n > while a>0 and b>1: > n = (n)*(b-1) > b = b-1 A functio

Re: TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'

2008-05-01 Thread Sean DiZazzo
On May 1, 5:21 pm, "Jordan Harry" <[EMAIL PROTECTED]> wrote: > I'm trying to write a simple program to calculate permutations.  I created a > file called "mod.py" and put the following in it: > > def factorial(n): >     a = n >     b = n >     while a>0 and b>1: >         n = (n)*(b-1) >         b

Re: RegEx for matching brackets

2008-05-01 Thread George Sakkis
On May 1, 7:44 pm, NevilleDNZ <[EMAIL PROTECTED]> wrote: > Below is a (flawed) one line RegEx that checks curly brackets (from > awk/c/python input) are being matched. Is there a one liner for doing > this in python? There is not even a 1000-liner regular expression for this; it's a context-free

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 7:54 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > No, all I want is to give the OP a useful alternative Fair enough, I can't argue with that. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list

TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'

2008-05-01 Thread Jordan Harry
I'm trying to write a simple program to calculate permutations. I created a file called "mod.py" and put the following in it: def factorial(n): a = n b = n while a>0 and b>1: n = (n)*(b-1) b = b-1 def perm(n, r): a = factorial(n) b = factorial(n-r) q =

Problems with psycopg2

2008-05-01 Thread David Anderson
Hi all I have this function: def checkName(self, name): cur = self.conn.cursor() sql = "SELECT * from patient WHERE fn_pat = '" + name + "'" cur.execute(sql) rows = cur.fetchall() if rows == "[]": self.insert() It seems to work fine, But I'm ge

Re: RegEx for matching brackets

2008-05-01 Thread John Machin
On May 2, 9:44 am, NevilleDNZ <[EMAIL PROTECTED]> wrote: > Below is a (flawed) one line RegEx that checks curly brackets (from > awk/c/python input) are being matched. Is there a one liner for doing > this in python? > > ThanX > N > > re_open_close="(((\{))[^{}]*((?(0)\})))+" > re_open_close=re.co

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote: > Hallöchen! > > Ivan Illarionov writes: > >> [...] >> >> For me it looks more like an old-school/new-school thing than use-case >> thing. I may be wrong, but I see more and more new projects use things >> like reST and YAML/JSON and it

Re: where do I begin with web programming in python?

2008-05-01 Thread Paul Rubin
jmDesktop <[EMAIL PROTECTED]> writes: > I am aware there are various frameworks (Django, Pylons, etc.), > but I would like to know how to create web pages without these. If I > have mod_python or fastcgi on apache, where do I start? I don't have > clue where to begin to create a web page from scr

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 16:32:00 -0700, Carl Banks wrote: > On May 1, 4:50 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote: >> > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wro

Re: where do I begin with web programming in python?

2008-05-01 Thread George Sakkis
On May 1, 7:13 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On May 2, 7:45 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > > > > > jmDesktop schrieb: > > > > I have been to the main python site, but am still confused.  I have > > > been using .net, so it may be obvious how to do this to ever

RegEx for matching brackets

2008-05-01 Thread NevilleDNZ
Below is a (flawed) one line RegEx that checks curly brackets (from awk/c/python input) are being matched. Is there a one liner for doing this in python? ThanX N re_open_close="(((\{))[^{}]*((?(0)\})))+" re_open_close=re.compile(re_open_close) tests=""" { this is a test BAD { this is a test

Up to the minute gizmo and gadget news and reviews!

2008-05-01 Thread gizmohackers
Come check out this new site on the latest news and reviews on gizmos and gadgets! http://gizmohacker.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 4:50 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote: > > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: > >> > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > [...] > > For me it looks more like an old-school/new-school thing than > use-case thing. I may be wrong, but I see more and more new > projects use things like reST and YAML/JSON and it feels like they > are gradually replacing traditional old-school solution

Re: where do I begin with web programming in python?

2008-05-01 Thread Graham Dumpleton
On May 2, 7:45 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > jmDesktop schrieb: > > > I have been to the main python site, but am still confused. I have > > been using .net, so it may be obvious how to do this to everyone > > else. I am aware there are various frameworks (Django, Pylons, etc.

Pep11

2008-05-01 Thread Terry Reedy
The syllable link at the bottem is not currently working. The site itself is still alive and distributing 2.5.1 terry -- http://mail.python.org/mailman/listinfo/python-list

Re: dropping win98 support? was Re: Python 2.6 and wrapping C libraries on Windows

2008-05-01 Thread Terry Reedy
"illume" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Ah, why is that? Were any of the reasons given in http://www.python.org/dev/peps/pep-0011/ unclear? It appears you are already aware of MS's non-support of Win98 | Seems like a lot of people using it, so it's still worthwhil

Re: is +=1 thread safe

2008-05-01 Thread Gary Herron
AlFire wrote: Hi, I have a piece of software which uses threads in very massive way - like hundreds of them generated every second. there is also a piece of code which maintains the number of outstanding threads, simply counter+=1 is executed when before starting the thread and counter-=1

Re: Custom Classes?

2008-05-01 Thread Victor Subervi
On Wed, Apr 30, 2008 at 12:35 PM, J. Cliff Dyer <[EMAIL PROTECTED]> wrote: > Post working code, and I'll answer your actual question. Good grief! The code is *not* double spaced! Take a look. Click to the end of the first line and hit the right arrow key, and see for yourself. As for not initi

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 23:03:38 +0200, Torsten Bronger wrote: > Hallöchen! > > Ivan Illarionov writes: > >> [...] >> >> I took the example from >> http://www.kuro5hin.org/story/2004/10/29/14225/062 I haven't use my own >> example only because I don't have one at hand right now. YAML, in its >> simp

pil:effbot and pythonware offline

2008-05-01 Thread spdegabrielle
Sorry, I'm new to python and was trying to get imageTK; this led me to try find PIL, but pythonware and effbot both seem to be offline. I can't find any mention of an outage on python.org, this newsgroup, or the planet-blogs. Is it just me? and does anyone know where I can find ImageTK? Cheers,

Re: dropping win98 support?

2008-05-01 Thread Christian Heimes
illume schrieb: > Ah, why is that? > > There's still at least 1.1% of people using win98, if you believe this > source of stats: > http://www.w3schools.com/browsers/browsers_os.asp > > I just noticed that win9x winme and win nt are all being dropped from > python. > > I know they are old and cru

Re: Getting started with pyvtk

2008-05-01 Thread Robert Kern
Peter Pearson wrote: I'm trying to get started with pyvtk, the Python interface to the Visualization Toolkit, but there's obviously something important that I haven't figured out after an embarrassingly long morning of googling around. When I run sample pyvtk code (example1.py, from http://cens.

Re: where do I begin with web programming in python?

2008-05-01 Thread Christian Heimes
jmDesktop schrieb: > I have been to the main python site, but am still confused. I have > been using .net, so it may be obvious how to do this to everyone > else. I am aware there are various frameworks (Django, Pylons, etc.), > but I would like to know how to create web pages without these. If

Is anyone using Python for embedded applications?

2008-05-01 Thread Lori Welte
Hi Dean I need a minimalist version of Python to run on a ColdFire-based embedded system (written in C with no RTOS). It will be used by mechanical engineers to test their servo and stepper motors. I need all the basic features you are providing in PyMite. I've managed to port PyMite and ru

dropping win98 support? was Re: Python 2.6 and wrapping C libraries on Windows

2008-05-01 Thread illume
Ah, why is that? There's still at least 1.1% of people using win98, if you believe this source of stats: http://www.w3schools.com/browsers/browsers_os.asp I just noticed that win9x winme and win nt are all being dropped from python. I know they are old and crufty, but there's still heaps of peop

Re: where do I begin with web programming in python?

2008-05-01 Thread Mike Driscoll
On May 1, 4:25 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > I have been to the main python site, but am still confused.  I have > been using .net, so it may be obvious how to do this to everyone > else.  I am aware there are various frameworks (Django, Pylons, etc.), > but I would like to know how to

where do I begin with web programming in python?

2008-05-01 Thread jmDesktop
I have been to the main python site, but am still confused. I have been using .net, so it may be obvious how to do this to everyone else. I am aware there are various frameworks (Django, Pylons, etc.), but I would like to know how to create web pages without these. If I have mod_python or fastcg

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Torsten Bronger
Hallöchen! Ivan Illarionov writes: > [...] > > I took the example from > http://www.kuro5hin.org/story/2004/10/29/14225/062 I haven't use > my own example only because I don't have one at hand right > now. YAML, in its simple form, definetely makes me more > productive. I wasted too much time wit

Re: Getting started with pyvtk

2008-05-01 Thread Paul Melis
On 1 mei, 22:54, Peter Pearson <[EMAIL PROTECTED]> wrote: > I'm trying to get started with pyvtk, the Python interface > to the Visualization Toolkit, It looks like you're using this package: http://cens.ioc.ee/projects/pyvtk/ These are not the official Python bindings to VTK, but seem to be an a

Getting started with pyvtk

2008-05-01 Thread Peter Pearson
I'm trying to get started with pyvtk, the Python interface to the Visualization Toolkit, but there's obviously something important that I haven't figured out after an embarrassingly long morning of googling around. When I run sample pyvtk code (example1.py, from http://cens.ioc.ee/cgi-bin/viewcvs.

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote: > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: >> > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: >> >> On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wr

Re: send gpg encrypted emails (properly mime formatted)

2008-05-01 Thread Mike Driscoll
On May 1, 12:57 pm, Neal Becker <[EMAIL PROTECTED]> wrote: > Any ideas on python packages that could help with sending gpg encrypted > (properly mime formatted) emails? > > My idea is to forward all my emails to a remote imap server, but gpg encrypt > them to myself in the process. Take a look at

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 14:13:08 -0500, Jon Ribbens wrote: > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> I used XML files before for this purpose and found YAML much easier and >> better suitable for the task. >> >> Please explain why don't like YANL so much? > > Because even the exa

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread tinnews
Carl Banks <[EMAIL PROTECTED]> wrote: > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > IMO .ini-like config files are from the stone age. The modern approach is > > > to use YAML (http://www.yaml.org). > > > > You m

Re: i want to add a timeout to my code

2008-05-01 Thread maehhheeyy
On Apr 29, 3:29 pm, John Krukoff <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-29 at 14:47 -0700, maehhheeyy wrote: > > On Apr 17, 4:24 pm, Miki <[EMAIL PROTECTED]> wrote: > > > On Apr 17, 1:10 pm,maehhheeyy<[EMAIL PROTECTED]> wrote: > > > > > I want to add a timeout so that when I pull out my gps f

Python Wins "Favorite Scripting Language" Award

2008-05-01 Thread Steve Holden
The Linux Journal readers apparently suffer the same ambiguity as the rest of us when it comes to defining what the difference between a scripting language and a programming language. They do, however, clearly like Python, which they voted their scripting language of 2008. PHP, Bash and Perl c

Re: data manipulation

2008-05-01 Thread Jeff
The function expects an excel file. It cannot read a plain text file. You would need to figure out a way to convert the text file data into an excel format and save it to a new file first. The proper way to handle this is to make your data processing functions expect a defined format. Then, you

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Micah Elliott
On 2008-05-01 Carl Banks wrote: > If you don't intend to write a GUI to do that, write a simple > text file parser (if the options are simple), use ConfigParser, > or use a Python file that you exec. INI is great for so many things. It is also extremely commonplace, regardless of platform. The

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Jon Ribbens
On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > I used XML files before for this purpose and found YAML much easier and > better suitable for the task. > > Please explain why don't like YANL so much? Because even the examples in the spec itself are unreadable gibberish. The PyYAML lib

data manipulation

2008-05-01 Thread Krishna
I have a script that reads an excel file and and do manipulations on it. But, now, I have a text file that needs the same manipulation. I tried the same script, but it will not work, when I use command such as: workbook = xlrd.open_workbook('C:/trial.txt'), its giving me errors saying "expected BOF

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: > > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > >> On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > >> > IMO .ini-like config files are from the stone

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Matimus
On May 1, 4:37 am, Lance Gamet <[EMAIL PROTECTED]> wrote: > Hi, python beginner starting a new project here. > > This project will store most of its actual data in a shared-database, but > I have a small amount of user specific data that I need to be stored like > configuration or preferences for e

Re: DO U WANT TO KNOW ABOUT SCIENTOLOGY?

2008-05-01 Thread Danyelle Gragsone
<3 BAHAHAHAA -- http://mail.python.org/mailman/listinfo/python-list

Re: DO U WANT TO KNOW ABOUT SCIENTOLOGY?

2008-05-01 Thread Mensanator
On May 1, 8:11�am, [EMAIL PROTECTED] wrote: > � � � � � � � � � � HELLO FRIEND IAM SHALINI, > > � � � � � � � � � � � � � � � � � � � � DO U WANT TO KNOW ABOUT > SCIENTOLOGY? Do I need to know about wiping my ass with a rock? Oh, wait...that's Islam, isn't it? Sorry, I often get those two confus

Re: tool to calculate color combination

2008-05-01 Thread Max M
Astan Chee skrev: Hi, I was just wondering if there is a tool/script in python that allows me to do color calculations; specifically, when I add them. There is the colorsys module which I have used in this class: from colorsys import rgb_to_hls, hls_to_rgb import binascii from types import

Re: Python application distribution

2008-05-01 Thread Martin v. Löwis
> I haven't figured out a way to do this but see no reason why it cannot be > done. I have a decent size application written in 100% Python. I would > like to distribute this application, but only the .pyc files. Since the > .pyc's are just the compiled sources I figured it would work, but if I

Re: Problems with Cheese Shop

2008-05-01 Thread Martin v. Löwis
> How can I authorise to the Python Cheese Shop in order to use > setup.py upload? Currently, I get > > Upload failed (401): You must be identified to edit package information You need to add your PyPI password to .pypirc. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with Cheese Shop

2008-05-01 Thread Torsten Bronger
Hallöchen! Christian Heimes writes: > Torsten Bronger schrieb: > >> How can I authorise to the Python Cheese Shop in order to use >> setup.py upload? Currently, I get >> >> Upload failed (401): You must be identified to edit package >> information > > Try "python setup.py register sdist upload"

send gpg encrypted emails (properly mime formatted)

2008-05-01 Thread Neal Becker
Any ideas on python packages that could help with sending gpg encrypted (properly mime formatted) emails? My idea is to forward all my emails to a remote imap server, but gpg encrypt them to myself in the process. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tremendous slowdown due to garbage collection

2008-05-01 Thread Dieter Maurer
John Nagle <[EMAIL PROTECTED]> writes on Mon, 28 Apr 2008 11:41:41 -0700: > Dieter Maurer wrote: > > Christian Heimes <[EMAIL PROTECTED]> writes on Sat, 12 Apr 2008 18:47:32 > > +0200: > >> [EMAIL PROTECTED] schrieb: > >>> which made me suggest to use these as defaults, but then > > > We observed

Python application distribution

2008-05-01 Thread ron.longo
I haven't figured out a way to do this but see no reason why it cannot be done. I have a decent size application written in 100% Python. I would like to distribute this application, but only the .pyc files. Since the .pyc's are just the compiled sources I figured it would work, but if I copy ju

Re: Problems with Cheese Shop

2008-05-01 Thread Christian Heimes
Torsten Bronger schrieb: > Hallöchen! > > How can I authorise to the Python Cheese Shop in order to use > setup.py upload? Currently, I get > > Upload failed (401): You must be identified to edit package information Try "python setup.py register sdist upload" Christian -- http://mail.python.or

Problems with Cheese Shop

2008-05-01 Thread Torsten Bronger
Hallöchen! How can I authorise to the Python Cheese Shop in order to use setup.py upload? Currently, I get Upload failed (401): You must be identified to edit package information Thanks! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Patrick Mullen
YAML is a joke if you expect a windows user to be able to hand edit the data. Windows users typically expect a .ini file in the application's directory. (Usually not the users home directory, even if that may be a better location). XML is ok, but .ini is much preferred. If you have a configurat

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote: > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: >> On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> >> > IMO .ini-like config files are from the stone age. The modern >> > approach is to use YAML (http://www.yaml.org).

Re: Zope/DTML Infuriating...

2008-05-01 Thread Michael L Torrie
Michael Torrie wrote: > The second example, x = Integer.fromString('5') demonstrates a huge > weakness in Java. Ahem. Javascript. Sorry. -- Michael Torrie Assistant CSR, System Administrator Chemistry and Biochemistry Department Brigham Young University Provo, UT 84602 +1.801.422.5771 A: Be

Re: Stream I/O to a java applet (os.popen?)

2008-05-01 Thread Michael Torrie
Cody Woolaver wrote: > This is all done at the terminal though and i need to have it done through a > python file. I'm aware that i will have to use os.popen but am unfamiliar > with how it works. You'll probably want to look at the subprocess module, which replaces the old os.popen stuff. It's

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 11:11:29 -0500, Jon Ribbens wrote: > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: >> IMO .ini-like config files are from the stone age. The modern approach >> is to use YAML (http://www.yaml.org). > > You mean YAML isn't a joke!? It's so ludicrously overcomplicate

Re: simple beginner question about lists and negative index

2008-05-01 Thread Terry Reedy
"jmDesktop" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | This program: | | s = 'abcde' | i = -1 | for i in range (-1, -len(s), -1): |print s[:i], i | | gives | | abcd -1 | abc -2 | ab -3 | a -4 | | Why doesn't the first one have the e if -1 is the end of the list? In | Dive

Re: pop langs website ranking

2008-05-01 Thread Jon Harrop
[EMAIL PROTECTED] wrote: > Alexa's data is more reliable than quantcast. Alexa claim to have accurate data on lots of sites but I just tried to correlate their data with the exact data on our web server and the discrepancies are huge. For example, combining our number of absolute visitors with the

Re: Photo gallery software

2008-05-01 Thread Jumping Arne
On Thu, 1 May 2008 16:59:33 +0200, Scott Sandeman-Allen wrote (in article <[EMAIL PROTECTED]>): > I've been working with Photologue for a while with some nice results. > Looks like it's time to start reading that Django book. Thanks, JA

Re: Zope/DTML Infuriating...

2008-05-01 Thread Michael Torrie
Michael Torrie wrote: > The second example, x = Integer.fromString('5') demonstrates a huge > weakness in Java. Ahem. Javascript. Sorry. -- http://mail.python.org/mailman/listinfo/python-list

my module and unittest contend over commandline options...

2008-05-01 Thread chrisber
using the unittest module in Python 2.3.5, I've written some test code that ends up with if __name__ == "__main__": unittest.main() Since I want to run this code in various environments, I'd initially added some commandline options, e.g. to specify a configuration file like so test.py -

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Carl Banks
On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED]> wrote: > On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > IMO .ini-like config files are from the stone age. The modern approach is > > to use YAML (http://www.yaml.org). > > You mean YAML isn't a joke!? It's so ludicrously overcomp

Re: Zope/DTML Infuriating...

2008-05-01 Thread Michael Torrie
Jens wrote: > - Why is it, when primitive data types seem to be objects (similar to > javascript), that type casting is done through build-in functions > rather than methods, e.g. String.toInt('5') or '5'.toInt() or x = > Integer.fromString('5'). Mainly because it's much cleaner to do it the pytho

Re: Is vs Equality Operator

2008-05-01 Thread Terry Reedy
"Good Z" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hello, | I am having problem in using is. Here is what i am doing. | | x='' | if x is None or x is '': |return 1 x is not the singleton value None, nor is it the newly created null string object. It is up to the imp

Re: PyGame, window is not closing, tut not helping

2008-05-01 Thread Mike Driscoll
On May 1, 10:55 am, globalrev <[EMAIL PROTECTED]> wrote: > im doing this > :http://www.learningpython.com/2006/03/12/creating-a-game-in-python-us... > > and when closing the program the window stays up and doesnt respond. i > tried adding this:http://www.pygame.org/wiki/FrequentlyAskedQuestions >

Re: Best way to store config or preferences in a multi-platform way.

2008-05-01 Thread Jon Ribbens
On 2008-05-01, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > IMO .ini-like config files are from the stone age. The modern approach is > to use YAML (http://www.yaml.org). You mean YAML isn't a joke!? It's so ludicrously overcomplicated, and so comprehensively and completely fails to achieve its

Re: PyGame, window is not closing, tut not helping

2008-05-01 Thread globalrev
another program that has the same problem: import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) ball = pygame.image.load("snake.png") ballrect = ball.get_rect() while 1: for event in pygame.event.get():

PyGame, window is not closing, tut not helping

2008-05-01 Thread globalrev
im doing this : http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using-pygame-part-one/ and when closing the program the window stays up and doesnt respond. i tried adding this: http://www.pygame.org/wiki/FrequentlyAskedQuestions bu it doesnt work, or maybe im doing it wrong. h

Symposium “Image Processing and Analysis” within the ICCES'09 Thailand - Announce & Call for Papers

2008-05-01 Thread [EMAIL PROTECTED]
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ** Symposium “Image Processing and Analysis” Internati

Re: Please help me with linking libraries on Solaris 10 sparc

2008-05-01 Thread idev
On May 1, 11:41 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Martin, could you please tell me how to do this, I am pretty new in > > Solaris. > > It's fairly complicated, so I'm not sure I can give you the full > tutorial in a Usenet message. > > In essence, you need to spot the linker line

Re: Please help me with linking libraries on Solaris 10 sparc

2008-05-01 Thread Martin v. Löwis
> Martin, could you please tell me how to do this, I am pretty new in > Solaris. It's fairly complicated, so I'm not sure I can give you the full tutorial in a Usenet message. In essence, you need to spot the linker line in the build process, (e.g. by the -o option to the compiler), and add -lm t

Re: is +=1 thread safe

2008-05-01 Thread John Nagle
AlFire wrote: Hi, all is very simple and by the end of the program life I expect the counter to zero out. however I am getting values -1, -2, 1 ,2 ,3 and quite often 0 as expected. I guarded those statement with Lock.{acquire,release} and now it always returns 0. But I still can not belie

Re: is +=1 thread safe

2008-05-01 Thread Diez B. Roggisch
AlFire schrieb: Hi, I have a piece of software which uses threads in very massive way - like hundreds of them generated every second. there is also a piece of code which maintains the number of outstanding threads, simply counter+=1 is executed when before starting the thread and counter-

Re: is +=1 thread safe

2008-05-01 Thread Duncan Booth
AlFire <[EMAIL PROTECTED]> wrote: > But I still can not believe that +=1 is not a thread safe operation. > > > Any clue? The statement: x+=1 is equivalent to: x = x.__iadd__(1) i.e. a function call followed by an assignment. If the object is mutable then this *may* be safe so

Re: computing with characters

2008-05-01 Thread George Sakkis
On May 1, 3:36 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > George Sakkis <[EMAIL PROTECTED]> wrote: > > On Apr 30, 5:06 am, Torsten Bronger <[EMAIL PROTECTED]> > > wrote: > >> Hallöchen! > > >> SL writes: > >> > "Gabriel Genellina" <[EMAIL PROTECTED]> schreef in bericht > >> >news:[EMAIL PROTECT

  1   2   >