Hello!
As far as I can see os.chmod() doesn't adjust permissions on directories
recusively. Is there any other possibility to achieve this aim except for
calling os.system('chmod -R /dir') directly?
Thanks,
Fabian
--
http://mail.python.org/mailman/listinfo/python-list
Jennifer Thacher wrote:
Fabian Steiner wrote:
As far as I can see os.chmod() doesn't adjust permissions on directories
recusively. Is there any other possibility to achieve this aim except for
calling os.system('chmod -R /dir') directly?
Thanks,
Fabian
Check out os.path.walk.
Thanks
Hello!
As the subject says I need to test whether a host computer in our
network is reachable or not. At the moment I simply attempt to connect
to a given port that is open when the machine is online:
[...]
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
Hello!
Chris Mellon wrote:
On 2/22/07, Fabian Steiner [EMAIL PROTECTED] wrote:
[...]
Now I am wondering if there isn't any better method which would be more
general. In fact, I think of something like a python version of ping
which only tries to send ICMP packets. However, I don't know what
Recently I came across a problem which I still can't solve on my own.
Consider this small example:
import sys
import time
time.sleep(3)
print
sys.stdin.flush()
input = raw_input('Your input: ')
print 'Your input: ', input
While the script is sleeping I type in the word 'test1', so that it is
I often have to deal with strings like PCI:2:3.0 or PCI:3.4:0 and
need the single numbers as tuple (2, 3, 0) or (3, 4, 0). Is there any
simple way to achieve this? So far I am using regular expressions but I
would like to avoid them ...
Regards,
Fabian Steiner
--
http://mail.python.org/mailman
Bruno Desthuilliers wrote:
Fabian Steiner wrote:
I often have to deal with strings like PCI:2:3.0 or PCI:3.4:0 and
need the single numbers as tuple (2, 3, 0) or (3, 4, 0). Is there any
simple way to achieve this? So far I am using regular expressions but I
would like to avoid them
really be anything, and if there
are no numbers in the first space (PCI), then maybe this approach:
Thank you, this solution seems to be quite satisfying :-)
Regards,
Fabian Steiner
--
http://mail.python.org/mailman/listinfo/python-list
Hello!
I am currently working on an alternative for the gnome-volume-manager
for multiseat systems based on HAL and DBus. Whenever the signal
'DeviceAdded' is received I would like to start a GUI-Interface where
the user can choose from different options. But now I am wondering how I
should
Hello!
I have got a Python Device Object which has got a attribute (list)
called children which my contain several other Device objects. I
implemented it this way in order to achieve a kind of parent/child
relationship.
Now I would like to get all children of a given Device object and
Lenny G. wrote:
What's the best way to do cross-platform hidden file detection? I want
to do something like weed-out the files that should be 'hidden' from
os.listdir() (which would be files that start with '.' under Unix,
files that have the hidden attribute set on windows, and whatever it
Hello!
I am currently working on a quite complicated application (at least for
me) and unfortunately I don't know how to go on.
I wrapped a Windows-dll by using the ctypes module so that I can access
different functions that are used to control a network device (open,
close, write/read values).
Hello!
I am currently wondering how to write something like an event loop.
For example, if I want to write a function that checks whether a file
was added or removed in a directory I would think of a while 1: ...
construct that checks the mtime of the directory. Is this the right way
to achieve
I recently started learning C since I want to be able to write Python
extension modules. In fact, there is no need for it, but I simply want
to try something new ...
I tried to implement the bubblesort algorithm in C and to use it in
python; bubblesort.c compiles fine, but whenever I want to
Heikki Salo wrote:
Heikki Salo wrote:
Fabian Steiner wrote:
What did I do wrong? As I am quite new to C, I probably made many
mistakes, so please feel free to correct me.
The following line:
for (i = 0; i = seqlen; i++) {
Should be for (i = 0; i seqlen; i++) {. Otherwise the last
Georg Brandl wrote:
Fabian Steiner wrote:
[...]
for (i = 0; i = seqlen; i++) {
That is one iteration too much. Use
for (i = 0; i seglen; i++)
item = PySequence_Fast_GET_ITEM(seq, i);
Now item is a PyObject*. You'll have to convert it to an integer now
with HTML and CSS but I don't want to waste
my time with that.
Regards,
Fabian Steiner
--
http://mail.python.org/mailman/listinfo/python-list
text on the paper,
I always have to pass the proper x, y values to QPainter.drawText().
Isn't there any other possibility? How do I get these values?
Thanks in advance,
Fabian Steiner
--
http://mail.python.org/mailman/listinfo/python-list
the template have? (XML, etc.?)
Any hints appreciated!
Cheers,
Fabian Steiner
--
http://mail.python.org/mailman/listinfo/python-list
Hi Kai!
Kai Teuber wrote:
Hi Fabian,
override the accept() method and call self.showListViewItems() there.
But remember to call QDialog.accept() at the end.
def accept( self ):
self.showListViewItems()
QDialog.accept( self )
Thank you very much, I got it working :-)
Cheers,
for any input!
Cheers,
Fabian Steiner
--
http://mail.python.org/mailman/listinfo/python-list
to achieve this aim,
but so far I didn't succeed in doing it because I couldn't find any
examples.
Could anyone give me some hints or a piece of code?
Cheers,
Fabian Steiner
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
Sorry for adopting your post for my own question, but since it is
related to PyQT I think it's ok: Does anybody of you know where the
openbook »GUI Programming with Python: QT Edition« has gone? It's not
available any more: http://www.opendocs.org/pyqt/ points now to a
non-existing site.
Hello!
So far, I am using something like »if isinstance(var, int):« to
determine, whether var's value is an integer. Now I would like to know
if there is any better possibility to do such general checks or may a
construct with isinstance() even fail in certain cases?
Cheers,
Fabian
--
24 matches
Mail list logo