Is there a way to execute shell commands on VMWare server via PyVMomi?

2015-02-11 Thread Johnny Ting Shi
We have some VM running on top of EXSi. We want to be to run some remote arbitrary commands on the VM, anyone has experience with https://github.com/vmware/pyvmomi? which command do i need to call? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2011-08-23 Thread Johnny Venter
http://greenteapress.com/thinkpython/ On Aug 23, 2011, at 10:46 PM, User wrote: > Hello all, > Does anyone have any good resources for learning Python? I know basic Java > and basic Python (loops, data types, if-then statements, etc), but I want to > delve into Python further. If anyone knows o

Re: Python Windows Extensions for Mac

2011-08-20 Thread Johnny Venter
his? On Aug 20, 2011, at 7:57 PM, Chris Angelico wrote: > On Sun, Aug 21, 2011 at 12:51 AM, Johnny Venter > wrote: >> Thank you all for the replies. I would like to query various Windows' >> objects and resources from Mac and/or Linux such as Active Directory users,

Re: Python Windows Extensions for Mac

2011-08-20 Thread Johnny Venter
Thank you all for the replies. I would like to query various Windows' objects and resources from Mac and/or Linux such as Active Directory users, network shares, group members, etc... What module or methods can I use with python to accomplish this? I found dcerpc might be the way to go. On A

Sockets: Receiving C Struct

2011-08-05 Thread Johnny Venter
I',s.recv(4))[0] s.close() print data What I would like to do is take the input from the server, and store it in an array. The type of data is int. Can someone help? Thanks, Johnny PGP.sig Description: This is a digitally signed message part -- http://mail.python.org/mailman/listinfo/python-list

Fwd: Sockets: Receiving C Struct

2011-08-05 Thread Johnny Venter
I was not sure if this message was sent before my membership was accepted. Please disregard if it's a duplicate. Thanks Begin forwarded message: > From: Johnny Venter > Date: August 5, 2011 8:15:53 AM EDT > To: python-list@python.org > Subject: Sockets: Receiving C Struct &

Printing list/tuple elements on separate lines

2009-06-04 Thread Johnny Chang
I have a large list of strings that I am unpacking and splitting, and I want each one to be on a new line. Someone showed me how to do it and I got it working, except it is not printing each on its own separate line as his did, making it incredibly hard to read. He did it without adding a new lin

any function to fill zeros to the right?? zfill??

2008-08-13 Thread Johnny
if I want to fill zeros to the right, what function can help?? ex: '1.23'=>'1.2300' but '1.23'.zfill(6)=>'001.23' -- http://mail.python.org/mailman/listinfo/python-list

Re: best open source sample

2007-11-13 Thread Johnny
On Nov 13, 9:14 am, [EMAIL PROTECTED] wrote: > On Nov 13, 9:20 am, Johnny <[EMAIL PROTECTED]> wrote: > > > Hi, I'm new to Python and am looking for a really good/complete open > > source project to learn from. I'd like it to take input from the > >

best open source sample

2007-11-13 Thread Johnny
Hi, I'm new to Python and am looking for a really good/complete open source project to learn from. I'd like it to take input from the browser and query mysql. Suggestions? -- http://mail.python.org/mailman/listinfo/python-list

noob: reloading modified python file within Python Shell

2007-09-10 Thread johnny
from people.models import * Now I make changes to the models.py. How do I reload this module in Python Shell? -- http://mail.python.org/mailman/listinfo/python-list

Any python module for Traversing HTML files

2007-07-24 Thread johnny
Any python module for navigating and selecting, parsing HTML files? -- http://mail.python.org/mailman/listinfo/python-list

How to Machine A python script execute Machine B python script?

2007-07-08 Thread johnny
Anyone know how I can make Machine A python script execute a python script on Machine B ? -- http://mail.python.org/mailman/listinfo/python-list

newb: Scope Question

2007-06-22 Thread johnny
Scope of ids: When I print "ids", it's always empty string '', as I have intialized before. That's not what I want. I want the ids to have str(r['id']).join(',') if res: ids = '' for r in res['key']: ids = str(r['id']).join(',')

