Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I'm writing a python script to give me the number of files and directories in a given directory and I'm having varying results.
I have two scripts which I have written the first one does not work and second one works
I'm using Python 2.4.3 on CentOS 5.9
2. Relevant commands, code, scripts, algorithms:
When I run this I get an output as follows
3. The attempts at a solution (include all code and scripts):
The following code I have written with few changes works. 4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Python Programming
Self - learning
Reference The Python Tutorial — Python v2.7.4 documentation
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Hi all...
As you know I like making code backwards compatible for as many platforms as possible.
This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Hi all,
I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine..
Below is the code I am trying:
#!/usr/bin/env python
import wmi
c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
I'm writing python script to get the file-names in the current directory and file sizes .I'm able to get file list and their sizes but unable to pass them through command line. I want to use this script to execute on other directory and pass directory path with file name through command line. Any... (1 Reply)
I am working on requirement on spreadsheet in python scripting.
I have a spreadsheet containing cell values and with background color.
I am able to read the value value but unable to get the background color of that particular cell.
Actually my requirement is to read the cell value along... (1 Reply)
Hello,
i have:
# python -V
Python 2.7.6
But original for my CentOS is 2.3 or 2.4
my python folder:
/root/python2.7.6
(inside are folders like lib, include, bin, share)
I launched app iotop:
# iotop -od 6
Traceback (most recent call last):
File "/usr/bin/iotop", line 16, in... (3 Replies)
Hello all,
I have a question, and would like some advice please. I am a windows guy by trade....5 years in the Marines is where I learnt a lot of what i know. I took a junior level sys admin job...learned a bit more...and now I do IT security. All of this happened in the last 8 years. So I'm 27... (2 Replies)