a little parsing challenge ☺

Thomas Jollans t at jollybox.de
Thu Jul 21 09:21:25 EDT 2011


On 21/07/11 14:29, Xah Lee wrote:
> On Jul 19, 11:14 am, Thomas Jollans <t... at jollybox.de> wrote:
>> I thought I'd have some fun with multi-processing:
> 
> Nice joke. ☺
> 
>> Here's a sane version:
>>
>> https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e
> 
> hi thomas,
> 
> i still cant get your code to work. I have a dir named xxdir with a
> single test file xx.txt,with this content:
> 
>  foo[(])bar
> 
> when i run your code
> py3 validate_brackets_Thomas_Jollans_2.py
> 
> it simply exit and doesn't seem to do anything. I modded your code to
> print the file name it's proccessing. Apparently it did process it.
> 
> my python isn't strong else i'd dive in. Thanks.

Curious. Perhaps, in the Windows version of Python, subprocesses don't
use the same stdout? Windows doesn't have fork() (how could they
survive?), so who knows. Try replacing
    ex.submit(process_file, fullname)
with
    process_file(fullname)
for a non-concurrent version.

> 
> I'm on Python 3.2.1. Here's a shell log:
> 
>  h3 at H3-HP 2011-07-21 05:20:30 ~/web/xxst/find_elisp/validate matching
> brackets
> py3 validate_brackets_Thomas_Jollans_2.py
>  h3 at H3-HP 2011-07-21 05:20:34 ~/web/xxst/find_elisp/validate matching
> brackets
> py3 validate_brackets_Thomas_Jollans_2.py
> c:/Users/h3/web/xxst/find_elisp/validate matching brackets/xxdir
> \xx.txt
>  h3 at H3-HP 2011-07-21 05:21:59 ~/web/xxst/find_elisp/validate matching
> brackets
> py3 --version
> Python 3.2.1
>  h3 at H3-HP 2011-07-21 05:27:03 ~/web/xxst/find_elisp/validate matching
> brackets
> 
>  Xah




More information about the Python-list mailing list