Simple Python REGEX Question

2007-05-11 Thread johnny
I need to get the content inside the bracket. eg. some characters before bracket (3.12345). I need to get whatever inside the (), in this case 3.12345. How do you do this with python regular expression? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to make Python poll a PYTHON METHOD

2007-05-10 Thread johnny
en all jobs are done, spawned threads join. When the next interval is up this process repeat itself. Thanks. On May 7, 11:19 pm, Nick Vatamaniuc <[EMAIL PROTECTED]> wrote: > On May 7, 10:42 pm, Nick Vatamaniuc <[EMAIL PROTECTED]> wrote: > > > > > On May 7, 10:07 pm, jo

newb: Python Module and Class Scope

2007-05-10 Thread johnny
Can a class inside a module, access a method, outside of class, but inside of the module? Eg. Can instance of class a access main, if so how? What is the scope of "def main()" interms of class A? myModule: class A: main() def main(): thnx. -- http://mail.python.org/mailman/listinfo/pyt

How to make Python poll a PYTHON METHOD

2007-05-07 Thread johnny
Is there a way to call a function on a specified interval(seconds, milliseconds) every time, like polling user defined method? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Any Good tools to create CSV Files?

2007-04-28 Thread johnny
Any Good tools to create CSV Files? ReportLab only creates pdf files. I need something to create CSV files. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: rewrite for achieving speedup

2007-04-17 Thread Johnny Blonde
thanks steve h., works like this just perfectly! steve b.: for the next time if i cannot figure it out i will just do it like this! thanks a lot guys, Frank -- http://mail.python.org/mailman/listinfo/python-list

rewrite for achieving speedup

2007-04-17 Thread Johnny Blonde
Hello Group! I really tried hard for two hours to rewrite the following expression (python 2.4): -- teilnehmer = [] for r in Reisen.select(AND(Reisen.q.RESVON <= datum, Reisen.q.RESBIS >= datum)): for g in r.BUCHUNGEN: for t in g.aktiveTeilnehmer:

newb: lxml objectify

2007-03-30 Thread johnny
Breakfast at Tiffany's Movie Classic Borat Movie Comedy How do you represent DVD id=1 and it's elements, and DVD id=2 and it's elements as child of root "Library"? Like this:? from lxml import etree from lxml import objectify root = objectify.Element("Library") child[1] = objectify.Elemen

newb: Python Floating Point

2007-03-15 Thread johnny
When I do the following, rounding to 2 decimal places doesn't seem to work. I should get 0.99 : >>> a =0.99 >>> a 0.98999 >>> round(a,2) 0.98999 >>> thank you. -- http://mail.python.org/mailman/listinfo/python-list

New Pythin user looking foe some good examples to study

2007-02-11 Thread Johnny Garcia
I have just discovered Python and am familiarizing myself with the syntax but I have always found that code examples where the best way for me to learn. Can anyone point me to a site with some good open source functioning python applications? I would appreciate any help. Also, does anyo

Python **kwargs ?

2007-01-31 Thread johnny
What is **kwargs mean in python? When you put double **, does it mean passing by reference? For example: def redirect_to(request, url, **kwargs): -- http://mail.python.org/mailman/listinfo/python-list

Any python based "Live Web Chat Support"

2007-01-12 Thread johnny
Is there any open source "live web chat support" program or script out there? Any you can recommend? -- http://mail.python.org/mailman/listinfo/python-list

WHAT is [0] in subprocess.Popen(blah).communicate()[0]

2006-12-14 Thread johnny
Can someone tell me what is the reason "[0]" appears after ".communicate()" For example: last_line=subprocess.Popen([r"tail","-n 1", "x.txt"], stdout=subprocess.PIPE).communicate()[0] Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: newb: Creating Exception

2006-12-13 Thread johnny
I checked out couple of books from Library, one that I like called "Foundation of Python Network Programming", this is what I needed, code with understandable explantion. ;) Thread pooling and many others. Thanks all of you for the help. Dustan wrote: > Dennis Lee Bieber wrote: > > On 13 Dec 20

