Can someone help please

2011-07-21 Thread Gary
Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but would like to fix the code. Thanks total = ' ' os.chdir('/home/woodygar/Deskto

Design advice for unit test asserters

2005-04-21 Thread Gary
ain, I wonder if I'm missing a better or more natural way to solve this problem. Thanks, Gary -- http://mail.python.org/mailman/listinfo/python-list

Re: Design advice for unit test asserters

2005-04-27 Thread Gary
First, thanks to both Kent and Edvard for useful comments. I certainly need to consider whether it make sense to switch to py.test at this time; its simplicity is attractive. In response to Edvards question: Edvard Majakari wrote: > "Gary" <[EMAIL PR

hi can someone help please key bind

2011-10-15 Thread Gary
Hi im trying to use key bind on Tkinter to call this function def Start(): for i in range(60,-1,-1): ent['text'] = i time.sleep(1) root.update() ent['text'] = 'Time Out!' root.update() i know the function is ok as i have assigned a button and i calls the function

Business & Spirituality

2005-05-17 Thread Gary
If you are interested in Business and Spirituality visit us at http://www.executivecoachingservices.ca -- http://mail.python.org/mailman/listinfo/python-list

Empty string namespace on XP in minidom

2007-07-07 Thread Gary
uot;, "&").replace("<", "<") AttributeError: 'NoneType' object has no attribute 'replace' and it's working on Linux Python 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type "help", &quo

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
Hi! I'd like to join the fray, as the person who posted that original LJ rant. First, some full disclosure, and stampings out of what seem to me to be misconceptions... 1) I am not a CS major. I majored in Computer Animation at an art college. I'm quite well aware that I don't know all there is to

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
Hi! I'd like to join the fray, as the person who posted that original LJ rant. First, some full disclosure, and stampings out of what seem to me to be misconceptions... 1) I am not a CS major. I majored in Computer Animation at an art college. I'm quite well aware that I don't know all there is to

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 3:19 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > The problem is that to everybody else in the world, indentation > in Python represents control flow nesting, not GUI widget > nesting. Thanks, Grant. That's the first solid reasoning I've seen, and it's a very solid argument, as well.

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 3:50 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > You have been done a disservice > by whoever wrote the Maya python bindings, as far as using this tool > to improve your knowledge and understanding of Python goes. No worries there. I'm definitely not using Maya as the way to learn

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 6:44 pm, Ross Ridge <[EMAIL PROTECTED]> wrote: > Sam <[EMAIL PROTECTED]> wrote: > >cmds.window(t='gwfUI Builder') > >cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, > >100))) > >cmds.paneLayout(configuration='horizontal2') > >cmds.frameLayout(l='Layouts')

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 6:44 pm, Ross Ridge <[EMAIL PROTECTED]> wrote: > Sam <[EMAIL PROTECTED]> wrote: > >cmds.window(t='gwfUI Builder') > >cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, > >100))) > >cmds.paneLayout(configuration='horizontal2') > >cmds.frameLayout(l='Layouts')

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 7:01 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Hi, Gary. Welcome to Python. I hope you will take some of the reaction > you got as initiatory ribbing. Thanks, Terry, and absolutely! You guys are quite tame compared to some of the lions whose dens I'

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 7:01 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Hi, Gary. Welcome to Python. I hope you will take some of the reaction > you got as initiatory ribbing. Thanks, Terry, and absolutely! You guys are quite tame compared to some of the lions whose dens I'

Re: Allowing Arbitrary Indentation in Python

2007-12-20 Thread Gary
On Dec 19, 10:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > ElementTree is a good candidate for processing xml: > http://effbot.org/zone/element.htm > It provides a "natural" way to access elements and attributes, instead of > writing the same handler again and again or using slow DOM

Re: Allowing Arbitrary Indentation in Python

2007-12-20 Thread Gary
On Dec 19, 10:10 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > ElementTree is a good candidate for processing xml: > http://effbot.org/zone/element.htm > It provides a "natural" way to access elements and attributes, instead of > writing the same handler again and again or using slow DOM

