Re: embedded python in c++ packaging

2008-02-07 Thread Warren Myers
The Python byte-code files are already pretty dense, so compressing them
further is unlikely to work if you try to put them in a zip.

WMM

On Feb 7, 2008 11:39 AM, Furkan Kuru <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I have been developing an application in C++ that embeds Python
> interpreter.
> It takes advantage of too many modules from Python.
> When I want to package this application, I need to add too many files
> (.pyc) from Python/lib folder together with Python25.dll.
> Is there a way to pack these .pyc files to a zip file and redirect
> Python25.dll to that zip file?
>
> Thanks in advance.
>
> --
> Furkan Kuru
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://warrenmyers.com
"God may not play dice with the universe, but something strange is going on
with the prime numbers." --Paul Erdős
"It's not possible. We are the type of people who have everything in our
favor going against us." --Ben Jarhvi, Short Circuit 2
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: dream hardware

2008-02-12 Thread Warren Myers
/me no longer wishes to know about your dreams.

WMM

On Feb 12, 2008 4:56 PM, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Tue, 12 Feb 2008 10:05:59 -0800, castironpi wrote:
>
> > What is dream hardware for the Python interpreter?
>
> I'm not sure that the Python interpreter actually does dream, but if it's
> anything like me, it's probably a giant computer the size of a bus, made
> out of broccoli and oven-roasted garlic, that suddenly turns into
> Sylvester Stallone in a tutu just before my program returns its result.
>
>
> --
> Steven
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://warrenmyers.com
"God may not play dice with the universe, but something strange is
going on with the prime numbers." --Paul Erdős
"It's not possible. We are the type of people who have everything in
our favor going against us." --Ben Jarhvi, Short Circuit 2
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: dream hardware

2008-02-12 Thread Warren Myers
A Cray?

What are you trying to do? "dream" hardware is a very wide question.

WMM

On Feb 12, 2008 1:05 PM,  <[EMAIL PROTECTED]> wrote:
> What is dream hardware for the Python interpreter?
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://warrenmyers.com
"God may not play dice with the universe, but something strange is
going on with the prime numbers." --Paul Erdős
"It's not possible. We are the type of people who have everything in
our favor going against us." --Ben Jarhvi, Short Circuit 2
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-29 Thread Warren Myers
The OO overheads for C++ are almost non-existent.
http://www.informit.com/articles/article.aspx?p=1192024&ns=15058

On Mon, Jul 21, 2008 at 2:05 PM, Dan Upton <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 21, 2008 at 1:21 PM, Marc 'BlackJack' Rintsch
> <[EMAIL PROTECTED]> wrote:
>> On Mon, 21 Jul 2008 18:12:54 +0200, mk wrote:
>>
>>> Seriously, though, would there be any advantage in re-implementing
>>> Python in e.g. C++?
>>>
>>> Not that current implementation is bad, anything but, but if you're not
>>> careful, the fact that lists are implemented as C arrays can bite your
>>> rear from time to time (it recently bit mine while using lxml). Suppose
>>> C++ re-implementation used some other data structure (like linked list,
>>> possibly with twists like having an array containing pointers to 1st
>>> linked list elements to speed lookups up), which would be a bit slower
>>> on average perhaps, but it would behave better re deletion?
>
> Aside (actual reply below): at least for a sorted LL, you're basically
> describing Henriksen's algorithm.  They can asymptotically be faster,
> based on amortized analysis, but they're somewhat more complicated to
> implement.
>
>>
>> An operation that most people avoid because of the penalty of "shifting
>> down" all elements after the deleted one.  Pythonistas tend to build new
>> lists without unwanted elements instead.  I can't even remember when I
>> deleted something from a list in the past.
>>
>> Ciao,
>>Marc 'BlackJack' Rintsch
>
> The other side of the equation though is the OO-overhead for C++
> programs as compared to C.  (A couple years ago we used an
> instrumentation tool to check the instruction count for a simple hello
> world program written in C (ie, main(){printf("Hello world!"); return
> 0;}) and Python (main(){cout<<"hello world"< instruction count was significantly higher for C++.  I expect any sort
> of C++ objects you used to implement Python structures will be slower
> than the equivalent in C.  So even if writing it in C++ would reduce
> the overhead for deleting from a list, I expect you would lose a lot
> more.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 

Warren Myers
http://warrenmyers.com
--
http://mail.python.org/mailman/listinfo/python-list