Re: newb: Creating Exception

2006-12-12 Thread johnny
16:02:02 -0800, "johnny" <[EMAIL PROTECTED]> declaimed > the following in gmane.comp.python.general: > > > I want to print individual exception for database connection, sql > > execution, database closing, closing the cursor. Can I do it with one > > try..catch

Re: newb: SENDING os.system(encode_cmd) output to a logging file

2006-12-11 Thread johnny
I am doing the os.system(encode_cmd) within a thread. So you are saying, have each thread create a subprocess module. Did you mean, "Popen" (os.popen)? Like os.popen(encode_cmd) , not os.system(encode_cmd)? Gabriel Genellina wrote: > At Monday 11/12/2006 20:47, johnny wrote: >

AttributeError: Logger instance has no attribute 'setFormatter'

2006-12-11 Thread johnny
I am getting a log error. I am running ActiveState Python 2.4.3. Any help greatly appreciated. Here is my code: file.py - def main() setupLogging() blah def setupLogging(): global log log = logging.getLogger("ftp") formatter = logging.Formatter('%(name)-12s:

newb: Creating Exception

2006-12-11 Thread johnny
I want to print individual exception for database connection, sql execution, database closing, closing the cursor. Can I do it with one try..catch or I need a nested try...catch? conn = adodb.NewADOConnection('mysql') conn.Connect('localhost', 'temp', 'temp', 'temp') sql

newb: SENDING os.system(encode_cmd) output to a logging file

2006-12-11 Thread johnny
How do I pipe the output, generated from os.system(some_command), to the logging file? -- http://mail.python.org/mailman/listinfo/python-list

newb: logging.getLogger('') and logging.getLogger("something")

2006-12-11 Thread johnny
For getLogger, can you pass anything in there and it will return a object? Would that returned object, be your root logger? Thanks, -- http://mail.python.org/mailman/listinfo/python-list

ATTRIBUTE ERROR: 'module' object has no attribute 'ssl'

2006-12-09 Thread johnny
I am getting the following errors: File "H:\xampp\xampp\xampp\python\lib\httplib.py", line 679, in _send_output self.send(msg) File "H:\xampp\xampp\xampp\python\lib\httplib.py", line 646, in send self.connect() File "H:\xampp\xampp\xampp\python\lib\httplib.py", line 1073, in connect

ERROR CLOSING CONNECTION: mysql connection close

2006-12-08 Thread johnny
I am getting following connection error from my python script: conn.close() AttributeError: adodb_mysql instance has no attribute 'close' Here is my relevant code below: def worker(tq): while True: host, e = tq.get() c = ftplib.FTP(host) c.connect() try:

mySql and multiple connection for threads

2006-12-08 Thread johnny
How do you create multiple connection in the treads. Lets say I will have at most 5 threads and I want to create at most 5 connections. If I create a connection in the "worker method", does it create connection for each threads. def worker(tq): while True: host, e = tq.get()

Re: Multithreaded python script calls the COMMAND LINE

2006-12-07 Thread johnny
[EMAIL PROTECTED] wrote: > > That depends on how you invoke it: os.system creates a new shell which > in turn creates a new process; the spawn* functions do that directly. I am using os.system. Here is my code import ftplib, posixpath, threading from TaskQueue import TaskQueue def worker(tq):

Multithreaded python script calls the COMMAND LINE

2006-12-07 Thread johnny
I have python script does ftp download in a multi threaded way. Each thread downloads a file, close the file, calls the comman line to convert the .doc to pdf. Command line should go ahead and convert the file. My question is, when each thread calls the command line, does one command line process a

Re: newb: How to call one modue from other

2006-12-06 Thread johnny
Gabriel Genellina wrote: > Reading the Python Tutorial helps a lot. > I did read "Dive Into Python", one week ago. It's a good book, but it didn't cover this kind of situation. -- http://mail.python.org/mailman/listinfo/python-list

newb: What is the purpose of if __name__ == "__main__":

2006-12-06 Thread johnny
What is the purpose of if __name__ == "__main__": If you have a module, does it get called automatically? -- http://mail.python.org/mailman/listinfo/python-list

Re: newb: How to call one modue from other

2006-12-06 Thread johnny
johnny wrote: > I have a module called ftp and I have another module called > processKick. What I need is to have processKick, create fork and > execute ftp like below. > > Relevant processKick code as follows: > > def do_child_stuff(): > ftp > > def fo

newb: How to call one modue from other

2006-12-06 Thread johnny
I have a module called ftp and I have another module called processKick. What I need is to have processKick, create fork and execute ftp like below. Relevant processKick code as follows: def do_child_stuff(): ftp def fork_test(): pid = os.fork() if pid == 0: # child

newb: Can I use PYRO

2006-12-06 Thread johnny
What I want to do is the following: Web user uploads a word doc (web app written in php), and I need it to move the uploaded word doc, on to another machine and conver it to pdf. Then update the database and allow immediate pdf download. I am thinking of using ftp from machine 1 -> machine 2, th

PHP calls python: process vs threads

2006-12-06 Thread johnny
What I want to do is the following: Web user uploads a word doc, and I need it to move the uploaded word doc, on to another machine and conver it to pdf. Then update the database and allow immediate pdf download. I am thinking of using ftp from machine 1 -> machine 2, then convert doc to pdf on

Re: newb: Join two string variables

2006-12-05 Thread johnny
In my code, I have the following: p = posixpath.basename(e).strip filename = download_dir+p I am getting the following error: filename = download_dir+p TypeError: cannot concatenate 'str' and 'builtin_function_or_method' objects Cameron Walsh wrote: > johnny wrote

newb: Join two string variables

2006-12-05 Thread johnny
How do I join two string variables? I want to do: download_dir + filename. download_dir=r'c:/download/' filename =r'log.txt' I want to get something like this: c:/download/log.txt -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
lipse/workspace/src/ftp_download/' + p, 'wb') johnny wrote: > I am getting the following error: > > raise error_temp, resp > error_temp: 421 Unable to set up secure anonymous FTP > > Here is the code: > > import ftplib, posixpath, threading > from TaskQueue i

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
elif n.lower().endswith('.jpeg'): q.put((host, n)) finally: c.close() numworkers = 4 for i in range(numworkers): t = threading.Thread(target=worker, args=(q,)) t.setDaemon(True) t.start() q.join() print 'Done.&#x

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
It places the ftp downloaded contents on the same folder as the this ftp python script. How do I set a diffrent download folder location? johnny wrote: > It works using ftp.microsoft.com. But where does it put the downloaded > files? can I specify a download folder location? > > Jus

Re: Multiple FTP download using Muliti thread

2006-12-05 Thread johnny
It works using ftp.microsoft.com. But where does it put the downloaded files? can I specify a download folder location? Justin Ezequiel wrote: > johnny wrote: > > When I run the following script, with host and password and username > > changed, I get the following errors: >

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread johnny
When I run the following script, with host and password and username changed, I get the following errors: raise error_temp, resp error_temp: 421 Unable to set up secure anonymous FTP Dose the host should allow 4 simultaneous login at a time? Justin Ezequiel wrote: > import ftplib, posixpath, thre

Re: Multiple FTP download using Muliti thread

2006-12-04 Thread johnny
Where or What folder does the ftp files get downloaded to? Justin Ezequiel wrote: > import ftplib, posixpath, threading > from TaskQueue import TaskQueue > > def worker(tq): > while True: > host, e = tq.get() > > c = ftplib.FTP(host) > c.connect() > try: >

Multiple FTP download using Muliti thread

2006-11-30 Thread johnny
I have taken a look at the code that dose one download at time, in multi threaded manner: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/465531 What I wanted to do is, make it download multiple files at the same time. I am new to python and have gone over "Dive In To Python" yesterday.

Re: Default location while open an Excel file

2006-10-19 Thread Johnny
On Oct 20, 11:24 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Friday 20/10/2006 00:08, Johnny wrote: > > >doc.Workbooks.Open(excelFile, ReadOnly=True) > > >But the problem is when I only pass the filename to the Open() > >method, and of course the

Default location while open an Excel file

2006-10-19 Thread Johnny
the "somebody" happen to put the file on the default location of the Open() method? If so, does any one know the default location? Thanks for your consideration. Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: py.test munging strings in asserts?

2006-04-21 Thread Johnny deBris
Timothy Grant wrote: > > granted the left side of that equality could be messed up due to > create_output() NOT doing the right thing. But the right side is > simply the contents of the variable "text" so WHY is the first part of > the path being substituted with "..."? > Some grepping on '...' r

Re: How can I call a python method from the XML-RPC client in Java?

2006-04-20 Thread Johnny deBris
[EMAIL PROTECTED] wrote: > Hi all, > I have created a XML-RPC model (with server and client) written in > Java. > I want to call the methods in another XML-RPC model written in > Python. > I know that in Java, I can use like > "xmlrpc_client.excute("handler_name.method", param)" to call

Why the nonsense number appears?

2005-10-31 Thread Johnny Lee
nt time1, time2 1130748744.461 1130748744.500 >>> float(time2) - float(time1) 0.03934332275391 >>> Why are there so many nonsense tails? thanks for your help. Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: How to translate python into C

2005-10-29 Thread Johnny Lee
Thanks Szabolcs and Laurence, it's not the crash of python but the crash of cygwin. We can locate the line number but when we submit the crash to cygwin's mail list, they told us they don't speak python. So I'm just trying to re-produce the crash in C. Regard

Re: How to translate python into C

2005-10-28 Thread Johnny Lee
Thanks for your tips Niemann:) Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: How to translate python into C

