Need bluez/python ( PyBluez) method to access BlueZ data- Please Help!

2010-03-02 Thread Isaac
the D-Bus API and can directly access the BlueZ file system to get this parsed data. Can PyBlueZ do this? If not, any suggestions would be immensely appreciated. Thanks! Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Isaac To
On Sat, Jun 29, 2013 at 9:36 AM, Ethan Furman wrote: > On 06/27/2013 03:49 PM, Steven D'Aprano wrote: > >> >> Libraries should not call sys.exit, or raise SystemExit. Whether to quit >> or not is not the library's decision to make, that decision belongs to >> the application layer. Yes, the appli

Question about nested loop

2012-12-31 Thread Isaac Won
m more? I really appreciate any help. Thank you, Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about nested loop

2012-12-31 Thread Isaac Won
On Monday, December 31, 2012 5:25:16 AM UTC-6, Gisle Vanem wrote: > "Isaac Won" wrote: > > > > > while c < 10: > > >c = c + 1 > > > > > >for columns in ( raw.strip().split() for raw in f ): > > > > &

Re: Question about nested loop

2012-12-31 Thread Isaac Won
On Monday, December 31, 2012 6:59:34 AM UTC-6, Hans Mulder wrote: > On 31/12/12 11:02:56, Isaac Won wrote: > > > Hi all, > > > I am a very novice for Python. Currently, I am trying to read continuous > > > columns repeatedly in the form of array.

avoding the accumulation of array when using loop.

2013-01-02 Thread Isaac Won
. Do you guys have any idea? I will really appreciate ant help and idea. Thanks, Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: avoding the accumulation of array when using loop.

2013-01-02 Thread Isaac Won
On Wednesday, January 2, 2013 5:54:18 PM UTC-6, Dave Angel wrote: > On 01/02/2013 05:21 PM, Isaac Won wrote: > > > Hi all, > > > > > > Thanks to Hans, I have had a good progress on my problem. > > > > > > Followings are Hans's Id

Memory error with quadratic interpolation

2013-01-22 Thread Isaac Won
The number of data is 31747. Thank you, Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Tuesday, January 22, 2013 10:06:41 PM UTC-6, Isaac Won wrote: > Hi all, > > > > I have tried to use different interpolation methods with Scipy. My code seems > just fine with linear interpolation, but shows memory error with quadratic. I > am a novice for python. I wil

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Wednesday, January 23, 2013 4:08:13 AM UTC-6, Oscar Benjamin wrote: > On 23 January 2013 08:55, Ulrich Eckhardt > > wrote: > > > Am 23.01.2013 05:06, schrieb Isaac Won: > > > > > >> I have tried to use different interpolation methods with Scipy. My &

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Wednesday, January 23, 2013 4:08:13 AM UTC-6, Oscar Benjamin wrote: > On 23 January 2013 08:55, Ulrich Eckhardt > > > > > Am 23.01.2013 05:06, schrieb Isaac Won: > > > > > >> I have tried to use different interpolation methods with Scipy. My &

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Wednesday, January 23, 2013 2:55:14 AM UTC-6, Ulrich Eckhardt wrote: > Am 23.01.2013 05:06, schrieb Isaac Won: > > > I have tried to use different interpolation methods with Scipy. My > > > code seems just fine with linear interpolation, but shows memory > > >

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Wednesday, January 23, 2013 8:40:54 AM UTC-6, Oscar Benjamin wrote: > On 23 January 2013 14:28, Isaac Won wrote: > > > On Wednesday, January 23, 2013 4:08:13 AM UTC-6, Oscar Benjamin wrote: > > > > > > To Oscar > > > My actual error message is: >

Re: Memory error with quadratic interpolation

2013-01-23 Thread Isaac Won
On Wednesday, January 23, 2013 10:51:43 AM UTC-6, Oscar Benjamin wrote: > On 23 January 2013 14:57, Isaac Won wrote: > > > On Wednesday, January 23, 2013 8:40:54 AM UTC-6, Oscar Benjamin wrote: > > >> On 23 January 2013 14:28, Isaac Won wrote: > > >> &g

Komodo, Python

2012-06-15 Thread Isaac@AU
I just started learning python. I have komodo2.5 in my computer. And I installed python2.7. I tried to write python scripts in komodo. But every time I run the code, there's always the error: Traceback (most recent call last): File "C:\Program Files\ActiveState Komodo 2.5\callkomodo\kdb.py", l