Re: file write collision consideration

2009-01-22 Thread Gary
It would help to know which version of Python when giving examples... I recollect that so-called mutex operation wasn't actually thread safe when using Python 2.5, but perhaps that was wrong, or subsequent versions have fixed that? -- http://mail.python.org/mailman/listinfo/python-list

Proxy server?

2008-07-28 Thread Gary
I've seen examples for HTTP and FTP use, but not for simply any TCP data on any port, which is what I require. Can anyone please point me in the right direction? TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Proxy server?

2008-07-28 Thread Gary
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gary wrote: > For what? A non-transparent proxy, for anonymity purposes only. -- http://mail.python.org/mailman/listinfo/python-list

Re: Proxy server?

2008-07-30 Thread Gary
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gary schrieb: > > "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > You can't make any TCP/IP communication run through a pro

Re: problems with looping, i suppose

2006-03-27 Thread Gary
for file "idle.pyw". (NB: At the moment, I'm running a WinXP box and that's where it is here. My poor old mind can't dredge up whether it's in the same relative place in say, a Linux installation.) "IDLE" isn't perfect but it'll get you started.

Re: Append to python List

2013-05-09 Thread Gary Herron
On 05/08/2013 11:36 PM, RAHUL RAJ wrote: Checkout the following code: sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y] output=[] output=[x for x in sample2 if x not in output] This statement is not doing what you expect. It is not building a list in the variable named outpu

Re: create new python file

2013-06-04 Thread Gary Herron
file. For instance: with open("Hello.py", "w") as f: print("print('Hello world')\n", file=f) will create a file containing a simple one-line Python program. If you meant something else, then please take the time to provide more detail. Gary

Re: Default Value

2013-06-19 Thread Gary Herron
the function (or rather with each call to the function that does not supply its own value for L). Gary Herron print(f(1)) print(f(2)) print(f(3)) This will print [1] [1, 2] [1, 2, 3] How the list is retained between successive calls? And why? -- Dr. Gary Herron Department of Computer Sc

Re: n00b question on spacing

2013-06-21 Thread Gary Herron
all in one statement.) fmt = "Item wrote to MongoDB database %s/%s" msg = fmt % (settings['MONGODB_DB'], settings['MONGODB_COLLECTION']) log.msg(msg, level=log.DEBUG, spider=spider) Gary Herron -- Dr. Gary Herron Department of Computer Scien

Re: analyzing time

2013-07-05 Thread Gary Herron
somewhere that discusses statistics and analysis. Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: RAM slots problem

2013-07-09 Thread Gary Herron
On 07/08/2013 10:06 PM, saadharana wrote: I've got some annoying problem with RAM. I was depth cleaning my case, everything regular, it wasn't my first time. And when I put it all together and powered it on, it wasn't working, just beeps fast. But how that happend when I put all back in like it w

Re: Storing a very large number