2005-10-28 Thread Johnny Lee
a crush on cygwin. I used a session of python code to produce the crush, and want to translate it into C and reproduce it. Is the tools provided by you help with these issues? Of coz, I'll try them first. :) Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

How to translate python into C

2005-10-28 Thread Johnny Lee
translated first into C, where can I get the C source? Thanks for your help. Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on class member in python

2005-10-20 Thread Johnny Lee
It looks like there isn't a last word of the differrences -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on class member in python

2005-10-18 Thread Johnny Lee
Alex Martelli 写道: > Johnny Lee <[EMAIL PROTECTED]> wrote: > > > But I still wonder what's the difference between the A().getMember and > > A().member besides the style > > Without parentheses after it, getMember is a method. The difference > between a meth

Re: Question on class member in python

2005-10-18 Thread Johnny Lee
But I still wonder what's the difference between the A().getMember and A().member besides the style -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on class member in python

2005-10-17 Thread Johnny Lee
Peter Otten 写道: > Johnny Lee wrote: > > > Class A: > >def __init__(self): > > self.member = 1 > > > >def getMember(self): > > return self.member > > > > a = A() > > > > So, is there any difference betw

Question on class member in python

2005-10-17 Thread Johnny Lee
Class A: def __init__(self): self.member = 1 def getMember(self): return self.member a = A() So, is there any difference between a.member and a.getMember? thanks for your help. :) Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: A problem while using urllib

