For following example, how to write command-line option OR metavar
into file...
parser.add_option(-opt1, metavar=MY_OPTION1, default=123)
parser.add_option(-opt2, metavar=YOUR_OPTION2 ,default= abc)
parser.add_option('-opt3, metavar=FLAG, default=True)
do we have any facility to write
On Oct 15, 5:24 pm, Michel Claveau -
MVPenleverlesx_xx...@xmclavxeaux.com.invalid wrote:
Hi!
1) the good syntax is:
# -*- coding: latin-1 -*-
print **
oo = ö
print char=%s % oo
print
On Oct 15, 11:06 pm, John Nagle na...@animats.com wrote:
On 10/15/2010 4:57 AM, hiral wrote:
Hi,
I tried...
code
# coding: latin-1
print **
oo = ö
print char=%s % oo
print
On Oct 15, 11:38 pm, Mark Tolonen metolone+gm...@gmail.com wrote:
hiral hiralsmaill...@gmail.com wrote in message
news:90b62600-a0a4-47d5-bb6f-a3ae14cf6...@9g2000prn.googlegroups.com...
Hi,
I tried...
code
# coding: latin-1
print
Hi,
Like we 'named pipes', how we can achieve comminication between more
than two processes.
And how it can be scaled to remote machines?
Any idea?
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
I am planning to use python module if available.
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 13, 6:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
hiral wrote:
Hi,
I want to display help message of python script and then display help
message from the binary file (which also supports -h option):
Assumptions:
1) 'mybinary' - is linux executable file which
Hi,
I tried...
code
# coding: latin-1
print **
oo = ö
print char=%s % oo
print **
/code
but it is not printing ö char; any idea?
Thank you.
-Hiral
--
http://mail.python.org/mailman
()
if options.file:
subprocess.call(options.file)
Requirement:
$ python myscript.py -h
currently it prints the help message with '-e' and '-h' help message
becides I want to display help message of 'mybinary'
Thank you in advance.
-Hiral
--
http://mail.python.org/mailman/listinfo/python-list
all time.
I am unable to understand why read() method is changing server behavior!!
Can anyone please guide me in same?
Thank you so much for your time. Waiting for your reply.
Thanks,
Hiral
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 14, 7:11 pm, Kushal Kumaran kushal.kumaran+pyt...@gmail.com
wrote:
On Mon, Jun 14, 2010 at 7:01 PM,hiralhiralsmaill...@gmail.com wrote:
Hi,
Do we have any facility to append file from Popen()/call(); see below
example...
1 import subprocess
2 f=open('log', 'w')
3 ...# writing
Hi,
Do we have any facility to append file from Popen()/call(); see below
example...
1 import subprocess
2 f=open('log', 'w')
3 ...# writing some log-into into log file
4 p = subprocess.Popen(cmd, stdout=f, stderr=f) # (Q)
5 ...# do remaining stuff
Q: At line# 4, the output of the 'cmd' will
Hi,
Do we have any facility to append file from Popen()/call(); see below
example...
1 import subprocess
2 f=open('log', 'w')
3 ...# writing some log-into into log file
4 p = subprocess.Popen(cmd, stdout=f, stderr=f) # (Q)
5 ...# do remaining stuff
Q: At line# 4, the output of the 'cmd' will
On Jun 8, 3:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
hiralwrote:
Hi,
I am using optparser to do following...
Command syntax:
myscript -o[exension] other_arguments
where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc.
Now to parse this, I am doing
(-otxt', dest=txt_file...)
parser.add_option(-opdf', dest=pdf_file...)
parser.add_option(-oppt', dest=ppt_file...)
Thank you in advance.
-Hiral
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 6, 7:27 am, Steve vvw...@googlemail.com wrote:
On 5 June, 08:53, Steve vvw...@googlemail.com wrote:
I am new to Python and am wanting to replace characters in a very
large text file.6 GB
In plain language what I wish to do is:
Remove all comma's
Replace all @ with comma's
Hi,
I am using optparser to do following...
Command syntax:
myscript -o[exension] other_arguments
where; extension can be 'exe', 'txt', 'pdf', 'ppt' etc.
Now to parse this, I am doing following...
parser.add_option(-oexe', dest=exe_file...)
parser.add_option(-otxt', dest=txt_file...)
) with custom methods?
Thank you in advance.
-Hiral
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is there any module/utility like 'rsync' in python.
Thank you in advance.
-Hiral
--
http://mail.python.org/mailman/listinfo/python-list
(0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (167major+23minor)pagefaults 0swaps
As you can observe output of 'time' command got printed as garbage.
Can you please let me know how can I get output of 'time' same as
terminal.
Thank you in advance.
-Hiral
--
http://mail.python.org/mailman
On Mar 15, 7:14 am, Tim Roberts t...@probo.com wrote:
hiralhiralsmaill...@gmail.com wrote:
...
Output:
real 0.0m0.010002421s
user 0.0m0.0s
sys 0.0m0.0s
Command:
$ time ls
Output:
real 0m0.007s
user 0m0.000s
sys 0m0.000s
Is this the intended behaviour?
What
On Mar 12, 8:02 pm, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
Luis M. González wrote:
On Mar 12, 10:59 am,hiralhiralsmaill...@gmail.com wrote:
Hi,
Is there any way to create variables which name matches with dict key?
For example:
dict1 = {abc:'1, def:2}
Now I am looking
Hi,
Python version: 2.6
Script:
def pt(start_time, end_time):
def ptime(time, time_str):
min, sec = divmod(time, 60)
hr, min = divmod(min, 60)
stmt = time_str + '\t'
if hr:
stmt += str(hr) + 'h'
stmt += str(min) + 'm' + str(sec) + 's'
Hi,
Is there any python module/utility available which would report the
time same as 'time' command in linux and/or report time same as
'ntimer' utility in Windows.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is there any way to create variables which name matches with dict key?
For example:
dict1 = {abc:'1, def:2}
Now I am looking to have variable name abc and it's value be '1' etc.
Pl. suggest.
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
25 matches
Mail list logo