[issue25919] htp.client PUT method ignores error responses sent immediatly after headers

2015-12-22 Thread Wiktor Niesiobedzki
Wiktor Niesiobedzki added the comment: Maybe something like this? Doesn't look too complicated and I haven't noticed any breakage yet. -- keywords: +patch Added file: http://bugs.python.org/file41390/http.client.put.fix.patch ___ Python tracker <

[issue25919] htp.client PUT method ignores error responses sent immediatly after headers

2015-12-22 Thread Wiktor Niesiobedzki
Wiktor Niesiobedzki added the comment: Here is revised patch. Also covers changes to tests. -- Added file: http://bugs.python.org/file41392/http.client.put.fix.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25919] htp.client PUT method ignores error responses sent immediatly after headers

2015-12-21 Thread Wiktor Niesiobedzki
New submission from Wiktor Niesiobedzki: It looks like, when doing PUT together with a file-like object to send, http.client will try to send the whole file before analysing the response from the server. If you do the following: $ dd if=/dev/zero of=/tmp/300mb.zero bs=1M count=300

Re: Loading Python 2.7

2014-11-24 Thread Wiktor
On Mon, 24 Nov 2014 18:25:25 -0500, Seymore4Head wrote: What I do when I need to run 2.7 code is to just save the file to my Python 2.7 folder and run a command prompt. I then just type the py file. That works but I am left with a dos prompt when the file finishes. I sometimes would like

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-05 Thread Wiktor
with those cmd.exe limitations, and really not trying to achieve look of frame from first post. I'm OK with those single-only and double-only lines. Now my game would look like this: https://dl.dropboxusercontent.com/u/10544563/kolony_prntscr.png [*] and I think it's very neat. Wiktor *) it's mocup

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-05 Thread Wiktor
On 05 Aug 2014 20:26:08 GMT, Tony the Tiger wrote: On Mon, 04 Aug 2014 00:52:29 +0200, Wiktor wrote: okumenty\python\kolony\menu.py, line 14, in module This works for me on Linux: I believe you, but I use Windows and its cmd.exe (as mentioned in subject). -- Best regards, Wiktor

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Wiktor
to tell them 'It is pure console based game/framework but works only in ConEmu'... Now, to Terry's post: On 8/3/2014 6:52 PM, Wiktor wrote: as OO programming exercise, I'm trying to port to Python one of my favorite game from early'90 (Atari 65XL/XE) - Kolony (here's video from original

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Wiktor
, and color them just while sending them to printing function, I could get rid of colorama and termcolor... Well, thanks for asking, because now, during writing this response, I see that maybe redesign is worth of trying... Wiktor -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Wiktor
On Tue, 5 Aug 2014 03:06:41 +1000, Chris Angelico wrote: On Tue, Aug 5, 2014 at 2:48 AM, Wiktor look@signature.invalid wrote: From colorama I just use one function - init(). Without this initialization all those ansii escape characters (used by colorama itself, but also by termcolor.colored

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Wiktor
with Polish strings inside. There will be simpler version instead. -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') -- https://mail.python.org/mailman/listinfo/python-list

cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-03 Thread Wiktor
exploit that writing my Python program? Wiktor -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') -- https://mail.python.org/mailman/listinfo/python-list

Re: Forking PyPI package

2014-06-05 Thread Wiktor
from the scratch looking only at the original JavaScript version. :-/ Thank you guys. -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') -- https://mail.python.org/mailman/listinfo/python-list

Re: Forking PyPI package

2014-06-05 Thread Wiktor
On Fri, 6 Jun 2014 03:37:56 +1000, Chris Angelico wrote: On Fri, Jun 6, 2014 at 2:56 AM, Wiktor look@signature.invalid wrote: I guess, I'll try to do what Chris proposed. Forget about this implementation and write python script from the scratch looking only at the original JavaScript

Re: Forking PyPI package

2014-05-29 Thread Wiktor
On Thu, 29 May 2014 02:31:56 +0200, Wiktor wrote: So, what should I do? Thanks guys, you're right. I'll contact the Lion. ;-) Yes, I forgot to mention that pwdhash.py was published under BSD licence. Without knowing that I wouldn't even consider forking it. -- Best regards

Forking PyPI package

2014-05-28 Thread Wiktor
place and just mail to author Hey, would you please port it to Py3?, but I also treated it as programming exercise, and I didn't think about consequences. ;-) TIA -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') -- https://mail.python.org/mailman/listinfo/python-list

Re: Python prime numbers

2014-02-01 Thread Wiktor
really have to check every divisor? I mean, increasing it by 1 in every step? -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Recursive algorithm - review

2014-01-04 Thread Wiktor
. It looks stupid now. ;-) Thank you for all Your comments. -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') # email spam trap -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Recursive algorithm - review

2014-01-04 Thread Wiktor
On Fri, 03 Jan 2014 20:47:16 -0500, Terry Reedy wrote: [0]*size] is fine for one row towers = [[0]*size] for i in range(size)] should do what you want for a 2-d array instead of the above. Right. Thank you also. -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm

Re: [newbie] Recursive algorithm - review

2014-01-04 Thread Wiktor
[:] random.shuffle(row) x = size - 1 if x + 1 size**2: # [...] Much more cleaner. Thanks! -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') # email spam trap -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Recursive algorithm - review

2014-01-04 Thread Wiktor
time consumption of script every time I make serious change in it. Your tune-ups made this script (mostly check() I guess) about 20% faster. So it's not only 'more readable' profit. :-) -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') # email spam trap -- https

Re: [newbie] Recursive algorithm - review

2014-01-04 Thread Wiktor
On Sat, 4 Jan 2014 01:16:14 +0100, Wiktor wrote: Hi, OK, another question. This time, I think, closer to the original subject (recursive algorithm). Thanks to Terry's and Chris' advises I refined script. Then I thought, that with some changes and with minimal effort I can force this script

Re: [newbie] Recursive algorithm - review

2014-01-04 Thread Wiktor
On Sat, 4 Jan 2014 20:07:33 +0100, Wiktor wrote: I guess that some kind of you have done this before. ;-) Damn it. This 'kind' shouldn't be there. Now it sounds silly, even offensive. ;-) Normally I would supersede it, but probably attached

Re: Flip a graph

2014-01-04 Thread Wiktor
()) temporary_graph = [] for t, y in measurement_dict.items(): temporary_graph.append('X'*y + ' '*(max_height - y)) for i in range(max_height-1, -1, -1): for item in temporary_graph: print(item[i], end='') print() -- Best regards, Wiktor Matuszewski 'py{}@wu{}em.pl

[newbie] Recursive algorithm - review

2014-01-03 Thread Wiktor
# more time... return towers def main(): towers6by6 = generate(6) # print(check(towers6by6)) print(towers6by6) if __name__ == __main__: main() Footnote: English isn't my native language, so forgive me my bad grammar and/or vocabulary. :-) -- Best regrds, Wiktor

[newbie] Recursive algorithm - review

2014-01-03 Thread Wiktor
, Wiktor Matuszewski 'py{}@wu{}em.pl'.format('wkm', 'ka') # spam trap -- https://mail.python.org/mailman/listinfo/python-list

PyThreadState_Swap crash

2011-04-04 Thread Wiktor Adamski
I have 2 threads in C code using python 2.5.2. First thread creates new interpreter (i need several interpreters but those 2 threads use only one) like that: PyEval_AcquireLock(); threadState = Py_NewInterpreter(); PyThreadState_Swap(threadState); // calling python API PyThreadState_Swap(NULL);