field in my sql
table, or should what sql type should I save the pickle as?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
s alot of data and I'd like to remove all
> data older than 30 days. My ideal solution would be something that
> runs in the background but only wakes up to run every few days to
> check for old data.
>
> Thanks,
>
> Dan McLeran
And you can use cron to launch your py
I would like to write some code that would randomly select a function from a
list of functions and call it. I was looking in the globals names space and
randomly selecting items that were of type function.. but I didn't see a
way of actually running the function.
Any pointers?
--
David
I was justing wondering how safe python string templates are to use with
unicode. I was just scanning pep 292 and it seems to say that they are --
or can by with inheritance... but I don't quite understand.
--
David Bear
-- let me buy your intellectual property, I want to own your tho
Diez B. Roggisch wrote:
> David Bear schrieb:
>> I'm looking to see if there are any examples or prewritting fifo queue
>> classes. I know this is a broad topic. I'm looking to implement a simple
>> application where a web server enqueue and pickle using a local
jay graves wrote:
> On Mar 6, 1:34 pm, David Bear <[EMAIL PROTECTED]> wrote:
>> Is it possible to use python to make calls agains microsoft active
>> directory? I suppose this should be qualified by what is needed to do it
>> from windows (I assume the win32all
Is it possible to use python to make calls agains microsoft active
directory? I suppose this should be qualified by what is needed to do it
from windows (I assume the win32all package) and from linux (if possible).
Any code samples would be great.
--
David Bear
-- let me buy your intellectual
lication dequeue the
pickles again using a local socket.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Coming from BASIC and Pascal, these are constructions that never entered
into youthfull learning;-)
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Since redhat packages python2.3 with their distro (RHEL 4..) I was looking
for a module reference for that version. Looking at python.org I only see
current documentation.
any pointers to a 2.3 module ref?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts
e documentation on this module
at python.org seems to assume a great deal about what the reader would
already know about which methods they should subclass.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> David Bear wrote:
>
> > I am trying to translate some perl code to python and I need some
> > advice on making fixed sized strings.
>
> looks like you're reimplementing HMAC; there's no need to do that in
> Python, really, si
y)); #zero-fill to blocksize
} else {
$key = sha1($key); #if longer, pre-hash key
}
Finally it concatenates and xors these strings together like this:
return sha1($key^$opad . sha1($key^$ipad . $data));
I when python XOR's strings, is it the same as when perl xor's th
David Bear wrote:
> Diez B. Roggisch wrote:
>
>> David Bear schrieb:
>>> I found this simple recipe for converting a dotted quad ip address to a
>>> string of a long int.
>>>
>>> struct.unpack('L',socket.inet_aton(ip))[0]
>>>
Diez B. Roggisch wrote:
> David Bear schrieb:
>> I found this simple recipe for converting a dotted quad ip address to a
>> string of a long int.
>>
>> struct.unpack('L',socket.inet_aton(ip))[0]
>>
>> trouble is when I use this, I get
>>
Is there a better way to take a dotted quad and convert it to a string
representation of an long int?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Is there an easy way to get the current level of recursion? I don't mean
sys.getrecursionlimit. I want to know during a live run of a script how
many times the functions has recursed -- curses, I don't know how to say it
better.
--
David Bear
-- let me buy your intellectual property,
Robert Kern wrote:
> David Bear wrote:
>> I built python 2.4.2 for suse linux 9.3. I configured it to be a separate
>> instance of python from the version packaged with suse.
>>
>> Now when I start it I get an error:
>> python
>> Python 2.4.2 (#4, Jul 27
e-5.0-7.2
readline-32bit-9.3-7.1
it id truly does exist:
locate readline
...
/lib/libreadline.so.5
/lib/libreadline.so.5.0
/lib64/libreadline.so.5
/lib64/libreadline.so.5.0
...
I googled about for this and there were numerous hits on this problem from
others, but I never found a 'sol
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
I don't know what ROOT variable the message is referring too. Any advice
would be appreciated.
--
David Bear
-- let me buy your intellectual property, I wa
= 'a local var'
module B
from A import *
_myvar -- is not available.
Is this in a pep somewhere ?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
problem with the syslog server.
I am using python 2.4 -- on a 2.6.11.4-xx kernel. (suse 9.3)
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
ave time to reimplement what was written in perl. When I
run the perl code directly, I get the output I want. When I run it through
the os.popen2 module, I get an additional 1 appended. (It's all string
output)
Is this normal behavior for this module? What am I missing?
--
David Bear
-- let me
' from
a python program. I found the following:
http://www.annocpan.org/~GAAS/pyperl-1.0/perlmodule.pod
and wondered if anyone had any comments. This thing implements a perl
interpreter inside python. That seems like overkill to me.
I wonder what wisdom this group can offer.
--
David Bea
or:
print "exception..."
item,value=(None,None)
return(item,value)
However, the except block does not seem to catch the exception and an
unboundlocalerror is thrown anyway. What am I missing?
--
David Bear
-- let me buy your intellectual pr
utput, I was hoping to use the perl mods and the perl
objects returned by these mods in python -- since I can't stand reading
perl.
The question then becomes, are there any python modules that encapsulate and
map perl objects into python object?
--
David Bear
-- let me buy your intellectual p
true, even if I gave /var/www permision
> recursively to 777(I know this not good idea, just for testing), still
> have permision denied stuff.
> Btw I'm using SuSE 10, Apache/2.0.54, and python 2.4
> Sighhh, there's a lot of weird thing with my apache and I can't
>
I was wondering if anyone has written an apache config file parser in
python. There seem to be a number of perl mods to do this. But I don't seem
to be able to find anything in python.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
If I have a unix user name, is there a way to verify that the user really
exists and query default group memberships?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Claudio Grondi wrote:
> David Bear wrote:
>> I'm trying to use os.chmod and am refered to the stat module.
>>
>> Is there are explanation of:
>> * S_ISUID
>> * S_ISGID
>> * S_ENFMT
>> * S_ISVTX
>> * S_IREAD
>>
x27;S_IROTH', 'S_IRUSR',
'S_IRWXG', 'S_IRWXO', 'S_IRWXU', 'S_ISBLK', 'S_ISCHR', 'S_ISDIR',
'S_ISFIFO', 'S_ISGID', 'S_ISLNK', 'S_ISREG', 'S_ISSOCK', 'S_ISUID',
'S_ISVT
'm just
wondering if there is an 'easy' fix...
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
number 1, if the tape column it goes into is of type int
or num or float, will the DBAPI really know what to do with the newline?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> David Bear wrote:
>
>> Being new to pgdb, I'm finding there are lot of things I don't understand
>> when I read the PEP and the sparse documentation on pgdb.
>>
>> I was hoping there would be a module that would properly esca
hon string object ends up being a properly type for postgresql. I've
bought 3 books on postgresql and none of th code samples demonstrate this.
web searchs for 'python sql escape string' yeild way too many results.
Any pointers would be greatly appreciated.
--
David Bear
-- let
you very much for the greater explanation. Yes, I was not
understanding that that %s in one instance was a python string format
operator, and in another instance it was a placeholder sent to the dbapi
objects (and I supposed on down into the data base cursor) for the
parameters following the function call. BIG DIFFERENCE.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> David Bear wrote
>
>> Fredrik Lundh wrote:
>>
>> > cursor.execute(
>> > "INSERT INTO table (%s) VALUES (%%s);" % (",".join(fields)),
>> > *values
>> > )
>>
>> Thanks
Fredrik Lundh wrote:
> David Bear wrote
>
>> Fredrik Lundh wrote:
>>
>> > cursor.execute(
>> > "INSERT INTO table (%s) VALUES (%%s);" % (",".join(fields)),
>> > *values
>> > )
>>
>> Thanks
print "INSERT INTO table (%s) VALUES (%%s);" % (",".join(fields),
*values)
^
SyntaxError: invalid syntax
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
ls are represented as lists. So, then I need to strip the
[] from them, but then ... there must be an easier way.
Any advise?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Robert Kern wrote:
> David Bear wrote:
>> I'm confused about how to use the email module in python 2.4.x
>>
>> I'm using python packaged with suse 9.3.
>>
>>>From the module documetation at http://docs.python.org/lib/node597.html I
>> found th
_name__', 'cStringIO', 'email',
'getMessage', 'sys']
This is nothing like the documentation on python.org.
Any idea what I am missing?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
'save.p','w'))
I don't really want to write to a file. I know I could write to sys.stdout.
But I'd rather collect the string and do some garbage collect, etc before I
exit the script.
Is there a way to have cPickle just hand me a string?
--
David Bear
-- let me buy yo
I was wondering if anyone has implemented the rsync protocol in python.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
ctionary, and the value of the keys set to
null?
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
Let's say I have a list called, alist. If I pass alist to a function,
how can I get the name of it?
alist = range(10)
def afunction(list):
listName = list.__name__ (fails for a list object)
--
http://mail.python.org/mailman/listinfo/python-list
r = " ' "
Well, reading character by char until I have the list and then parse it all
myself.
I was hoping there was a pythonic way of doing this..
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
seems like a terrific environment.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
I have been trying to do something like this:
f = open('someDocs.str', 'r')
try:
while True:
ln = f.readline()
except EOFError:
print 'reached eof'
f.close()
sys.exit(1)
However, EOFError is never raised. What am I missing?
--
http://mail.python.org/mailman/listinfo/pyt
delim:
do something
I've looked at the hex function but it doesn't sound like what I want.
--
David Bear
-- let me buy your intellectual property, I want to own your thoughts --
--
http://mail.python.org/mailman/listinfo/python-list
I was hoping to write some network utils and found an ipv4 class written
by Keith Dart circa 1999. It doesn't work any longer under python 2.3. I
think I found it on starship python and links to his web site point to a
non-functional server.
anyone know of a simple ipv4 class I might steal...
m not
really good at experimenting without destroying things.
--
David Bear
phone: 480-965-8257
fax:480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
"Beware the IP portfolio, everyone will be suspect of trespassing"
--
http://mail.python.org/mailman/listinfo/python-list
I've googled for the above and get way too many hits..
I'm looking for an 'easy' way to have the last item in a list returned.
I've thought about
list[len(list)-1]
but thought there would be a more gracefull way.
--
http://mail.python.org/mailman/listinfo/python-list
How does one query the python environment, ie pythonhome, pythonpath,
etc.
also, are there any HOWTO's on keeping multiple versions of python
happy?
--
http://mail.python.org/mailman/listinfo/python-list
54 matches
Mail list logo