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 lik
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
>
> This works for me on Linux:
I believe you, but I use Windows and its cmd.exe (as mentioned in
subject).
--
B
heck them all.
But you need to understand, that I'm already OK 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/105
x27;t do this fancy frame from first post 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
On Tue, 5 Aug 2014 03:06:41 +1000, Chris Angelico wrote:
> On Tue, Aug 5, 2014 at 2:48 AM, Wiktor 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.
bly bad) design, but now I need all three
packages. Maybe if I resign from storing my colored strings, 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 red
s silly 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 (Atar
those Unicode characters (by
copy/paste them in command line or by listing filenames containing that
characters), no matter what CP is set. How does it manage to do it? Can I
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
On Fri, 6 Jun 2014 03:37:56 +1000, Chris Angelico wrote:
> On Fri, Jun 6, 2014 at 2:56 AM, Wiktor 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
>> o
ript
isn't published under any BSD license.
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 version. :-/
Thank you guys.
--
Best regards, Wiktor Matuszewski
'py{}@wu{}em.pl'.format('wkm', 'ka')
--
https://mail.python.org/mailman/listinfo/python-list
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.
s?
So, what should I do?
I know, that maybe I shouldn't touch that script in first 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 regard
return True
So, this is your main loop. Very inefficient. Think about that:
a) do you really have to check divisors up to the potentialprime?
Maybe there is a point, where you may say, that you've checked all
possibilities? Remember that a * b = b * a
b) do you 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
= max(measurement_dict.values())
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,
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
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 c
Euler gave me habit to
compare 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'.
ffle(row)
if not towers:
towers = [[0]*size for _ in range(size)]
towers[0] = row[:]
random.shuffle(row)
x = size - 1
if x + 1 < size**2:
# [...]
Much more cleaner.
Thanks!
--
Best regards, Wiktor Matuszewski
'py{}@wu{}em.pl'.
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
>> if repeat: # I'll repeat 'matching' next
>> row.append(num) # number as long as last
>> x -= 1 # changed column is unique
>
> Hmm, I'm slightly confused
name__ == "__main__": main()
Footnote: English isn't my native language, so forgive me my bad grammar
and/or vocabulary. :-)
--
Best regrds, Wiktor Matuszewski
'py{}@wu{}em.pl'.format('wkm', 'ka') # spam trap
--
https://mail.python.org/mailman/listinfo/python-list
== "__main__": main()
Footnote: English isn't my native language, so forgive me my bad grammar
and/or vocabulary. :-)
--
Best regrds, Wiktor Matuszewski
'py{}@wu{}em.pl'.format('wkm', 'ka') # spam trap
--
https://mail.python.org/mailman/listinfo/python-list
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);
23 matches
Mail list logo