extract PDF pages

2005-10-13 Thread David Isaac
While pdftk is awesome http://www.accesspdf.com/pdftk/ I am looking for a Python solution. Just for PDF page extraction. Any hope? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

grep

2005-10-24 Thread David Isaac
What's the standard replacement for the obsolete grep module? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: calling matlab

2005-10-24 Thread David Isaac
perceded by mlabwrap http://mlabwrap.sourceforge.net/ Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: grep

2005-10-25 Thread David Isaac
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:: def grep(pattern, *files): search = re.compile(pattern).search for file in files: for index, line in enumerate(open(file)): if search(line): print ":".join((file, str(index+1), line[:-1])

best cumulative sum

2005-11-20 Thread David Isaac
What's the good way to produce a cumulative sum? E.g., given the list x, cumx = x[:] for i in range(1,len(x)): cumx[i] = cumx[i]+cumx[i-1] What's the better way? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-21 Thread David Isaac
e a solution that relies on a built-in to give me both of those. (Pretty is good too.) Like SciPy's cumsum. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-21 Thread David Isaac
> Alan Isaac wrote: >> Like SciPy's cumsum. "Colin J. Williams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Doesn't numarray handle this? Sure. One might say that numarray is in the process of becoming scipy. But I was looking f

Re: Converting a flat list to a list of tuples

2005-11-22 Thread David Isaac
', 3)] That behavior is currently an accident. http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=1121416 Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-23 Thread David Isaac
ed. Right. So it is "more concise" only by being incomplete, right? What other advantages might it have? > otherwise, that is more or less what I wrote for my scanl/scanl1. I didn't see a post with that code. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-23 Thread David Isaac
init = iterable.next() yield init elif not iterable: yield init for item in iterable: init = func(init, item) yield init Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-23 Thread David Isaac
(f, [], 0) THANKS! > Of course nothing can beat a plain old for loop in terms of readability and > -- most likely -- speed. OK. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-23 Thread David Isaac
"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Of course nothing can beat a plain old for loop in terms of readability and > -- most likely -- speed. Here are two versions, meant to be comparable. Thanks, Alan Isaac def cumreduce(func, seq

Re: best cumulative sum

2005-11-23 Thread David Isaac
way to test for an empty iterable to see if it can generate an item? I found this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413614 Seems like a reason to rely on sequences ... Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-24 Thread David Isaac
"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd rather have a second look whether the test is really needed. That's too obscure of a hint. Can you be a bit more explicit? Here's an example (below). You're saying I think that most of it is unnecessary. Thanks, Alan

Re: FTP over TLS

2005-11-25 Thread David Isaac
"Carl Waldbieser" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone know of any good examples for writing client side code to upload > files over a secure FTP connection? http://trevp.net/tlslite/ Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: best cumulative sum

2005-11-27 Thread David Isaac
"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I think that the test for an empty iterator makes ireduce() unintuitive. OK. I misunderstood you point. But that is needed to match the behavior of reduce. >>> reduce(operator.add,[],42) 42 Thanks, Alan -- http://mail.

Re: best cumulative sum

2005-11-28 Thread David Isaac
"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > sufficiently similar I think I understand your points now. But I wanted to match these cases: >>> import operator >>> reduce(operator.add,[],42) 42 >>> reduce(operator.add,[1],42) 43 The idea is that the i-th yield of i

Re: python speed

2005-11-30 Thread Isaac Gouy
Peter Hansen wrote: > David Rasmussen wrote: > > Frithiof Andreas Jensen wrote: > >>From the speed requirement: Is that correspondance chess by any chance?? > > > > Regular chess at tournament time controls requires speed too. Any pure > > Python chess program would lose badly to the best C/C++ pr

Re: python speed

2005-11-30 Thread Isaac Gouy
Peter Hansen wrote: > Isaac Gouy wrote: > > Peter Hansen wrote: > >>Judging by the other posts in this thread, the gauntlet is down: Python > >>is faster than Java. Let those who believe otherwise prove their point > >>with facts, and without artificially hand

Re: python speed

2005-12-01 Thread Isaac Gouy
[EMAIL PROTECTED] wrote: > Isaac Gouy wrote: > > > Which stated "Python is doing the heavy lifting with GMPY which is a > > compiled C program with a Python wrapper" - but didn't seem to compare > > that to GMPY with a Java wrapper? > > You are missi

Re: python speed

2005-12-01 Thread Isaac Gouy
[EMAIL PROTECTED] wrote: > Isaac Gouy wrote: > > Peter Hansen wrote: > > > Isaac Gouy wrote: > > > > Peter Hansen wrote: > > > >>Judging by the other posts in this thread, the gauntlet is down: Python > > > >>is faster than Java. Le

Re: python speed

2005-12-01 Thread Isaac Gouy
Fredrik Lundh wrote: > Cameron Laird wrote: > > >>You are missing the main idea: Java is by design a general purpose > >>programming language. That's why all "GMPYs" and alike are written in > >>Java - now wrappers to C-libraries. Python, by design, is glue > > . > > I don't understand the sentenc

Re: python speed

2005-12-01 Thread Isaac Gouy
Fredrik Lundh wrote: > Isaac Gouy wrote: > > >> and yes, the proposition matches my experiences. java heads prefer to do > >> everything in java, while us pythoneers happily mix and match whenever we > >> can... (which is why guoy's "benchmarks

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 7)

2005-12-08 Thread David Isaac
e.com/group/comp.lang.python/browse_thread/thread/ad0e15cb6b8f2c32/ #evaluate polynomial (coefs) at x using Horner's ruledef horner(coefs,x): return reduce(lambda a1,a2: a1*x+a2,coefs)'Nuf said.Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda (and reduce) are valuable

2005-12-09 Thread David Isaac
>>> Jibes against the lambda-clingers lead eventually to serious >>> questions of style in regard to variable namespacing, >>> lifespan, cleanup, and so on: >>> http://groups.google.com/group/comp.lang.python/browse_thread/thread/ad0e15cb6b8f2c32/

Re: problems with duplicating and slicing an array

2005-01-22 Thread David Isaac
Yun Mao wrote: >a[ [1,0], [0,1] ] , which should give me >[[4, 5], [1,2]] Numeric: take(take(a,[1,0]),[0,1],1) fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: python without OO

2005-01-26 Thread Isaac To
to implement a generic reverse() that works for all the different kinds of object---even if they share similar interfaces. Try to implement a generic "reverse" in C when the different type of containers are encoded as different style struct's accessible from different function, and yo

extract files from MS-TNEF attachments

2005-01-28 Thread David Isaac
I'm looking for Python code to extract files from MS-TNEF attachments. (I'm aware of the C code at http://tnef.sourceforge.net/ ) Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Python API to manipulate CAB files.

2005-06-22 Thread Isaac Rodriguez
Does anyone know of a Python API to manipulate CAB files? Thanks, -- Isaac Rodriguez SWE Autodesk. There are 10 types of people. Those who undertand binary, and those who don't -- http://mail.python.org/mailman/listinfo/python-list

CAB files manipulation API (again).

2005-06-28 Thread Isaac Rodriguez
to manipulate CAB files? Thanks, -- Isaac Rodriguez SWE Autodesk. There are 10 types of people. Those who undertand binary, and those who don't -- http://mail.python.org/mailman/listinfo/python-list

tuple.index(item)

2005-07-11 Thread David Isaac
Why don't tuples support an index method? It seems natural enough ... Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning histogram-like data for items in a list

2005-07-22 Thread David Isaac
the list (I think that this is referred to as a histogram): For ease of reading (but not efficiency) I like: hist = [(x,L1.count(x)) for x in set(L1)] See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/277600 Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Software needed

2005-07-22 Thread David Isaac
"niXin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can anyone direct me to where I can find free software to do the following: > Document Management Software > --- > 1. Written in PHP or Python > 2. scanning feature - where I can scan a document http://

can list comprehensions replace map?

2005-07-27 Thread David Isaac
ist comprehension? (Or, more generally, what is the best way to do this without 'map'?) Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

MultiFile object does not iterate

2005-08-09 Thread David Isaac
Why is a MultiFile object not an iterator? For example if mfp = multifile.MultiFile(fp)I cannot dofor line in mfp: do_somethingRelated:MultiFile.next seems badly named.(Something like next_section would be better.)Is this just historical accident or am I missing the point?Thanks,Alan Isaac

FTP over SSL (explicit encryption)

2005-08-10 Thread David Isaac
f someone tells me they have found this trivial under Windows, I am willing to try ... ) I would have thought that this was a common need with a standard Python solution, so I suspect I'm overlooking something obvious. Hoping, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over SSL (explicit encryption)

