[Ironpython-users] Distributing apps

mchalkley at mail.com mchalkley at mail.com
Mon Mar 5 03:35:12 CET 2012


I really appreciate all the help getting the process of distributing a
python app - I was able to get it working today, since RC 1 fixed the
"Unexpected token <newline>" error.

I have one more question regarding deploying python apps. If I put the
python libraries I'm using (string, etc.) into a zip file, the app
doesn't see it in the current working directory, for some reason.
Since there's no PYTHONPATH on the target machine, and the 'os' module
isn't available until after the library is imported, what's the best
way to specify the path to the zipped lib file? I can specify a
complete path, using sys.path.append (e.g. 'c:\lib.zip'), which
requres putting it there, but is there a way specify the current
working directory, so I can deploy the program in one place, rather
than making the user copy the library to C:\ directory?

Thanks,

Mark

Friday, March 2, 2012, 4:30:23 PM, you wrote:

> On Fri, Mar 2, 2012 at 12:58 PM,  <mchalkley at mail.com> wrote:
>> Well, when you or whoever finds time to document the process, could
>> you include something about that, too? If put some of the standard
>> library files, but omit others, I get a message telling me which ones
>> are missing, but if I include everything, I get:
>>
>> Unhandled Exception: Microsoft.Scripting.SyntaxErrorException: unexpected token '<newline>'
>>   at IronPython.Runtime.ThrowingErrorSink.Add(SourceUnit sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity severity)
>>   at IronPython.Compiler.Parser.ReportSyntaxError(Int32 start, Int32 end, String message, Int32 errorCode)
>>   at IronPython.Compiler.Parser.ReportSyntaxError(Token t, IndexSpan span, Int32 errorCode, Boolean allowIncomplete)
>>   at IronPython.Compiler.Parser.ParsePrimary()
>>   at IronPython.Compiler.Parser.ParsePower()
>>
>> So, it seems it doesn't like the libs being in a zip file... I'll keep
>> playing with it...

> See http://ironpython.codeplex.com/workitem/32335. It'll be fixed in the RC.

> - Jeff



More information about the Ironpython-users mailing list