folks
I am new to python, so excuse me if i am asking stupid questions.
I have a txt file and here are some lines of it
Document Keyword
Keyword Keyword
Keyword Keyword Keyword Keyword
Keyword Keyword Keywordhttp://mail.python.org/mailman/listinfo/python-list
folks,
I am new to python.
I have a list made of elements
['amjad\n', 'kiki\n', 'jijiji\n']
I am trying to get rid of '\n' after each name.
to get list as
['amjad','kiki','jijiji']
But list does not have a strip function as string does have.
is there any solutions
Is there a way this can be
folks
I have two lists
i am trying to loop thorough them simultenously.
Here is the code i am using
f1 = os.popen('ls chatlog*.out')
data1=f1.readlines()
f1.close()
data1=[x.strip() for x in data1]
f1 = os.popen('ls chatlog*.txt')
data=f1.readlines()
f1.close()
for eachline in data1 and line
Folks
I am trying to read a file
This file has a line containing string 'disable = yes'
I want to change this line to 'disable = no'
The concern here is that , i plan to take into account the white spaces
also.
I tried copying all file int list and then tried to manipulate that
list
But the se
On Apr 16, 1:08 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> CSUIDL PROGRAMMEr wrote:
> > hi folks
> > I am new to python. I have a module does call a os.command(cmd) where
> > cmd is a rpm command.
> > Instead of using os.command and getting the results on c
I am new to python. so be patient with me
I am trying to redirect the output of os.popen command to a file. I
want to append to that file. but instead of appending. The file only
shows last command that was writtenn to it.
filehandle= open("/root/yhpc-2.0/installer/yhpc-log" ,"a+");
fileh
I am trying to write a user defined exception that will catch for
failed dependencies when a rpm is installed
try:
rpm -ivh xxx.rpm --force;
except RPMError:
print RPM failed dependency
Can some one tell me how to define this RPMError. I looked at python
docs but they were not useful.
-
Hi folks
I am trying to write a program that will install RPM.
IS there any built in Exception in python that will catch the faied
dependencies in python.
Also if not how can i write one ??
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hi folks
I am new to python
I am trying to write a program that will install rpm
using rpm -ivh xxx.rpm
I want to know if python has in-built exceptions to catch no-
dependencies error.
If not how can i build them
thanks
--
http://mail.python.org/mailman/listinfo/python-list
hi folks
I am new to python. I have a module does call a os.command(cmd) where
cmd is a rpm command.
Instead of using os.command and getting the results on command line ,
i would like to dump the output in a file. Is os.command(cmd >
filename) the most efficient command??
thanks
--
http://mail
folks,
I am trying to write a script that would open a download server and
download all the files and store them in a list
for example Download server is
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/
is there any way this can be done in python??
--
http://mail.pytho
I have a filename
cairo-2.3.4.src.rpm
Is there any way i can only get 2.3.4 from this file name
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hello
I am a novice python progammer
I am just writing a script that will automatically write my /etc/
yum.repos.d/* files in linux.
the problem is i am trying to connect to a secure repo and pass
username and password to the baseurl .
here is the baseurl
baseurl=http://USERNAME:passw...@ydl.net
13 matches
Mail list logo