[issue27943] pstats.Stats: missing the source OS setting argument in strip_dirs() method

2016-09-02 Thread Jaroslav
New submission from Jaroslav: Forked from Issue 27902. The method cannot process the paths from different OS correctly. The optional argument will help, default = host OS settings as it is now. -- components: Windows messages: 274273 nosy: Jaroslav, paul.moore, steve.dower, tim.golden

[issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS

2016-09-02 Thread Jaroslav
Jaroslav added the comment: The paragraph is ok. I'll open. Thanks a lot. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS

2016-08-30 Thread Jaroslav
New submission from Jaroslav: Setup = profile data from machine - - Win 7 (64bit) - Python 3.5.2 (32bit) data analyzed on - Lubuntu 16.04 (64bit) incl. Python 3 issue - method strip_dirs() cannot extract the base name since it assumes the Unix

[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-05-07 Thread Jaroslav Urban
Jaroslav Urban added the comment: just a remark, my system is $uname -r 4.4.5-200.fc22.x86_64 and these python-related rpm archives are installed: $rpm -qa | grep python python-IPy-0.81-12.fc22.noarch python-urllib3-1.13.1-3.fc22.noarch libselinux-python-2.3-10.fc22.x86_64 python-kitchen

[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-05-07 Thread Jaroslav Urban
New submission from Jaroslav Urban: #wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz #xz -d Python-3.5.1.tar.xz #tar xvf Python-3.5.1.tar #cd Python-3.5.1 #./configure --prefix=/usr #make #make altinstall --- so far so good but afterwards

[issue17748] Condition.wait timeout can't be set to more than 50 ms

2013-04-16 Thread Jaroslav Škarvada
Jaroslav Škarvada added the comment: The current behaviour is not good for power consumption especially with the current tickless kernels - the python processes using threading shows in the top of the powertop list (on machine tuned for low power consumption) causing 20 wakeups per second

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2013-01-13 Thread Jaroslav Henner
Changes by Jaroslav Henner jaroslav.hen...@gmail.com: -- nosy: +jary ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1633941 ___ ___ Python-bugs

Re: catch UnicodeDecodeError

2012-07-26 Thread Jaroslav Dobrek
On Jul 25, 8:50 pm, Dave Angel d...@davea.name wrote: On 07/25/2012 08:09 AM, jaroslav.dob...@gmail.com wrote: On Wednesday, July 25, 2012 1:35:09 PM UTC+2, Philipp Hagemeister wrote: Hi Jaroslav, you can catch a UnicodeDecodeError just like any other exception. Can you provide

Re: catch UnicodeDecodeError

2012-07-26 Thread Jaroslav Dobrek
And the cool thing is: you can! :) In Python 2.6 and later, the new Py3 open() function is a bit more hidden, but it's still available:     from io import open     filename = somefile.txt     try:         with open(filename, encoding=utf-8) as f:             for line in f:              

Re: catch UnicodeDecodeError

2012-07-26 Thread Jaroslav Dobrek
On Jul 26, 12:19 pm, wxjmfa...@gmail.com wrote: On Thursday, July 26, 2012 9:46:27 AM UTC+2, Jaroslav Dobrek wrote: On Jul 25, 8:50 pm, Dave Angel lt;d...@davea.namegt; wrote: gt; On 07/25/2012 08:09 AM, jaroslav.dob...@gmail.com wrote: gt; gt; gt; gt; gt; gt; gt; gt; gt

Re: catch UnicodeDecodeError

2012-07-26 Thread jaroslav . dobrek
that tells you the exact code line where the error occurred. No need to look around. You are right: try: for line in f: do_something() except UnicodeDecodeError: do_something_different() does exactly what one would expect it to do. Thank you very much for pointing this out

catch UnicodeDecodeError

2012-07-25 Thread jaroslav . dobrek
UnicodeDecodeError: sys.exit(Found a bad char in file + file + line + str(line_number) Yet, no matter where I put this try-except, it doesn't work. How should I use try-except with UnicodeDecodeError? Jaroslav -- http://mail.python.org/mailman/listinfo/python-list

Re: catch UnicodeDecodeError

2012-07-25 Thread jaroslav . dobrek
On Wednesday, July 25, 2012 1:35:09 PM UTC+2, Philipp Hagemeister wrote: Hi Jaroslav, you can catch a UnicodeDecodeError just like any other exception. Can you provide a full example program that shows your problem? This works fine on my system: import sys open(#39;tmp#39;, #39;wb#39

parallel subprocess.getoutput

2012-05-14 Thread Jaroslav Dobrek
= subprocess.getoutput(command) if result: output.append(result) i += 1 return output Yet, I don't think that the files are searched in parallel. Am I right? How can I search them in parallel? Jaroslav -- http://mail.python.org/mailman/listinfo/python-list

Re: parallel subprocess.getoutput

2012-05-14 Thread Jaroslav Dobrek
Sorry, for code-historical reasons this was unnecessarily complicated. Should be: MY_DIR = '/my/path/to/dir' FILES = os.listdir(MY_DIR) def grep(regex): output = [] for f in FILES: command = egrep + '' + regex + ' ' + MY_DIR + '/' + f result =

system call that is killed after n seconds if not finished

2012-04-16 Thread Jaroslav Dobrek
be killed. How could this be done? Jaroslav -- http://mail.python.org/mailman/listinfo/python-list

subtraction of floating point numbers

2012-02-24 Thread Jaroslav Dobrek
? Jaroslav -- http://mail.python.org/mailman/listinfo/python-list

read from file with mixed encodings in Python3

2011-11-07 Thread Jaroslav Dobrek
encodings. Jaroslav -- http://mail.python.org/mailman/listinfo/python-list

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2008-02-02 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: To me it seems more like a bug fix - in Python 2.4 and older the pickling works well and the current 2.5 behavior really breaks existing code. That's why I plead for inclusion in 2.5.2; because this issue prevents our company to move to 2.5

[issue1693149] patch to make 'trace.py --ignore-module' accept module name list.

2008-01-19 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: The patch works fine for me. -- nosy: +jarpa severity: - normal _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1693149

[issue1509] Documentation lacking for the sqlite3 module.

2008-01-19 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: Attaching a patch that adds fetchXXX() description to the documentation for Python 2.6. -- nosy: +jarpa versions: +Python 2.6 Added file: http://bugs.python.org/file9232/sqlite3_docs_26.diff __ Tracker [EMAIL PROTECTED

[issue1509] Documentation lacking for the sqlite3 module.

2008-01-19 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: Attaching a patch that fixes the docstrings for Python 2.6. Added file: http://bugs.python.org/file9233/sqlite3_docstrings_26.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1509

[issue1509] Documentation lacking for the sqlite3 module.

2008-01-19 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: Attaching a patch that adds fetchXXX() description to the documentation for Python 2.5. Added file: http://bugs.python.org/file9235/sqlite3_docs_25.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1509

[issue1509] Documentation lacking for the sqlite3 module.

2008-01-19 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: BTW, the first 2 patches (for Python 2.6) work also on version 3.0a2 for me. -- versions: +Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1509

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2008-01-17 Thread Jaroslav Pachola
Jaroslav Pachola added the comment: While zseil's patch for Python 2.5 works for me (on the current 2.5.1 download), svn version of Python 2.6 rejects the 2.6 patch. Attaching fixed 2.6 patch (2 rejects, 1 fuzz fixed, patch works without complains for me). I would be very glad if someone could