[Twisted-Python] Forcing Twisted / Klein to use HTTPS

2017-08-30 Thread Chris Norman
Hi all, I'm trying to force Klein to use HTTPS, and so far I have a custom error handler which redirects the user to the HTTPs version of the page via a check_secure function which takes the request object and raises the right error if request.isSecure() is False. Is there a better global w

Re: [Twisted-Python] Beginner

2017-04-12 Thread Chris Norman
On 12/04/2017 14:41, Jean-Paul Calderone wrote: On Wed, Apr 12, 2017 at 9:37 AM, Chris Norman mailto:chris.norm...@googlemail.com>> wrote: On 12/04/2017 14:21, catch me wrote: Hey! I don't know I should ask this question or not but as a beginner I have to ask.

Re: [Twisted-Python] Beginner

2017-04-12 Thread Chris Norman
On 12/04/2017 14:21, catch me wrote: Hey! I don't know I should ask this question or not but as a beginner I have to ask. I have just started learn python network programming and fortunately found such an amazing Twisted Framework. Welcome! Glad you found Twisted, it really is awesome! As

Re: [Twisted-Python] in case there's downtime

2017-03-25 Thread Chris Norman
Hi, What needs taking over on the mailing list side? I'd love to help out if possible. Cheers, On 25/03/2017 04:14, Glyph Lefkowitz wrote: We've been very conservative about upgrading our operating system on twistedmatrix.com , since we don't want to disrupt anyt

Re: [Twisted-Python] Problem with Deferreds

2016-04-02 Thread Chris Norman
he transport. During the disconnect process the reactor is generating a t.p.failure.Failure object and passing in your returned value as the 'why' which is expected to be an Exception or Failure and not a Deferred. Try returning None instead of your Deferred. That should resolve this parti

[Twisted-Python] Problem with Deferreds

2016-04-02 Thread Chris Norman
Hi all, I recently got over myself and forced myself to read about Deferreds rather than using threading opperations. I've used them successfully in a couple of places, but this one has me flummoxed: Here's the code for the Deferred and it's sub-commands: def do_command(self, cmd, **kwargs

Re: [Twisted-Python] 16.0.0 32-bit wheels for Windows

2016-03-30 Thread Chris Norman
Hi, On 30/03/2016 19:20, anatoly techtonik wrote: Hi, I am having the same problem as this guy: https://stackoverflow.com/questions/36279141/pip-doesnt-install-twisted-on-windows Absence of 32-bit wheels breaks Python projects that added Twisted>10 as a dependency, for example. Is that intenti

Re: [Twisted-Python] Sending disconnect messages to clients

2016-03-22 Thread Chris Norman
the messages, everything works fine, panic over! Thank you for your help with this! On 22/03/2016 20:37, L. Daniel Burr wrote: Hi Chris, On March 22, 2016 at 3:09:08 PM, Chris Norman (chris.norm...@googlemail.com <mailto:chris.norm...@googlemail.com>) wrote: Hi Daniel, [SNIP] Ac

Re: [Twisted-Python] Sending disconnect messages to clients

2016-03-22 Thread Chris Norman
Hi Daniel, On 22/03/2016 19:49, L. Daniel Burr wrote: Hi Chris, On March 22, 2016 at 2:42:14 PM, Chris Norman (chris.norm...@googlemail.com <mailto:chris.norm...@googlemail.com>) wrote: Hi all, I'm sure I asked this question before, but I can't find any answers on google,

[Twisted-Python] Sending disconnect messages to clients

2016-03-22 Thread Chris Norman
Hi all, I'm sure I asked this question before, but I can't find any answers on google, and I've changed my work flow a bit now, so thought it was worth re-asking. So on my server's protocol, I have a send method. This allows me to pass arguments which get sent off to the client in the right f

Re: [Twisted-Python] Waiting for transports to close

2015-12-19 Thread Chris Norman
Hello, On 17/12/2015 13:03, Glyph Lefkowitz wrote: On Dec 17, 2015, at 4:56 AM, Chris Norman mailto:chris.norm...@googlemail.com>> wrote: Hi, It's a MUD server, so players type in commands and receive textual responses. One of the admin commands is the ability to shutdown the

Re: [Twisted-Python] Waiting for transports to close

2015-12-17 Thread Chris Norman
r shutdown, so they're not rudely disconnected, then once the notifications have all gone through, then the server is free to shutdown. I hope all this makes sense. Cheers, On 12/17/2015 11:49 AM, Glyph Lefkowitz wrote: On Dec 16, 2015, at 9:25 AM, Chris Norman mailto:chris.norm...

[Twisted-Python] Waiting for transports to close

2015-12-16 Thread Chris Norman
Hi all, I'm writing a MUD server, and I want a way for transports to be notified ofa shutdown before being disconnected, and the reactor being stopped. I've tried: for t in transports: t.write('Shutting down.\r\n') t.loseConnection() reactor.stop() This doesn't seem to notify the transports

[Twisted-Python] Running Trial [wav]: Re: Possible bug

2015-10-31 Thread Chris Norman
le.py", line 94, in symlink os.rmdir(newlinkname) OSError: [WinError 145] The directory is not empty: 'C:\\Users\\chris\\Dropbox\\SRC\\twisted\\_trial_temp.lock.1446280185217.newlink' Is that a trial error or a Twisted test failing? Sorry if this is a stupid question, but (terr

Re: [Twisted-Python] Possible bug

2015-10-31 Thread Chris Norman
Hi, I've used git extensively, and I can soon read up on how to contribute on git. So what's the next step? Is there a howto somewhere on the Twisted site? Cheers, On 31/10/2015 07:39, Glyph Lefkowitz wrote: On Oct 30, 2015, at 11:49 PM, Chris Norman mailto:chris.norm...@goog

Re: [Twisted-Python] Possible bug

2015-10-30 Thread Chris Norman
p, please tell me how! Cheers, - Amber On 31 Oct 2015, at 14:41, Chris Norman wrote: Hi all, Using windows 10 with Python 3.5, importing pretty much anything gives me the following error. Not sure if there's something wrong with my configuration or if it's a bug... I seem to remember

[Twisted-Python] Possible bug

2015-10-30 Thread Chris Norman
Hi all, Using windows 10 with Python 3.5, importing pretty much anything gives me the following error. Not sure if there's something wrong with my configuration or if it's a bug... I seem to remember something a while back, should I file a ticket? Traceback (most recent call last): File ""

Re: [Twisted-Python] Blacklisting hosts

2015-08-10 Thread Chris Norman
Hello, > On 10 Aug 2015, at 03:32, Glyph wrote: > >> >> On Aug 9, 2015, at 9:07 AM, Cory Benfield > <mailto:c...@lukasa.co.uk>> wrote: >> >> >>> On 8 Aug 2015, at 08:07, Chris Norman >> <mailto:chris.norm...@googlemail.com>

Re: [Twisted-Python] Blacklisting hosts

2015-08-10 Thread Chris Norman
Hello, > On 9 Aug 2015, at 17:07, Cory Benfield wrote: > > >> On 8 Aug 2015, at 08:07, Chris Norman wrote: >> >> Hi all, >> I am using Twisted to make a game server. I want to be able to ban IP >> addresses. Currently I check if the host is

[Twisted-Python] Blacklisting hosts

2015-08-08 Thread Chris Norman
Hi all, I am using Twisted to make a game server. I want to be able to ban IP addresses. Currently I check if the host is in a blacklist, and if it is, call abortConnection on the transport. It works fine, but I'm thinking there should be a better way, to actively refuse the connection in the