| |
thread by: =?iso-8859-1?q?S=E9bastien?= Weber |
last post Oct 18 '07 by: =?iso-8859-1?q?S=E9bastien?= Weber
Hello,
I'm actually writing an application with pyinotify which watchs a
directory.
Pyinotify lets me know the events (access, modify, suppression, etc.) on
and in the directory, but not the users who are responsable of them.
Does someone know a library which could give me that information (who's
using a file) ?
Thank's in advance,
|
thread by: uymqlp502 |
last post Oct 18 '07 by: uymqlp502
Version 1.4 of my scalar class is available at
http://RussP.us/scalar.htm
No major changes. I have corrected the "repr" function to make it more
useful, and I have added a "unit_type" function that returns the type
of a unit (e.g., time, length, force). The unit_type function is
intended mainly for interactive, "calculator-style" use.
...
|
thread by: rc |
last post Oct 18 '07 by: Diez B. Roggisch
How to insert NULL values in to int field using params.
I'm trying to use pymssql.execute, passing the operation and list of
params. One of the values in the params is a NULL value going to int
field. The pymssql._quote() puts ' around the NULL which causes an
exception to be thrown, is there a way to use the params for this or
do I need...
|
thread by: Harlin Seritt |
last post Oct 18 '07 by: Hyuga
Is there a module that can pull str values for say the last 3 months?
Something like:
print lastMonths(3)
Thanks
|
thread by: diwakar09 |
last post Oct 18 '07 by: diwakar09
Hi,
I have a json that i have parsed with simplejson, Now i have to make a xml by using this json
a = simplejson.loads('{"result":"true","name":{"first":"abcd","middle":"efgh"}}')
a
{u'result': u'true', u'name': {u'middle': u'efgh', u'first': u'abcd'}}
|
thread by: Debajit Adhikary |
last post Oct 18 '07 by: J. Clifford Dyer
I have two lists:
a =
b =
What I'd like to do is append all of the elements of b at the end of
a, so that a looks like:
a =
|
thread by: Steven W. Orr |
last post Oct 18 '07 by: Steve Holden
We have an app and I'm trying to decide where the app should be
installed. The question is whether it should be site-specific or not, as
in
/usr/lib/python2.3/site-packages
or
/usr/lib/site-python
The latter would solve a lot of problems for me.
|
| |
thread by: danbrotherston |
last post Oct 18 '07 by: Tim Golden
Hello,
I am trying to get the output from the win32 platform command
OutputDebugString. I have used the following C++ code as a
guideline:
http://groups.google.com/group/microsoft.public.vc.utilities/browse_frm/thread/1434418cb968d053/1a3c957675242c7e?lnk=st&q=DBWIN_BUFFER&rnum=3#1a3c957675242c7e
And I have been able to translate most...
|
thread by: dedalusenator |
last post Oct 18 '07 by: dedalusenator
Hello Folks,
My first posting here and I am a stuck in figuring out the exact way
to update a global variable from within a function that doesnt return
any value (because the function is a target of the thread and I dont
know how exactly return would work in such a case). I am sure I am
missing something very fundamental here. The essential...
|
thread by: Thomas Wittek |
last post Oct 18 '07 by: Andrew Durdin
Hi!
I'm relatively new to Python, so maybe there is an obvious answer to my
question, that I just didn't find, yet.
I've got quite some classes (from a data model mapped with SQL-Alchemy)
that can be instatiated using kwargs for the attribute values. Example:
class User(object):
def __init__(self, name=None):
|
thread by: Abandoned |
last post Oct 18 '07 by: Amit Khemka
Hi..
I have a dictionary like these:
a={'a': '1000', 'b': '18000', 'c':'40', 'd': '600'} ...... 100.000
element
I want to sort this by value and i want to first 100 element..
Result must be:
( first 100 element)
I done this using FOR and ITERATOR but it tooks 1 second and this is
very big time to my project.
|
thread by: danfolkes |
last post Oct 18 '07 by: Eduardo O. Padoan
I thought I would post the source to a program that I made that will
download the http://ubuntu.media.mit.edu/ubuntu-releases/gutsy/
as soon as its posted.
It checks the site every 10 min time.sleep(600)
This is mostly untested so I would appreciate comments, and if you use
it, post that too! :)
<code>
|
thread by: Licheng Fang |
last post Oct 18 '07 by: Marc 'BlackJack' Rintsch
Python is supposed to be readable, but after programming in Python for
a while I find my Python programs can be more obfuscated than their C/C
++ counterparts sometimes. Part of the reason is that with
heterogeneous lists/tuples at hand, I tend to stuff many things into
the list and *assume* a structure of the list or tuple, instead of...
|
thread by: lukasz.f24 |
last post Oct 18 '07 by: Duncan Booth
Hello,
I came across annoying problem during my fun with mod_python. I turned
out that mod_python load package only onca and don't care about any
changes to it. Obviously it makes sense on production server but
during development is more then annoying. I find a way to reload my
module:
m = apache.import_module(name)
reload(m)
|
thread by: sophie_newbie |
last post Oct 18 '07 by: Paul Hankin
Hi, in my program i need to call a couple of functions that do some
stuff but they always print their output on screen. But I don't want
them to print anything on the screen. Is there any way I can disable
it from doing this, like redirect the output to somewhere else? But
later on in the program i then need to print other stuff so i'd need...
|
| |
thread by: diegososa |
last post Oct 18 '07 by: bartonc
I have this code inside a function:
try:
for linea in subprocess.Popen(comando, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).stdout:
req = urllib2.Request(URL, "&mac_addr=" + mac_addr + " &sampled_time=" + sampled_time + " &line_data=" + linea)
ret = urllib2.urlopen(req).read()
except...
|
thread by: bartonc |
last post Oct 18 '07 by: bartonc
Here is the first installment of SQL helper functions which I use with two classes that I wrote which encapsulate a MySQL server and a MySQL client. These helpers make it easy to convert back and forth between python dictionaries and SQL tables.
def MySQLSelect(table, arglist=, argdict={}, **kwargs):
"""Build an SQL SELECT command from the...
|
thread by: bartonc |
last post Oct 18 '07 by: bartonc
Here are the latest versions of My (as in mine) SQL helper functions. Please feel free to rename them if you use them.
The SELECT helper:def MySQLSelect(table, arglist=(), argdict={}, **kwargs):
"""Build an SQL SELECT command from the arguments:
Return a single string which can be 'execute'd.
arglist is a list of strings that are...
|
thread by: bartonc |
last post Oct 18 '07 by: bartonc
This is a work in progress (current and active).
There are some issues to resolve in supporting multiple connection types and I plan to add PySQLite to the mix. The this update is due to my suggesting the accompanying helper functions in a recent post and noticing that the ones posted here are a bit out of date. I'll post those helpers in a...
|
thread by: warhero |
last post Oct 18 '07 by: Amit Khemka
Hey all, sorry for the totally newb question. I recently switched over
to python from ruby. I'm having problems figuring out how module
importing works.. as a simple example I've got these files:
/example/loader.py
/example/loadee.py
loadee.py
class loadee(object):
def __init__(self):
|
thread by: Anthony Perkins |
last post Oct 18 '07 by: Devraj
Hi everyone,
What is the best GNU/Linux distribution (or the most preferred) for
developing Python applications? Ideally I would like one with both
Python *and* IDLE included on the install media (neither Ubuntu nor SUSE
have IDLE on the CDs), so that I can use it on machines without a
network connection.
Thanks,
|
thread by: Devraj |
last post Oct 18 '07 by: Devraj
Hi everyone,
I have been battling to make my code work with a HTTPS proxy, current
my code uses urllib2 to to most things and works well, except that
urllib2 doesn't handle HTTPS proxies.
Urlgrabber (http://linux.duke.edu/projects/urlgrabber/help/
urlgrabber.grabber.html) looks very promising except that I can find a
way to handle...
|
thread by: Matthew Wilson |
last post Oct 18 '07 by: Gabriel Genellina
What are the most popular, easiest to use, and most powerful mock
object packages out there?
Thanks in advance.
Matt
|
| |
thread by: Ixiaus |
last post Oct 18 '07 by: hg
I have recently (today) just started learning/playing with Python. So
far I am excited and impressed (coming from PHP background).
I have a few questions regarding Python behavior...
val = 'string'
li = list(val)
print li.reverse()
returns nothing, but,
|
thread by: Sean Davis |
last post Oct 17 '07 by: Adonis Vargas
I would like to set up a server that takes XMLRPC requests and
processes them asynchronously. The XMLRPC server part is trivial in
python. The job processing part is the part that I am having trouble
with. I have been looking at how to use threadpool, but I can't see
how to get that working. I would like to have the XMLRPC part of
things...
|