2013-07-17 Thread Gary Herron
dex the 209th character: >>> str(12**345) '2077446682327378559843444695582704973572786912705232236931705903179519704325276892191015329301807037794598378537132233994613616420526484930777273718077112370160566492728059713895917217042738578562985773221381211423961068296308572143393854703167926779929682604844469621152130457090778409728703018428147734622401526422774317612081074841839507864189781700150115308454681772032' >>> str(12**345)[209

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread Gary Herron
hed parentheses. ... n = n2 / m ... r = n2 - n * m ... rtn.append(m * x[n] + r * (x[n + 1] - x[n])) ... print 'n2 =', n2, ': n =', n, ' r =' , r, ' rtn =', rtn ... rtn However, I am getting the error "expected an indented block"

Re: Has anyone gotten Pyglet to work

2013-07-29 Thread Gary Herron
On 07/29/2013 01:56 PM, Devyn Collier Johnson wrote: I tried Pyglet in a Python3 and a Python2 script, but both fail. The error code is below and the script is attached. The 'boot.ogg' file is Ubuntu's default bootup sound. I got my code from this link (http://guzalexander.com/2012/08/17/playin

Re: binary key in dictionary

2013-07-30 Thread Gary Herron
tes a key-value pair in the dictionary, but the line d[2] += 98 tries to add 98 to an already existing value at d[2], But there is no value at d[2] until you set it: d[2] = 0 # for instance You may want to look at defaultdict from the collections module. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: What’s the differences between these two pieces of code ?

2012-07-06 Thread Gary Herron
gh 12. What are we supposed to be comparing? Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: python CAD libraries?

2012-09-10 Thread Gary Herron
recommend some good ones for me? Thanks a lot!! Try PythonCAD: http://sourceforge.net/projects/pythoncad/ (Google would have been faster. :-) ) Gary Herron -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo

Re: how to insert random error in a programming

2012-10-15 Thread Gary Herron
On 10/15/2012 06:55 AM, Debashish Saha wrote: how to insert random error in a programming? Drink several beers before you start programming. :-) -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo

Re: date and time comparison how to

2012-10-29 Thread Gary Herron
dt = datetime.datetime.fromtimestamp(mtime) -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: logger doesn't roll over

2012-11-21 Thread Gary Chambers
Ron, LOGFILE, maxBytes=(1048576*10), backupCount=5 What am I doing wrong here, I don't get it. 10 * 1048576 = 10MB -- GC -- http://mail.python.org/mailman/listinfo/python-list

Re: Conversion of List of Tuples

2012-12-04 Thread Gary Herron
On 12/03/2012 11:58 AM, subhabangal...@gmail.com wrote: [(1,2), (3,4)] >>> L=[(1,2), (3,4)] >>> >>> [b for a in L for b in a] [1, 2, 3, 4] -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.

Gary Sokolich - 3463

2012-12-22 Thread Gary Sokolisch
3463 W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 Local PD 949-644-3681 Residence: 1029 S Point View St Los Angeles CA 90035 (310) 650-5379 and 5309 Victoria Ave., Los Angeles, CA, 90043 http://web.archive.org/web/20080821231423/http://www.tbpe.state.tx.us/da

Re: Python, email temperature

2012-12-22 Thread Gary Herron
Could it be this easy? In one spot you refer to it as "cpu_temperature" and in another as "cputemp". If that's not it, you'd probably better show us your *real* code, otherwise we're just guessing. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Python, email temperature

2012-12-22 Thread Gary Herron
On 12/22/2012 12:54 PM, KarlE wrote: On Saturday, December 22, 2012 9:44:39 PM UTC+1, Joel Goldstick wrote: On Sat, Dec 22, 2012 at 3:36 PM, Alexander Ranstam wrote: Hi! Im totally new to Python, and im using it on my Raspberry pi. I found a program that sends an email, and one that checks

Re: how to solve complex equation?

2013-01-01 Thread Gary Herron
of study. No one is going to put that kind of time into answering your question here. -- Dr. Gary Herron Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: Using an object inside a class

2012-01-23 Thread Gary Herron
that being the builtins. -- Gary Herron, PhD. Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting 1172026 entries

2012-05-06 Thread Gary Herron
or deletion and garbage collection. Instead do the in-place sort: temp.sort() Same result, less thrashing. This will make your program slightly more efficient, HOWEVER, it is not the solution of your week-long sort problem. Gary Herron On Sun, May 6, 2012 at 6:26 PM, J. Mwebaze <

Kathryn Sokolich Spawned A Crook

2011-06-10 Thread Gary Sokolisch
Sure did http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich

Re: Is there a way to customise math.sqrt(x) for some x?

2011-07-16 Thread Gary Herron
math # to get your stuff but named math. Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Can someone help please

2011-07-21 Thread Gary Herron
On 07/21/2011 10:02 AM, Gary wrote: Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but would like to fix the code. Thanks total

Re: Can someone help please

