How to make python24.dll smaller ?

2005-09-14 Thread Stormbringer
Hello,

I am trying to make an executable for one of my applications with cx
freeze. All works ok although I must include python24.dll with it if I
want to redistribute it. The big problem is python24.dll size, it's 1.8
MB and I am sure I don't need much of what's in there.

I downloaded python source code and built the dll using the VC 7.1
project (directory PCBuild/), still can't figure out how I can tweak
the project so I get smaller dll - for example is there a way to find
out what modules are included, what is the approx size they take inside
the dll and how can I not include them by default ?

Thanks,
Andrei

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to make python24.dll smaller ?

2005-09-14 Thread Stormbringer
Ok, for anyone interested on the issue: I have found the solution. I
commented out some module lines inside config.c (modules I know for
certain I will not use) and removed the module .c files from the
project.

Biggest save was when I removed the Asian character encodings, reduced
size by about 650 KB.

I also changed the build options to link against multithreaded libs,
not multithreaded dll libs (which makes python24.dll dependent on
msvcr71.dll which in turn is not present on some people's computers and
would have to be distributed in that case).

Final result: a 1.1 MB python24.dll which works with my frozen apps and
is not dependent on msvcr71.dll and compressed goes to around 440 KB.
And I'm sure that depending on the project I still could trim some more
modules out.

Andrei

-- 
http://mail.python.org/mailman/listinfo/python-list


tracing function calls

2005-04-23 Thread Stormbringer
Greetings,

I've been wondering if there is a mechanism similar to trace/untrace
found in lisp, for example call trace(function-name) and whenever this
function is called it will show its parameters to stdout 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: tracing function calls

2005-04-23 Thread Stormbringer
Thank you Fredrik !
With a little tweaking for the right indentation it should prove useful
:)

Fredrik Lundh wrote:
> "Stormbringer" wrote:
>
> > I've been wondering if there is a mechanism similar to
trace/untrace
> > found in lisp, for example call trace(function-name) and whenever
this
> > function is called it will show its parameters to stdout 
>
> def trace(func):
> def tracer(*args, **kwargs):
> print func.__name__, args, kwargs
> result = func(*args, **kwargs)
> print func.__name__, "return", result
> return result
> return tracer
>
> def myfunc(a, b, c):
> return a + b + c
>
> myfunc = trace(myfunc)
> 
> myfunc(1, 2, 3)
> 
> (tweak as necessary)
> 
> 

-- 
http://mail.python.org/mailman/listinfo/python-list


passing C++ parameters to a function

2005-05-27 Thread Stormbringer
Greetings,

I was trying to use pyopengl - which is imported into python using SWIG
- when I stumbled upon the following function with the C++ definition:

void glShaderSourceARB(GLhangleARB shader, GLuint number_strings, const
GLcharARB** strings, Glint * length);

this is imported inside pyopengl, looks something like this :

# This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.

import _shader_objects

[...]

glShaderSourceARB = _shader_objects.glShaderSourceARB


Now I am at a loss here, I need to call this function but can't figure
out a quick way to convert my argumets to this list of string pointers
and pointer to int. Could anyone more experienced in SWIG-usage and/or
pyopengl internals give me some hints ?

Thanks,
Andrei

-- 
http://mail.python.org/mailman/listinfo/python-list


Python crash

2005-05-30 Thread Stormbringer
I am using latest python 2.4 under Windows.

I have a file where I have a bunch of functions, but none with a
special name and nothing outside the functions, no import etc

In the main module all works fine if I don't import that file.
The moment I import it nothing happens but I get a crash later on when
I call a pyopengl function. If I comment just the 'import ...' line
then all works ok.

The crash occurs in pythonw.exe and can't follow further as pythonw
doesn't seem to contain any debug information.

Obviously something must be wrong with my pyopengl but I don't
understand why including a module generates the crash later on. Anyone
got something similar ? Any hints/tips/tricks on finding the cause of
the problem ?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: xcode able to run script?

2008-04-28 Thread Stormbringer
On Apr 28, 1:52 pm, Alex Pavluck <[EMAIL PROTECTED]> wrote:
> Does anyone know if it is possible to test your scripts from within
> the xcode editor?  I am currently using Uilipad on windows and there
> is a sub window that lets you view your output when you launch the
> script from within the ide.  hopefully this makes sense.
>
> thanks, Alex

Use SPE, it has this functionality plus a lot more.You can get it at:

http://pythonide.blogspot.com/

--
http://mail.python.org/mailman/listinfo/python-list