Re: Learning python networking

2014-01-15 Thread Paul Pittlerson
I'm sorry if this is a bit late of a response, but here goes. Big thanks to Chris Angelico for his comprehensive reply, and yes, I do have some questions! On Thursday, January 9, 2014 1:29:03 AM UTC+2, Chris Angelico wrote: Those sorts of frameworks would be helpful if you need to scale to

Learning python networking

2014-01-08 Thread Paul Pittlerson
I'm trying to learn about socket, how to create and handle connections in python. This is the best I could come up with on my own, please take a look and give me critique: Server script: http://pastebin.com/KtapYfM0 Client script: http://pastebin.com/t4dYygmX How to run it: I open 3

Re: Constructive Criticism

2014-01-08 Thread Paul Pittlerson
I think the only winning move is not to play. -- https://mail.python.org/mailman/listinfo/python-list

Re: WHAT DOES ISLAM SAY ABOUT TERRORISM ?????????????????

2013-11-09 Thread Paul Pittlerson
If you want to convert pythoneers to Islam, you are gonna have to show them how importing Allah will make their scripts run faster, or something like that. Otherwise, I'm pretty sure you are out of luck. -- https://mail.python.org/mailman/listinfo/python-list

pycrypto: what am I doing wrong?

2013-10-23 Thread Paul Pittlerson
I seem to have misunderstood something about the way Crypto.Cipher is supposed to work, because I'm getting unexpected results, here is my code.. import hashlib from Crypto.Cipher import AES from Crypto import Random h = hashlib.new('sha256') h.update('my key') key = h.digest() iv =

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-17 Thread Paul Pittlerson
What we need to do is A) Prove that we are not sexist and racist by excluding and intolerating people who do not agree with. B) Head on over to the Ruby mailing list and make a thread called Hey guys we are the python people, and can you learn to behave, ok plz? wherein we detail to them what

Re: better and user friendly IDE recommended?

2013-09-12 Thread Paul Pittlerson
On Wednesday, September 11, 2013 5:14:04 PM UTC+3, mnishpsyched wrote: Hey i am a programmer but new to python. Can anyone guide me in knowing which is a better IDE used to develop web related apps that connect to DB using python? If you are a programmer in the sense that you are a

Re: Multiprocessing / threading confusion

2013-09-06 Thread Paul Pittlerson
Ok here is the fixed and shortened version of my script: #!/usr/bin/python from multiprocessing import Process, Queue, current_process from threading import Thread from time import sleep class Worker(): def __init__(self, Que): self._pid = current_process().pid

Multiprocessing / threading confusion

2013-09-05 Thread Paul Pittlerson
I'm trying to understand data handling using multiprocessing and threading, haven't gotten very far without running into problems. This is my code: #!/usr/bin/python from multiprocessing import Process from multiprocessing import Queue from multiprocessing import current_process from threading

Re: Multiprocessing / threading confusion

2013-09-05 Thread Paul Pittlerson
On Friday, September 6, 2013 1:28:39 AM UTC+3, mar...@python.net wrote: Also you can't (and shouldn't) depend on the time that __del__ gets called. It can get called at any time, in any order and sometimes not at all.* Wow I did not know that! I was counting on that it reliably gets called

Re: Multiprocessing / threading confusion

2013-09-05 Thread Paul Pittlerson
On Friday, September 6, 2013 1:46:40 AM UTC+3, Chris Angelico wrote: The first thing I notice is that your Debugger will quit as soon as its one-secondly poll results in no data. This may or may not be a problem for your code, but I'd classify it as code smell at best. Is your goal here to

Re: How to check client shutdown?

2013-08-27 Thread Paul Pittlerson
MAJOR security issue here. You are taking data from a networked source and running it through a trusting system (pickle). This is NOT recommended. Security issue!? Do you mean someone could enter devious python h4xx into the chat or something? I had no idea using pickle was so

How to check client shutdown?

2013-08-26 Thread Paul Pittlerson
I'm currently learning about the socket module. My question is how can I detect if a connection is closed from the other side, for example a KeyboardInterrupt as I frequently use. My code below: ## #server script: class

unit selection problem

2013-01-14 Thread Paul Pittlerson
Unit selection doesn't work properly. Pygames event.pos returns a tuple of the coords within the current window, so it's not possible to select units outside of the top left corner. from pygamehelper import * from pygame import * from pygame.locals import * from vec2d import * from math import