Re: [Twisted-Python] running code on its own and importing, howto install a different reactor?

2016-07-29 Thread Daniel Sank
Looks like the problem is that the twisted.internet.reactor is imported inside a block guarded by if __name__ == '__main__' When you import working_code that block doesn't run, because of the guard, so terrific_method tries to access "reactor" which doesn't exist. I guess your question is really

[Twisted-Python] Pydoc parameter formatting and explaining interfaces

2016-07-26 Thread Daniel Sank
m grasp of the whole "abstract interface" thing but also found it confusing. Perhaps. On the other hand I think it might be better to replace Twisted's own documentation with a link to zope's, or at least put the link at the top and say "read this before reading our ex

Re: [Twisted-Python] Request for help with Twisted bindings in M2Crypto

2016-07-26 Thread Daniel Sank
Glyph, >> 2. I have no idea what a "task" is. I realize this is python and yay duck-typing but not >> specifying the expected behavior of an argument seems like a big omission. > Did you miss the part where it said "type: 0-argument callable" in the documentation? Yes :( I can only guess that I

Re: [Twisted-Python] Request for help with Twisted bindings in M2Crypto

2016-07-25 Thread Daniel Sank
> b"foo" != "foo" > "foo" == u"foo" > > There is lots of code out there which uses Python strings and bytes > interchangeably > which "works" under Python2, but breaks big time on Python 3. > > -- > Craig > > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > -- Daniel Sank ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] overview: new review queue venue

2016-05-23 Thread Daniel Sank
FWIW I thought of another "open source" community which uses a similar idea to closing pull requests if they won't be accepted in their current form: Stack Exchange. I mostly frequent Physics Stack Exchange . At any time some number of the questions on the front

Re: [Twisted-Python] overview: new review queue venue

2016-05-21 Thread Daniel Sank
I can speak for ~20 scientific research groups who use Twisted via LabRAD's python API . A lot of us use or deploy to Windows at least some times. So that's around 200 people you've never heard of who use Twisted on Windows :)

Re: [Twisted-Python] overview: new review queue venue

2016-05-21 Thread Daniel Sank
All, > Please do not use squash commits. See http://mjg59.dreamwidth.org/42759.html. Squashing commits is essential to making useful commit histories. Are you just saying not to use Github's built-in feature which squashes everything into a _single_ commit? If so, note that you can turn that GUI

Re: [Twisted-Python] overview: new review queue venue

2016-05-21 Thread Daniel Sank
Dear all, While I'm just a lurker, having used Twisted and Github for some time in a moderately sized team I would like to offer a couple comments: > This is exactly why issues and PRs should be separated. If you only have one > artifact - the PR - to represent both the issue and the potential s

Re: [Twisted-Python] Adding support for Diameter protocol

2015-04-13 Thread Daniel Sank
ickets > > Please feel free to ask any and all questions on this list. > > -glyph > > _______ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > -- Daniel Sank ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Tips for dev environment

2015-02-04 Thread Daniel Sank
x won't work to source the relevant file. But perhaps > if a Windows user complains we can figure out what a reasonable setup is > there :). > > -glyph > > > _______ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com &g

Re: [Twisted-Python] not terrible object oriented rpc system in js?

2014-12-27 Thread Daniel Sank
This looks promising. Thanks. On Sat, Dec 27, 2014 at 1:23 PM, Jens Sauer wrote: > Hi Daniel, > > whats about node.js with http://uber.github.io/multitransport-jsonrpc/ > > Regards > > J.Sauer > > ------ > *Von:* Daniel Sank > *An:*

[Twisted-Python] not terrible object oriented rpc system in js?

2014-12-27 Thread Daniel Sank
Are you guys aware of anything which solves the same kind of problem as t.s.pb but in js? I asked about this on the js stack exchange chat room and the general response was that there's isn't anything. I figured y'all might know more.

Re: [Twisted-Python] Tubes!

2014-12-11 Thread Daniel Sank
ple. And we live in a world where installing > dependencies is trivial now, right? :) > > But yeah, +100. I’m really happy you came to this conclusion. > > -radix > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com >

[Twisted-Python] workflow

