Re: timing issue: shutil.rmtree and os.makedirs

2013-07-30 Thread Göktuğ Kayaalp
On Jul 30, 2013 3:29 PM, Chris Angelico ros...@gmail.com wrote: On Tue, Jul 30, 2013 at 2:10 PM, Tim jtim.arn...@gmail.com wrote: hmm, now that you mention it, this is executing on a remote box with access to the same file system my local calling program is on. That is, there is a local call

Testing python command line apps -- Running from within the projects w/o installing

2013-10-31 Thread Göktuğ Kayaalp
Hi all, I'm using python to write command line apps from time to time. I wonder *what is the conventional way to test-run these apps from within the project itself, while developing, without installing*. My usual practise is to have two entry points to the program as executable scripts. I

Re: Testing python command line apps -- Running from within the projects w/o installing

2013-10-31 Thread Göktuğ Kayaalp
On Fri, Nov 01, 2013 at 10:42:23AM +1100, Ben Finney wrote: Göktuğ Kayaalp s...@gkayaalp.com writes: I'm using python to write command line apps from time to time. I wonder *what is the conventional way to test-run these apps from within the project itself, while developing, without

Re: Testing python command line apps -- Running from within the projects w/o installing

2013-11-02 Thread Göktuğ Kayaalp
[...] Testing at levels of abstraction above the unit is important, but Python's ‘unittest’ is not a good fit. You'll need a different tool. For behaviour testing, I recommend Behave, which lets you describe assertions in English and have them automatically tested

Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
Hi, AFAIK, we do not have postfix conditionals in Python, i.e. a condition appended to a statement, which determines whether the statement runs or not: py for i in [False]: ... break if not i The above piece of code is equivalent to this in Python: py for i in [False]: ...if

Re: Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
On 05-01-2014 22:41, Roy Smith wrote: In article mailman.4966.1388953508.18130.python-l...@python.org, Göktu€ Kayaalp s...@gkayaalp.com wrote: py for i in [False]: ... break if not i Python is not Perl. Well done! Good for you, that you know the fact; but you are not being

Fwd: Re: Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
:09:14 -0800 From: Chris Rebert c...@rebertia.com To: Göktuğ Kayaalp s...@gkayaalp.com CC: Python python-list@python.org On Sun, Jan 5, 2014 at 12:24 PM, Göktuğ Kayaalp s...@gkayaalp.com wrote: Hi, AFAIK, we do not have postfix conditionals in Python, i.e. a condition appended

Re: Postfix conditionals

2014-01-05 Thread Göktuğ Kayaalp
On 06-01-2014 03:40, Rhodri James wrote: On Sun, 05 Jan 2014 20:24:53 -, Göktuğ Kayaalp s...@gkayaalp.com wrote: AFAIK, we do not have postfix conditionals in Python, i.e. a condition appended to a statement, which determines whether the statement runs or not: py for i in [False

Re: Python program distribution - a source of constant friction

2014-01-19 Thread Göktuğ Kayaalp
/python-list -- Göktuğ Kayaalp s...@gkayaalp.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Try-except-finally paradox

2014-01-31 Thread Göktuğ Kayaalp
Terry Reedy tjre...@udel.edu writes: I do not have any information on the topic, but I *imagine* that the when RETURN_VALUE opcode is evaluated within the context of an except block, it triggers a check for whether a corresponding finally block exists and should it exist, it is triggered, much

Re: Postfix conditionals

2014-02-03 Thread Göktuğ Kayaalp
[comments inline] BartC b...@freeuk.com writes: Göktuğ Kayaalp s...@gkayaalp.com wrote in message news:mailman.4966.1388953508.18130.python-l...@python.org... AFAIK, we do not have postfix conditionals in Python, i.e. a condition appended to a statement, which determines whether

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Göktuğ Kayaalp
io.StringIO only accepts Unicode input (i.e. umultibyte string), while StringIO.StringIO accepts either 8 bit input or unicode input. As you can see in the following excerpt from your traceback, the 'print_list' function creates an 8-bit string, which is then (probably) passed to 'file.write' as

Re: Is this PEP-able? fwhile

2013-06-25 Thread Göktuğ Kayaalp
that's going to make the feature popular :) I think a better way would be to label the outer loop somehow and then break out of it by name. Would say that procedure-scoped gotos are useful for more than manipulating loops indeed. Doubt if either will be in Python ever though. -- Göktuğ

Fwd: Important features for editors

2013-07-05 Thread Göktuğ Kayaalp
Programmability comes to my mind, before anything else. I'd suggest to find out about designs of Emacs and Vi(m). On Thu, Jul 4, 2013 at 10:32 AM, cutems93 ms2...@cornell.edu wrote: I am researching on editors for my own reference. I found that each of them has some features that other don't,

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-21 Thread Göktuğ Kayaalp
hereas ending with some slightly wilder but more enticing > examples can make those who weren't interested in the statistics want to > pay more attention to what you have been saying. > > - Nick > > On Wed, Nov 20, 2019 at 11:33 PM MRAB wrote: > >> On 2019-11-20 21:58, Terry

Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
a few lines of Python (or R) is all they need. I came here because IDK teaching about this stuff, and I haven’t left the comfort zones of a programmer ever before, so this is some new experience for me and I don’t want to botch it. Thanks a lot in advance, Göktuğ. -- İ. Göktuğ Kayaalp

Re: Library Generate a diff between two text files

2019-11-29 Thread Göktuğ Kayaalp
On 2019-11-25 16:31 +03, Noah wrote: >>From experience, could someone point me to a library that can do a diff > between two separate text files... > > *difflib* doesn't seem to cut it to this end Kinda simplistic idea, but would shelling out to diff(1) work for you? GNU diff is probably one

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
epared. If anybody will be interested, I may even try to make a video version and put it up somewhere. > Feel free to ignore all of these thoughts, they are highly subjective. Thanks a lot for your thoughts! I really appreciate your help. Cheers, -gk. -- İ. Göktuğ Kayaalp <htt

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
n-us/microsoft-edge/tools/vms/ I’ve just asked my brother to try it out for me. Later on, I’ll try with my friends. Thanks a lot for the link, I’ll try it out. Cheers, -gk. -- İ. Göktuğ Kayaalp <https://www.gkayaalp.com/> 024C 30DD 597D 142B 49AC 40EB 465C D949 B101 2427 -- https://mail.python.org/mailman/listinfo/python-list

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
On 2019-11-20 16:03 -05, Andrew Z wrote: > Look into https://repl.it Sadly this apparaently can’t do plots. > On Wed, Nov 20, 2019, 15:43 Göktuğ Kayaalp wrote: > >> >> Andrew Z wrote: >> > Goktug, >> > Im not clear what is the objective of the lectu

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
ea, but sadly also too involved / technical for my audience of absolute non-techies. Cheers, -gk. -- İ. Göktuğ Kayaalp <https://www.gkayaalp.com/> 024C 30DD 597D 142B 49AC 40EB 465C D949 B101 2427 -- https://mail.python.org

Re: Recommendations for intro to python+programming lecture to Humanities MA students

2019-11-20 Thread Göktuğ Kayaalp
python. >> > >Absolutely agreed. Your job is not to turn them into programmers. Your >job is just to inspire them - to show them possibilities, to excite >them, to empower them to play. Thanks! -gk. -- İ. Göktuğ Kayaalp <https://www.gkayaalp.com/