I suggest to change /etc/timezone by invoking sudo tzselect.
HTH,
Gerald
Pradnyesh Sawant schrieb:
Hello,
can someone please tell me how can I programatically detect the timezone
information that has been set through kde?
basically, I have a small pyqt4 app which shows the current time.
Stefan Behnel schrieb:
Allen Peloquin wrote:
On Feb 24, 11:44 pm, Stefan Behnel [EMAIL PROTECTED] wrote:
Allen Peloquin wrote:
class B
{
fun(A x, A y, A z)...
fun(A1 x, A y, A z)...
}
class B1
{
fun(A1 x, A y, A z)...
}
Such that any previous behavior is inherited, but
Hi,
You can't import subproces from future, only syntactic and semantic
changes that will become standard feature in future python version can
be activated that way.
You can copy the subprocess module from python 2.4 somewhere where it
will be found from python 2.3. At least subporcess is
Perhaps this piece of code might explain the behaviour:
class C( object ):
... __slots__ = ()
...
o = C()
o.a = 1
Traceback (most recent call last):
File input, line 1, in ?
AttributeError: 'C' object has no attribute 'a'
object behaves like having an implict __slots__ attribute.
AOL^H^H^H, me too.
And it's paid better than C++ programming.
HTH,
Gerald
Gabriel Genellina schrieb:
At Monday 25/9/2006 20:09, walterbyrd wrote:
I do.
If so, I doubt there are many.
That's why they get well paid :)
(uhm, not really... :( )
Gabriel Genellina
Softlab SRL
Hi Sean,
perhaps it may help if you try Python 2.4.3 instead of
2.4.2. The release notes (http://www.python.org/download/releases/2.4.3/NEWS.txt)
mention a lot of fixed bugs, including a segfault, that
is similar to yours. Also all defects, that the folks at coverty
I read the whol email thread carefully and could not find any sentence by
Guido, which states that he does not accept ctypes for the standard library.
He just declined to rewrite winreg. Did I miss something?
Cya,
Gerald
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL
As long as memory mapped files are available, the fastest
method is to map the whole file into memory and use the
mappings rfind method to search for an end of line.
The following code snippets may be usefull:
reportFile = open( filename )
length = os.fstat( reportFile.fileno()
That's the most accurate description of Xah's behaviour I've read so far.
Jon Perez schrieb:
Sherm Pendley wrote:
Xah's a pretty well-known troll in these parts. I suppose he thinks someone
is going to take the bait and rush to defend the other languages or some
such nonsense.
Actually,
Did you consider the mmap library?
Perhaps it is possible to avoid to hold these big stings in memory.
BTW: AFAIK it is not possible in 32bit windows for an ordinary programm
to allocate more than 2 GB. That restriction comes from the jurrasic
MIPS-Processors, that reserved the upper 2 GB for
Hi Henko,
the proper solution to this problem ist to use on libpcap's python bindings,
like for example Billy The Kid.
Here are some pointers:
http://home.student.utwente.nl/g.v.berg/btk/
http://pycap.sourceforge.net/
http://monkey.org/~dugsong/pypcap/
http://www.tcpdump.org/ (libpcap)
HTH
Isn't
class AbstractBase:
def method(self):
raise NotImplementedError( abstract method called )
the right thing to do?
Gerald
- Original Message -
From: Andreas Kostyrka [EMAIL PROTECTED]
To: Iyer, Prasad C [EMAIL PROTECTED]
Cc: python-list@python.org
Sent: Thursday,
if you write
B = '\x12','\x32'
you get an immutable tuple.
To get a mutable list use:
B = [ '\x12','\x32' ]
HTH,
Gerald
Tuvas schrieb:
As a bit more of an update, I have decided to create a list of strings,
but am having a problem. To illistrate this in a simple manner.
B='\x12','\x32'
Perhaps irc://irc.freenode.net##python
Note the double #
This channel is less crowed as the #python channels are.
Alessandro Brollo schrieb:
Far from a professional programmer, I'm simply a
newbie Python user. Two basic questions:
1. I don't want to post banal questions about Python
to
How about:
import locale
s=u'\u00e9'
print s
locale.setlocale(locale.LC_ALL, '')
locale.strxfrm( s.encode( latin-1 ) )
---
HTH,
Gerald
[EMAIL PROTECTED] schrieb:
I am trying to use strxfm with unicode strings, but it does not work.
This is what I did:
import locale
s=u'\u00e9'
print s
Sali Nicolas :)),
please see below for my answers.
[EMAIL PROTECTED] schrieb:
Gruzi, Gerald ;-)
Well, ok, but I don't understand why I should first convert a pure
unicode string into a byte string.
The encoding ( here, latin-1) seems an arbitrary choice.
Well latin-1 is only encoding, about
Perhaps you can use OpenOffice and it's python UNO Bindings?
I only know about their existence, but perhaps this will be a starting
point: http://udk.openoffice.org/
HTH,
Gerald
Gilles Lenfant schrieb:
Hi,
This is certainly off topic, but as my problem must have a pythonic answer.
I'm
Use the inspect module like:
def tf( a, b, c, *arguments, **keywordArguments ):
... print tf
...
import inspect
inspect.getargspec( tf )
(['a', 'b', 'c'], 'arguments', 'keywordArguments', None)
Xavier Décoret schrieb:
Hello,
I have the following code:
def foo(x,y):
pass
Hi,
it`s
import os
f = open( os.path.join( dir , 'configuration.smo' ), 'r' )
HTH,
Gerald
Joerg Schuster schrieb:
Hello,
I want to open the file 'configuration.smo' that is in directory dir.
Yet, I don't know on which os my program is being run. On Unix I would
say:
f = open(dir +
Map the file into RAM by using the mmap module.
The file's contents than is availabel as a seachable string.
HTH,
Gerald
Robin Becker schrieb:
Is there any way to get regexes to work on non-string/unicode objects. I
would like to split large files by regex and it seems relatively hard to
do so
The python rationale is We are all consenting adults..
You shoukd change tens to _tens and ones to _ones, in order to
syntacticly mark these attributes as internal.
If someone not consenting, wants to mess with your internal
representation, it's his fault.
HTH,
Gerald
Marcus Goldfish schrieb:
I'd
How about using the vars builtin?
Michael Hoffman schrieb:
robcarlton wrote:
I've written this function to make a list of all of an objects
attributes and methods (not for any reason, I'm just learning)
def list_members(obj)
l = dir(obj)
return map(lambda x : eval('obj.'+x), l)
That works
Kanthi Kiran Narisetti schrieb:
Hi All,
Thank You for your suggestionsI request you all to eloborate the
Uses(In Practical) for systems administrator.Some of my questions
regarding the same follows.
1)Can i build web applications in Python ? If so how. I am planning to
build a web application
try:
myVariable
except NameError:
print Not bound
else:
print Bound
If you want to distinguish between the local an the global environment:
if globals().has_key( myVariable ):
...
versus
if locals().has_key( .
HTH,
Gerald
fabian schrieb:
how testing if a variable exists in python as isset
Hi Heiko, Hi all,
I have a PAM-library available that embedds Python.
Just tell me if you need it and I will publish it.
HTH,
Gerald
Heiko Wundram schrieb:
Hey all!
Before I start hacking away, I'm looking for a Python backend binding for
libpam or libnss, or a python binding for the pppd plugin
Well, I am actually playing, right now. For http://www.carelix.org I
implemented
a module that
* adds a user to passwd and
* authenticates that user given a certificate and some other info on
removable media
* it creates an encrypted loopback file, that is mounted as the
user's home
I think you can, as long as you have a C-Compiler available.
I used pyrex to embedd python into a Linux PAM-Module and
i used C-Types to embbed Python into a Windows DLL. With hindsight, the
pyrex solution was much fatser to develop and less complicated.
Pyrex provides an example.
Ctypes:
27 matches
Mail list logo