2014-09-11 Thread Daniel Sank
t doing it because I don't know how to set up a sane environment. -- Daniel Sank ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-18 Thread Daniel Sank
Dustin, > Adding what amounts to a use-after-free bug to the protocol seems like a really bad idea to me. Oh goody, a sarcastic comment which doesn't actually bother to explain the bug :) Since what I describe is basically WeakReferenceable, it's not obvious to me that there's a bug. I tell you

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-18 Thread Daniel Sank
Mitchell wrote: > Indeed, what you're expecting is very much against the design of PB. > > Dustin > > > On Mon, Aug 18, 2014 at 5:25 PM, Daniel Sank > wrote: > >> Dustin, >> >> > No, this is simply incorrect. 'del myThingy' simply removes

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-18 Thread Daniel Sank
business. There's no sense (to me) in keeping an object alive because a GUI, logger, or other observer is observing it. Am I just wrong? Daniel On Mon, Aug 18, 2014 at 2:18 PM, Dustin J. Mitchell wrote: > On Mon, Aug 18, 2014 at 3:37 PM, Daniel Sank > wrote: > > and I send

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-18 Thread Daniel Sank
glyph, > A "resource" - i.e. a Referenceable - is just a Python object in memory. Indeed. > but in normal operation, Python objects don't spontaneously ascend > to a different plane of existence - as long as there are pointers to them in > memory Of course. > in the case of Referenceables that

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-18 Thread Daniel Sank
glyph, > On the sender's side, the object *can't* disappear unless the recipient sends the deletion. Surely a resource can disappear on the server. When that happens, any Referenceables being used to mediate access to that resource should go away... or something, right? I must not be thinking abo

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-17 Thread Daniel Sank
glyph, >> 2. Do I notify you if Joe disappears on my side? >> > Yes. > < https://github.com/twisted/twisted/blob/a8227e5562a4f9074bb0d5faf6a10e91069704aa/twisted/spread/pb.py#L365-L369 >. That's the recipient announcing deletion, not the sender. And anyway, my questions is how _should_ this work,

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-09 Thread Daniel Sank
This discussion about inlineCallbacks has nothing to do with the title of this thread. Someone already created a spin-off thread talking about inlineCallbacks. Let's use that. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twisted

Re: [Twisted-Python] On problems with inlineCallbacks (was Re: Is there pb documentation somewhere?)

2014-08-09 Thread Daniel Sank
Moved from pb documentation thread. >> I've participated in this discussion several times: >> >> Hypothetical Amalgam of Median Interlocutors Speaking Here: "I'm using Tulip because >> I really like its style of coroutines." >> Glyph: "That's interesting. Did you know that Twisted has an equivalen

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-08 Thread Daniel Sank
Twisted dev people dudes, > Nevertheless, *Daniel* didn't lead with the details and refrain from a value judgement, so the > advice applies equally well to him. Lesson learned. Thanks. I agree that this is important. Now to bring the thread back on-topic, I'd like to ask what pb should do *in pr

Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Daniel Sank
o add pb.Referenceable to Dictionary class, and use > observe_? > > > > On Fri, Aug 8, 2014 at 12:30 AM, Daniel Sank > wrote: > >> Kevin, >> >> Is there a question there? I'd be happy to try to help if I knew what you >> were asking. >> >&

Re: [Twisted-Python] pb.Copyable knowledge barrier

2014-08-08 Thread Daniel Sank
>> python wordsmith.py >> >> library.sh due to main/jelly issues >> >> > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > >

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-07 Thread Daniel Sank
glyph, > I really wish we would stop calling things "bad" and "good". My wording of exarkun's wording. He gave a much more detailed description of what he think's is "crazy" about pb. > make your own decisions about how to write your own code. Indeed, but gathering information from wiser folks

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-04 Thread Daniel Sank
glyph > I would be happy to answer questions, but obviously I'm not super responsive :). > Let me know what you need. I am trying to understand jelly's serialization strategy: 1. In t.s.jelly._Jellier, what is the meaning of persistentStore? 2. In t.s.jelly._Jellier, what is the meaning of cooke

Re: [Twisted-Python] Is there pb documentation somewhere?

2014-08-04 Thread Daniel Sank
glyph, >> 2. Is there a specification for the pb dialect of banana? >> > Beyond the code, no. Ok. > I would be happy to answer questions, but obviously I'm not super responsive :). > Let me know what you need. For two personal projects, I would like to have a reasonable remote objects library i