2005-08-10 Thread David Isaac
the stuff as an extension to ftplib. Great! Please post a link as soon as it is usable! Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over SSL (explicit encryption)

2005-08-11 Thread David Isaac
> David Isaac wrote: > > I am looking for a pure Python secure ftp solution. > > Does it exist? "Andrew MacIntyre" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I recall coming across an extension package (pretty sure it wasn't pure > Pyt

Re: FTP over SSL (explicit encryption)

2005-08-12 Thread David Isaac
"Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.lag.net/paramiko/ > However it requires the PyCrypto module. > http://www.amk.ca/python/code/crypto > > Can you briefly outline how to use this as a client > to upload and d

Re: Permutation Generator

2005-08-13 Thread David Isaac
st[i+1:])) \ or [[]] Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Permutation Generator

2005-08-14 Thread David Isaac
nd Permutations" - 2005 Can you elaborate a bit on what you mean? Given a list of unique elements, it is easy enough to produce a complete permutation generator in Python, in the sense that it yields every possible permuation. (See my previous post.) So you must mean something else? Che

Re: FTP over SSL (explicit encryption)

2005-08-14 Thread David Isaac
found this: http://trevp.net/tlslite/ I haven't even had time to try it, but I thought you'd want to know. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: FTP over SSL (explicit encryption)

2005-08-14 Thread David Isaac
> > http://www.lag.net/paramiko/ "Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > sock.settimeout(20) > sock.connect((hostname, port)) > my_t = paramiko.Transport(sock) >

Re: a sequence question

2005-02-10 Thread David Isaac
an N element list with each element being the same iterator object, but after that http://www.python.org/doc/2.3.5/lib/built-in-funcs.html just didn't get me there. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: a sequence question

2005-02-11 Thread David Isaac
> Alan Isaac wrote: > > I see that [iter(l)]*N produces an N element list with each element being > > the same iterator object, but after that > > http://www.python.org/doc/2.3.5/lib/built-in-funcs.html > > just didn't get me there. "Nick Coghlan" <[E

Re: Iteration over two sequences

2005-02-11 Thread David Isaac
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]: > Numarray is the future, Numeric is the "past", This statement is not obviously true. See the recent discussion on the developer lists. (Search for Numeric3.) Alan Isaac -- h

Re: a sequence question

2005-02-12 Thread David Isaac
> artifact of the CPython implementation, since the zip() docs don't make any > promises. So updating the docs to include that information would probably be a > bigger issue, as it involves behaviour which is currently not defined by the > library. OK, thanks. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: yield_all needed in Python

2005-03-01 Thread Isaac To
ng? def gen_all(gen): for e in gen: yield e def foogen(arg1): def foogen1(arg2): # Some code here # Some code here gen_all(arg3) # Some code here gen_all(arg4) # Some code here gen_all(arg5) # Some code here gen_all(arg6) Regards, Isaac. -- http://mail.python.org/mailman/listinfo/python-list

Re: yield_all needed in Python

2005-03-01 Thread Isaac To
>>>>> "Isaac" == Isaac To <[EMAIL PROTECTED]> writes: def gen_all(gen): for e in gen: yield e def foogen(arg1): def foogen1(arg2): # Some code here # Some code here gen_all(arg3) ^ I mean foogen1(arg3), obviously, and si

Re: yield_all needed in Python

2005-03-01 Thread Isaac To
def fun2(): fun1(val) for a in fun2(): ... we cannot expect MyObj() to be yielded to main? But soon I found that it is not realistic: there is no way to know that fun2 has generator semantics. Perhaps that is a short-sightness in not introducing a new keyword instead of def when

Re: yield_all needed in Python

2005-03-05 Thread Isaac To
rable) argument, Paul> unless the element is a generator, in which case we recurse Paul> into it: Paul> ... Only if you'd never want to yield a generator. Regards, Isaac. -- http://mail.python.org/mailman/listinfo/python-list

Re: The use of :

2004-11-28 Thread Isaac To
http://compsoc.dur.ac.uk/whitespace/ :-) Regards, Isaac. -- http://mail.python.org/mailman/listinfo/python-list

Re: creating generators from function

2004-12-08 Thread Isaac To
ue later in your code. And of course, most editors will highlight the "break" for you, while no editor will highlight for you the "condition" variable that you are staring at. Regards, Isaac. -- http://mail.python.org/mailman/listinfo/python-list

