Is vs Equality Operator

2008-05-01 Thread Good Z
Hello, I am having problem in using is. Here is what i am doing. x='' if x is None or x is '': return 1 The above statement does not return value 1. If i changed the above check to if x == None or x == '': return 1 Now it works fine. Any idea. What is happening here. I am usin

A bug in difflib module? (find_longest_match)

2008-05-01 Thread n00m
from random import randint s1 = '' s2 = '' for i in xrange(1000): s1 += chr(randint(97,122)) s2 += chr(randint(97,122)) print s1[:25] print s2[:25] import difflib s = difflib.SequenceMatcher(None, s1, s2) print s.find_longest_match(0, len(s1), 0, len(s2)) >>> == RESTART

Re: computing with characters

2008-05-01 Thread Duncan Booth
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 PROTECTED] >> >> >> En Wed, 30 Apr 2008 04:19:22 -0300, SL <[EMAIL PROTECTED]>

Re: calling variable function name ?

2008-05-01 Thread Duncan Booth
"thinkofwhy" <[EMAIL PROTECTED]> wrote: > Try a dictionary: > > def funcA(blah, blah) > def funcB(blah, blah) > def funcC(blah, blah) > functions = {'A': funcA, 'B': funcB, 'C': > funcC} > user_func = 'A' > functions[user_func] #execute function Python has a neat concept

Re: best way to host a membership site

2008-05-01 Thread Jeroen Ruigrok van der Werven
-On [20080430 17:48], Aaron Watters ([EMAIL PROTECTED]) wrote: >Wow. An initial glance looks great! I need help with pronunciation, >though :(. Werkzeug is supposed to be pronounced in German. It translates to 'tool'. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http:

Re: Sending Cntrl-C ??

2008-05-01 Thread Gabriel Genellina
En Wed, 30 Apr 2008 15:06:13 -0300, gamename <[EMAIL PROTECTED]> escribió: win32api.GenerateConsoleCtrlEvent(win32con.CTRL_C_EVENT, pgid) How do you determine the value of 'pgid'? Make the child start a new process group, then its pid is the process group ID. You have to use the "creatio

Re: A bug in difflib module? (find_longest_match)

2008-05-01 Thread Gabriel Genellina
En Thu, 01 May 2008 04:35:17 -0300, n00m <[EMAIL PROTECTED]> escribió: from random import randint s1 = '' s2 = '' for i in xrange(1000): s1 += chr(randint(97,122)) s2 += chr(randint(97,122)) print s1[:25] print s2[:25] import difflib s = difflib.SequenceMatcher(None, s1, s2) print

Re: A bug in difflib module? (find_longest_match)

2008-05-01 Thread n00m
Gabriel Genellina: > En Thu, 01 May 2008 04:35:17 -0300, n00m <[EMAIL PROTECTED]> escribi�: > > > from random import randint > > > > s1 = '' > > s2 = '' > > > > for i in xrange(1000): > > s1 += chr(randint(97,122)) > > s2 += chr(randint(97,122)) > > > > print s1[:25] > > print s2[:25] > >

Re: Is vs Equality Operator

2008-05-01 Thread Gary Herron
Good Z wrote: Hello, I am having problem in using is. Here is what i am doing. Short answer: Use == for equality.Don't use "is". Ever! (Especially if you are a newbie.) Longer answer: In a dozen years of programming Python, the only time I use "is" is when testing for something like

Re: __getattr__ and recursion ?

2008-05-01 Thread Stef Mientki
thanks Peter, for your perfect explanation, and By the way, looping over a dictionary destroys its key advantage, O(1) lookup. Use # untested if attr in self.extra_setters: self.extra_setters[attr](value) else: self.__dict__[attr] = value and something similar in __getattr__(). ye

Re: Python -v import behavior

2008-05-01 Thread M.-A. Lemburg
On 2008-04-30 18:42, Sean Ryan wrote: Hi all, (A similar question was posted by a colleague, but did not appear to reach comp.lang.python or this list). I am wondering if the -v option causes the python application to be more tolerant to module import warnings and / or errors. The reason is th

Re: A bug in difflib module? (find_longest_match)

2008-05-01 Thread Gabriel Genellina
En Thu, 01 May 2008 06:21:22 -0300, n00m <[EMAIL PROTECTED]> escribió: > import difflib > s = difflib.SequenceMatcher(None, s1, s2) > print s.find_longest_match(0, len(s1), 0, len(s2)) > (0, 0, 0) > > I think it's line #314 in difflib "who's to blame" -- Me too. Could you think of some alternat

buy desktop computers

2008-05-01 Thread sharma . mohit80
HP Pavilion Desktop with 17 inch LCD Model No: 6310, Compaq Presario Desktop Model No: 3153, Zenith Desktop Model No: 203L-XIl latest desktop computer available please visit - http://www.homeshop18.com/shop/u/y/c-Computers-Q-and-Q-Peripherals-S-Desktops/Home_Online-clI_2-cI_919-pCI_909- -- http://

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

2008-05-01 Thread Jeff
Look at the pickle and marshal modules. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is vs Equality Operator

2008-05-01 Thread Christian Heimes
Good Z schrieb: > Hello, > I am having problem in using is. Here is what i am doing. > > x='' > if x is None or x is '': > return 1 > > The above statement does not return value 1. > > If i changed the above check to > if x == None or x == '': > return 1 > Now it works fine. >

Re: Is vs Equality Operator

2008-05-01 Thread Michael Mabin
'is' tests for identity (variable references the same memory location) while '==' tests for equality. Though it's probably best to use 'is' with more complex classes and not the simpler built-in types like integers. See how 'is' works for lists below: >>> l1 = [1,2,3,4] >>> l3 = [1,2,3,4] >>> l1

Re: Python 2.6 and wrapping C libraries on Windows

2008-05-01 Thread Christian Heimes
illume schrieb: > Hi, > > after a little research it appears that win9x is not supported by the > msvcr90.dll run time. > > Can you confirm this Lenard? > > Has anyone tested the new python binaries that link to msvcr90.dll on > win9x machines? It doesn't matter to use because Python 2.6 and 3.

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

2008-05-01 Thread M.-A. Lemburg
On 2008-05-01 13:37, Lance Gamet 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 example, the list of dat

Photo gallery software

2008-05-01 Thread Jumping Arne
I've searching for some software that would allow me to present my photos on the web (I'm not interested a software that generates static pages that I upload) and there are quite a few, see for example , but I haven't managed to

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

