Hi! All
If I would like to use C (Coddewarrior for example) to
call Applescript for iTune or Finder or other
application, what is the general rule or code should
be except ask OS to run the script especially when I
would like to pass data back and forth between C and
applescript?
Thanks
Zhi
Hi! All
If I would like to use C (Coddewarrior for example) to
call Applescript for iTune or Finder or other
application, what is the general rule or code should
be except ask OS to run the script especially when I
would like to pass data back and forth between C and
applescript?
Thanks
Zhi
Hi! All
If I would like to use C (Coddewarrior for example) to
call Applescript for iTune or Finder or other
application, what is the general rule or code should
be except ask OS to run the script especially when I
would like to pass data back and forth between C and
applescript?
Thanks
Zhi
Hi! All Could I ask you, what exactly corresponding c or python code on apple script "tell application iTune" or "tell application Finder"? Thanks Zhi __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around
Hi! All Did anyone try to catch an instance of iTune or Finder under Mac by C or python? What OSA function should I use? Thanks Zhi __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _
Hi!
Does anyone try to import .tlb type library on MAc
platform? It seems Mac (link codewarrior) can run MFC
based application such as on CodeWarrior 9?
Regards
Zhi
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection ar
Thanks, Chris I will send my simple example to you later on Zhi Christopher Barker <[EMAIL PROTECTED]> wrote: On Tuesday 13 December 2005 7:24 pm, Zhi Peng wrote:> I would like> to have a small C code and then compile and linked as dynamic library so> that it can be imp
Hi! All I downloaded py2app but it failed in installation. Where can I download the right version for python2.3 on Mac Tiger? Thanks Zhi
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
Pythonmac-SIG maillist -
. Thanks fo!
r all
info and help. ZhiBob Ippolito <[EMAIL PROTECTED]> wrote:Bob Ippolito <[EMAIL PROTECTED]> wrote: On Dec 13, 2005, at 4:45 PM, Zhi Peng wrote:> See if I go the right direction.>> On Wed, I will use my old code to build .so file which is run on > Lin
interesting (not show any error). I would rather write a little more code on this part. On Linux, it generate name.so, is it same name style on MAc ? any difference? Thanks Bob and others. Regards Zhi Bob Ippolito <[EMAIL PROTECTED]> wrote: On Dec 13, 2005, at 3:59 PM, Zhi Peng wrote:
d is -L/usr/lib -L/usr/local/lib -lpython -lc -lm -lSystemStubs -lSystem_profile It may need more lib? anyone knoew. This may be old problem that people had. Thanks Zhi Bob Ippolito <[EMAIL PROTECTED]> wrote: On Dec 13, 2005, at 1:30 PM, Zhi Peng wrote:> Actually there i
-bob On Dec 13, 2005, at 12:46 PM, Zhi Peng wrote:Hi! Bob ? What you suggested is right. ? The interesting thing is that I have a lot of old c code which will try to call python code. It is true that I can write pure python code and use py2app (I use py2exe on windows) to make an e
that I need to do something as you said, try to change all C code to python, it may be easier than that I embeded python to C. Thanks all . Zhi Bob Ippolito <[EMAIL PROTECTED]> wrote: On Dec 13, 2005, at 12:18 PM, Zhi Peng wrote:> If we use pythonw, then there may be problem
First of all, Thanks 'Has"'s help during past months. If we use pythonw, then there may be problem in C code to call the python code with appscript inside because it seems PyImport_ImportModule("ModuleName") only works with python instead of pythonw. By the way, I have another question fo
Hi! All
I posted a few items in a few days. I think the first
problem I had is that it can not import python module
when I used "from appscrpt import *" inside modue
because appscript need pythonw instead of python. Here
is the error message:
Hi! All
I posted a few items in a few days. I think the first
problem I had is that it can not import python module
when I used "from appscrpt import *" inside modue
because appscript need pythonw instead of python. Here
is the error message:
Thanks [EMAIL PROTECTED] wrote: (snip) PyRun_SimpleString("sys.path.append('.\')\n");(snip)I try to throw in my 5 Cent: The backslash (Windows path separator?) following the dot might be the problem. So let me guess, the program runs on Windows, but not on Unix.(Sorry for my silly quoting, but
I think there are something wrong with my MacPython as
the code is simple and I am sure it will be run on
Linux.
You and another Friend may run this program. He did
not get any error.
Thanks
Zhi
--- Bob Ippolito <[EMAIL PROTECTED]> wrote:
>
> On Dec 12, 2005, at 10:02 AM, Zh
is correct, then it would import. I
> don't believe you,
> show the sys.path from the python interpreter and
> show it from your
> program.
>
> -bob
>
> On Dec 12, 2005, at 9:40 AM, Zhi Peng wrote:
>
> >
> > Hi! Bob
> >
> > Following i
sume it is
python2.3 and tiger OS too?
Thanks
Regards
Zhi
--- Ronald Oussoren <[EMAIL PROTECTED]> wrote:
>
> On 12-dec-2005, at 20:48, Zhi Peng wrote:
>
> >
> > Thanks Ronald and everyone. My OS is Tiger. This
> shows
> > me that my Python installatio
05, at 19:30, Zhi Peng wrote:
>
> > Hi! All
> >
> > If you use MacPython2.3 on MAc, please try the
> > following code to see if you can get
> "StringModule"
> > imported.
>
> This works for me, run see the attached zipfile for
> the
Hi! All
If you use MacPython2.3 on MAc, please try the
following code to see if you can get "StringModule"
imported.
//=StringModule.py===
#!pythonw
import os
class Module1:
def __init__(self):
self.var1= 9
def method1(self):
self.v
When I generate the module, it generated .pyc file but not .pyo file. IS that a reason that I can not import the module from c code? Or something else that I missed. Thanks Zhi Zhi Peng <[EMAIL PROTECTED]> wrote:Hi! All What was the .pyo file on Mac. Could anyone tell me
Hi! All What was the .pyo file on Mac. Could anyone tell me how to make a .pyo file from .py file? Thanks. Regards Zhi
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
Pythonmac-SIG maillist - Pythonmac-SI
Hi All
It seems to me it is very strange that it can not
import the module that is in python from C code.
The sys.path is correct. What else did I miss? I
linked obj with python library.
Thanks
Zhi
__
Do You Yahoo!?
Tired of spam? Yahoo! M
is make
> absolutely sure
> you're using the correct Python interpreter,
> framework, or dylib and
> also make sure that sys.path is setup properly.
> This might help::
>
> PyRun_SimpleString("import sys\nprint
> sys.path\nprint sys.version
> \nprint sys.executable\n&qu
Thanks ZhiBob Ippolito <[EMAIL PROTECTED]> wrote: On Dec 9, 2005, at 4:41 PM, Zhi Peng wrote:> In my c code, I have used myMod=PyImport_ImportModule("moduleName") > and run on Mac, but it just can not import the "moduleName" for > some unknown reas
Hi! All In my c code, I have used myMod=PyImport_ImportModule("moduleName") and run on Mac, but it just can not import the "moduleName" for some unknown reason. I am sure I install the "moduleName" by "pythonw setup install". And I can import "moduleName" from command lines such as >
Bob
Let me say
Thanks a lot for your email
First, then I will read corresponding document.
Surely it helps a lot.
Regards
Zhi
--- Bob Ippolito <[EMAIL PROTECTED]> wrote:
>
> On Dec 9, 2005, at 3:55 PM, Zhi Peng wrote:
>
> > What was the difference when I try to i
odule", version="1.0" py_modules=["module.py"]) Is above enough to set up the module? Where are "module.py" should be in current dir? Thanks Bob Ippolito <[EMAIL PROTECTED]> wrote: On Dec 9, 2005, at 3:19 PM, Zhi Peng wrote:> /System/Lib
Hi! All
When I have module say module.py with sentance like
#!pythonw
import os
from appscript import *
and then import from terminal say pythonw, it show me
error or warning message
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/aem/send/errors.py:5:
Hi! All Recently I am back to window platform and try the same as I had in MAc. But win does not have python installed as default. I call python function from my C code, but I would like to have min python library installed on win platform. Is there tool that I can use to strip extra python co
Jure
Could I ask you. With gcc compiler and linker, if the dylib name is module.dylib, can this dynamic library be used by C code that are developed by other C compiler such as CodeWarrior?
Zhi [EMAIL PROTECTED] wrote:
Hi all,I'm porting some software from Linux/Python to MacOS/Python. Core
Hi! all
I have some c code which can be compiled under gcc. But how can I compiled c code as a dynamic library as in Linux in .so form? In Mac, "gcc -shared *** " does not work. If I compiled it as dynamic library, can it be used in CodweWarriot compiler as a dynamic library if I use gcc to
I would like to run this code from Mac 10.4 environment first as individual program by create main and put some Py_Initialize();
and Py_Finalize()
inside main and compile it. If it can run, it should be able to compiled as .so library.
Regards
Zhi Jaonary Rabarisoa <[EMAIL PROTECTED]>
currently.
On *nix system, it normally is with C compiler such as gcc cc or workshop. What is the most often used c compiler on Mac ?
Thanks
Zhi
Chris Barker <[EMAIL PROTECTED]> wrote:
Zhi Peng wrote:> I has some small program in C which is compiled as .so library in> Linux and
Hi! All
I has some small program in C which is compiled as .so library in Linux and I can directly import name_of_lib.so as a module from python when I run it on Linux. It looks same if I just see them from Terminal window on Mac. Did anyone compile any C code as library called by MacPython or f
Hi! Has
Thanks a lot for your help. You may email me the
binary version if possible.
It makes sense to use new code for mytextFrame. I will
try that too.
regards
Zhi
--- has <[EMAIL PROTECTED]> wrote:
> Zhi Peng wrote:
>
> >I use Tiger Mac 10.4. Could I ask you
ndError(app(u'/Applications/Adobe
InDesign CS2/Adobe InDesign
CS2.app').documents[u...frames.ID(179).contents.set,
(('InDesign Doc',), {}), )
> /Users/zpeng/Documents/projects/has.py(19)?()
-> myTextFrame.contents.set("InDesign Doc")
(Pdb) n
Zhi
--- has &
_bounds.set(['6p0',
'6p0', '18p0', '18p0'])
zhi-pengs-power-mac-g5:~/Documents/projects zpeng$ vi
error.txt
--- Zhi Peng <[EMAIL PROTECTED]> wrote:
> Hi! 'Has"
>
> First of all, thank you very much for your help.
>
> tell
.contents.set("set
the frame")
(Pdb)
cs.documents[1].pages[1].text_frames[1].contents.get()
(Pdb) print
cs.documents[1].pages[1].text_frames[1].contents.get()
None
But it is much better than that before.
Regards
Zhi
--- has <[EMAIL PROTECTED]> wrote:
Hi! All
I strongly believe that MacPython can be used to write similar code to perform Applescript code functions. I try to find corresponding MacPython code for apple script. For example following adobe apple script code
tell application "Adobe InDesign CS2"
set myDoc to make document
contents is a property of textframe with r/w
I wonder if I missed something since I get only a
small __init__.py file while I used pythonw
getsuitmodule.py for Adobe InDesign CS2. But same
command applied to TextEdit and Finder, iTune, I get a
few big file include __init__.py.
--- has <[EMA
Hi! All
First of all, Thanks for all your answers for my
qestions.
1. In appscript commands set, I often see something
like
reference.bring_to_front()
reference.extract_label()
application.open()
...
etc
Application can accept all commands it should accept
and respond to the commands.
I kn
Hi! All
First of all, thanks for all your answers to my qestions.
1.
When I used appscript, I often try to print out the object or string while I debug the program. For example:
cs = app('TextEdit').documents[1].paragraphs[1]print csI assumed that cs should be anObject of paragraphs. But it
Hi! All
I often get type error when I pass some parameters inside a function while I am using appscript MacPython. I saw some documents mentioning sth like AEType('sf '). What does it mean? Anyone knew? Thanks
Zhi
Yahoo! FareChase - Search multiple travel sites in one click.
__
This is very helpful documents about appscript. Thanks a lot, 'Has'!Note: forwarded message attached.
Yahoo! FareChase - Search multiple travel sites in one click.
--- Begin Message ---
Hi! Has and others
Information about appscript is extramely helpful for MacPython users. Thanks
Hi! Everyone
Did any of you make a new object such as document, textframe etc by using MacPython appscript for Adobe InDesign CS2?
For example, I have document object docObj
should I use
newPage = docObj.add() or docObj.make or something else
Thanks
Zhi
Yahoo! FareChase -
Hi!
Obviously the macfs.FSSpec(file) does not accept form of file name as following:
file = "//Applications//Program\ Filename.rsrc"
(or //Applications//Program Filename.rsrc")
But if I have space between file name as above, what I need to do. Anyone knew? Thanks in advance.
Zhi
Hi!
Did anyone know how to activate Finder in MacPython as we do in activating PromptGetFile as following
---
import macfs
fss = macfs.PromptGetFile('Select file with aeut/aete resource:')
---
Did anyone know where I can find old gensuitemodule.py?
Thanks
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
___
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-s
51 matches
Mail list logo