On 1月9日, 下午4时46分, Mitya Sirenef wrote:
> On Wed 09 Jan 2013 03:23:56 AM EST, skyworld wrote:
>
> > Hi,
>
> > I see someone's code as this:
>
> > class ABC:
> > def __init__(self, env):
> > ...
> > sel
Hi,
I see someone's code as this:
class ABC:
def __init__(self, env):
...
self.jmpTable['batchQ']['submit_job'] = self.lsf_submit
...
def lsf_submit(self, cmd,env):
.
what confused me is why there is no parentheses for self.lsf_submit
Hi,
I'm studying python now and I saw a piece of code like this:
def storeDbase(db, dbfilename=dbfilename):
.
dbfile=open(dbfilename,'w')
for key in db:
print(key, file=dbfile)
can anybody help me to understand what does this "file=dbfile" mean
and what is its funct
On Oct 27, 11:02 am, MRAB wrote:
> On 2012-10-27 03:28, skyworld wrote:> Hi,
>
> > I'm new to python and I'm trying to porting some scripts from v0.96 to
> > v2.0.1. A piece of code is like this:
>
> > cmd_h = os.popen4(env['SYSCMDLINE'])[1]
>
Hi,
I'm new to python and I'm trying to porting some scripts from v0.96 to
v2.0.1. A piece of code is like this:
cmd_h = os.popen4(env['SYSCMDLINE'])[1]
the system indicates the popen4 is deprecated and suggest to use
subprocess. Can anybody tell me how to use subprocess in this case?
and what d