2011-07-21 Thread Gary Herron
On 07/21/2011 10:23 AM, Billy Mays wrote: On 07/21/2011 01:02 PM, Gary wrote: Hi Can someone help me with this code below please, For some reason it will not send me the first text file in the directory. I made up an empty file a.txt file with nothing on it and it sends the files i need but

Re: Can someone help please

2011-07-21 Thread Gary Wood
t files in the body of an email Thanks On Thu, Jul 21, 2011 at 6:23 PM, Billy Mays < 81282ed9a88799d21e77957df2d84bd6514d9...@myhashismyemail.com> wrote: > On 07/21/2011 01:02 PM, Gary wrote: > >> Hi >> Can someone help me with this code below please, >> For some r

Re: how to separate a list into two lists?

2011-08-06 Thread Gary Herron
, any methods to make this done? List comprehension: L1 = [item[0] for item in L] L2 = [item[1] for item in L] which *is* still a loop. (You are going to have to write *really* arcane code to have no loop.) Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: pairwise combination of two lists

2011-08-17 Thread Gary Herron
nt function to do this, especially when li1 and li2 are long lists. I found zip() but it only gives [('a', '1'), ('b', '2')], not exactly what I am looking for. Thank you. - Yingjie >>> li1 = ['a', 'b'] >>> li2 = ['1', '2'] >>> print [a+b for a in li1 for b in li2] ['a1', 'a2', 'b1', 'b2'] Gary Herron -- http://mail.python.org/mailman/listinfo/python-list

Re: Floating point multiplication in python

2011-09-06 Thread Gary Herron
On 09/05/2011 10:57 PM, xyz wrote: hi all: As we know , 1.1 * 1.1 is 1.21 . But in python ,I got following : 1.1 * 1.1 1.2102 why python get wrong result? Who can tell me where's the 0.0002 from? It's not a python errorIt's the nature of floating point arithm

Re: I am confused by

2011-09-07 Thread Gary Herron
re is a "deepcopy" in the library which may do what you expect. Gary Herron -- Gary Herron, PhD. Department of Computer Science DigiPen Institute of Technology (425) 895-4418 -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2011-04-01 Thread Gary Herron
On 04/01/2011 12:52 PM, Karl wrote: Hello, one beginner question: aList = [0, 1, 2, 3, 4] bList = [2*i for i in aList] sum = 0 for j in bList: sum = sum + bList[j] Your j is already an element of bList. You don't need to index bList again. Instead do for b in bList:

Re: Fibonacci series recursion error

2011-04-29 Thread Gary Herron
comparison [36355 refs] can any one help You correctly test for n==1, but what about when n==2?When the recursion works its way down to fib(2), you call both fib(1) and fib(0), but the latter starts an infinite sequence of calls to fib(-1), fib(-2) and so on without end. Gary Herron -- http

Re: None is None but not working

2017-09-27 Thread Gary Herron
   if data is None: ... and I get output of None None {'MeetingDate': '2017-01- ... and so on. How can I actually get this to check? If i use type(data) I also get None. Cheers Sayth -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Please Help

2018-01-26 Thread Gary Herron
know what that means?  The answer you might have expected (i.e. 260) does not fit in the 0 ... 255 range of 8 bits, and so the result has overflowed and "wrapped around" to produce 4. Try this for a simpler example of the same: >>> np.uint8(260) 4 Gary Herron -- Dr. Gary

Re: =- and -= snag

2023-03-13 Thread Gary Herron
instead of -=. Isn't it unpythonic to be able to make a mistake like that? Regards, Morten These all mean the same thing, but I don't see a good way to designate the second or third as an error. x = -5 x=-5 x =- 5 Dr. Gary Herron Professor of Computer Science DigiPen Institute of

Re: Standard class for time *period*?

2023-03-27 Thread Gary Herron
The Python standard library module datetime seems to be what you want.  It has objects representing date/times, and deltatimes (i.e., durations).  These can be timezone aware or not as you wish. Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology On 3/27/23 6:00 AM

Re: Change first occurrence of character x in a string - how?

2021-02-14 Thread Gary Herron
requirement of needing to change '.' to '@'. Alternatively is there an RE 'match' function that would test if linux-r...@vger.kernel.org matches linux-raid.vger.kernel.org? I don't really care if the '.' are all regarded as wild cards, the match will

Re: A strange list concatenation result

2016-08-11 Thread Gary Herron
, 6] In this next example, there are two separate lists: >>> list1 = [1,2,3] >>> list2 = [1,2,3] >>> list1 += [4,5,6] >>> print(list1, list2) [1, 2, 3, 4, 5, 6] [1, 2, 3] Does that help? Gary Herron -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