[Twisted-Python] Is there pb documentation somewhere?

2014-07-27 Thread Daniel Sank
nd of narrative documentation on how pb works under the hood? 2. Is there a specification for the pb dialect of banana? 3. Is there anyone else out there interested enough in pb to want to work with me to figure things out and produce documentation if there

Re: [Twisted-Python] Serial interface for software program

2014-05-05 Thread Daniel Sank
> Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > -- Daniel Sank Department of Physics Broida Hall University of California Santa Barbara, CA 93117 (805)893-3899

Re: [Twisted-Python] pb objects unexpectedly change identity

2014-05-01 Thread Daniel Sank
sue here: https://twistedmatrix.com/trac/ticket/7274 I am interested in fixing this bug. What is the right way to get help from people who know the code? I have some simple questions I'd like to ask so that I go in the right direction while fixing this. -Daniel On Wed, Apr 30, 2014 at 8:09 PM

Re: [Twisted-Python] pb objects unexpectedly change identity

2014-04-30 Thread Daniel Sank
an observe_* method differ the id reported by objects owning references to that RemoteCache?" Thank you for your time, Daniel On Wed, Apr 30, 2014 at 11:00 AM, Daniel Sank wrote: > Dear twisted users, > > I think I have found some surprising behavior in perspective broker. I >

Re: [Twisted-Python] problem with numpy and twisted xmlrpc

2014-04-30 Thread Daniel Sank
s that marshal does not support numpy arrays. > I dont know what is from/tostring. Ok, are you only interested in solutions that use functions you already know about? I was going to explain how to deal with this, but since I see you posted an identical question on stackoverflow I guess I

Re: [Twisted-Python] problem with numpy and twisted xmlrpc

2014-04-30 Thread Daniel Sank
;C:\Python27\lib\xmlrpclib.py", line 1297, in single_request > return self.parse_response(response) > File "C:\Python27\lib\xmlrpclib.py", line 1473, in parse_response > return u.close() > File "C:\Python27\lib\xmlrpclib.py", line 793, in close > raise

[Twisted-Python] pb objects unexpectedly change identity

2014-04-30 Thread Daniel Sank
eported as 45952456, which is different. Then, when in the last line we print out the id of the RemoteCache we're back to 45952496. Is there some reason that a RemoteCache's id can change during its life time? -- Daniel Sank Department of Physics Broida Hall University of California San

[Twisted-Python] object identify and lifecycle in pb

2014-03-17 Thread Daniel Sank
Dear Twisted users, I have been writing a developer library under pb and I've come to a problem that I don't know how to solve. I suspect folks here will have dealt with similar problems so I want to get your advice. This is a long post so I've put specific questions on their own lines. Suppose w

Re: [Twisted-Python] Where are the documentation files?

2014-02-27 Thread Daniel Sank
>> Also, do you have any idea when the new documentation system will up and >> ready for contributions? >> > It's up and running; there should be a lot less need for documentation > (although > as you pointed out the current docs are wrong) because sphinx is better > understood generally in the wi

Re: [Twisted-Python] Where are the documentation files?

2014-02-13 Thread Daniel Sank
> For now. Feel free to report errors and suggest new text for the site. Right. What is the appropriate channel to report errors with the website? Also, do you have any idea when the new documentation system will up and ready for contributions? Thanks, Daniel _

Re: [Twisted-Python] Where are the documentation files?

2014-02-12 Thread Daniel Sank
> There is a process of migrating the documentation to Sphinx. > Look in the new /docs/ folder. https://github.com/twisted/twisted/tree/trunk/docs So all of the information on the website regarding how to contribute to documentation is now obsolete and incorrect? __

[Twisted-Python] Where are the documentation files?

2014-02-12 Thread Daniel Sank
I am following the instructions on this web page https://twistedmatrix.com/trac/wiki/ReviewingDocumentation to prepare a submission for a documentation edit in the pb section of the howto. However, I can't find any of the supposed xhtml files that are supposed to comprise the documentation. For e

Re: [Twisted-Python] starting point to contribute

