I have CentOS 5 32 bit and I wish to be able to use Python as it is required by a web script I am installing.The Apache however handles the test Python scripts as text. I have Apache/2.2.3 installed and I followed this tutorial: [URL]installed mod_python, edited the httpd.conf file, restarted the Apache, it restarted ok - no change at all. I tried other suggestions I googled but in vain.
I want to display the contents of a particular log file (simple text file, I mean in Linux). But there is a problem: The contents need to be organized in a fixed format. Have a look at this log file:
So, while displaying the contents of above file on a web page, I want to format the field names found in the log file: User Name:, Reported Problems Description:, and Remarks:. These fields may contain a variable length of text and no specific line number is assumed for them to appear on.
Well, what I am trying to do may sound wierd to some of you. The filed "Reported Problems Description:" can possible contain text which embeds colon (.
I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.
I'm a bit new to Python programming and hoped that someone might be able to help with a problem I'm having. What I essentially want to do is to combine two text files line for line. I know how to do this in a bash script so to give you a better idea here's the code for that:
Code:
This is basically for adding on values to the end of a CSV file that uses ';' as the delimiter. So say file1 said:
And file2 said:
Then running this command would create merged_file1_and_file2 which would be:
The code I'm using at the moment is:
Code:
As I'm sure any experienced python programmer will see, this prints out the first line of the file "csvraw" and then all of the lines of "stamps" and then the remainder of "csvraw".
What I'd like to do is something like: (pseudo code, I know it's not python ;-))
Code:
Is this possible? I've tried googling and my Python Pocket Reference hasn't been much help. I've looked at pickling but that doesn't seem appropriate.
Why does centos-release-notes have any dependancies ?
I can see no reason why centos-relese-notes should depend on centos-release when I try "yum erase centos-release-notes" I am told there are 72 dependancies including completely irrelevant packages such as tar all because of this unnecessary dependancy.
The centos-release-notes package simply contains a bunch of text/html files that nothing else relies upon, so why the dependancies ?
but not all, of my text documents show their contents as their icons, instead of using my theme's designated icons for text files. For example, in the above image, the bottom-right file contains: "hello ubuntu forums / this is my problem / how can we fix it? / thank you" and it's icon displays some of this message so that it may be read without opening the file As you can see, the problem occurs with some filetypes, like .txt and .html, but not with others, like .doc or .rtf. How can I force all text files to use my theme's designated icons?
15 this is a sentence containing various words and spaces 34 this is a another sentence containing various words and spaces
cat file2.txt
2 this is sentence1file2 6 this is sentence2file2 54 this is sentence3file2
I would like to join these 2 files. The result should look as follows :
cat joinedfile.txt
2 this is sentence1file2 6 this is sentence2file2 15 this is a sentence containing various words and spaces 34 this is a another sentence containing various words and spaces 54 this is sentence3file2
==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?
i'm not able to play music at all. videos videos seem to crash my browser and using either rhythmbox or banshee they crash too.i ran rhythmbox by typing sudo rhythmbox and tried to play a file and it displayed a pop-up window saying that my autioaudiosink element is missing and the terminal displayed this:
code: (rhythmbox:8415): rhythmbox-warning **: unable to grab media player keys: could not get owner of name 'org.gnome.settingsdaemon': no such name warning: unhandled message: interface=org.freedesktop.dbus.introspectable, path=/, member=introspect
I have installed OpenSuse 11.4, KDE 4.6. In konqueror filemanagement I don't get fileproperties when hovering over the files with the mouse. Only right click -> properties will give me the properties. Now properties are not too much a concern but it is the preview I want. Dolphin does give me properties and preview.What can I do to get fileproperties to be displayed while hovering over the files?
I upgraded to 5.3 and on the next login I was placed in a basic xwindows desktop. Running /etc/init.d/gdm give me the response "GDM already running. Aborting!" Not sure where to look next.
After a power outage my external hard drive that I use to serve a DLNA server with content lost all the files. The parent directories are still displayed, but there is nothing inside them, and I cannot write anything into them. (creating any file in them does not work.) I assume that I have a corrupted drive but I was hoping to find a way to recover the content. Most of it is backed up, but I have become a bit lazy in the past month, and have not backed up so there are a number of videos I don't want to lose. It seams odd that the directories show up, but the files don't. The drive properties also show that the correct amount of the drive space is taken up (for the videos to be present) so I haven't reformatted because I assume that will wipe out all traces of the data.
Google has not found the information I ws looking for. Does anyone have any information how to adjust the variouse splash screens displayed during the boot process?
We are working on an applience project where we would like to add a company logo to the boot and desktop screens. (Worked out the desktop already)
may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.
I'm having jittery DVD playback, and I don't know what the problem is. I tried switching to metacity, but that didn't help. I tried copying the whole disk to local drive with dvdbackup, but the local files displayed the same effects. I tried mplayer and vlc, but no difference. Totem, however, is really bad with jitters. With totem, I tried checking 'Disable deinterlacing of interlaced videos', which I saw someone recommend in another thread, but that didn't help either. I also have all the codecs from this forum's how-to sticky. A video capture of the jitters while playing with vlc: [URL] I'm using Ubuntu 10.10 Desktop 32-bit.
I started my computer and i goto home/downloads. i found all downloaded are deleted. and every folder and file in home folder are displayed in desktop.
I'm using centos5 hiab with qmail and apache and i'm trying to install Mailman via: ./configure --prefix=/home/admin/mailman --with-mail-gid=qmail --with-cgi-gid=apache
and I get the error:
***** Distutils is not available or is incomplete for /usr/bin/python ***** If you installed Python from RPM (or other package manager) ***** be sure to install the -devel package, or install Python ***** from source. See sec. 15.1 of the Installation Manual for ***** details
Doing an rpm -qa | grep python yields the following: python-2.4.3-19.el5 libxml2-python-2.6.26-2.1.2
[Code]....
So it seems to me that the only thing I need to is upgrade(new install??) python-devel-2.4.3-19.e15
The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.
How do you convert Open Office (ODT) documents to Text files? I have made a report using libre office. Now I wish to continue editing the document using lyx (latex front end). So the ODT file needs to be saved as some .tex file.
I don't see an option to do this in File menu (export/save as). So is there any other plugin to do this?
I have an HP printer and have installed hplip in the hope of resolving some printing problems and having nicer, more consistent print dialog boxes. Unfortunately it wants dbus-python version .80+ and the current version is .70
I'm aware that centos is about stability and I'm guessing that a new version of dbus-python isn't likely to happen until centos 6-- right? So what's the best option? Can I find a newer dbus-python package that works with centos 5.2 or is that defeating the purpose of the OS? Do I have to choose between stability with printing problems and instability with better printing functionality?