checkbook manager

2005-04-03 Thread David Isaac
I'd like to try personal financial management using Python. I just found PyCheckbook, but it does not support check printing. Is there a Python check printing application kicking around? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: checkbook manager -> cross platform printing

2005-04-04 Thread David Isaac
"Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not support check printing. > Is there a Python check printing application kicking around?

cross platform printing

2005-04-05 Thread David Isaac
"Alan Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to try personal financial management using Python. > I just found PyCheckbook, but it does not support check printing. > Is there a Python check printing application kicking around?

Re: cross platform printing

2005-04-24 Thread David Isaac
> Alan Isaac wrote: > > What is the current best practice for cross platform printing of PostScript > > files from Python? "Warren Postma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Well since printing postscript files on most Unix systems (pro

Coding Standards (and Best Practices)

2005-04-26 Thread Isaac Rodriguez
guidelines and best practices as our coding standards. Does anyone know where I can get some information about what the community is doing? Are there any well defined guidelines established? Thanks, -- Isaac Rodriguez SWE Autodesk. There are 10 types of

mbx repair script

2005-04-27 Thread David Isaac
I'm looking for a Python script to repair the mbx header for a mail file where only the header is corrupted. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: mbx repair script

2005-04-29 Thread David Isaac
e header contained information tightly tied to the rest of the content (to speed search etc) so that e.g., byte counts could matter. Can you point me to documentation of the mbx format? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter weirdness item count

2005-04-29 Thread David Isaac
"phil" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Using Tkinter Canvas to teach High School Geometry > with A LOT of success. Can you post a link to your code. I'd like to see what you are doing. Thx, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

mbx repair script: Python vs perl

2005-04-30 Thread David Isaac
I'm looking for the Python equivalent of the perl script and module described at http://comments.gmane.org/gmane.mail.imap.uw.c-client/707 Any hope? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

using print() with multiprocessing and pythonw

2013-11-12 Thread Isaac Gerg
can I fix my code so that the print()'s are supressed. I would hate to do a warnings.filterwarnings('ignore') because when I unit test those functions, the warnings dont appear. Thanks in advance, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Re: using print() with multiprocessing and pythonw

2013-11-12 Thread Isaac Gerg
Thanks for the reply Bill. The problem is the text i am getting is from a python warning message, not one of my own print() function calls. -- https://mail.python.org/mailman/listinfo/python-list

Plot a contour inside a contour

2013-11-14 Thread Isaac Won
plt1) plt.show() My intention is to plot ax2 on the top of ax1 from xdist and ydist = 8 with 18 by 18 size. However, the result seems only showing ax1. I will really appreciate any help or idea. Thank you, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Re: Plot a contour inside a contour

2013-11-14 Thread Isaac Won
On Thursday, November 14, 2013 2:01:39 PM UTC-8, John Ladasky wrote: > On Thursday, November 14, 2013 11:39:37 AM UTC-8, Isaac Won wrote: > > > I tried to plot one smaller contour inside of the other larger contour. > > > > Using what software? A plotting package i

Using MFDataset to combine netcdf files in python

2013-12-02 Thread Isaac Won
h_ref=np.array(Th[:]) print Th.shape I will really appreciate any help, idea, and hint. Thank you, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Drawing shaded area depending on distance with latitude and altitude coordinate

2014-01-06 Thread Isaac Won
er of columns in z, and length of y must be number of rows. IF I use meshgrid for X and Y, I also get: TypeError: Inputs x and y must be 1D or 2D. I just need to draw shaded contour with distance from one point on the top of the plot of each point. If you give any idea or hint, I will really ap

Extracting the value from Netcdf file with longitude and lattitude

2014-05-16 Thread Isaac Won
Hi, My question may be confusing. Now I would like to extract temperature values from model output with python. My model output have separate temperature, longitude and latitude variables. So, I overlap these three grid variables on one figure to show temperature with longitude and latitude thr

Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
ing on here? Thanks in advance, Isaac -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
example here: http://stackoverflow.com/questions/948119/preventing-file-handle-inheritance-in-multiprocessing-lib None of the solutions posted work. On Thursday, October 10, 2013 12:38:19 PM UTC-4, Piet van Oostrum wrote: > Isaac Gerg writes: > > > > > I have a function t

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
On Thu, Oct 10, 2013 at 2:41 PM, Ned Batchelder wrote: > On 10/10/13 12:44 PM, Isaac Gerg wrote: > >> Sorry, I am just providing pseudo code since I the code i have is quite >> large. >> >> As I mentioned, the code works fine when I remove the multirpcessing >&

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
On Thu, Oct 10, 2013 at 2:49 PM, Isaac Gerg wrote: > > > > On Thu, Oct 10, 2013 at 2:41 PM, Ned Batchelder wrote: > >> On 10/10/13 12:44 PM, Isaac Gerg wrote: >> >>> Sorry, I am just providing pseudo code since I the code i have is quite >>> large

Re: Python 3.2 | WIndows 7 -- Multiprocessing and files not closing

2013-10-10 Thread Isaac Gerg
functions which read from the file. Isaac -- https://mail.python.org/mailman/listinfo/python-list

About a value error called 'ValueError: A value in x_new is below the interpolation range'

2013-02-05 Thread Isaac Won
h1, p1, 'o') plt.xlabel('Distance(km)') plt.ylabel('Correlation coefficient') plt.grid(True) plt.show() --- For any help or advice, I will really appreciate. Best regards, Isaac -- http://mail.python.org/mailman/listinfo/python-list

Import redirects

2013-02-10 Thread Isaac To
I have a package (say "foo") that I want to rename (say, to "bar"), and for compatibility reasons I want to be able to use the old package name to refer to the new package. Copying files or using filesystem symlinks is probably not the way to go, since that means any object in the modules of the p

Re: Import redirects

2013-02-11 Thread Isaac To
On Mon, Feb 11, 2013 at 8:27 PM, Oscar Benjamin wrote: > On 11 February 2013 06:50, Isaac To wrote: > > Except one thing: it doesn't really work. If I `import foo.baz.mymod` > now, > > and if in "bar.baz.mymod" there is a statement `import bar.baz.depmod`, &

Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
try to make my triple nested loop working. My code would be: c = 4 y1 = [] m1 = [] std1 = [] while c <24: c = c + 1 a = [] f.seek(0,0) for columns in ( raw.strip().split() for raw in f ): a.append(columns[c])

Re: Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
Thank you, Chris. I just want to acculate value from y repeatedly. If y = 1,2,3...10, just have a [1,2,3...10] at onece. On Friday, March 1, 2013 7:41:05 AM UTC-6, Chris Angelico wrote: > On Fri, Mar 1, 2013 at 7:59 PM, Isaac Won wrote: > > > while c <24: > > >

Re: Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
On Friday, March 1, 2013 7:41:05 AM UTC-6, Chris Angelico wrote: > On Fri, Mar 1, 2013 at 7:59 PM, Isaac Won wrote: > > > while c <24: > > > for columns in ( raw.strip().split() for raw in f ): > > > while d <335: > > > > Note

Re: Triple nested loop python (While loop insde of for loop inside of while loop)

2013-03-01 Thread Isaac Won
Thank you Ulich for reply, What I really want to get from this code is m1 as I told. For this purpose, for instance, values of fpsd upto second loop and that from third loop should be same, but they are not. Actually it is my main question. Thank you, Isaac On Friday, March 1, 2013 6:00:42 AM

Putting the loop inside of loop properly

2013-03-01 Thread Isaac Won
mulated to m1. However, it doesn't work and fpsd values in and out of the last loop are totally different. My question is clear? Any help or questions would be really appreciated. Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64)

2013-03-09 Thread Isaac To
In general, it is hard for any process to return the memory the OS allocate to it back to the OS, short of exiting the whole process. The only case that this works reliably is when the process allocates a chunk of memory by mmap (which is chosen by libc if it malloc or calloc a large chunk of memo

Re: I hate you all

2013-04-05 Thread Isaac To
You underestimated the arrogance of Python. Python 3 tab doesn't map to 4 spaces. It doesn't map to any number of spaces. Tabs and spaces are completely unrelated. If you have a function having the first indentation level with 4 (or any number of) spaces, the next line starting not with 4 space

Re: lambda (and reduce) are valuable

2005-12-11 Thread David Isaac
> Alan Isaac wrote: > >>> #evaluate polynomial (coefs) at x using Horner's rule > >>> def horner(coefs,x): return reduce(lambda a1,a2: a1*x+a2,coefs) > > It just cannot get simpler or more expressive. "Peter Otten" <[EMAIL PROTECTED]> wrote

  1   2   3   4   5   6   >