2014-01-17 Thread Daniel Sank
Kasun, For the record I'm kind of a n00b myself. -Daniel ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] starting point to contribute

2014-01-17 Thread Daniel Sank
I think the general idea is to find tickets on the webpage and just go ahead and fix them. You can sort them by difficulty. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] multiple log-in / perspective broker

2014-01-11 Thread Daniel Sank
> _PortalAuthChallenger is a Referenceable Facepalm. Thanks. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] multiple log-in / perspective broker

2014-01-11 Thread Daniel Sank
> In other words, you don't have to log in on the *root* pb object. Loginis > just > a PB method call. You can have a second portal wrapping a different realm > handing out different avatars and you can log in to that portal the second time. I look in t.s.pb to find out what methods are called

Re: [Twisted-Python] Filing Bugs

2014-01-07 Thread Daniel Sank
This has been resolved. Thanks to whoever it was (I didn't recognize your IRC username) who reset my password, as that did the trick. For the record I had tried using the password reset on the website and it didn't seem to work. Others recently had similar problems. ___

Re: [Twisted-Python] Filing Bugs

2014-01-05 Thread Daniel Sank
I have a windows computer and an Ubuntu computer that I use as a file server. I'm reading about IRC now. How are we supposed to find each other? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/list

Re: [Twisted-Python] Filing Bugs

2014-01-05 Thread Daniel Sank
> I guess I can try to re-set your password manually. Are you on IRC? I'd like to do it in real time. Never used IRC before. Is there a particular client program I should use? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twis

Re: [Twisted-Python] Filing Bugs

2014-01-04 Thread Daniel Sank
I really want to work on the perspective broker documentation as it is fresh in my mind. I still can't log into the website. Has there been any news in this area? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cg

[Twisted-Python] different import paths lead to insecureJelly

2014-01-01 Thread Daniel Sank
nd the on Stackoverflow question I could find regarding this issue. In both cases, it says to not define names in a main file precisely to avoid this issue, but not what to do in my case. Thank you for any advice. -- Daniel Sank Department of Physics Broida Hall Univers

Re: [Twisted-Python] Where is trial?

2013-12-29 Thread Daniel Sank
> On my current setup (Twisted 12.3), trial is at: > > C:\Python27\Scripts\trial.py Oh, me too. When I read the howto I thought it was saying that there should be a binary, eg. trial.exe somewhere. I thought that because it said the file would be in a directory called "bin". Now I understand. Bt

[Twisted-Python] Where is trial?

2013-12-29 Thread Daniel Sank
I am trying to write tests for my project. According to the twisted howto found here http://twistedmatrix.com/documents/current/core/howto/trial.html I should use trial. When I try to run trial from the command line (Windows) I get the usual "that's not a program I know about" error. The howto sa

Re: [Twisted-Python] multiple log-in / perspective broker

2013-12-28 Thread Daniel Sank
> In other words, you don't have to log in on the *root* pb object. > Login is just a PB method call. You can have a second portal > wrapping a different realm handing out different avatars and you > can log in to that portal the second time. How can the client access that second Portal if it's n

Re: [Twisted-Python] multiple log-in / perspective broker

2013-12-28 Thread Daniel Sank
> Do your own cred login() to the new Realm, or maybe Portal if need > auto auth. The way I understand currently is like this: r = MyIRealmImplementer() p = portal.Portal(r) pbFactory = pb.PBServerFactory(p) reactor.listenTCP(, pbFactory) reactor.run() The API documentation for Portal specifical

Re: [Twisted-Python] multiple log-in / perspective broker

2013-12-27 Thread Daniel Sank
Anyone? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] multiple log-in / perspective broker

2013-12-18 Thread Daniel Sank
another realm and listen on another port but that seems wrong. -- Daniel Sank Department of Physics Broida Hall University of California Santa Barbara, CA 93117 (805)893-3899 ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http

Re: [Twisted-Python] Filing Bugs

2013-12-10 Thread Daniel Sank
> Can you try deleting all cookies for twistedmatrix.com and then try the reset > again, or perhaps login with last reset password you got? 1. Deleted all cookies 2. Asked for password reset 3. Got new password 4. Tried to log in with new password. Does not work.

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-09 Thread Daniel Sank
> What exactly is the problem with login? In an effort to stay on topic and reduce mailing list entropy I just responded to this question in another thread that was about the broken log-in. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.co

