  | | | Properties not available in Python? | Properties not available in Python? 2004-07-05 - By Aloys Baillet
Back Hello Bernard, In XSI 3.51, we used ActivePython 2.2.3 and I believe we did not have this bug. Have you tried this code ?
oSelList = Application.Selection for iSel in range(oSelList.Count): obj = oSelList[iSel] Application.LogMessage(obj.FullName)
-- Aloys Baillet - R&D @ La Maison --
Bernard Lebel wrote:
>Salut encore Guy, > >What version of Python were you using in 3.5.11? > >I found that it works fine in XSI 4 but as you know my production is made >with 3.5.11. > >Merci >Bernard > > >-- -- Original Message -- -- >From: "Guy Rabiller" <guy@(protected)> >To: <XSI@(protected)> >Sent: Sunday, July 04, 2004 4:33 PM >Subject: Re: [Script] Properties not available in Python? > > > > >>Hey Bernard, >> >>you don't need to install both Python/win32 and ActivePython. >>Forget about ActivePython. Just remove everything again, and properly >>re-install only Python 2.3.4 + win32com, and lets see what will happens. >>-- >>guy rabiller | 3d technical director @ LaMaison >> >> >>-- -- Original Message -- -- >>From: "Bernard Lebel" <atyss4si@(protected)> >>To: <XSI@(protected)> >>Sent: Sunday, July 04, 2004 1:08 PM >>Subject: Re: [Script] Properties not available in Python? >> >> >> >> >>>Thanks Rick, >>> >>>I even uninstalled Python 2.3.4 with the win32com module and reinstalled >>>ActivePython 2.2.3, and still get this error. >>> >>> >>>This sucks terribly. >>> >>> >>>Bernard >>> >>> >>> >>> >>> >>>>From: Rick Walia <xsilist@(protected)> >>>>Reply-To: XSI@(protected) >>>>To: XSI@(protected) >>>>Subject: Re: [Script] Properties not available in Python? >>>>Date: Sat, 3 Jul 2004 10:05:15 -0400 >>>> >>>>It should work! >>>> >>>>The following examples work fine on my end: >>>>#-- ---- ---- ---- ---- ---- ---- ---- ---- --- >>>>for iSel in Application.Selection: >>>>Application.LogMessage(iSel.FullName) >>>>Application.LogMessage("#"*25) >>>> >>>># Let's get lazy and replace Application with XSI >>>>XSI = Application >>>>oSel = XSI.Selection >>>> >>>>for iSel in range(oSel.Count): >>>> XSI.LogMessage("Name: %s" % oSel.Item(iSel).FullName) >>>> XSI.LogMessage("-"*25) >>>> >>>> >>>>for iSel in range(oSel.Count): >>>>XSI.LogMessage(oSel.Item(iSel).FullName) >>>>XSI.LogMessage("x"*25) >>>>#-- ---- ---- ---- ---- ---- ---- ---- ---- --- >>>> >>>>I'm using active python 2.2. There were some initial quirks with python >>>> >>>> >>2.3 >> >> >>>>and >>>>XSI and I never bothered to upgrade. >>>> >>>>/R >>>> >>>> >>>> >>>> >>>> >>>>Quoting Bernard Lebel <atyss4si@(protected)>: >>>> >>>> >>>> >>>>>Thanks Guy. >>>>> >>>>>But I still get the same error... :-( >>>>> >>>>> >>>>>Bernard >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>From: "Guy Rabiller" <guy@(protected)> >>>>>>Reply-To: XSI@(protected) >>>>>>To: <XSI@(protected)> >>>>>>Subject: Re: [Script] Properties not available in Python? >>>>>>Date: Fri, 2 Jul 2004 22:21:22 +0200 >>>>>> >>>>>>Better use this: >>>>>> >>>>>>for iSel in Application.Selection: >>>>>> >>>>>> Application.LogMessage(iSel.FullName) >>>>>> >>>>>>-- >>>>>>guy rabiller | 3d technical director @ LaMaison >>>>>> >>>>>> >>>>>>-- -- Original Message -- -- >>>>>>From: "Bernard Lebel" <atyss4si@(protected)> >>>>>>To: <XSI@(protected)> >>>>>>Sent: Friday, July 02, 2004 8:49 PM >>>>>>Subject: [Script] Properties not available in Python? >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>Hello, >>>>>>> >>>>>>>Trying out some ultra basic things in Python, in this case I'm >>>>>>> >>>>>>> >>>>trying a >>>> >>>> >>>>>>doc >>>>>> >>>>>> >>>>>>>example letter for letter, and it doesn't work! :-( >>>>>>> >>>>>>>From "Groups, Colleciton and Array" (XSI 3.5.11 docs): >>>>>>> >>>>>>># >>>>>>> >>>>>>> >>>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- >>> >>> >>>>>>>oSelList = Application.Selection >>>>>>> >>>>>>>for iSel in range(oSelList.Count): >>>>>>>Application.LogMessage(oSelList.Item(iSel).FullName) >>>>>>># >>>>>>> >>>>>>> >>>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- >>> >>> >>>>>>>When I run this code, I get this error: >>>>>>> >>>>>>>#ERROR : "Traceback (most recent call last): >>>>>>># File "<Script Block >", line 4, in ? >>>>>>># Application.LogMessage(oSelList.Item(iSel).FullName) >>>>>>># File >>>>>>> >>>>>>> >>"C:\Python23\Lib\site-packages\win32com\client\__init__.py", >> >> >>>>>>line >>>>>> >>>>>> >>>>>>>454, in __getattr__ >>>>>>># raise AttributeError, "'??????' object has no attribute >>>>>>> >>>>>>> >>>>>>'????????1'" >>>>>> >>>>>> >>>>>>>(repr(self), attr) >>>>>>>#AttributeError: '<win32com.gen_py.Softimage|XSI Object Model >>>>>>> >>>>>>> >>>>Library >>>> >>>> >>>>>>>v1.5.X3DObject instance at 0x557334576>' object has no attribute >>>>>>> >>>>>>> >>>>>>'FullName' >>>>>> >>>>>> >>>>>>># - [line 454]" >>>>>>> >>>>>>> >>>>>>>I mean, what the...? >>>>>>> >>>>>>> >>>>>>> >>>>>>>Thanks >>>>>>>Bernard >>>>>>> >>>>>>> >>>>>>>--- >>>>>>>Unsubscribe? Mail Majordomo@(protected) with the following >>>>>>> >>>>>>> >text > > >>in >> >> >>>>>>body: >>>>>> >>>>>> >>>>>>>unsubscribe xsi >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>--- >>>>>Unsubscribe? Mail Majordomo@(protected) with the following text in >>>>> >>>>> >>>>body: >>>> >>>> >>>>>unsubscribe xsi >>>>> >>>>> >>>>> >>>> >>>>--- >>>>Unsubscribe? Mail Majordomo@(protected) with the following text in >>>> >>>> >>body: >> >> >>>>unsubscribe xsi >>>> >>>> >>>--- >>>Unsubscribe? Mail Majordomo@(protected) with the following text in >>> >>> >body: > > >>>unsubscribe xsi >>> >>> >>> >>> >> >> >>--- >>Unsubscribe? Mail Majordomo@(protected) with the following text in body: >>unsubscribe xsi >> >> >> >--- >Unsubscribe? Mail Majordomo@(protected) with the following text in body: >unsubscribe xsi > > > > --- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |