Re: [Tutor] 'root' dir of a package from within the package ?

2007-01-09 Thread Michael Lange
On Mon, 8 Jan 2007 19:24:37 + Dave S [EMAIL PROTECTED] wrote: Hi all, I have written a python package, which works fine, the 'root' directory is 'my_app' with sub directories within in, complete with there __init__.py files. I need to work out the path to the root directory from

Re: [Tutor] is gotchas?

2007-01-09 Thread Kent Johnson
Hugo González Monteverde wrote: Hmmm! Hmmm! Lookee here: ## console session a=[1,2] b=[1,2] a is b False c='1' ## one byte d='1' ## one byte c is d True c='1,2' d='1,2' c is d False The Hmmm!

Re: [Tutor] Tutor Digest, Vol 35, Issue 27

2007-01-09 Thread raghu raghu
i have a clarification regarding built in function,in some scripts it is being used and it is give n: if _name_ == '_main_' why this is being used in the scripts? On 1/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Send Tutor mailing list submissions to tutor@python.org To subscribe

Re: [Tutor] python Error:IndentationError: expected an indented block

2007-01-09 Thread ziok
hi .. i'm learning python .i have a book with examples. i did the examples for if and have the same errors... here is the simple code(two of them) z=['ze','se'] for s in z: ... if s=='ze': File stdin, line 2 if s=='ze': ^ IndentationError: expected an indented block z=['ze','se']

Re: [Tutor] python Error:IndentationError: expected an indented block

2007-01-09 Thread Kent Johnson
ziok wrote: hi .. i'm learning python .i have a book with examples. i did the examples for if and have the same errors... here is the simple code(two of them) z=['ze','se'] for s in z: ... if s=='ze': File stdin, line 2 if s=='ze': ^ IndentationError: expected an indented

Re: [Tutor] Tutor Digest, Vol 35, Issue 27

2007-01-09 Thread Kent Johnson
raghu raghu wrote: i have a clarification regarding built in function,in some scripts it is being used and it is give n: if _name_ == '_main_' why this is being used in the scripts? This is a way to include test code that runs if the module is run as a main program, but not if the module is

Re: [Tutor] Question about __name__ global variable (Was: Tutor Digest, Vol 35, Issue 27)

2007-01-09 Thread Luke Paireepinart
raghu raghu wrote: i have a clarification regarding built in function,in some scripts it is being used and it is give n: if _name_ == '_main_' why this is being used in the scripts? The global variable __name__ is equal to '__main__' when the python script is run. If the script is imported,

[Tutor] feeding data to subprocess exes and getting results without writing files

2007-01-09 Thread Barton David
Hi there, I can easily use the subprocess module to run a separate exe from within MyScript.py.. e.g. import subprocess process=subprocess.Popen(myprog.exe -i inputfile.txt -o outputfile.txt) ..and that's just fine as far as it goes, if I don't mind creating 'inputfile.txt' first, and reading

Re: [Tutor] feeding data to subprocess exes and getting results without writing files

2007-01-09 Thread Christopher Arndt
Barton David schrieb: I just can't wrap my head around stdin, stdout and the whole pipes thing, but there's got to be a relatively simple way to do this, surely? You have to distinguish between three different concepts: 1) file names 2) file objects 3) file contents 1) Is just a string with

Re: [Tutor] smtplib starttls() error

2007-01-09 Thread Olen
On 1/8/07, Olen [EMAIL PROTECTED] wrote: I have also looked in all the documentation python 2.4.3 files I downloaded and this points out that I should have install the socket.ssl() my question is that is how do I install the socket.ssl() thank you ennma On 1/8/07, olen88 [EMAIL

[Tutor] Fwd: smtplib starttls() error

2007-01-09 Thread Olen
-- Forwarded message -- From: Olen [EMAIL PROTECTED] Date: Jan 8, 2007 1:44 AM Subject: Re: [Tutor] smtplib starttls() error To: tutor@python.org I have also looked in all the documentation python 2.4.3 files I downloaded and this points out that I should have install the

[Tutor] Before I start

2007-01-09 Thread Hemantharaju Subbanna
Hi, Before I jump into the investigation, I wanted to ask experts and get help/direction. I am looking to develop a simple web application. What would be my best approach. Thank you Raju __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best

[Tutor] Before I start

2007-01-09 Thread Hemantharaju Subbanna
Hi, Before I jump into the investigation, I wanted to ask experts and get help/direction. I am looking to develop a simple web application. What would be my best approach? What package/s is good to explore? Need HTML GUI for Client (Qt plug-in may be ok). Server application with database Thank

Re: [Tutor] smtplib starttls() error

2007-01-09 Thread Kent Johnson
olen88 wrote: Hello, I was wondering if anyone could point me in the right direction my system info: Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32 as the subject says. starttls() returns the following error, reply, null =

[Tutor] question about pydev

2007-01-09 Thread shawn bright
hey there gents, i was wondering if anyone uses pydev ? its a plugin for eclipse. Has lots of cool stuffs, but i don't like the way it does code snippets, when i paste one that is kinda long, it messes up the indentation. anyone know a way around this ? i have posted this question on the pydev

Re: [Tutor] smtplib starttls() error

2007-01-09 Thread Terry Carroll
On Tue, 9 Jan 2007, Kent Johnson wrote: Are you using the standard Python installer from python.org or something else? SSL support is a build option. It is included in the standard Python for Windows v2.3.5 and 2.4.4. Can you upgrade to the standard 2.4.4 distribution and see if that

Re: [Tutor] Question about __name__ global variable (Was: Tutor Digest, Vol 35, Issue 27)

2007-01-09 Thread wesley chun
The global variable __name__ is equal to '__main__' when the python script is run. If the script is imported, __name__ is something other than '__main__' (not sure what.) it will be the name of your module. so for foo.py, if you execute it (as a script), __name__ == '__main__', but if you

Re: [Tutor] smtplib starttls() error

2007-01-09 Thread Olen
Hi Kent and Terry, Correct I am using Active state python,and did not read the full information about installations. Thank you for for the information. I just need to confirm something, In python when we upgrade we essentially install a new version of python , and we would be needing