Re: [Twisted-Python] Filing Bugs

2013-12-09 Thread Daniel Sank
This is an update because glyph asked about this issue in another thread but I want to put the information where it belongs: 1. Try to log in. Does not accept credentials (login box simply reappears with username and password fields blank). 2. Cannot find a password reset option. Scratch head. 3

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-08 Thread Daniel Sank
> I would like to know, is there anyone else who knows how pb works, > or is it mostly just you (glyph)? I'm asking this just to get a feel for who's who among twisted developers, not for any other reason. To be clear your help has been awesome and I really appreciate it very much! :) ___

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-08 Thread Daniel Sank
> I would strongly encourage you to contribute documentation enhancements that > add the requisite level of docstring coverage to PB. Eagerly awaiting for the website login to work so I can do that. > it's been years since I worked on a PB-based application. I would like to know, is there anyon

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-07 Thread Daniel Sank
I'm posting this for future hapless n00bs like myself who find this thread while trying to grok perspective broker. > It seems to me that the right way to fix this issue with being able to > pass Cacheable and Viewable instances as arguments to mind.callRemote > methods would be to "attach" a pers

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-07 Thread Daniel Sank
Glyph, It seems to me that the right way to fix this issue with being able to pass Cacheable and Viewable instances as arguments to mind.callRemote methods would be to "attach" a perspective to that mind, possibly during login (with a means for doing in manually as well). As soon as that though cr

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-06 Thread Daniel Sank
> class Perspectiveize(Jellyable): > def __init__(self, perspective, obj): > self.perspective = perspective > self.obj = obj > def jellyFor(self, jellier): > old = jellier.invoker.serializingPerspective > jellier.invoker.serializingPerspective = self.perspect

Re: [Twisted-Python] Filing Bugs

2013-12-04 Thread Daniel Sank
> I've filed a website bug about the whole issue (should probably be 3 separate > bugs, but I really don't have the patience): Thanks. I have bunch of functionality and documentation bugs in twisted.spread.pb to report but as things are right now I can't.

Re: [Twisted-Python] Filing Bugs

2013-12-04 Thread Daniel Sank
> I assume there’s something obvious that I’m missing, but it’s flying below my > visual radar, because I’ve tried looking everywhere on the site. I had exactly this problem last night. I googled "twisted password reset" and found this page http://twistedmatrix.com/trac/reset_password I got it

[Twisted-Python] website login not working?

2013-12-03 Thread Daniel Sank
I just tried logging into the website to place some tickets and found that my login doesn't work. I got a password reset but still no dice. Anyone else having this problem? -- Daniel Sank Department of Physics Broida Hall University of California Santa Barbara, CA 93117 (805)893

Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread Daniel Sank
this is not a complete working example. There's no executable code, and what you included doesn't make sense. When people ask for a complete working example it means that they want to try to run the same program that you're running. Just attach your actual source files to an email and send them.

Re: [Twisted-Python] How to get callback return value

2013-12-03 Thread Daniel Sank
The code you included in your email doesn't make sense. Please include a full working (with errors) code sample and then people can help you. Also, I _highly_ recommend that you read this: http://krondo.com/?page_id=1327 It might as well be considered the official n00b intro to Twisted, imho. _

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-12-02 Thread Daniel Sank
> One way to fix this is to manually construct a ViewPoint rather than a > Viewable and pass that to the client. For the sake of trying to get my current project to work and so that I can understand what's really going on and fix the bugs in pb: how would I do the similar thing for a Cacheable? L

Re: [Twisted-Python] Unpersistable instead of pb.Avatar

2013-12-01 Thread Daniel Sank
>> It doesn't make sense to use the same perspective in >> both games >> > I don't see why not personally. I can think of two reasons. First, suppose that I would like to participate in two different games of chess at the same time. Suppose my Avatar class has a method for moving the chess pieces

[Twisted-Python] Unpersistable instead of pb.Avatar

2013-11-29 Thread Daniel Sank
nice to separate the responsibilities of the user from those of the "player." If I'm not thinking about this correctly please advise. Thank you for your time, Daniel Sank ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twisted

[Twisted-Python] Why must RemoteCacheObservers be hashable?

2013-11-27 Thread Daniel Sank
I just wrote up a class that allows dicts to be be pb.Cacheable. Everything works hunky-dory but only if I implement __hash__, which is problematic for mutable objects for reasons explained thoroughly elsewhere. The problem comes from twisted.spread.flavors.RemoteCacheObserver: class RemoteCacheOb

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-25 Thread Daniel Sank
>>> Question: Is there a way to distribute un-asked for references to >>> Viewables that properly get the perspective argument in their view_* >>> methods? >>> >>> >> I think this is a pretty reasonable question but nobody's biting. Did >> I do something wrong in the way I asked? >> >> > This is wh

Re: [Twisted-Python] How to debug the client-server pyqt project using twisted framework?

2013-11-24 Thread Daniel Sank
> But i have no idea about using trail in qt application testing. Neither do I. As I said I'm trying to figure this out for myself as well. If I learn anything useful I'll let you know. I would say that you probably can write most of your application without worrying about the GUI at all. In that

Re: [Twisted-Python] How to debug the client-server pyqt project using twisted framework?

2013-11-24 Thread Daniel Sank
Yangyouxiu, I was recently trying to solve the same problem for my own project. Twisted apparently has some built-in testing facilities: http://twistedmatrix.com/documents/current/core/howto/trial.html Does this help at all? ___ Twisted-Python mailing

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Daniel Sank
ere are indeed many issues, however they are inter-related. As I said, I will try to make some sense out of what needs to be fixed and file (and fix!) tickets in as orderly a fashion as I can. -Daniel Sank ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Daniel Sank
ective broker; I do not know how it works under the hood. I have been collecting notes on bugs in the perspective broker documentation. I promise to submit a documentation patch when I have a first draft of my project up and running. Regards, Daniel Sank ___

Re: [Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-22 Thread Daniel Sank
> Question: Is there a way to distribute un-asked for references to > Viewables that properly get the perspective argument in their view_* > methods? I think this is a pretty reasonable question but nobody's biting. Did I do something wrong in the way I asked?

[Twisted-Python] Do Viewables absolutely have to be return'ed by Avatars?

2013-11-20 Thread Daniel Sank
ver that succinctly illustrates this issue. Question: Is there a way to distribute un-asked for references to Viewables that properly get the perspective argument in their view_* methods? Sincerely, Daniel Sank #!/usr/bin/env python from twisted.spread import pb from twisted.internet import reac

Re: [Twisted-Python] How to call remote server method to read a file on the server machine useing perspective broker ?

2013-11-19 Thread Daniel Sank
> You are right. It should be 'r+' mode, ^_^ Yes, reading the error message can be useful... ;) ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] How to call remote server method to read a file on the server machine useing perspective broker ?

2013-11-19 Thread Daniel Sank
Did you try reading the error message? I don't think 'wr' is an allowed mode for open() ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] perspective argument missing from Viewable.view_*

2013-11-18 Thread Daniel Sank
rier soon. This raises the question of how to enable a single human with a single connection to act as more than one client in a pb managed system. Regards, Daniel Sank ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] perspective argument missing from Viewable.view_*

2013-11-18 Thread Daniel Sank
> Client then have to authenticate to the server, only then you will receive the > perspective object representing the "logged" user into your view_ and > perspective_ method. I am confused by this. When I use the cred system the client gets a remote reference to an Avatar on which it can call per

[Twisted-Python] perspective argument missing from Viewable.view_*

2013-11-17 Thread Daniel Sank
nd regards, Daniel Sank # Server import twisted.spread.pb as pb import twisted.internet.reactor as reactor class Server(pb.Root): def __init__(self): self.v = MyViewable() def remote_getViewable(self): return self.v class MyViewable(pb.Viewable): def view_foo(self, p

Re: [Twisted-Python] Is a Viewable Cacheable a good idea?

2013-11-17 Thread Daniel Sank
> So may be (IMHO) you could have one viewable object acting like a > stockroom-manager > that clients will (remote)call to make changes on the server side > stockroom-object, and > a cacheable stockroom-object, that you will sync with client. Now that I've been working on this for a while and u

Re: [Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread Daniel Sank
Yangyouxiu, I can definitely help you with this as I've recently written a chat server/client with twisted+PyQt4 and am working on a more complex program that uses PyQt4 with twisted's perspective broker. I have attached five files: 1. client-pyqtreactor.py is a chat client using pyqtreactor and

[Twisted-Python] Is a Viewable Cacheable a good idea?

2013-11-12 Thread Daniel Sank
lients can invoke methods on them directly. If the Stockroom were _also_ Cacheable then changes on a Stockroom would automatically propagate to the client process. Is simultaneously sub-classing Viewable and Cacheable a good idea? Am I thinking about this properly? Regards and thanks in advance,

Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-10-24 Thread Daniel Sank
> That will atomically combine the propagation of initial state with the > provision of the > back-propagation channel for updates to that state. My understanding of Cacheable is that it propagates initial state to the RemoteCache and then sends subsequent updates also to the RemoteCache. What I

Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-23 Thread Daniel Sank
elds my browser (firefox) brought up a notice that the security certificate is invalid because of unavailable issuance chain information. Knowing absolutely nothing about internet security issues I thought I should mention this and ask if this is expected behavior. Sincerely -- Daniel Sank Departmen

Re: [Twisted-Python] Twisted Users on Windows XP

2013-10-23 Thread Daniel Sank
> If you're still running XP isn't it pretty unlikely you have > hardware modern enough to power a Steam game in the > first place? You'd be surprised. I have an XP machine at work because I never bothered to buy a new license for Win7, but I've upgraded the hardware reasonably recently. I have no

Re: [Twisted-Python] "mind" introduced strangely in pb howto

2013-10-22 Thread Daniel Sank
I should clarify something: I understand that Avatar and Mind are introduced in the cred section. I'll venture to suggest that the pb section simply refers and links to that. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twiste

[Twisted-Python] "mind" introduced strangely in pb howto

2013-10-22 Thread Daniel Sank
y introduced but never used in example up to this point. I'm not good enough with pb yet to want to suggest an alteration but this confused me enough that I thought I should bring it up. Yours sincerely -- Daniel Sank Department of Physics Broida Hall University of California Sa

Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-10-21 Thread Daniel Sank
> Here's my game that uses PB: https://github.com/dripton/Slugathon This has been useful. I am learning from it and my own experimentation. > One piece of advice: do the network code first and always exercise it, even > when playing on a single computer. Every time I've written a single-machine

[Twisted-Python] pb.Cacheable with response to remote requests

2013-10-17 Thread Daniel Sank
Is there a good way to make something like a pb.Cacheable on which the observers can call remote methods? -- Daniel Sank Department of Physics Broida Hall University of California Santa Barbara, CA 93117 (805)893-3899 ___ Twisted-Python mailing list

Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-09-27 Thread Daniel Sank
> Have you seen this: > > http://twistedmatrix.com/documents/current/core/howto/pb-copyable.html#auto9 No, I hadn't. That example is extremely helpful, thank you. I just realized that the documentation pages I'd been reading are all linked from here: http://twistedmatrix.com/documents/current/co

Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-09-26 Thread Daniel Sank
Upon re-reading the Cacheable docs I still don't understand how to use it. Can we take my previous home-brewed example and use that as a launch point for illustrating how to use Cacheable? Here's the example. We assume the client has a PlayerClient instance with .server pointing to a PlayerServer

Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-09-26 Thread Daniel Sank
nny. I read the documentation on Cacheable a few times and eventually figured the warning about it being "hard to understand" was there for a reason. I'll check it out in earnest now that I know it's relevant. Many thanks. Regards, Daniel Sank P.

[Twisted-Python] Clean pb solution for two-way object sync?

2013-09-25 Thread Daniel Sank
uot;, a) d.addCallback(lambda obj: a.clients.append(obj)) class PlayerClient(bp.referenceable): def requestNewAgent(self): """Tell the server we want to spawn a new Agent""" self.server.callRemote("newAgent"

[Twisted-Python] (no subject)

2013-09-25 Thread Daniel Sank
append(obj)) class PlayerClient(bp.referenceable): def requestNewAgent(self): """Tell the server we want to spawn a new Agent""" self.server.callRemote("newAgent", self) def newAgent(self, serverObj): a = AgentClient()