2005-10-13 Thread Johnny Lee
"r") >>> f.tell() 0L >>> f.readline() 'http://cn.realestate.yahoo.com\n' >>> f.tell() 28L -- Here is the a snapshot from cygwin: --- Johnny [EMAIL PROTECTED] /cygdrive/d $ python Python 2.4.1 (#1, May 27 2005, 18:02:40

Re: A problem while using urllib

2005-10-12 Thread Johnny Lee
Steve Holden wrote: > Steve Holden wrote: > > Johnny Lee wrote: > > [...] > > > >>I've sent the source, thanks for your help. > >> > > > > [...] > > Preliminary result, in case this rings bells with people who use urllib2 > >

Re: A problem while using urllib

2005-10-12 Thread Johnny Lee
Steve Holden wrote: > Johnny Lee wrote: > > Alex Martelli wrote: > > > >>Johnny Lee <[EMAIL PROTECTED]> wrote: > >> ... > >> > >>> try: > >>> webPage = urllib2.urlopen(url) > >>> excep

Re: A problem while using urllib

2005-10-11 Thread Johnny Lee
Alex Martelli wrote: > Johnny Lee <[EMAIL PROTECTED]> wrote: >... > >try: > > webPage = urllib2.urlopen(url) > >except urllib2.URLError: >... > >webPage.close() > >return True > > --

A problem while using urllib

2005-10-11 Thread Johnny Lee
raise urllib2.URLError until the program exits. I tried many ways to work it out, using urllib, set a sleep(1) in the filter (I thought it was the massive urls crashed the program). But none works. BTW, if I set the url from which the program crashed to base url, the program will still crashed at th

A problem while using anygui

2005-09-30 Thread Johnny Lee
, the program will never get the sentence "return n". I googled for the problem but didn't find much help. So any one here could give me a hand? thanks regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: Help on regular expression match

2005-09-23 Thread Johnny Lee
Fredrik Lundh wrote: > ".*" gives the longest possible match (you can think of it as searching back- > wards from the right end). if you want to search for "everything until a > given > character", searching for "[^x]*x" is often a better choice than ".*x". > > in this case, I suggest using some

Help on regular expression match

2005-09-22 Thread Johnny Lee
http://xxx.xxx.xxx";>xx In fact it's filtered from this kind of source: http://xxx.xxx.xxx";>xx" But some result are right, I wonder how can I get the all the answers clean like "http://xxx.xxx.xxx";? Thanks for your help. Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: No newline using printf

2005-09-15 Thread Johnny Lee
Roy Smith wrote: > > For closer control over output, use the write() function. You want > something like: > > import sys > for i in range(3): >sys.stdout.write (str(i)) here is the output of my machine: >>> import sys >>> for i in range(3): ... sys.stdout.write(str(i)) ... 012>>>

Re: An interesting python problem

2005-09-14 Thread Johnny Lee
bruno modulix wrote: > > I dont see anything interesting nor problematic here. If you understand > the difference between class attributes and instance attributes, the > difference between mutating an object and rebinding a name, and the > attribute lookup rules in Python, you'll find that all thi

An interesting python problem

2005-09-14 Thread Johnny Lee
Hi, Look at the follow command in python command line, See what's interesting?:) >>> class A: i = 0 >>> a = A() >>> b = A() >>> a.i = 1 >>> print a.i, b.i 1 0 --- >>> class A: arr = [] >>> a = A() >>> b = A() >>> a <__main__.A instance at 0x

Would you pls tell me a tool to step debug python program?

2005-09-12 Thread Johnny Lee
Hi, I've met a problem to understand the code at hand. And I wonder whether there is any useful tools to provide me a way of step debug? Just like the F10 in VC... Thanks for your help. Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the difference between VAR and _VAR_?

2005-09-08 Thread Johnny Lee
Erik Max Francis wrote: > > You're going to have to be more clear; I don't understand your question. > What's the difference between > > a = 1 > > and > > b = 1 > > besides the difference of name? > I thought there must be something special when you named a VAR with '_' the first ch

Re: What's the difference between VAR and _VAR_?

2005-09-08 Thread Johnny Lee
Erik Max Francis wrote: > > No, of course not. One defines a class varaible named `_passxxx_', the > other defines one named `passsxxx'. > I mean besides the difference of name... -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the difference between VAR and _VAR_?

2005-09-08 Thread Johnny Lee
As what you said, the following two code section is totally the same? (I) class TestResult: _passxxx_ = "pass" (II) class TestResult: passxxx = "pass" -- http://mail.python.org/mailman/listinfo/python-list

What's the difference between VAR and _VAR_?

2005-09-08 Thread Johnny Lee
Hi, I'm new in python and I was wondering what's the difference between the two code section below: (I) class TestResult: _pass_ = "pass" _fail_ = "fail" _exception_ = "exception" (II) class TestResult: pass = "pass" fail = "fail" exception = "ex

What's the matter with this code section?

2005-08-24 Thread Johnny Lee
Here is the source: #! /bin/python [EMAIL PROTECTED] This is a xunit test framework for python, see TDD for more details class TestCase: def setUp(self): print "setUp in TestCase" pass def __init__(self, name): print "__init__ in Te

What's the difference between built-in func getattr() and normal call of a func of a class

2005-08-23 Thread Johnny
Hi, I wonder what is the difference between the built-in function getattr() and the normal call of a function of a class. Here is the details: getattr( object, name[, default]) Return the value of the named attributed of object. name must be a string. If the string is the name of one of the

Re: What's the difference between built-in func getattr() and normal call of a func of a class

2005-08-23 Thread Johnny
Diez B. Roggisch wrote: > No, it will only return _always_ a value if you provide a default one. > If not, they have the exact same semantics. > > What you've got here is something usually called "syntactic sugaring" - > a specialized syntax that performs certain instructions that _could_ be > don

another title shortener

2005-05-18 Thread Johnny Gentile
. [EMAIL PROTECTED] wrote: > Best Viewed at << 1024x768 >> > http://groups-beta.google.com/group/alt.religion.christian/browse_thread/thread/73352e0ed6923d23/1ea6c7a1ea6923ab?hl=en#1ea6c7a1ea6923ab > > *** > ***

Re: space saving retitle of thread

2005-05-16 Thread Johnny Gentile
And this is OK w/ Google? -- http://mail.python.org/mailman/listinfo/python-list

thread title's getting shorter...

2005-05-15 Thread Johnny Gentile
. -- http://mail.python.org/mailman/listinfo/python-list

stop

2005-05-14 Thread Johnny Gentile
Enough salvation for one day. -- http://mail.python.org/mailman/listinfo/python-list

space saving retitle of thread

2005-05-14 Thread Johnny Gentile
aa. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ron Grossi: God is not a man

2005-04-30 Thread Johnny Gentile
>From the Book of Armaments: "And Saint Attila raised the hand grenade up on high, saying, 'Oh, Lord, bless this thy hand grenade that with it thou mayest blow thy enemies to tiny bits, in thy mercy.' And the Lord did grin, and people did feast upon the lambs, and sloths, and carp, and anchovies,

Re: Ron Grossi: God is not a man

2005-04-29 Thread Johnny Gentile
Donald - go away. Far away. Now. And, for the last time (hopefully), stop crossposting to rec.music.beatles. Go sell crazy somewhere else. We're all stocked up. Donald L McDaniel wrote: > AKA wrote: > > "Donald L McDaniel" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> MC05 w

Re: Ron Grossi: God is not a man

2005-04-28 Thread Johnny Gentile
Can we stop crossposting this shit to the Beatles NG, please? Donald L McDaniel wrote: > Matt Hayden wrote: > > Johnny Gentile wrote: > >> C'mon. Everyone knows God plays a Martin. > > > > I dunno. I think God has a honkin' big collection so he won

Re: Ron Grossi: God is not a man

2005-04-24 Thread Johnny Gentile
C'mon. Everyone knows God plays a Martin. -- http://mail.python.org/mailman/listinfo/python-list

Spamming nut won't go away

2005-04-22 Thread Johnny Gentile
There is no God. OK, Ron, discuss. Ron wrote: > Reports to [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], > [EMAIL PROTECTED], [EMAIL PROTECTED] > > And do not feed the troll! -- http://mail.python.org/mailman/listinfo/python-list

Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? GOOGLE·NEWSGROUP·POST·146

2005-04-21 Thread Johnny Gentile
You seem to have a lot of questions for someone who talks to God every three minutes. What do you guys do, discuss the Yankees or something? -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Language for Systems Administrator

2005-04-11 Thread johnny . shz
Kanthi Kiran Narisetti wrote: > Hi All, > > I am Windows Systems Administrator(planning to migrate to Linux > administration in near future), I have occassionally written few batch > files and Vbscripts to automate my tasks. > > Now I have strong interest to learn a programming language that would

Re: Unbinding multiple variables

2005-01-24 Thread Johnny Lin
thanks again for all the help! especially the advice on ideas of tracking down the memory leak :). (sorry for not mentioning it earlier...i had thought deleting everything might be a quick and dirty way short-term fix. :P) best, -Johnny -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >