Re: [Tutor] trying to translate and ebcidic file

2011-06-15 Thread Mark Tolonen
"Prinn, Craig" wrote in message news:6b49a56a6e493f4eba255f6f197f070f050e4fe...@bbh-mail1.bbh.priv... I am looking for a way to translate and ebcidic file to ascii. Is there a pre-existing library for this, or do I need to do this from scratch? If > from scratch and ideas on where to start?

Re: [Tutor] Tutor Digest, Vol 88, Issue 53

2011-06-15 Thread Jacob Bender
Thanks, and I'll try those. On Wed, Jun 15, 2011 at 12:47 AM, wrote: > Send Tutor mailing list submissions to >tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit >http://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subjec

Re: [Tutor] Already Initialized Object Inheritance?

2011-06-15 Thread Steven D'Aprano
WolfRage wrote: Unfortunately I am not able to inherit "stdscr" using that method. As Python returns with an error stating that "stdscr" is not defined. This error is returned at run time and by the compiler prior to actual execution. If you would like I can write a quick example that will genera

[Tutor] using python to write web page

2011-06-15 Thread Michael bridges
i would like to use python to write a web page like writing an html file that is displayed in a browser without having to run a server. found a few options, but need to have server running. https://skulpt.googlecode.com/hg/skulpt gives 404 error ___

Re: [Tutor] using python to write web page

2011-06-15 Thread Andrés Chandía
Or maybe, you're lokking something like this: http://wiki.python.org/moin/PythonEditors On Wed, June 15, 2011 13:42, Michael bridges wrote: i would like to use python to write a web page like writing an html file that is displayed in a browser without having to run a server. found a few option

Re: [Tutor] using python to write web page

2011-06-15 Thread Andrés Chandía
cherrypy is what you are looking for check this site: http://www.chandia.net:8080/ you cn download the code from here, so you can use it as you want: NMT-2.6-20110529.tar_.gz On Wed, June 15, 2011 13:42, Michael bridges wrote: i would like to use python to write a web page like writing an ht

Re: [Tutor] Converting ebcidic to ascii

2011-06-15 Thread Prinn, Craig
Thanks Mark that did the trick, couldn't quite figure out the syntax before. Craig Prinn Document Solutions Manager Office Phone 919-767-6640 Cell Phone410-320-9962 Fax 410-243-0973 3600 Clipper Mill Road Suite 404 Baltimore, MD 21211 -Original Message- From: tutor-bounce

Re: [Tutor] Break stament issue

2011-06-15 Thread Susana Iraiis Delgado Rodriguez
Hello members!! Steven, I already changed the settings in the IDE to avoid the trouble when I type the code. In the other hand I added the pass statement so the script keep working even though it finds an error, but the scripts ignore the pass statement. Console prints: Traceback (most recent cal

[Tutor] Step Value

2011-06-15 Thread Vincent Balmori
I am still working on that one question in the absolute beginners with the the ask_number function and step value. Honestly, I still have no idea what to do. This is one of my many attempts, but I know that it's wrong. def ask_number(question, low, high): """Ask for a number within a range."

Re: [Tutor] Step Value

2011-06-15 Thread James Reynolds
Without looking at your code, What is it that you know that's wrong about it? Are you getting a return value which you know is incorrect, is the program throwing error and you aren't sure why? or do you just suspect it is wrong but you aren't sure? When posing a question, it's helpful to know the

[Tutor] step value

2011-06-15 Thread Vincent Balmori
The question to that code I am trying to solve is "Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1." ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscriptio

[Tutor] Connection Error

2011-06-15 Thread Christopher King
I was playing around with socket. It raised a connection error when I tried to connect a non-local client to a linux server. It timed out when I tried to connect a Linux client to a Windows server. I did succeed when I: connected a Linux client to a local server connected a Windows client to a loca

Re: [Tutor] step value

2011-06-15 Thread James Reynolds
I am copying and pasting your code here from the previous email: def ask_number(question, low, high): > """Ask for a number within a range.""" > response = None > if response in range(low, high, 1): > return response > while response not in range(low, high): > respon

Re: [Tutor] using python to write web page

2011-06-15 Thread Alan Gauld
"Michael bridges" wrote i would like to use python to write a web page like writing an html file that is displayed in a browser without having to run a server. OK, So whats the problem? Python can create html files so if you only want to create an html file just do it: content = """ He

Re: [Tutor] Step Value

2011-06-15 Thread Alan Gauld
"Vincent Balmori" wrote I am still working on that one question in the absolute beginners with the the ask_number function and step value. Honestly, I still have no idea what to do. Take it stage by stage. Define the function so that it takes a step parameter with a default value of 1. Don;

Re: [Tutor] step value

2011-06-15 Thread Steven D'Aprano
Vincent Balmori wrote: The question to that code I am trying to solve is "Improve the function ask_number() so that the function can be called with a step value. Make the default value of step 1." You need to be able to tell ask_number what step function you want to use. So it isn't enou

Re: [Tutor] using python to write web page

2011-06-15 Thread ALAN GAULD
From: Michael bridges To: Alan Gauld Sent: Thursday, 16 June, 2011 0:43:35 Subject: Re: [Tutor] using python to write web page > i do not want to write html, not in whole or in part, nor in reference. > just 100% python. not from a server. The code I showed was 100% Python that created an ht

Re: [Tutor] using python to write web page

2011-06-15 Thread naheed arafat
Got a question in this context. If i would like to edit an html file. suppose i want to edit the values of href tags or the img tags, what should i do? should I 1. read the file as string, 2.parse it for the tags, 3.edit the tags 4.and then replace the tags by the editted tags 5.delete the main fil

Re: [Tutor] using python to write web page

2011-06-15 Thread Steven D'Aprano
naheed arafat wrote: Got a question in this context. If i would like to edit an html file. suppose i want to edit the values of href tags or the img tags, what should i do? This question is more general than just editing HTML files. The same question, and answer, applies to editing *any* file

Re: [Tutor] using python to write web page

2011-06-15 Thread Brett Ritter
On Wed, Jun 15, 2011 at 8:46 PM, naheed arafat wrote: > Or there is any python module to get this job done? The normal way this sort of thing is handled is that the HTML is in some form of template, where the tags you are talking about editing are variables. A common example is a web-based form

Re: [Tutor] Already Initialized Object Inheritance?

2011-06-15 Thread WolfRage
Christopher, Thank you for the explanation of the error. I see now why I am unable to reference it outside of __init__'s scope. No, I did not mean to do that. I will include further details in my reply to Steven. Please feel free to jump in on that conversation to continue my learning. Thank you f

Re: [Tutor] Tutor Digest, Vol 88, Issue 56

2011-06-15 Thread WolfRage
> From: Steven D'Aprano > To: Python Tutor > Subject: Re: [Tutor] Already Initialized Object Inheritance? > Message-ID: <4df898e9.5050...@pearwood.info> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > WolfRage wrote: > > Unfortunately I am not able to inherit "stdscr" using tha

Re: [Tutor] Already Initialized Object Inheritance?

2011-06-15 Thread WolfRage
All, I have found a way to use __getattr__() to redirect failed calls to the variable that holds 'stdscr'. I will draw up some better potential code tomorrow, and then you can provide me feedback, for a potentially better method. Or perhaps optimized code. I think I also understand OOP a little be