Re: Is there no compression support for large sized strings in Python?

2005-12-01 Thread Harald Karner
Claudio Grondi wrote:
> Anyone on a big Linux machine able to do e.g. :
>   \>python -c "print len('m' * 2500*1024*1024)"
> or even more without a memory error?

I tried on a Sun with 16GB Ram (Python 2.3.2)
seems like 2GB is the limit for string size:

 > python -c "print len('m' * 2048*1024*1024)"
Traceback (most recent call last):
   File "", line 1, in ?
OverflowError: repeated string is too long

 > python -c "print len('m' * ((2048*1024*1024)-1))"
2147483647
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Detect current virtual desktop

2006-08-21 Thread Harald Karner
Maciej BliziƄski wrote:
> How to detect current virtual desktop in GNOME? How to detect a virtual
> desktop change?
> 
Take a look at http://wallpapoz.sourceforge.net/


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


Re: 32 OS on 64-bit machine

2007-05-03 Thread Harald Karner
SamG wrote:
> If anyone has a x86_64 machine and is running a 32bit OS on top of
> that could you tell me what output would you get for the following
> program
> 
> #==
> import platform
> print platform.processor()
> print platform.architecture()
> #==
> 
> Thanks in advance
> : )~
> 
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import platform
 >>> print platform.processor ()

 >>> print platform.architecture ()
('32bit', 'WindowsPE')
 >>>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: time.gmtime

2008-01-25 Thread Harald Karner
asit wrote:
> we know that time.gmtime(secs) takes a parameter secs. what does this
> secs suggest ??What is it's significance ??

 >>> import time
 >>> help (time.gmtime)
Help on built-in function gmtime in module time:

gmtime(...)
 gmtime([seconds]) -> (tm_year, tm_mon, tm_day, tm_hour, tm_min,
tm_sec, tm_wday, tm_yday, tm_isdst)

 Convert seconds since the Epoch to a time tuple expressing UTC 
(a.k.a. GMT).  When 'seconds' is not passed in, convert the current time 
instead.

 >>> time.gmtime (0)
(1970, 1, 1, 0, 0, 0, 3, 1, 0)
 >>>
-- 
http://mail.python.org/mailman/listinfo/python-list