If anyone is interested I was able to fix this. The problem appears
to have been caused by udev. Disabling udev completely in the
container seems to have corrected the issue.
On Fri, Sep 27, 2013 at 4:54 PM, Sean Carolan scaro...@gmail.com wrote:
Basically just what the subject said. When I
Basically just what the subject said. When I run this directly from a
root shell it works splendidly, the container spins up immediately and
I can use it right away.
virt-install --connect lxc:/// --name node3 --ram 512 --vcpu 1
--filesystem /containers/node3/,/ --network bridge:br0
I feel like I'm so close to getting this working...maybe one of you can help?
Here's the scenario:
I have a virtualbox host running CentOS 6.4 x86_64. It's got libvirt
installed and an lxc guest on it. The guest setup went fine, and I
can even ssh into the guest from the host. The guest
But, where did you get the idea that you could build Python RPMs using
$python setup.py bdist_rpm ? I thought that was only limited to
building RPMs for python packages (including extensions), but not the
Python interpreter itself. Please correct me if i am wrong.
Ok, so it's only for module
My apologies if this comes through twice; I think I sent the first copy
before I was approved to send to this list!
**
Hello everyone:
I'm attempting to use the bdist_rpm flag to build a plain vanilla, Python
2.7 RPM for RHEL 5 x86_64, but the build
Hello everyone:
I'm attempting to use the bdist_rpm flag to build a plain vanilla, Python
2.7 RPM for RHEL 5 x86_64, but the build command fails. Since you all are
the distutils experts I figured you might have seen this before. I also
submitted a bug to bugs.python.org:
Sean Carolan added the comment:
Éric Araujo, if that is the case then why does it build what looks like a
*.spec file for Python itself?
[scarolan@titania:~/Python-2.7.3]$ head -10
./build/bdist.linux-x86_64/rpm/SPECS/Python.spec
%define name Python
%define version 2.7.3
%define
Sean Carolan added the comment:
Ok, thanks for clearing that up. Maybe the documentation could be updated to
explicitly state this to avoid confusion, eg:
NOTE: You cannot use setup.py to build a Python RPM. It is only for building
Python modules
I'm attempting to use setup.py to build an RPM, but ran into this error:
[scarolan@cobbler:~/rpmbuild/BUILD/Python-2.7.3]$ python27 setup.py
bdist_rpm
File setup.py, line 361
with open(tmpfile) as fp:
^
SyntaxError: invalid syntax
error: Bad exit status from
Could it be that it is taking the system python executable which is
probably 2.4?
-Amit.
I've tried it with python24, python25 and python27 and all of them give the
same error.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
, Sean Carolan scaro...@gmail.com wrote:
Could it be that it is taking the system python executable which is
probably 2.4?
-Amit.
I've tried it with python24, python25 and python27 and all of them give
the same error.
___
Tutor maillist - Tutor
What it looks like to me is that while you run (using python 2.7):
python27 setup.py bdist_rpm
doing that generates a temporary bash script, which in turn runs:
python setup.py build
Yea, I checked this, and /usr/local/bin/python is just a symlink pointing
at /usr/local/bin/python2.7.
http://hg.python.org/cpython/file/d321885ff8f3/Lib/distutils/command/bdist_rpm.py#l23
No dice.
[scarolan@titania:~/Python-2.7.3]$ alias | grep python
alias python='/usr/local/bin/python2.7'
[scarolan@titania:~/Python-2.7.3]$ /usr/local/bin/python2.7 setup.py
bdist_rpm
error: pyconfig.h: No
If so, what was your secret?
I tried running this again with strace, and it looks like it's finding the
pyconfig.h file:
open(/usr/local/include/python2.7/pyconfig.h, O_RDONLY) = 4
read(4, /* pyconfig.h. Generated from p..., 4096) = 4096
stat(pyconfig.h, {st_mode=S_IFREG|0664, st_size=36037,
Given that most folks on this list are only learning Python its pretty
unlikely that they are building bespoke RPMs...
You might find more experience of RPM building on the general Python
mailing list/newsgroup.
Sorry 'bout that. I'll follow up with the bug report and possibly the
general
New submission from Sean Carolan:
I'm attempting to build a Python 2.7.3 RPM but the build command from the
documentation fails. My platform is RHEL 5.9, x86_64
http://docs.python.org/2/distutils/builtdist.html#creating-rpm-packages
Steps to reproduce:
1. Download latest Python tarball
I'm working on a python script that runs on a Raspberry Pi. The script
detects when hardware buttons are pressed, and then runs functions based on
that input.
I want to be able to always listen for a button press, no matter what the
script is doing at the current moment. When a button press is
If you show us how you check whether the button is pressed, we may be able to
show you how to run that asynchronously.
Apologies for the previous email; I think I sent it in HTML format.
Gmail changed their user interface again...
This is how I'm checking for a button press:
modes = (weather,
On Sun, Nov 25, 2012 at 7:29 AM, Francois Dion francois.d...@gmail.com wrote:
This should really be done with interrupts, but unfortunately there is
no support in the RPi.GPIO module for that, even if you have a patched
kernel.
Thank you for all this great information. I ended up going with a
If I run this:
find /path/to/files/ -type f -mtime -2 -name *.xml.gz
I get the expected results, files with modify time less than two days old.
But, if I run it like this, with the print0 flag:
find /path/to/files/ -print0 -type f -mtime -2 -name *.xml.gz
I get older files included as well.
Order of operations
find /path/to/files/ -type f -mtime -2 -name *.xml.gz -print0
Thanks!
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
I have a string, 2012_10_16; let's call this $YESTERDAY
How can I rsync a file tree from a remote machine to the local one,
including *only* filenames that contain the matching string? I've
read the man page and googled around but can't seem to get the syntax
right. I either end up syncing all
Suppose you have server A and server B. Server B is running 60
seconds too fast, while server A is accurate. Is there a way to
gradually move server B's time back into sync with server A, without
making a drastic, immediate change to the clock? In other words, we
would like to 'smear' the
This is already how ntpd works. When you first start the service
(usually upon reboot), it will use 'ntpdate' to do a hard set of the
clock, then ntpd picks up and adjusts the clock back and forth to keep
it correct.
My understanding was that ntpd will use slewing for adjustments of
less
What I'm trying to avoid is abruptly resetting the clock from 12:06 to
12:05 all at once. Instead we want to slowly turn the clock back that
one minute, but spread the changes across several hours or days.
I think the -x option may be our solution; I R'd the FM and it says:
...If the -x
This has been extremely useful in my environment when importing the odd
'unique snowflake' type server quickly without having to make any code/logic
changes or introduce large numbers of ENC values to disable certain
functionality or alter the flow of your puppet code.
Yes. Puppet doesn't
It's not really the cleanest-looking thing, but the easiest option for
your particular case is to wrap the file resource in an if statement
like this:
if (! $::security_limits_disabled) {
file { '/etc/security/limits.conf':
...
}
}
Super, thanks Martin!
--
You received this
It's not really the cleanest-looking thing, but the easiest option for
your particular case is to wrap the file resource in an if statement
like this:
if (! $::security_limits_disabled) {
file { '/etc/security/limits.conf':
...
}
}
Thanks, this is just what I was looking
Maybe one of you can help with this. I have a class that's got a
file{} type directive in it. It populates /etc/security/limits.conf
with specific settings. I have a small handful of hosts where we want
to manage /etc/security/limits.conf manually. Is there a simple way
to tell puppet to
You don't say what version of puppet you're using, whether you're using
an ENC, or whether you're already using either extlookup() or hiera(),
so it's really difficult to suggest something that integrates well with
your current environment.
Sorry I didn't provide more detail. We're using
Anyone have a fix for this? We are running RHEL5.8 and Spacewalk 1.7.
The fix is referenced in the bugzilla. But since you are running
RHEL 5.8, I suggest you open a support ticket with Red Hat to have the
issue properly triaged and addressed.
Thanks, I'll get that submitted today.
I'm seeing an odd result in the Duplicates by IP address list:
1.0.0.1 (2 systems) Compare Systems
host1.domain.com 7/30/12 5:48:47 PM GMT
host2.domain.com 7/30/12 5:49:53 PM GMT
I've tried deleting both of these systems and re-registering them
repeatedly, every time they
I've tried deleting both of these systems and re-registering them
repeatedly, every time they keep coming back with this duplicate IP,
even though 1.0.0.1 is not configured anywhere that I can see.
/sbin/ifconfig doesn't show this ip address, nor can I find it in the
I'm digging up this old thread to ask - is the jabber bug where osad
can't communicate through a proxy server fixed in Spacewalk 1.7? In
other words, if I upgrade both the master spacewalk server and all
proxies to 1.7 do you think it will work?
Just one final question on this; do you know if
Yes, I personally think that (Mini)DOM should be locked away from beginners
as far as possible.
Ok, I'm glad to hear that. I'll continue to work with ElementTree and
lxml and see where it takes me.
___
Tutor maillist - Tutor@python.org
To
I'm trying to parse some XML data (Book titles, ISBN numbers and
descriptions) with Python. Is there a *simple* way to import an XML
file into a dictionary, list, or other usable data structure? I've
poked around with minidom, elementtree, and untangle but am not
really understanding how they
The simplest way using the standard library tools is (IMHO)
elementtree. minidom is a complex beast by comparison,
especially if you are not intimately familiar with
your XML structure.
Thank you, this is helpful. Minidom is confusing, even the
documentation confirms this:
The name of the
Thank you, this is helpful. Minidom is confusing, even the
documentation confirms this:
The name of the functions are perhaps misleading
But I'd start with the etree tutorial (of which
there are many variations on the web):
Ok, so I read through these tutorials and am at least able to
This snippet of code pulls an array of hostnames from some log files.
It has to parse around 3GB of log files, so I'm keen on making it as
efficient as possible. Can you think of any way to optimize this to
run faster?
HOSTS=()
for host in $(grep -h -o [-\.0-9a-z][-\.0-9a-z]*.com ${TMPDIR}/* |
*sigh*
awk is not cut. What you want is
awk '{if (/[-\.0-9a-z][-\.0-9a-z]*.com/) { print $9;}}' | sort -u
No grep needed; awk looks for what you want *first* this way.
Thanks, Mark. This is cleaner code but it benchmarked slower than awk
then grep.
real3m35.550s
user2m7.186s
sys
*sigh*
awk is not cut. What you want is
awk '{if (/[-\.0-9a-z][-\.0-9a-z]*.com/) { print $9;}}' | sort -u
I ended up using this construct in my code; this one fetches out
servers that are having issues checking in with puppet:
awk '{if (/Could not find default node or by name with/) { print
How many systems? What kind of disk is the system running on? If it's
a slower SATA type, you might look at relocating the /var/lib/cobbler
directory to another partition, especially if your server is busy
(lots of http requests to /var/www for instance).
It's about 3000 systems. This is
I wrote a basic python CGI script to parse cobbler data and generate
some graphs. The script works fine but it takes a really long time to
run due to the large number of hosts stored in cobbler's *.json files.
Any suggestions for improving performance? I know I can convert the
*.json data and
I'm working on a simple python web app that generates graphs, because
managers love graphs. I've got it about 90% done, but I'm having
trouble getting labels onto my stacked graph. In the matplotlib
documentation there is a nice example showing how to create the
legend. Note how the variables
Unfortunately my graph is generated dynamically. How can I create my
legend when my 'bar' objects have no names to refer to?
I also noticed another issue with my stacked bar graph; the total
height of the bar is the size of the largest number of the dataset,
and not the total of all the
Not me, but I notice there is a gmane newsfeed for matplotlib:
gmane.comp.python.matplotlib.general
Probably worth posting questions there.
Thank you, I will inquire on the newsfeed.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
Unfortunately my graph is generated dynamically. How can I create my
legend when my 'bar' objects have no names to refer to?
for admin in bd:
bar(ind, bd[admin], width, color=colordict[admin])
xticks(ind+width/2., datenames)
legend()
grid('on')
outfile =
I also noticed another issue with my stacked bar graph; the total
height of the bar is the size of the largest number of the dataset,
and not the total of all the individual items. Anyone matplotlib
experts out there who can weigh in?
I figured out what was going on here; the bars were all
On Fri, Jun 15, 2012 at 7:51 AM, Wojtak, Greg (Superfly)
gregwoj...@quickenloans.com wrote:
I can offer some encouragement at least and say that I have been running
Spacewalk in a VM since 0.6. The only thing I'd say is to make sure the
VM is sized appropriately.
Thanks, guys. All helpful
We are planning to move our spacewalk installation from a physical
server onto a VMware guest. The primary reasons for doing this are
portability and snapshots.
Has anyone else moved a Spacewalk installation from one server to
another? Any gotchas or things to look out for? Also if you have
I've got a function that builds a bar graph. We are 95% happy with
it, but the x-axis tick labels are a little bit skewed to the right.
Anyone know how to skew the labels over by 10 or 20 pixels? Here's
the code that generates my xticks:
xticks(range(len(builds)), users, rotation=30)
I've got a function that builds a bar graph. We are 95% happy with
it, but the x-axis tick labels are a little bit skewed to the right.
Anyone know how to skew the labels over by 10 or 20 pixels? Here's
the code that generates my xticks:
xticks(range(len(builds)), users, rotation=30)
In
I had a little trepidation at doing the migration, but I followed the
steps closely, made sure I had backups and dumps of the database, and it
went very smoothly.
Thank you. This was the confirmation I was looking for.
___
Spacewalk-list mailing
Has anyone attempted this? When we first installed Spacewalk the
postgres support was not stable so we went with Oracle XE instead, but
the situation seems to have improved.
Might there be a migration script or other process for migrating from
Oracle XE to PostgreSQL?
thanks
Sean
In bash you can do this to see if a process is running:
[scarolan@kurobox:~/bin]$ kill -0 24275
[scarolan@kurobox:~/bin]$ echo $?
0
Is there a python equivalent? I tried using os.kill() but did not see
any way to capture the output.
___
Tutor maillist
That one is 2 years old release. The bug was fixed one year ago. The
trouble is that release was not made for those 2 years.
Ok, so in other words we probably need to apply the patch, unless
maybe someone at Red Hat already has a patched version?
I thought the same thing at first. Satellite at least would black list
your server for checking in too frequently. The best I could come up with
in this case was to set INTERVAL=60 (the minimum) in /etc/sysconfig/rhnsd.
Thanks, Greg. We'll use this workaround until the jabber bug is fixed.
Here's the situation:
* Master Spacewalk server is working fine
* Proxy server #1 is also fine, proxied clients are ping-able
* Proxy server #2 seems to be working, but clients are not ping-able.
Here's what I've tested on proxy server #2:
* Clients can register and run rhn_check -vv just
Below is a link to the output of osad -N -v. Any suggestions?
Forgot to mention; I did try blowing away the jabber databases both on
the master and proxy server, restarting osa-dispatcher, etc. but it
didn't help.
___
Spacewalk-list mailing
On Tue, Mar 13, 2012 at 3:19 PM, Wojtak, Greg (Superfly)
gregwoj...@quickenloans.com wrote:
I thought the same thing at first. Satellite at least would black list
your server for checking in too frequently. The best I could come up with
in this case was to set INTERVAL=60 (the minimum) in
On Thu, Feb 16, 2012 at 6:47 PM, Jeremy Davis jdavis4...@gmail.com wrote:
Yes, that is the correct cert. You also need to make sure you download that
cert to the client and change the /etc/sysconfig/rhn/osad.conf to point to
that downloaded cert from the proxy server.
Ok, so here are the
-TRUSTED-SSL-CERT
On 02/17/2012 09:18 AM, Sean Carolan wrote:
On Thu, Feb 16, 2012 at 6:47 PM, Jeremy Davisjdavis4...@gmail.com
wrote:
Yes, that is the correct cert. You also need to make sure you download
that
cert to the client and change the /etc/sysconfig/rhn/osad.conf to point
On Thu, Feb 16, 2012 at 4:53 PM, Jeremy Davis jdavis4...@gmail.com wrote:
If a server is connecting to a Spacewalk Proxy server you will need to use
the SSL Cert that was generated for that proxy server. This Cert will be in
the same location as the app server but on the proxy server.
How is
On Fri, Feb 17, 2012 at 2:11 PM, Wojtak, Greg (Superfly)
gregwoj...@quickenloans.com wrote:
server.pem and RHN-ORG-TRUSTED-SSL-CERT are two different things.
server.pem is for jabberd. the CN in server.pem should be your spacewalk
proxy's fqdn. RHN-ORG-TRUSTED-SSL-CERT should be identical to
Maybe one of you have already solved this in the past. We have a
master Spacewalk server which is working just fine. All clients are
able to contact the jabber server and receive push updates, etc. Our
proxy server is registered with the master server and is also working
ok for the most part.
Anyone know how to get statistics on bonded interfaces? I have a
system that does not use eth0-3, rather we have bond0, bond1, bond2.
The members of each bond are not eth0-3, rather they are eth6, eth7,
etc. I didn't see anything in the man page about forcing sar to
collect data on specific
Anyone know how to get statistics on bonded interfaces? I have a
system that does not use eth0-3, rather we have bond0, bond1, bond2.
The members of each bond are not eth0-3, rather they are eth6, eth7,
etc. I didn't see anything in the man page about forcing sar to
collect data on specific
Anyone have a script or utility to convert an RTF file to ANSI? The
main idea here is to preserve the color codes that are specified in
the RTF file, so they can be displayed easily in a terminal window.
___
CentOS mailing list
CentOS@centos.org
Hello friends:
Could someone post a simple example of how to access the XMLRPC
interface using perl? I'm able to do this just fine with Python but
would also like to be able to do it with Perl as well. The example
given on this page uses a session token, which I'd like to avoid:
0x is typically the CA cert, was the inventory.txt file blank when
this occurred? If you have all the certificates, you can use puppet
cert -pa and extract the serial number, date, and CN info. I'm not
sure if there's an automated way using openssl commands. This might be
reasonably close
We have an issue where sometimes servers get assigned serial number
0x in the inventory.txt file. This causes major problems
including SSL cert errors in the log file. Anyone know how to
properly rebuild inventory.txt without tearing everything out and
starting from scratch?
--
You
On Tue, Jul 26, 2011 at 11:44 AM, Tony G. tony...@gmail.com wrote:
Try enabling debug and trace on your agent, that will provide more details.
Ok, we gave this a shot. Here's the output with --debug and --trace turned on:
/var/lib/puppet/lib/puppet/type/package.rb:316:in `initialize'
We are seeing this error in our log files on some clients:
puppetd[15068]: Could not run Puppet configuration client: undefined
method `initvars' for #Puppet::Type::Package:0x2bbb4858
Where do I begin troubleshooting this? The client software versions are:
ruby-1.8.5-5.el5_4.8.x86_64
This is kind of odd.
[scarolan@host:~]$ cat loremipsum.txt
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis
ipsum sed elit laoreet malesuada. Quisque rhoncus dui vitae eros
euismod fermentum sollicitudin sem scelerisque. Nulla facilisi.
Maecenas mollis pulvinar euismod. Duis
2011/7/20 Lamar Owen lo...@pari.edu:
On Wednesday, July 20, 2011 03:23:58 PM Sean Carolan wrote:
[snip]
Where did all the letter n's go?
I can't duplicate the problem here on a CentOS 5.6 box. What locale are you
set to? Here's what I get (note that a copy from the e-mail you sent
[scarolan@server:~]$ echo $myvar
Lorem ipsum dolor sit amet, co sectetur adipisci g elit.
lots of letter !
Weird huh?
Ok, I'm a bonehead; I had this in my bash history:
IFS='\n'
That seems to have been the cause of the missing n's. Now the next
question would be, how can I include the \n
(No, I don't advocate perl for everything, but knowing more about the
problem can
help in determining a suitable solution.)
You're right, I gave up and used python instead. The basic idea here
was to gather together a long list of hostnames by grepping through a
few hundred files, check the
I am working on a sandbox machine that will allow users to play around
with building virtual machines, then blow them all away each night
with a cron job. I wrote a small script that uses the virsh command
to destroy the VMs, then remove the storage. For some reason the vm
name still shows up in
Did you try:
virsh undefine domain-id
where domain-id is your vm name
Perfect, thanks Earl! Here's the script in case anyone else might
find it useful. Please post any improvements if you can see a way to
improve it.
#!/bin/bash
# Removes all KVM virtual machines from this host
# First
You can just create a new class that inherits your previous class
and then overwrites the File[] you declared before and use that
only on the new machines.
Will this also work with an augeas entry with a changes [] section?
--
You received this message because you are subscribed to the
I'm not sure how to do this. I'm reading lines in from a text file.
When I reach the string notes:, I want to assign the remainder of
the text file to a single variable (line breaks and all):
text
moretext
moretext
notes:
This is the stuff I want in my variable.
And this line should be included
So right now my code looks something like this:
for line in open('myfile','r'):
if line.startswith('notes'):
## Assign rest of file to variable
Is there an easy way to do this? Or do I need to read the entire file
as a string first and carve it up from there instead?
I ended up
if line.startswith('notes'):
break
notes = open('myfile','r').read().split(notes:\n')[1]
The first two lines are redundant you only need the last one.
I should have clarified, the if line.startswith part was used to
break out of the previous for loop, which was used to import the
other,
Hi All:
I have a couple of upgrade questions:
1. The wiki recommends using cobbler replicate to move to the new system.
Will this work when moving between version 1.6.2 2.0.9? Any gotchas to
look out for?
2. Is it possible to migrate one or more systems at a time? I'm wondering
if there
2. Is it possible to migrate one or more systems at a time? I'm
wondering
if there is an export command or way to generate the proper cobbler
system
add commands from the source, and then run them on the destination.
No, that is what replicate was created for. Unfortunately, we broke
I would do a 1.6 replication to another host with 1.6 installed. Then do
an in place upgrade on the new host. This should work.
Thanks for the tips, Scott.
___
cobbler mailing list
cobbler@lists.fedorahosted.org
Can anyone point out reasons why it might be a bad idea to put this
sort of line in your /etc/hosts file, eg, pointing the FQDN at the
loopback address?
127.0.0.1hostname.domain.com hostname localhost localhost.localdomain
___
CentOS mailing list
First, if your host is actually communicating with any kind of ip-based
network, it is quite certain, that 127.0.0.1 simply isn't his IP
address. And, at least for me, that's a fairly good reason.
Indeed. It does seem like a bad idea to have a single host using
loopback, while the rest of the
(Make sure you pick .dummy so as not to interfere with any other DNS.)
In theory you could leave off .dummy, but then you risk hostname being
completed with the search domain in resolv.conf, which creates the
problems already mentioned with putting hostname.domain.com in
/etc/hosts. (I have
The remote host's $TERM variable is in fact xterm. When I connect to
the screen session the $TERM variable is 'screen'.
Are you running screen locally or remotely?
Remotely. My work machine is a laptop, which is not powered on all
the time. Hence I use a remote box as a jumping-off point,
In this case, you might want to conditionally assign some reasonable
value on failure. Say:
tput -T $TERM init /dev/null 21 || export TERM=xterm
'tset -q' is another test which can be used.
The remote host's $TERM variable is in fact xterm. When I connect to
the screen session the
I really like gnu screen and use it everyday but there's one thing
that is a bit inconvenient, and that's the odd line wrapping and
terminal size issues that seem to pop up. The problem crops up when I
type or paste a really long command, and then go back and try to edit
it; the text starts to
You wouldn't by any chance be using PuTTY to access the session? If
so, you may need to play around with the terminal settings including
the scroll type so that it displays correctly. I don't recall the
specifics but a similar thing happened to me.
Actually, no I'm using gnome-terminal on
Maybe someone can help with this. I have a function that takes a
single file as an argument and outputs a tuple with each line of the
file as a string element. This is part of a script that is intended
to concatenate lines in files, and output them to a different file.
This is as far as I've
On Tue, Mar 1, 2011 at 11:55 AM, Sean Carolan scaro...@gmail.com wrote:
Maybe someone can help with this. I have a function that takes a
single file as an argument and outputs a tuple with each line of the
file as a string element. This is part of a script that is intended
to concatenate
I saw in your follow-up that you went straight for vars(). I really
don't think that's what you wish to use. Get rid of vars(), he had
to go to jail. Don't go visit vars() again for at least two months,
then maybe he'll be out on probation.
Thanks Martin and Hugo. As you can tell I'm no
My advice would be to go read up on the zip() function and the
str.join() function. Then, if you are using python 2.x, go find
itertools.izip. It does the same thing as zip but it's more memory
efficient. With those two you can do it in about two lines or so (and
maybe a few for set up and
Another way is:
zip(*map(open, myfiles))
Then your loop looks like:
for i in zip([ cleanedup(filename) for filename in myfiles ])
Thanks, Steven! I knew there was a way to do this with just a few
lines. I will read up some more on list expansion and the map
built-in.
, disk
space, etc. Hint: you can get a *lot* of useful info from the /proc
directory, for example, /proc/meminfo, /proc/loadavg, etc.
Here's a quickie that I built for a client, it watches the 15 minute
load average.
#!/usr/bin/env python
'''
File: load_average_watcher.py
Author: Sean Carolan
I have a function that accepts four arguments, namely startmonth,
startyear, endmonth, and endyear. For example:
startmonth = 8
startyear = 2009
endmonth = 1
endyear = 2010
What would be the most straightforward way to create a list of
year/month pairs from start to end? I want to end up with
1 - 100 of 394 matches
Mail list logo