Re: Nested/Sub Extensions in Python

2011-07-03 Thread H Linux
On Jul 2, 10:43 pm, Carl Banks wrote: > I got and built the package, and it imported smt.bar just fine for me. > > So my advice would be to rename all the modules. My guess is that there is a > conflict for smt and Python is importing some other module or package. Is > there a file called smt.

HOWTO: Parsing email using Python part1

2011-07-03 Thread aspineux
Hi I have written an article about parsing email using Python. The article is at http://blog.magiksys.net/Parsing-email-using-python-header and the full content is here. Hope this help someone. Regards. A lot of programs and libraries commonly used to send emails don't comply with RFC. Ignore s

Re: HOWTO: Parsing email using Python part1

2011-07-03 Thread python
Alain, > I have written an article about parsing email using Python. The article is at > http://blog.magiksys.net/Parsing-email-using-python-header and the full content is here. Very helpful - thank you! Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: HOWTO: Parsing email using Python part1

2011-07-03 Thread TheSaint
aspineux wrote: > Hope this help someone. > Yeah I will learn alot and surely applying to my code. Merci Beaucoup -- goto /dev/null -- http://mail.python.org/mailman/listinfo/python-list

Re: Why won't this decorator work?

2011-07-03 Thread OKB (not okblacke)
John Salerno wrote: > Basically what I want to do is this: I first to need to roll a die to > get a random number, then pass that number to the move method of a > Player class. Can this be done with a decorator, or is it better just > to do it like move(roll_die()) and be done with it? A

Re: Anyone want to critique this program?

2011-07-03 Thread OKB (not okblacke)
John Salerno wrote: > On Jul 2, 10:02 pm, Chris Angelico wrote: >> I'd do this with a triple-quoted string - it'll simply go across >> multiple lines: game_information = """***Chutes and Ladders*** >> Up to four (4) players may play. >> There are 90 spaces on the board. >> The player to reach spa

web hosting, first hand experiences?

2011-07-03 Thread Daniel Fetchinson
Hi folks, I know this comes up regularly but the thing is that the quality of service changes also quite regularly with many of the hosting companies. What's currently the best option for shared hosting of a turbogears application? I'm thinking of dreamhost and webfaction does anyone have any recen

Re: web hosting, first hand experiences?

2011-07-03 Thread Roy Smith
In article , Daniel Fetchinson wrote: > Hi folks, I know this comes up regularly but the thing is that the > quality of service changes also quite regularly with many of the > hosting companies. What's currently the best option for shared hosting > of a turbogears application? I'm thinking of dr

RFC: tkSimpleDialog IMPROVED AGAIN!.

2011-07-03 Thread rantingrick
Hello Folks, As many of you already know yours truly has posted improvements to the tkSimpleDialog many moons back HOWEVER i was looking over the code a few moments ago and realized even more improvements were needed. These improvements mainly concern naming conventions, comments, and docstrings

Re: Anyone want to critique this program?

2011-07-03 Thread Ben Finney
John Salerno writes: > On Jul 2, 10:02 pm, Chris Angelico wrote: > > > > game_information = '***Chutes and Ladders***\nUp to four (4) players > > > may play.\n'\ > > >                   'There are 90 spaces on the board. '\ > > >                   'The player to reach space 90 first wins.' > > >

Re: web hosting, first hand experiences?

2011-07-03 Thread Alan Harris-Reid
On 19:59, Daniel Fetchinson wrote: Hi folks, I know this comes up regularly but the thing is that the quality of service changes also quite regularly with many of the hosting companies. What's currently the best option for shared hosting of a turbogears application? I'm thinking of dreamhost and

Implicit initialization is EVIL!

2011-07-03 Thread rantingrick
Tkinter has a major flaw and this flaw has been with us for many many years. What is the flaw? Well the title says it all folks... IMPLICIT INITIALIZATION IS EVIL. Still confused, well let me explain. Unlike most GUI libraries the Tkinter developers thought is would "just wonderful" if the root GU

Re: Implicit initialization is EVIL!

2011-07-03 Thread Chris Angelico
On Mon, Jul 4, 2011 at 8:11 AM, rantingrick wrote: > A new user should learn from day one the hierarchy of a GUI. > > -root window > -optional widgets > --optional sub windows > ---optional widgets > ---and on and on You're forgetting all the other crucial parts of the hierarchy. A new user shoul

Re: Implicit initialization is EVIL!

2011-07-03 Thread Roy Smith
In article , Chris Angelico wrote: > var(0x14205359) x # Don't forget to provide an address where the > object will be located > x=42 > > After all, everyone's gotta learn about segfaults some day! 0x14205359 is more likely to give a bus error (odd address) than a segfault :-) -- http://ma

Virtual functions are virtually invisible!

2011-07-03 Thread rantingrick
Hello Folks! In my quest to uncover the many asininities contained within the tkSimpleDialog.py module i found myself contemplating some the very fundamental aspects of the Python language proper. And this is aspect be... "Pythonic notation". But before i introduce you to my latest discovery of

Re: RFC: tkSimpleDialog IMPROVED AGAIN!.

2011-07-03 Thread rantingrick
Sorry folks. I found a few bugs in that pasted code of the new and improved tkSimpleDialog. I believe most here could debug it however just in case any newbies are watching i want the code to execute without error. ## START CODE ## import Tkinter as tk MESSAGE = """ You are following bad design