2008-05-01 Thread Brian Vanderburg II
Lance Gamet 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 example, the list of databases that the prog

Signals/Slots support in Python

2008-05-01 Thread Brian Vanderburg II
I don't know if any such support is already built in, so I ended up making my own simple signals/slots like mechanism. If anyone is interested then here it is, along with a simple test. It can connect to normal functions as well as instance methods. It also supports weak connections where wh

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

2008-05-01 Thread Diez B. Roggisch
Lance Gamet schrieb: 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 example, the list of databases that the pr

Re: ]ANN[ Vellum 0.16: Lots Of Documentation and Watching

2008-05-01 Thread Istvan Albert
On Apr 29, 3:51 am, "Zed A. Shaw" <[EMAIL PROTECTED]> wrote: > You can grab the most recent draft of the book at: > > http://zedshaw.com/projects/vellum/manual-final.pdf > However, I'm curious to get other people's thoughts. IMO if you would refrain from using swear words in the manual it would

Re: Cookie Confusion - How to Set a Cookie

2008-05-01 Thread cbhoem
On Apr 29, 3:35 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > > Thanks for the code, Aaron. I will give it a try. > > > I've been reading some more about cookielib and am not sure whether I > > should use Cookie or cookielib. This is what I want to do: a user is > > going to login. Upon a succ

Re: [ANN] Vellum 0.16: Lots Of Documentation and Watching

2008-05-01 Thread python
Zed, Read the first 2 chapters of your book and love it! Fun to read - I like your writing style. I agreed with most of your premises/philosophies - very refreshing. I didn't find your language offensive but you might consider toning down your review of the Awesome Window Manager :) When do you

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

2008-05-01 Thread Nick Craig-Wood
Lance Gamet <[EMAIL PROTECTED]> wrote: > 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 example, the list of databases that the > program should connect t

Please help me with linking libraries on Solaris 10 sparc

2008-05-01 Thread idev
Hi all, Please help me with my stuff. I downloaded python 2.5.1 package from http://blastwave.org it was compiled using Sun Studio 11 for Solaris 8 sparc. My system is Solaris 10 sparc and I compiled using SunStudio 11 psycopg2 python binding for PostgreSQL 8.3.1. Compilation was OK, but when I

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

2008-05-01 Thread Ralf Schönian
idev schrieb: Hi all, Please help me with my stuff. I downloaded python 2.5.1 package from http://blastwave.org it was compiled using Sun Studio 11 for Solaris 8 sparc. My system is Solaris 10 sparc and I compiled using SunStudio 11 psycopg2 python binding for PostgreSQL 8.3.1. Compilation was

free fiction-- look

2008-05-01 Thread mickey333
http://www.authspot.com/Short-Stories/Disability.107809 -- http://mail.python.org/mailman/listinfo/python-list

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

2008-05-01 Thread Martin v. Löwis
> lib/python/site-packages/psycopg2/_psycopg.so: symbol round: > referenced symbol not found You need to link _psycopg.so with the math library, -lm. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

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

2008-05-01 Thread idev
On May 1, 10:17 am, Ralf Schönian <[EMAIL PROTECTED]> wrote: > idev schrieb: > > > > > Hi all, > > Please help me with my stuff. > > > I downloaded python 2.5.1 package fromhttp://blastwave.orgit was > > compiled using Sun Studio 11 for Solaris 8 sparc. > > > My system is Solaris 10 sparc and I com

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

2008-05-01 Thread idev
On May 1, 10:30 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > lib/python/site-packages/psycopg2/_psycopg.so: symbol round: > > referenced symbol not found > > You need to link _psycopg.so with the math library, -lm. > > Regards, > Martin Martin, could you please tell me how to do this, I am

Re: Signals/Slots support in Python

2008-05-01 Thread Scott SA
On 5/1/08, Brian Vanderburg II ([EMAIL PROTECTED]) wrote: >I don't know if any such support is already built in, so I ended up >making my own simple signals/slots like mechanism. If anyone is >interested then here it is, along with a simple test. It can connect to >normal functions as well as

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

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 08:30:03 -0500, Nick Craig-Wood wrote: > Lance Gamet <[EMAIL PROTECTED]> wrote: >> 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 examp

is +=1 thread safe

2008-05-01 Thread AlFire
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 after it fini

simple beginner question about lists and negative index

2008-05-01 Thread jmDesktop
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 Into Python it said that -1 was the end of the list. Thanks. it is from Chun's book, slightly modif

Re: Photo gallery software

2008-05-01 Thread Scott SA
On 5/1/08, Jumping Arne ([EMAIL PROTECTED]) wrote: >I've searching for some software that would allow me to present my photos on >the web (I'm not interested a software that generates static pages that I >upload) and there are quite a few, see for example >

Re: Signals/Slots support in Python

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 08:44:27 -0600, Scott SA wrote: > Did you review this? > > > from what I understand is originally based upon this: > > > and subsequently integrated into this: >

Re: simple beginner question about lists and negative index

2008-05-01 Thread jmDesktop
On May 1, 10:59 am, jmDesktop <[EMAIL PROTECTED]> wrote: > 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 Into Python it s

Re: is +=1 thread safe

2008-05-01 Thread Jeff
If no other threads will be accessing the counter, there will be no problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: Photo gallery software

2008-05-01 Thread Scott Sandeman-Allen
On 5/1/08, Jumping Arne ([EMAIL PROTECTED]) wrote: >I've searching for some software that would allow me to present my photos on >the web (I'm not interested a software that generates static pages that I >upload) and there are quite a few, see for example >

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

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

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

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

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

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

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

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

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

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

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

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: 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: 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: 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: DO U WANT TO KNOW ABOUT SCIENTOLOGY?

2008-05-01 Thread Danyelle Gragsone
<3 BAHAHAHAA -- 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 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: 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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >