hi guys;
sorry for sending a perl question here, but python guy "HAD TO" look at
perl code;
how can i split a string that contains white spaces and '_'
any clue?
thanks
moe smadi
--
http://mail.python.org/mailman/listinfo/python-list
hi;
say i have a text file with a string ( say '(XYZ)') and I want to find
the number of line where this string has occured. What is the best way
to do that?
what about if that string was say a 0 with leading and trailing white
spaces, would that be any different?
thanks
moe smadi
--
http://m
hi;
my script must return codes which are based on the POSIX spec of
returning a positive value. A work perl version of my code uses
exit(code_num). I am not sure if the equivilant in python is also:
exit(code_num)
or
return code_num
any ideas?
thanks
moe smadi
--
http://mail.python
moe smadi
Fredrik Lundh wrote:
>"M.N.A.Smadi" wrote:
>
>
>
>>I have a perl script that I need to port to python. The script takes
>>input from the command line. Is there a standard way of processing
>>command line arguments based on the -flag preceeding the
hi;
I have a perl script that I need to port to python. The script takes
input from the command line. Is there a standard way of processing
command line arguments based on the -flag preceeding the argument?
thanks
moe smadi
--
http://mail.python.org/mailman/listinfo/python-list
AttributeError: 'str' object has no attribute 'pop'
Mike Meyer wrote:
>In <[EMAIL PROTECTED]>, M.N.A.Smadi <[EMAIL PROTECTED]> typed:
>
>
>>HI;
>>
>>I am having the following error:
>>
>>AttributeError: 'str
command', argv[2])
def execute_action(manager, argv):
method_name = argv.pop(0).lower()
but i always thought that something like this will be standard stuff.
Any ideas?
Mike Meyer wrote:
>"M.N.A.Smadi" <[EMAIL PROTECTED]> writes:
>
>
>
>>HI;
>>
HI;
I am having the following error. I am using someone else's code and
all they are doing is pass an argv to a function then
def execute_action(manager, argv):
method_name = argv.pop(0).lower()
and am getting this strange error.
AttributeError: 'str' object has no attribute 'pop'
am us
hi;
if i want to send a mail message using the "mail" client on a machine
that has smtp protocol is there an easy way (i.e. like bash where you
would just type mail -s SUBJECT message RECIPIENT) to do it from a
python script?
thanks
moe smadi
--
http://mail.python.org/mailman/listinfo/python-l
hi;
I just want to test that a given website is up or not from a python
script. I thought of using wget as an os command. Any better ideas?
thanks
moe smadi
--
http://mail.python.org/mailman/listinfo/python-list
hi;
I need a simple script to run the ping command with some parameters and
be able to read the return value of the ping function. Any pointers will
be appreciated
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
hi;
i have a string that look like 16:23:20.019519 (i.e. system time)
without days and months. I want to convert it to just one long floating
point number with as many decimal places as possible. is there a
funciton to do that?
thanks
ms
--
http://mail.python.org/mailman/listinfo/python-lis
hi;
i am looking for 802.11 prism header parser for an ethereal text dump.
any body aware of something like already in place?
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
7;os' is not defined
smadi
Steven Bethard wrote:
M.N.A.Smadi wrote:
am getting an error in the script as follows:
NameError: global name 'os' is not defined
however i dont get the same error when running from the python CLI.
(and yes i am importing the os module)
Can you give
hard wrote:
M.N.A.Smadi wrote:
M.N.A.Smadi wrote:
hi;
in general: how can i pass a string containing a concatenated
sequcne of command line arguments to a unix system CLI?
i guess i will answer myself:
import os
os.system(string)
Also worth noting is that if you're using Python 2.4, you might want
M.N.A.Smadi wrote:
hi;
in general: how can i pass a string containing a concatenated sequcne
of command line arguments to a unix system CLI?
my specific problem:
i have an executable that is called xyz (written in C if that matters)
that i cannot modify, which prints it is text output to the
hi;
in general: how can i pass a string containing a concatenated sequcne of
command line arguments to a unix system CLI?
my specific problem:
i have an executable that is called xyz (written in C if that matters)
that i cannot modify, which prints it is text output to the screen and
takes an i
hi;
how can i do the following:
1- run a C program from a python script
2- pass that C program an argument
3- Read the out of the program into a buffer that is local to the script
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
hi;
i want to write a script to do the following:
when using firefox to download a textfile, instead of saving it to the
hard dist, i want to run a python script on it, and i want the python
script then to prompt me for the location where i want to store the
processed downloaded file
any help i
hi;
i have a project with multiple files in it. I need to have a varaible
that will contain a value that will be modified in one file, and when
coming back to the same file it should retain the same value. The way
am doing it right now, python is complaining about the variable being
non-glob
does python support a C-like enum statement where one can define a
variable with prespesified range of values?
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
hi;
say i have the following variable
data="""XYZ dflsjdfkl sdfsdhfl
jdsflkdsjf
sldjfsldjf
"""
i need to make sure that the first part is actually XYZ, is there an
easy way of doing that?
thanks
m.smadi
--
http://mail.python.org/mailman/listinfo/python-list
22 matches
Mail list logo