Hi Ramkumar,
I'm forwarding your message to Python-tutor; in your replies, please make
sure that you are using the "reply-to-all" feature in your email client.
This will allow your response to reach the others on the tutor list.
Don't rely on me alone: give the community the chance to help you.
I
As the below quote from the manual shows -
On Windows, the return value is that returned by the system shell
after running command, given by the Windows environment variable
COMSPEC: on command.com systems (Windows 95, 98 and ME) this is always
0; on cmd.exe systems (Windows NT, 2000 and XP) this
This is what i intend to do:
1. The files and directories to be backed up are given in a list.
2. The backup must be stored in a main backup directory.
3. The files are backed up into a zip file.
4. The name of the zip archive is the current date and time.
the coding:
__
import os
i
I need to know how to run another module through one what is
the command do I have to include a path name and if there is any special way I
have to save the file
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinf
IMAP / POP3 /SMTP connections/sessions as objects are very useful, as
you can pass them from function to function.
On Thu, 2 Dec 2004 21:50:20 -0500, Jacob S. <[EMAIL PROTECTED]> wrote:
> > I am fairly new to programming and I have started to learn programming
> > then stopped out of frustratio
makeSuite() creates a TestSuite object that consolidates all the test methods of the class named by
the first argument. Test methods are identified by having names starting with the second argument.
'test' is the default value so you could omit it; in fact the most recent documentation does omit
If you or anybody else is interested, I've written a script for codes like
kids in junior high use to write notes to each other with... It will cipher
and decipher mixed letters (encryption), turn words inside out (try it and
see), date code (mixed letters that changes with the date), morse code,
p
I thought that the '.py ' in this import statement would make the
interpreter think that newline was a package and therefore try to recognize
py as a module in the newline package.
from newline.py import newline
Perhaps you said this to help explain what's going on?
Jacob Schmidt
>
> If so that
> I am fairly new to programming and I have started to learn programming
> then stopped out of frustration several times in the past. I guess my
> frustration stems from not being able to understand when to use certain
> aspects of programming such as functions or classes.
Use functions when you
> > execute the scripts using python24. However, the "Edit with IDLE"
> command in
> > the shorcut menu (right-click pull down menu) no longer worked. So I
> went to
> > the registry (I know the risks involved)
>
> BUt entirely unnecesary here!
> The way to check/fix the context(right-click) menu o
Hello,
The way I do it is as follows.
def open():
a = open('myfile.txt','r')
di = a.read()
a.close()
di = eval(di)
return di
def save(di):
a = open('myfile.txt','w')
a.write(str(di))
a.close()
def dosomethingwithdi(di):
'''You can put whatever you want in her
What's t supposed to be, what are you initialising self.a as, where is
t generated, what is your expected output? What else is happening to
self.a?
Looks like an indentation error to me.
This kind of output
[[1, 237, 543], [1, 237, 543], [1, 237, 543], [1, 237, 543]]
would only come from
a lo
>Yowza; that's some bug. Danny, do you happen to know the bug number? I
>can't find it on sourceforge.
It's been like that since 2.3 as far as I know. It generates a
connection to localhost to run code in a separate environment.
On Thu, 02 Dec 2004 07:20:19 -0700, Mike Hansen <[EMAIL PROTECTE
Hi,
I've been through the unittest tutorial page and I've seen this function:
suite = unittest.makeSuite(Testname,'test')
In the python 2.4 Python Library Reference I have find no reference to
such a fucntion (there is an example, exactly the same but without the
'test' parameter).
I could not r
--- Ben Vinger <[EMAIL PROTECTED]> wrote:
> --- Bob Gailer <[EMAIL PROTECTED]> wrote:
> > Solutions:
> > 2 - l = os.popen(r'snmpget -Os -c ' +
> SNMPcommunity
> > + ' -v2c -r 3 ' + IP +
> > ' ' + counter, 'r').read() Puts snmpget's output
> in
> > l.
Sorry, now I have doubts again. Originall
On Thu, 2 Dec 2004, mdcooper wrote:
> Hello,
>
> I am trying to append a list to another list, but everytime I do, the new
> parent list has a new child list, but all the other lists have become the
> same
> as the new child list.
>
> Code:
>
>
> self._f.write(str(self.residue.atoms[int(t[0
Hello,
I am trying to append a list to another list, but everytime I do, the new
parent list has a new child list, but all the other lists have become the same
as the new child list.
Code:
self._f.write(str(self.residue.atoms[int(t[0])-1].element) + ' ')
for m in t:
Kent Johnson wrote:
Here is one way to do it, based on this Python Cookbook recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062
Use of sys._getframe() is generally considered something of a skanky hack. (Though it is often done
anyway.) Here is another solution that only uses sup
--On Thursday, December 02, 2004 1:42 PM -0500 Kent Johnson
<[EMAIL PROTECTED]> wrote:
Here is one way to do it,
Thanks so much. that's perfect.
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
Here is one way to do it, based on this Python Cookbook recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062
def debug(msg):
import sys
frame = sys._getframe(1)
name = frame.f_code.co_name
line_number = frame.f_lineno
filename = frame.f_code.co_filename
retu
20 matches
Mail list logo