DED processing

2016-08-22 Thread Gary Sublett
I have to go out for a while, so for DED processing two options from my end: 1. Process as you all have been in the past for now. If you all do this, the records that have not been mailed prior to the latest list are contained in a MailManage Job name DED_master. If you chose to process as in th

Re: degrees and radians.

2016-08-23 Thread Gary Herron
libraries Just for what its worth. Do you really need anything more complex than this? >>> toRadians = math.pi/180.0 >>> math.sin(90*toRadians) 1.0 Perhaps I'm not understanding what you mean by "clunky", but this seems pretty clean and simple to me. Gary H

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread Gary Herron
e guesswork: if cv2.rectangle draws a rectangle, what does it return? If it doesn't return anything, the line im = cv2.rectangle(...) is how im gets the value of None. -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: why this code loop forever after a draw a rectangle

2016-09-16 Thread Gary Herron
manual for opencv, we see that cv2.rectangle does indeed return None: Python: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0) → None So the first pass through your loop does indeed set im to None with the line im = cv2.rectangle(im.copy(), (x,y), (x+w,

Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Gary Herron
e: >>> >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--foo', action='append') >>> parser.parse_args('--foo 1 --foo 2'.split()) Namespace(foo=['1', '2']) I hope that helps. -- Dr. Gary Herr

Re: Weird side effect of default parameter

2018-05-03 Thread Gary Herron
This is a well known feature of Python.   It's a very common "gotcha" to new Python programmers. Google "Mutable default parameters in Python" for long list of explanations and fixes. In short, don't use a mutable object as a default parameter. Gary Herron

Re: Numpy array

2018-05-20 Thread Gary Herron
second columns alone for x and y respectively. I am confused as to how data[:10] gives the first 10 rows while data[:,0] gives all rows -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: How can an int be '+' with a tuple?

2018-06-02 Thread Gary Herron
the "any + context" at line 18. The "any" was passed as an integer from line 43 and the "context" was defined as a tuple at line 35. This concatenation works! how? Best Regards, Jach Fong --- This email has been checked for viruses by Avast antivirus softwa

Re: curve_fit in scipy

2018-06-19 Thread Gary Herron
_fit(test_func, x_data, y_data, p0=[2, 2]) print(params) plt.figure(figsize=(6, 4)) plt.scatter(x_data, y_data, label='Data') plt.plot(x_data, test_func(x_data, params[0], params[1]), label='Fitted function') plt.legend(loc='best&#

Re: Python Probability

2018-09-11 Thread Gary Herron
table. But its giving me zeros or 333. And to get 5digits after the zero i wanted to use "%.5f " %First. Could you help me to finish this, and tell me what am I doing wrong? Thank you -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895

Re: Python Probability

2018-09-11 Thread Gary Herron
make a table. But its giving me zeros or 333. And to get 5digits after the zero i wanted to use "%.5f " %First. Could you help me to finish this, and tell me what am I doing wrong? Thank you -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895

Re: trying to connect the setarrange and blendshape input target weight while running the script am getting error in the 8th line. (for each in lip_val_list: )

2018-09-13 Thread Gary Herron
lendshape, what's an input target weight,  what does it mean to connect them?  Either none of that is important (as is the case in this simple indentation error), so don't include such distractions, or it does matter, so take the time to define those terms. Gary Herron On

Re: import inspect error

2018-09-17 Thread Gary Herron
You appear to have a local file named keyword.py which is hiding a python installation file of the same name. Gary Herron On 09/17/2018 01:06 AM, jupiter@gmail.com wrote: I have following errors running on Ubuntu 18, any insight how to fix it? Thank you. Python 2.7.15rc1 (default

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Gary Herron
We're not here to do your homework for you, and you won't learn anything if we do.  You make an attempt at solving this, asking any specific Python related questions you need help with, and you'll find this to be prompt, friendly, and helpful group. Gary Herron -- Dr. Gary

Re: My python code has suddenly started to give me error. Please see code below**

2018-10-08 Thread Gary Herron
t((UL1)/(10**(count-1: B12 B1=(B11,"-",B12,"M") B1 -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Advice on law firm

2018-10-18 Thread Gary Herron
suits? Sent from Mail for Windows 10 -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: namedtuples anamoly

2018-10-18 Thread Gary Herron
ou destroy the   it so carefully stored in Grade.ID. So now the real question is:  What were you trying to accomplish with the assignment?  Tell us, and let's see if we can find a way to accomplish yor goal without wrecking the internals of the Grade class. Gary Herron it has impact on

Re: what is the difference between one-line-operation and 2-line-operation

2016-04-25 Thread Gary Herron
cond time, the iterator is exhausted and returns no objects. A simpler example: "b" is a map object (iterator), then list(b) is run twice. >>> a = [1,2,3] >>> b = map(lambda e: e+1, a) >>> b >>> list(b) [2, 3, 4] >>> list(b) [] I h

Re: def __init__(self):

2016-04-26 Thread Gary Herron
_ method is the constructor for instances of a class. It is not required, but the situations in which a constructor is not needed are few and unusual. If you don't know object-oriented-programming, then I'd suggest you put that high on your list of things to learn. It's a valuab

Re: def __init__(self):

2016-04-26 Thread Gary Herron
my original answer (that it's the constructor), and suggest ignoring the overly pedantic (and confusing) response to the contrary. -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Image loading problem

2016-05-21 Thread Gary Herron
Label(win, image=img).pack() return img saved_img = load_img(win) ... Gary Herron -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Spreading a class over multiple files

2016-06-05 Thread Gary Herron
esult will be essentially the same as if all three methods were defined in MainCLass. Gary Herron -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 My primary use case is when I create a "Model" class to reflect an entire SQL database.

Re: Operator precedence problem

2016-06-06 Thread Gary Herron
", "credits" or "license" for more information. >>> 2 ** 3 ** 2 512 >>> 2 ** (3 ** 2) 512 >>> (2 ** 3) ** 2 64 >>> Here's the relevant documentation page: https://docs.python.org/3/reference/expressions.html Look for "... except

Re: CAD Application

2019-05-06 Thread Gary Herron
it's still available for download. -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Multiprocessing and memory management

2019-07-03 Thread Gary Herron
2156 Koyukuk Drive Fairbanks AK 99775-7320 Work: 907-474-5172 cell: 907-328-9145 -- Dr. Gary Herron Professor of Computer Science DigiPen Institute of Technology (425) 895-4418 -- https://mail.python.org/mailman/listinfo/python-list

Re: Calculations and Variables

2019-10-31 Thread Gary Herron
uot; % eachPay) I am aiming for the result of 43.6, but somehow get the result of 44.44. (meal cost: 200) (Tip: 9) (people: 5) I seem to do the calculation below, but get different results each time. Total * Percentage Amount / 100 -- Dr. Gary Herron Professor of Computer Science DigiPen Ins

Re: Python Source Code for a HTTP Proxy

2005-09-23 Thread Gary Herron
llothar wrote: >Hello, > >i'm looking for a simple http proxy in python. >Does anybody know about something like this ? > > > Here's a list, maintained by Alan Kennedy, of about 20 proxys written in Python: http://xhaus.com/alan/python/proxies.ht

Re: What do you use as symbols for Python ?

2005-11-10 Thread Gary Herron
D > > Another similar approach that keeps those values together in a single namespace is this (my favorite): class State: OPENED, CLOSED, ERROR = range(3) Then you can refer to the values as State.OPENED State.CLOSED State.ERROR The extra clarity (and slight wordine

Re: weird problem with os.chmod

2005-11-11 Thread Gary Herron
James Colannino wrote: >James Colannino wrote: > > > >>So then I entered the command print 0600, and saw that the >>actual number being output was 384 (why would it output 384?!) >> >> >> >> > >Ok, so further research revealed that 0600 is actually the octal >representation for 384 (which

How to write an API for a Python application?

2005-11-14 Thread Gary Kshepitzki
of doing it as a python COM server but I am not familiar with COM and I saw that implementing a COM server with events in python is not trivial. Is there a better (or simpler) solution?What are the common ways for doing that?   Any answer would be greatly appreciated. Regards Gary   -- http

Re: how to convert between type string and token

2005-11-14 Thread Gary Herron
er results faster. Good luck, Gary Herron enas khalil wrote: > > hello all > when i run the code : > # -*- coding: cp1256 -*- > from nltk.tagger import * > from nltk.corpus import brown > from nltk.tokenizer import WhitespaceTokenizer > # Tokeni

Sending an event from a python COM server to a VB COM client

2005-11-15 Thread Gary Kshepitzki
highly appreciated. Regards Gary -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending an event from a python COM server to a VB COM client

2005-11-16 Thread Gary Kshepitzki
I am really looking for an example that will spell things out for me. There's a lot of 'wrapping' happening under the hood in this technology and I am kind of lost between what is done for me on each side and what I should explicitly do my self. Thanks again for taking the

How to write an API for a Python application?

2005-11-16 Thread Gary Kshepitzki
doing it as a python COM server but I am not familiar with COM and I saw that implementing a COM server with events in python is not trivial for me. Is there a better (or simpler) solution? What are the common ways for doing that? Any answer would be highly appreciated. Regards Gary -- http

Re: How to write an API for a Python application?

2005-11-16 Thread Gary Kshepitzki
Thanks Its an interesting solution but I need a more closely coupled solution, with real time events, so the communication really has to be 2 ways, and not by polling. Thanks for putting the time and though. Gary <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > While no

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-04 Thread Gary Herron
shed by the comma. Perhaps being more explicit about the returned tuple would produce what you want. lambda x : (x/60,x%60) Gary Herron > > [EMAIL PROTECTED] ~ $ python > Python 2.4.2 (#1, Nov 18 2005, 19:32:15) > [GCC 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on lin

Re: Reaching the real world

2005-01-04 Thread Gary Richardson
"Fuzzyman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a friend who would like to move and program lights and other > electric/electro-mechanical devices by computer. I would like to help - > and needless to say Python would be an ideal language for the > 'programmers inte

Re: IPython colors in windows

2005-02-05 Thread Gary Bishop
Claudio Grondi <[EMAIL PROTECTED]> wrote: > "Ashot" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > > whoa, that was quick, looks like it works for me. Thanks a lot! > > It would be nice to be able to set the colors in the prefs file, although > > its possible to edit the pyC

Re: IPython colors in windows

2005-02-05 Thread Gary Bishop
On SourceForge you will find release 1.12 of my Python readline module. If you don't want to hack the colors, there is no reason to upgrade from 1.11 to 1.12. They *should* work the same. But if you'd like to hack the iPython colors this new version makes it possible. In your ipythonrc file add a

Re: Slicing every element of a list

2005-07-12 Thread Gary Herron
;\t\"') > >This of course worked, but why didn't the first one work. Further why >didn't the first one return an error? > > Dr. Gary Herron Digipen Institute of Technology -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >