<div dir="ltr"><div><div>OK, that definitely sounds better, thanks Eric. I am familiar with how variables and attributes work in python, I guess what I was wondering was if you could use .upper() or .lower() to convert whatever inconsistently cased string input comes from the user into something that is read consistently as the same attribute, but having all the attributes lowercase would be fine - so long as I don't have to remember which letters are upper case and which are lower case it's all good!<br><br></div>Cheers,<br></div>Oli<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 2:01 PM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Oliver,<div><span style="white-space:pre-wrap"> </span>Attributes in Python are simply case sensitive, so you can have two different attributes, one named “stickscale” and the other “stickScale” and they are completely different as far as Python is concerned.</div><div><span style="white-space:pre-wrap"> </span>Nonetheless, in ChimeraX the situation will be significantly improved for two reasons. One is that all the attributes that ChimeraX cares about will be completely lower case (e.g. in ChimeraX “stickScale” is instead “stick_scale”), so you would have to somehow inadvertently uppercase a letter — which is much harder to do — to run into the same problem you get in Chimera 1 by inadvertently lowercasing a letter. The second reason is that the setattr command will not by default create new attributes (there will be a keyword to allow creation), so accidental typos will be caught in most cases.</div><div><br></div><div>—Eric</div><div><span class="HOEnZb"><font color="#888888"><br><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><span style="white-space:pre-wrap"> </span>Eric Pettersen</div><div><span style="white-space:pre-wrap"> </span>UCSF Computer Graphics Lab</div></div>
</div>
<br></font></span><div><blockquote type="cite"><span class=""><div>On Feb 10, 2016, at 7:43 AM, Oliver Clarke <<a href="mailto:olibclarke@gmail.com" target="_blank">olibclarke@gmail.com</a>> wrote:</div><br></span><div><div><div class="h5"><div dir="ltr"><div><div><div>Apologies for spamming the message board... in Chimera at present, attribute names (e.g. stickScale) are case sensitive. I understand that this is the way it was built and there is probably no changing it in the current version of Chimera, but assuming ChimeraX has a similar concept of attributes built in, would it be possible to make these case-insensitive? I can't imagine there are many situations where case would make a difference to the intended attribute (and if there are there probably should not be).<br><br></div>I have many cases where I type e.g. "setattr m stickscale 2.0", nothing happens and there is no error message, and I am confused until I realise I should have typed "setattr m stickScale 2.0". Alternatively, raising an error message in the status bar when a user attempts to alter a nonexistent attribute would also be helpful.<br><br></div>Cheers,<br></div>Oli.<br></div></div></div><span class="">
_______________________________________________<br>Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" target="_blank">Chimera-users@cgl.ucsf.edu</a><br>Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" target="_blank">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br></span></div></blockquote></div><br></div></div></blockquote></div><br></div>