Problem!!

2011-07-03 Thread amir chaouki
i have written code on linux for parsing text files and it works great but when i try to run it on windows it goes crazy, do you have any idea??? -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem!!

2011-07-03 Thread Irmen de Jong
On 4-7-2011 1:41, amir chaouki wrote: > i have written code on linux for parsing text files and it works great > but when i try to run it on windows it goes crazy, do you have any > idea??? No, I misplaced my crystal ball. Irmen P.S. http://www.catb.org/~esr/faqs/smart-questions.html -- http:

Re: Problem!!

2011-07-03 Thread Dan Stromberg
You'll probably want to give more detail about what your code is doing and what it should be doing. Mindreading is hard, especially when it's accurate. Usually the main difference between *ix and windows for text files is the line endings though - on *ix, you can open a file as text or binary, an

Re: Problem!!

2011-07-03 Thread Chris Angelico
On Mon, Jul 4, 2011 at 9:41 AM, amir chaouki wrote: > i have written code on linux for parsing text files and it works great > but when i try to run it on windows it goes crazy, do you have any > idea??? If you share your code, we may be able to help. Alternatively, here's a few differences to lo

Re: Problem!!

2011-07-03 Thread rantingrick
On Jul 3, 6:41 pm, amir chaouki wrote: > i have written code on linux for parsing text files and it works great > but when i try to run it on windows it goes crazy, do you have any > idea??? psst: you should show us the code first. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem!!

2011-07-03 Thread amir chaouki
the problem is when i use the seek function on windows it gives me false results other then the results on *ux. the file that i work with are very large about 10mb. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem!!

2011-07-03 Thread Ben Finney
amir chaouki writes: > i have written code on linux for parsing text files and it works great > but when i try to run it on windows it goes crazy, do you have any > idea??? Please compose a new message, with a descriptive ‘Subject’ field, example code that we can run, and your expectations for w

Re: Problem!!

2011-07-03 Thread Grant Edwards
On 2011-07-03, amir chaouki wrote: > i have written code on linux for parsing text files and it works great > but when i try to run it on windows it goes crazy, do you have any > idea??? Yes. -- Grant Edwards grant.b.edwardsYow! LOOK!! Sullen

Re: Problem!!

2011-07-03 Thread milosh zorica
filenames and the crlf / eof thing come to my mind first linux and windows handle files all different On Sun, Jul 3, 2011 at 9:34 PM, Grant Edwards wrote: > On 2011-07-03, amir chaouki wrote: > >> i have written code on linux for parsing text files and it works great >> but when i try to run

Re: Why won't this decorator work?

2011-07-03 Thread John Salerno
On Jul 3, 1:01 pm, "OKB (not okblacke)" wrote: > subsequent calls to it will behave differently.  If you want ALL calls > to your method to roll a die to get a random number, and then use that > random number, why not just roll the die inside the method itself: I thought maybe it would be cleane

Re: Anyone want to critique this program?

2011-07-03 Thread John Salerno
On Jul 3, 1:06 pm, "OKB (not okblacke)" wrote: > > Yeah, I considered that, but I just hate the way it looks when the > > line wraps around to the left margin. I wanted to line it all up > > under the opening quotation mark. The wrapping may not be as much > > of an issue when assigning a variabl

Re: The end to all language wars and the great unity API to come!

2011-07-03 Thread alex23
rantingrick wrote: > But why must we have > completely different languages just for that those two approaches? Because monocultures die. Because having broader diversity leads to more evolutionary leaps. Because the implementations are so fundamentally different. Because the people who ACTUALL

emacs lisp text processing example (html5 figure/figcaption)

2011-07-03 Thread Xah Lee
OMG, emacs lisp beats perl/python again! Hiya all, another little emacs lisp tutorial from the tiny Xah's Edu Corner. 〈Emacs Lisp: Processing HTML: Transform Tags to HTML5 “figure” and “figcaption” Tags〉 xahlee.org/emacs/elisp_batch_html5_tag_transform.html plain text version follows. -