Re: [Tutor] apache python cgi sockets error 13 (resend after joining the tutorial list)

2015-05-07 Thread Felix Dietrich
ut the working directory of the interpreter? -- Felix Dietrich ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] inserting path to open a file from a variable

2015-05-28 Thread Felix Dietrich
t that into the open() statement? > > What I've tried (none worked): > > file = open(rd1, 'r') > file = open('rd1', 'r') What do you mean by "none worked"? Did python respond with an error? How did you figure that the calls to /open

Re: [Tutor] inserting path to open a file from a variable

2015-05-28 Thread Felix Dietrich
argparse is here > https://docs.python.org/3/library/argparse.html True, but the /optparse/ module does not appear to be part of Python 2.6. ("new in version 3.2") richard kappler writes: >>> This is python 2.6.6 running on a Linux machine. -- Felix Dietrich ___

Re: [Tutor] inserting path to open a file from a variable

2015-05-28 Thread Felix Dietrich
/os.chdir/, /os.getcwd/, /os.expanduser/ specifically. /sys.path/ is also related to the current working directory and relative paths and it will come in handy when you import your own modules not residing in any of the default directories while running the script with a different working directory than its location. -- Felix Dietrich ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] inserting path to open a file from a variable

2015-05-28 Thread Felix Dietrich
Mark Lawrence writes: > On 29/05/2015 01:16, Felix Dietrich wrote: > >> True, but the /optparse/ module does not appear to be part of Python >> 2.6. ("new in version 3.2") > > If you mean argparse you're correct, but it's in 2.7. My point is > th

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Felix Dietrich
to be easily called from a directory in your PATH environment variable: $ chmod u+x LED_model_utf8.py $ ./LED_model_utf8.py LED_model_utf8.py LED_IV.txt -- Felix Dietrich ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What is wrong with my Python program that causes it to run but not give results?

2016-10-26 Thread Felix Dietrich
rong with the formatting and Python is > sensitive to that, so seeing your actual code would be a good idea. Could you also provide a small set of sample data that fails, maybe $ head LED_IV.txt > sample.txt will be enough. -- Felix Dietrich __

Re: [Tutor] class data member and objects of class in python

2013-09-12 Thread Felix Dietrich
) You might want to catch StopIteration here so that you can handle the case that the shop runs out of the initial stack of pizzas. ;) -- Felix Dietrich ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] trying to parse an xml file

2013-12-14 Thread Felix Dietrich
expected. Maybe something is wrong with your local copy of the xml-file. -- Felix Dietrich ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Stuck on error

2013-12-22 Thread Felix Dietrich
hould be reserved for "constants", - first letter capitalisation should be reserved for (something called) classes, - give them meaningful names Here's some reading about the suggested python-code styling conventions (you don't need to read that now): http://www.python.org

Re: [Tutor] Question

2014-08-21 Thread Felix Dietrich
ur program does not read another line of input and therefore the value of /line/ never changes and gets no chance to become the empty string. -- Felix Dietrich ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor