Re: pls help me with this prog

2012-10-21 Thread 88888 Dihedral
On Friday, October 19, 2012 4:40:42 PM UTC+8, inshu chauhan wrote: > in this prog I have written a code to calculate teh centre of a given 3D > data.. > > > > but i want to calculate it for every 3 points not the whole data, but > > instead of giving me centre for every 3 data the prog is prin

Re: turn list of letters into an array of integers

2012-10-24 Thread 88888 Dihedral
Chris Rebert於 2012年10月24日星期三UTC+8下午2時07分29秒寫道: > On Tue, Oct 23, 2012 at 10:23 PM, seektime wrote: > > > Here's some example code. The input is a list which is a "matrix" of > > letters: > > >a b a > > >b b a > > > > > > and I'd like to turn this into a Python array: > > > > Y

Re: Negative array indicies and slice()

2012-11-01 Thread 88888 Dihedral
andrew...@gmail.com於 2012年10月29日星期一UTC+8上午11時12分11秒寫道: > The slice operator does not give any way (I can find!) to take slices from > negative to positive indexes, although the range is not empty, nor the > expected indexes out of range that I am supplying. > > > > Many programs that I write w

Re: is implemented with id ?

2012-11-04 Thread 88888 Dihedral
On Wednesday, September 5, 2012 10:41:19 PM UTC+8, Steven D'Aprano wrote: > On Wed, 05 Sep 2012 10:00:09 -0400, Dave Angel wrote: > > > > > On 09/05/2012 09:19 AM, Franck Ditter wrote: > > >> Thanks to all, but : > > >> - I should have said that I work with Python 3. Does that matter ? - > >

Re: Multi-dimensional list initialization

2012-11-08 Thread 88888 Dihedral
On Monday, November 5, 2012 3:07:12 PM UTC+8, Chris Rebert wrote: > On Sun, Nov 4, 2012 at 10:27 PM, Demian Brecht wrote: > > > So, here I was thinking "oh, this is a nice, easy way to initialize a 4D > > matrix" (running 2.7.3, non-core libs not allowed): > > > > > > m = [[None] * 4] * 4 This

Re: father class name

2013-01-01 Thread 88888 Dihedral
On Monday, December 31, 2012 12:18:48 PM UTC+8, contro opinion wrote: > here is my haha  class > class  haha(object): >   def  theprint(self): >     print "i am here" > The definition of a class named haha. > >>> haha().theprint() > i am here > >>> haha(object).theprint() > Traceback (most recen

Re: dict comprehension question.

2013-01-01 Thread 88888 Dihedral
On Tuesday, January 1, 2013 11:10:48 AM UTC+8, Steven D'Aprano wrote: > On Sat, 29 Dec 2012 18:56:57 -0500, Terry Reedy wrote: > > > > > On 12/29/2012 2:48 PM, Quint Rankid wrote: > > > > > >> Given a list like: > > >> w = [1, 2, 3, 1, 2, 4, 4, 5, 6, 1] > > >> I would like to be able to do

Re: Python programming philosophy

2013-01-05 Thread 88888 Dihedral
chaouche yacine於 2013年1月6日星期日UTC+8上午6時34分38秒寫道: > The compiler reads your source code and parses it into parse trees. This is > first step. It then takes the parse trees and transform them into abstract > syntax trees, which are like a DOM tree in an HTML file, and then transform > that AST into

Re: How to call wget by python ?

2013-01-09 Thread 88888 Dihedral
Michael Torrie於 2013年1月10日星期四UTC+8上午11時04分31秒寫道: > On 01/09/2013 07:11 PM, iMath wrote: > > > can you give me an example code ? > > > > No but I can suggest some alternative ideas, such as using httplib > > (built into python), or libcurl. Or if you have to use wget, you run it > > the same

Re: ANNOUNCE: Thesaurus - a recursive dictionary subclass using attributes

2013-01-10 Thread 88888 Dihedral
在 2013年1月10日星期四UTC+8下午7时34分23秒,Duncan Booth写道: > Dave Cinege wrote: > > > > > You will notice that the code is disgusting simple. However I have > > > found that this has completely changed the way I program in python. > > > I've re-written some exiting programs using Thesaurus, and often >

Re: PyWart: Module access syntax

2013-01-12 Thread 88888 Dihedral
Chris Angelico於 2013年1月12日星期六UTC+8下午12時40分36秒寫道: > On Sat, Jan 12, 2013 at 3:34 PM, Rick Johnson > > wrote: > > > *The problem:* > > > ... is readability. The current dot syntax used ubiquitously in paths is > > not conveying the proper information to the reader, and in-fact obfuscating > > t

Re: PyWart: Import resolution order

2013-01-12 Thread 88888 Dihedral
Ian於 2013年1月12日星期六UTC+8下午3時36分43秒寫道: > On Fri, Jan 11, 2013 at 10:28 PM, Rick Johnson > > wrote: > > > On Friday, January 11, 2013 12:30:27 AM UTC-6, Chris Angelico wrote: > > >> Why is it better to import from the current directory first? > > > > > > Opps. I was not explicit enough with my e

Re: confusion with decorators

2013-02-01 Thread 88888 Dihedral
Jason Swails於 2013年1月31日星期四UTC+8上午8時34分03秒寫道: > Hello, > > > I was having some trouble understanding decorators and inheritance and all > that.  This is what I was trying to do: > > > > # untested > class A(object): >    def _protector_decorator(fcn): > >       def newfcn(self, *args, **kwar

Re: Maximum Likelihood Estimation

2013-02-01 Thread 88888 Dihedral
subhaba...@gmail.com於 2013年2月2日星期六UTC+8上午1時17分04秒寫道: > Dear Group, > > > > I am looking for a Python implementation of Maximum Likelihood Estimation. If > any one can kindly suggest. With a google search it seems > scipy,numpy,statsmodels have modules, but as I am not finding proper example >

Re: Maximum Likelihood Estimation

2013-02-01 Thread 88888 Dihedral
在 2013年2月2日星期六UTC+8上午2时47分22秒,subhaba...@gmail.com写道: > On Friday, February 1, 2013 11:07:48 PM UTC+5:30, 88888 Dihedral wrote: > > > subhaba...@gmail.com於 2013年2月2日星期六UTC+8上午1時17分04秒寫道: > > > > > > > Dear Group, > > > > > > > >

Re: advice, python for binary to xml

2013-02-01 Thread 88888 Dihedral
noydb於 2013年1月31日星期四UTC+8下午9時33分48秒寫道: > I'm looking for knowlegde about how best to go about converting a binary file > (from a GPS unit) to GPX/XML. I am completely clueless on this, so any > start-from-the-beginning info would be greatly appreciated! I'm guessing the > level of effort will

Re: Looking under Python's hood: Will we find a high performance or clunky engine?

2012-01-23 Thread 88888 Dihedral
在 2012年1月23日星期一UTC+8上午2时01分11秒,Robert Kern写道: > On 1/22/12 3:50 PM, Rick Johnson wrote: > > > > What does Python do when presented with this code? > > > > py> [line.strip('\n') for line in f.readlines()] > > > > If Python reads all the file lines first and THEN iterates AGAIN to do > > the strip;

Re: while True or while 1

2012-01-23 Thread 88888 Dihedral
在 2012年1月24日星期二UTC+8上午4时50分11秒,Andrea Crotti写道: > On 01/23/2012 06:05 PM, Evan Driscoll wrote: > > > > To play devil's advocate for a moment, if you have the choice between > > two ways of writing something, A and B, where both are basically the > > same in terms of difficulty to write, difficult

Re: copy on write

2012-02-02 Thread 88888 Dihedral
在 2012年1月14日星期六UTC+8上午6时48分29秒,Evan Driscoll写道: > On 01/13/2012 03:20 PM, Neil Cerutti wrote: > > They perform the same action, but their semantics are different. > > operator+ will always return a new object, thanks to its > > signature, and operator+= shall never do so. That's the main > > differ

Re: copy on write

2012-02-03 Thread 88888 Dihedral
在 2012年1月14日星期六UTC+8上午6时48分29秒,Evan Driscoll写道: > On 01/13/2012 03:20 PM, Neil Cerutti wrote: > > They perform the same action, but their semantics are different. > > operator+ will always return a new object, thanks to its > > signature, and operator+= shall never do so. That's the main > > differ

Re: Common LISP-style closures with Python

2012-02-10 Thread 88888 Dihedral
在 2012年2月4日星期六UTC+8上午8时27分56秒,Antti J Ylikoski写道: > In Python textbooks that I have read, it is usually not mentioned that > we can very easily program Common LISP-style closures with Python. It > is done as follows: > > - > > # Make a Common LISP-like closure

Re: Guide to: Learning Python Decorators

2012-02-10 Thread 88888 Dihedral
I prefer to decorate a function not a method. I prefer to decorate an object to own a new method from the existed ones inherited in all the class levels. I do not decorate a class if not necessary. I believe this is more pythonic to add functionalities to objects in classes by aggregated

Re: frozendict

2012-02-10 Thread 88888 Dihedral
在 2012年2月11日星期六UTC+8上午2时57分34秒,John Nagle写道: > On 2/10/2012 10:14 AM, Nathan Rice wrote: > >>> Lets also not forget that knowing an object is immutable lets you do a > >>> lot of optimizations; it can be inlined, it is safe to convert to a > >>> contiguous block of memory and stuff in cache, etc.

Re: Postpone evaluation of argument

2012-02-11 Thread 88888 Dihedral
在 2012年2月11日星期六UTC+8上午7时57分56秒,Paul Rubin写道: > Righard van Roy > writes: > > I want to add an item to a list, except if the evaluation of that item > > results in an exception. > > This may be overkill and probably slow, but perhaps most in the spirit > that you're asking. > > from itertool

Re: Numeric root-finding in Python

2012-02-12 Thread 88888 Dihedral
在 2012年2月12日星期日UTC+8下午2时41分20秒,Steven D'Aprano写道: > This is only peripherally a Python problem, but in case anyone has any > good ideas I'm going to ask it. > > I have a routine to calculate an approximation of Lambert's W function, > and then apply a root-finding technique to improve the approx

Re: how to tell a method is classmethod or static method or instance method

2012-02-13 Thread 88888 Dihedral
在 2012年2月13日星期一UTC+8下午4时03分24秒,Steven D'Aprano写道: > On Mon, 13 Feb 2012 15:59:27 +0900, Zheng Li wrote: > > > how to tell a method is class method or static method or instance > > method? > > That's a good question, with a subtle answer that depends on exactly what > you mean by the question. If

TEST AN EXECUTABLE PYTHON SCRIPT SPEED UNDER A PYTHON SHELL

2012-02-14 Thread 88888 Dihedral
After my testing of JAVA, PYTHON, VB, C-sharp and Erlang like script languages, I noticed that script languages should be timed after the shell interpreter completed loaded. The start up loading time of script interpreters should be excluded in the measure of executing a byte code script. Thi

Re: [semi OT]: Smartphones and Python?

2012-02-15 Thread 88888 Dihedral
在 2012年2月16日星期四UTC+8上午10时19分15秒,geremy condra写道: > On Wed, Feb 15, 2012 at 12:58 PM, Martin Schöön > wrote: > > First of all: I don't have any first hand experience of smartphones > > but now that my trusted old GSM phone is getting old I decided I am > > in for an up-grade. It struck me it might

Re: [semi OT]: Smartphones and Python?

2012-02-16 Thread 88888 Dihedral
The law suites of JAVA Vitrtual Machine from Oracle are famous now. But in 201X the JVM patents will be expired, thus it is not very urgent to chunk out a new jython now. Anyway just write codes that can be maintained and ported to other languages and platforms easily. Then I personally prefer

Re: [semi OT]: Smartphones and Python?

2012-02-16 Thread 88888 Dihedral
在 2012年2月16日星期四UTC+8下午11时22分44秒,Michael Torrie写道: > On 02/16/2012 07:53 AM, 88888 Dihedral wrote: > > The law suites of JAVA Vitrtual Machine from Oracle > > are famous now. But in 201X the JVM patents will be > > expired, thus it is not very urgent to chunk out a new jython

Re: question about function pointer

2012-02-17 Thread 88888 Dihedral
在 2012年2月17日星期五UTC+8下午5时55分11秒,Nobody写道: > On Fri, 17 Feb 2012 16:53:00 +0900, Zheng Li wrote: > > > def method1(a = None): > > print a > > > > i can call it by > > method1(*(), **{'a' : 1}) > > > > I am just curious why it works and how it works? > > and what do *() and **{'a' : 1} mean? >

Re: ANN: Sarge, a library wrapping the subprocess module, has been released.

2012-02-17 Thread 88888 Dihedral
Check PY2EXE, PYREX and PSYChO. I must use these packages to relase commercial products with my own dll in c. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT]: Smartphones and Python?

2012-02-17 Thread 88888 Dihedral
-- http://mail.python.org/mailman/listinfo/python-list

Re: [OT]: Smartphones and Python?

2012-02-17 Thread 88888 Dihedral
在 2012年2月18日星期六UTC+8上午9时51分13秒,Michael Torrie写道: > On 02/16/2012 10:25 PM, 88888 Dihedral wrote: > > Android is a customized linux OS used in mobile phones. I don't think > > any linux systm has to be locked by JAVA or any JVM to run > > applications. > > Gett

Re: Python as a default shell, replacement of bash, sh, cmd ?

2012-02-18 Thread 88888 Dihedral
在 2012年2月19日星期日UTC+8上午3时21分53秒,Jabba Laci写道: > Have a look at IPython (http://ipython.org/). It can interact with the > normal shell very well. > > Laszlo > > On Sat, Feb 18, 2012 at 19:58, SherjilOzair wrote: > > Has it been considered to add shell features to python, such that it can be > > u

Re: [OT]: Smartphones and Python?

2012-02-18 Thread 88888 Dihedral
在 2012年2月19日星期日UTC+8上午8时36分48秒,Michael Torrie写道: > On 02/18/2012 10:46 AM, Lie Ryan wrote: > > Android does have a full Linux experience; what it lacks is the GNU > > experience. Unlike "normal" Linux distros, Android does not use GNU > > userspace, instead it have its own userspace based on bion

Re: Python as a default shell, replacement of bash, sh, cmd ?

2012-02-19 Thread 88888 Dihedral
在 2012年2月20日星期一UTC+8上午8时23分33秒,Michael Torrie写道: > On 02/18/2012 11:58 AM, SherjilOzair wrote: > > Has it been considered to add shell features to python, such that it > > can be used as a default shell, as a replacement for bash, etc. > > > > I'm sure everyone would agree that doing this would ma

Re: pickle handling multiple objects ..

2012-02-27 Thread 88888 Dihedral
在 2012年2月26日星期日UTC+8下午9时00分31秒,Chris Angelico写道: > On Sun, Feb 26, 2012 at 11:04 PM, Peter Otten <__pete...@web.de> wrote: > > This is however a bit errorprone. If you accidentally write the loading code > > as > > > > fruit, beverages, vegetables = pickle.load(f) > > > > you'll end up drinking pot

Re: Need to write python source with python

2012-02-28 Thread 88888 Dihedral
在 2012年2月29日星期三UTC+8上午1时56分43秒,Peter Otten写道: > crs...@gmail.com wrote: > > > I'm new to Python but have experience with a few other programming > > languages(Java, Perl, JavaScript). > > > > I'm using Python 2.7.2 and I'm trying to create and write to a file (.py) > > a python class and function

Re: Porting Python to an embedded system

2012-03-04 Thread 88888 Dihedral
On Sunday, March 4, 2012 6:58:50 PM UTC+8, Justin Drake wrote: > I am working with an ARM Cortex M3 on which I need to port Python > (without operating system). What would be my best approach? I just > need the core Python and basic I/O. Sounds like the JVM law suites in ANDROINDS did stimulate a

Re: why can't I pickle a class containing this dispatch dictionary?

2012-04-03 Thread 88888 Dihedral
Peter Otten於 2012年4月3日星期二UTC+8下午3時54分50秒寫道: > jkn wrote: > > > I'm clearly not understanding the 'can't pickle instancemethod > > objects' error; can someone help me to understand, > > I think classes implemented in C need some extra work to make them > picklable, and that hasn't been done

Re: .py to .pyc

2012-05-20 Thread 88888 Dihedral
On Saturday, May 19, 2012 7:54:18 PM UTC+8, Colin J. Williams wrote: > On 18/05/2012 7:20 PM, Tony the Tiger wrote: > > On Sun, 13 May 2012 23:36:02 +0200, Irmen de Jong wrote: > > > >> Why do you care anyway? > > > > Wanna hide his code...? > > > > /Grrr > Curiosity. Perhaps there are st ack-ba

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread 88888 Dihedral
Yesterday Paid於 2012年6月10日星期日UTC+8上午6時44分44秒寫道: > I'm planning to learn one more language with my python. > Someone recommended to do Lisp or Clojure, but I don't think it's a > good idea(do you?) > So, I consider C# with ironpython or Java with Jython. > It's a hard choice...I like Visual studio(b

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread 88888 Dihedral
On Monday, December 16, 2013 2:41:08 PM UTC+8, seas...@gmail.com wrote: > I need to replace all tag with after ■. But the result from below > is '■ D / ' > > Can you explain what I did wrong, please. > > > > s = '■A B C D / ' > > soup = BeautifulSoup(s) > > for i in soup.find

Re: [newbie] trying socket as a replacement for nc

2013-12-16 Thread 88888 Dihedral
On Friday, December 13, 2013 5:58:49 AM UTC+8, Chris Angelico wrote: > On Fri, Dec 13, 2013 at 8:27 AM, Dan Stromberg wrote: > > > On Thu, Dec 12, 2013 at 6:16 AM, Grant Edwards > > wrote: > > > > > >>> Sockets reserve the right to split one socket.send() into multiple > > >>> socket.recv()'

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread 88888 Dihedral
On Saturday, December 14, 2013 8:12:16 PM UTC+8, Jai wrote: > GUI:-want to learn GUI programming in python , how should i proceed. > > > > There are lots of book here so I am confuse which book i should refer so > that i don't waste time . please answer Please check JYTHON and those ready-

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread 88888 Dihedral
Roy Smith於 2013年12月19日星期四UTC+8下午12時16分26秒寫道: > In article <07c6e6a3-c5f4-4846-9551-434bdaba8...@googlegroups.com>, > > rusi wrote: > > > > > Soon the foo has to split into foo1.c and foo2.c. And suddenly you need to > > > understand: > > > > > > 1. Separate compilation > > > 2. Make (wh

Re: [newbie] trying socket as a replacement for nc

2013-12-18 Thread 88888 Dihedral
> 88888 Dihedral wrote: > > > > > It is trivial to use UDP with > > > forward error correction such as > > > the CD in 1982. > > > > CD uses Reed-Solomon coding, which is great for correcting the types of > > errors exp

Re: Newbie question. Are those different objects ?

2013-12-20 Thread 88888 Dihedral
On Saturday, December 21, 2013 1:10:37 AM UTC+8, rusi wrote: > On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: > > > On 20/12/2013 15:34, rusi wrote: > > > > On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > > > >> y = raw_input('Enter a number:') >

Re: Editor for Python

2014-01-08 Thread 88888 Dihedral
On Friday, November 23, 2001 6:43:40 AM UTC+8, MANUEL FERNANDEZ PEREZ wrote: > Hello, > I'm looking for an editor for Python.I' m interested it works on Windows.Can > anybody help me? > > Thank you > > Manuel OK, try the notepad++ at notepad-plus-plus.org/ or use IDLE with the pycrust. -- ht

Re: SIngleton from __defaults__

2014-01-22 Thread 88888 Dihedral
On Thursday, January 23, 2014 12:37:36 AM UTC+8, Asaf Las wrote: > On Wednesday, January 22, 2014 6:18:57 PM UTC+2, Chris Angelico wrote: > > > On Thu, Jan 23, 2014 at 3:07 AM, Asaf Las wrote: > > > > > > Why not simply: > > > def get_singleton(x = SomeClass()): > > > return x > > > Or

Re: Using a static library in a C extension for Python

2014-01-22 Thread 88888 Dihedral
On Wednesday, January 22, 2014 7:01:50 PM UTC+8, lgabiot wrote: > Hello, > > > > working on OS X 10.8.5 > > Python 2.7 > > > > I've written a simple C extension for Python that uses the cairo graphic > > library. > > It works well, and I can call it from Python with no problem. > > The o

Re: Using a static library in a C extension for Python

2014-01-23 Thread 88888 Dihedral
On Thursday, January 23, 2014 3:22:52 AM UTC+8, lgabiot wrote: > Le 22/01/14 18:31, 88888 Dihedral a écrit : > > > > > > > > Check the C source code generated > > > by Pyrex and check cython for what u > > > want, but I did try that

Re: Calculator Problem

2014-02-05 Thread 88888 Dihedral
On Monday, February 3, 2014 5:16:44 AM UTC+8, Charlie Winn wrote: > Hey Guys i Need Help , When i run this program i get the 'None' Under the > program, see what i mean by just running it , can someone help me fix this > > > > def Addition(): > > print('Addition: What are two your numbers?

Re: Commonly-used names in the Python standard library

2014-02-21 Thread 88888 Dihedral
On Friday, February 21, 2014 12:26:00 AM UTC+8, Marko Rauhamaa wrote: > Chris Angelico : > > > > > Also, what happens if two modules (one of which might be your script) > > > written for different versions both import some third module? Should > > > they get different versions, based on what v

Re: Can tuples be replaced with lists all the time?

2014-02-23 Thread 88888 Dihedral
On Sunday, February 23, 2014 12:06:13 PM UTC+8, Sam wrote: > My understanding of Python tuples is that they are like immutable lists. If > this is the cause, why can't we replace tuples with lists all the time (just > don't reassign the lists)? Correct me if I am wrong. == OK, lets be seriou

Re: Functional programming

2014-03-03 Thread 88888 Dihedral
On Monday, March 3, 2014 10:08:11 PM UTC+8, Rustom Mody wrote: > On Monday, March 3, 2014 7:30:17 PM UTC+5:30, Chris Angelico wrote: > > > On Tue, Mar 4, 2014 at 12:48 AM, Rustom Mody wrote: > > > > ? [1,2] + [[3,4],[5]] > > > > ERROR: Type error in application > > > > *** expression : [1,2

Re: How security holes happen

2014-03-05 Thread 88888 Dihedral
On Wednesday, March 5, 2014 8:52:31 AM UTC+8, Andrew Cooper wrote: > On 03/03/2014 22:19, Cameron Simpson wrote: > > > On 03Mar2014 09:17, Neal Becker wrote: > > >> Charles R Harris Wrote in message: > > >>> > > >> > > >> Imo the lesson here is never write in low level c. Use modern > > >>

Re: Python programming

2014-03-05 Thread 88888 Dihedral
On Thursday, February 13, 2014 11:30:27 PM UTC+8, Neil Cerutti wrote: > On 2014-02-12, Tim Delaney wrote: > > > OK - it's degenerated into one of these threads - I'm going to > > > participate. > > > > Me, too! > > > > I wrote lots of programs, strictly for fun, on every personal > > comp

Re: CallBack function in C Libraries.

2014-03-20 Thread 88888 Dihedral
On Friday, March 21, 2014 7:56:43 AM UTC+8, fiens...@gmail.com wrote: > > Give the function call its required argument and the error will go > > > > > > away... well, at least that one. > > > > Yep, many thanks for the answer. > > But... im totally beginner with Python. > > I develop in Pa

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-25 Thread 88888 Dihedral
> >>> x = [[1, 2], [3, 4]] > > >>> for x in x: > > ... for x in x: > > ... print(x) > This is valid in the syntax level in python. But it is only good for those writing obscure programs in my opinions at most team works. -- https://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation unpythonic?

2013-09-02 Thread 88888 Dihedral
Fabrice Pombet於 2013年8月31日星期六UTC+8上午1時43分28秒寫道: > On Saturday, August 17, 2013 2:26:32 PM UTC+2, Fernando Saldanha wrote: > > > I am new to Python, with experience in Java, C++ and R. > > > > > > > > > > > > As I understand encapsulation is not a big thing in the Python world. I > > read

Re: How to execute command on remote windows machine

2013-09-03 Thread 88888 Dihedral
gauran...@gmail.com於 2013年9月3日星期二UTC+8下午12時45分57秒寫道: > Hi Guys, > > > > I have a requirement where i need to kill one process on remote windows > machine. > > Following command just works fine if i have to kill process on local machine > > > > os.system('taskkill /f /im processName.exe')

Re: class implementation

2013-10-01 Thread 88888 Dihedral
On Tuesday, October 1, 2013 3:34:08 AM UTC+8, Dave Angel wrote: > On 30/9/2013 08:41, markot...@gmail.com wrote: > > > > > under variables, i mean, the int's and lists and strings and floats that > > the parent class uses. IF in parent class there is variable called > > location, then can i us

Re: Tail recursion to while iteration in 2 easy steps

2013-10-04 Thread 88888 Dihedral
On Thursday, October 3, 2013 5:33:27 AM UTC+8, Terry Reedy wrote: > On 10/2/2013 8:31 AM, random...@fastmail.us wrote: > > > On Tue, Oct 1, 2013, at 17:30, Terry Reedy wrote: > > >> Part of the reason that Python does not do tail call optimization is > > >> that turning tail recursion into while

Re: Hyper-spacial ray-tracer

2013-10-04 Thread 88888 Dihedral
On Saturday, October 5, 2013 8:17:52 AM UTC+8, Rouslan Korneychuk wrote: > On 10/04/2013 04:23 PM, Tony the Tiger wrote: > > > On Wed, 02 Oct 2013 17:05:32 -0400, Rouslan Korneychuk wrote: > > > > > >> game > > > > > > Sorry, but that sounds awful. I hate games. > > > > > > > This... isn't

Re: Basic Python Questions - Oct. 31, 2013

2013-11-07 Thread 88888 Dihedral
On Tuesday, November 5, 2013 1:22:05 PM UTC+8, E.D.G. wrote: > "Jim Gibson" wrote in message > > news:031120131018099327%jimsgib...@gmail.com... > > > > > One way to generate plot within a CGI program is this: > > > >To start off with, I am not a CGI expert. Also, I have several

Re: Show off your Python chops and compete with others

2013-11-07 Thread 88888 Dihedral
On Friday, November 8, 2013 3:02:10 AM UTC+8, jsk...@gmail.com wrote: > We do not currently support cookieless or javascript-less browsing. We are > definitely looking at relying less and less on cookies, but it's unlikely > we'll ever be able to pull out javascript as it limits interactivity too

Re: Languages for different purposes (was Re: New user's initial thoughts / criticisms of Python)

2013-11-11 Thread 88888 Dihedral
On Sunday, November 10, 2013 4:56:38 PM UTC+8, Jorgen Grahn wrote: > On Sun, 2013-11-10, Chris Angelico wrote: > > > On Sun, Nov 10, 2013 at 11:41 AM, Roy Smith wrote: > > >> On 09/11/2013 22:58, Chris Angelico wrote: > > >>> > > > >>> > * Some languages are just fundamentally bad. I do not re

Re: Thread handling issue

2011-10-09 Thread 88888 dihedral
TRY to get BOA with wxpython! Please check the example for the UI part in BOA. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to create C-style "main" function in Python? (for teaching purposes)

2011-10-09 Thread 88888 dihedral
I do not think C is not good for functional programming, but C is hard to debug if one has to write programs to reload functional pointers and data structures that will grow in the run time for the possible cases. Thus, I love Python! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Migration Error: TypeError: exceptions must be old-style classes or derived from BaseException, not str

2011-10-10 Thread 88888 dihedral
I am thinking with the power of python evolving in different versions, if a feature is not desired in the new version, then the new version could also provide some script tools, of course in python, to convert codes in old styles into new styles automatically. -- http://mail.python.org/mailma

Re: Opportunity missed by Python ?

2011-10-13 Thread 88888 dihedral
As long as there are tools to translate scripts or source code between the two languages. More new evolved powerful programming languages arenot problems at all for experienced programmers. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Implement comparison operators for range objects

2011-10-13 Thread 88888 dihedral
How about iterable objects supported in python? Is a countable object iterable definitely? Also the tail recursion technique is useful for the same function with few arguments that calls itself. The lisp compiler would emit machine codes with fast jumps and passing arguments in registers or

Re: 1/2 evaluates to 0

2011-10-14 Thread 88888 dihedral
How about fractions to be computed in hundreds or even thousands of digits in precision? OK, just write programs to compute PI and the Euler number in hundreds or even thousands of digits to test various kind of programming languages. This is a sophomore school home work for gifted kid

Re: Opportunity missed by Python ?

2011-10-15 Thread 88888 dihedral
Conversion utilities are used to ease the burdens for programmers to translate source scripts and codes into different languages or even the same language with revisions. Check for translators for C, C++, PASCAL, BASIC, and FORTRAN and also SWIG, PYREX, CYTHON, JYTHON and etc.. -- ht

Re: Opportunity missed by Python ?

2011-10-15 Thread 88888 dihedral
The undetected recursive call loop in some states that can be hacked or would hang and crush! Every program has to be run in a VM is just one solution but that will slow down a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop through a dict changing keys

2011-10-15 Thread 88888 dihedral
Is there an FAQ available here? Please check the PYTHON official site and the active state PYTHON examples first, also check the PLEAC comparisons of a lot programming languages first! - Nothing is more thrilling to o

Re: Loop through a dict changing keys

2011-10-17 Thread 88888 dihedral
Uh, sounds reasonable, if one loops over an index variable that could be altered during the loop execution then the loop may not end as expected. -- http://mail.python.org/mailman/listinfo/python-list

Re: compare range objects

2011-10-20 Thread 88888 Dihedral
The range() in python is an iterable generator that returns an object ref/id. The xrange() is different. -- http://mail.python.org/mailman/listinfo/python-list

Re: non-standard module location (again)

2011-10-21 Thread 88888 Dihedral
1. Define a new class with an instance of the foo class included so that one can use all foo's properties and add new attributes. 2. Derive a new class from foo that extends its properties with the properties in foo accessible. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to isolate a constant?

2011-10-22 Thread 88888 Dihedral
Thank you for the good trick for a static class owned property. Someone might object this but this is really useful. -- http://mail.python.org/mailman/listinfo/python-list

Re: compare range objects

2011-10-23 Thread 88888 Dihedral
To compare two instances of objects defined by others in the same class or in derived classes from the same base class is an old problem in OOP. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating very similar functions with different parameters

2011-10-25 Thread 88888 Dihedral
Thanks for the debug modes in functional programing! Everything functional is true in CS at least in the theroy! -- http://mail.python.org/mailman/listinfo/python-list

Re: webapp development in pure python

2011-10-26 Thread 88888 Dihedral
I am thinking one has to distinguish between programs for database servers of the commercial applications in banks or insurance companies that cant be hacked in low costs, and experiments to chunk out database servers for games and videos all over the world! -- http://mail.python.org/mailman

Re: webapp development in pure python

2011-10-26 Thread 88888 Dihedral
OK, lets start a framework in using python in the server side and the client side. (1). requirements of the server side first: 1. sending HTML, XML documents to be displayed in the browsers of the clients and receiving for user inputs are easy in modpython, django, and etc. 2. Da

Re: python logging multiple processes to one file (via socket server)

2011-10-27 Thread 88888 Dihedral
Well, please check the byte code compiled results. This is useful. I know that a lot people are working on increasing the speed of execution scripts written in python, say, psyco, pyrex for packages released! -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast recursive generators?

2011-10-29 Thread 88888 Dihedral
I am thinking the bye code compiler in python can be faster if all known immutable instances up to the executionare compiled immutable objects to be assigned. -- http://mail.python.org/mailman/listinfo/python-list

Re: Database access benchmarks for use in web-frameworks - How does Python compare?

2011-11-03 Thread 88888 Dihedral
I suggest that the use of dynamical page forwarding to different severs which run the same software package. This can be done in python! -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-04 Thread 88888 Dihedral
Uhn, thanks for the easy way Just delete all *.pyc recursively. spend another 5-20 minutes to recompile all to get everything sync.. That is trivial! -- http://mail.python.org/mailman/listinfo/python-list

Re: file extension while saving Python files

2011-11-09 Thread 88888 Dihedral
In testing and debug it is better that a program can be easily modified and easy to set break point and dump values. Thus an interpreter environment is more convenient. But in the final version a compiler can speed up a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators and closures

2011-11-22 Thread 88888 Dihedral
On Monday, November 21, 2011 10:44:34 PM UTC+8, Andrea Crotti wrote: > With one colleague I discovered that the decorator code is always > executed, every time I call > a nested function: > > def dec(fn): > print("In decorator") > def _dec(): > fn() > > return _dec > > d

Re: suitability of python

2011-11-24 Thread 88888 Dihedral
On Friday, November 25, 2011 8:51:10 AM UTC+8, Terry Reedy wrote: > On 11/24/2011 7:31 AM, Rudra Banerjee wrote: > > Dear friends, > > I am a newbie in python and basically i use python for postprocessing > > like plotting, data manipulation etc. > > Based on ease of programming on python I am wond

Re: python shell that saves history of typed in commands that will persist between reboots

2011-11-25 Thread 88888 Dihedral
> Except that, intriguingly, I'm also using an ActiveState distro > and it neither adds Ctrl-D nor prevents history. But I'm > fairly sure that pyreadline does both of those things. > > TJG In python I can spawn a process to run python byte code that will produce a file with results. Easy to av

Re: my new project, is this the right way?

2011-11-26 Thread 88888 Dihedral
On Saturday, November 26, 2011 1:01:34 AM UTC+8, rusi wrote: > On Nov 14, 3:41 pm, Tracubik wrote: > > Hi all, > > i'm developing a new program. > > Mission: learn a bit of database management > > Idea: create a simple, 1 window program that show me a db of movies i've > > seen with few (<10) fiel

Re: my new project, is this the right way?

2011-11-26 Thread 88888 Dihedral
On Sunday, November 27, 2011 10:49:20 AM UTC+8, Roy Smith wrote: > In article , > Dave Angel wrote: > > > If you're using Python, you already have a "fast hash" library, in the > > dictionary class. And yes, if a problem doesn't need the full > > generality of a database, you may be able to i

Re: my new project, is this the right way?

2011-11-27 Thread 88888 Dihedral
On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: > Sounds like you want a key-value store. If it's a lot of data, you may > still want a "database", I think it's just relational databases that > you're trying to avoid? > > On Sun,

Re: my new project, is this the right way?

2011-11-27 Thread 88888 Dihedral
On Sunday, November 27, 2011 4:29:52 PM UTC+8, 8 Dihedral wrote: > On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: > > Sounds like you want a key-value store. If it's a lot of data, you may > > still want a "database", I think it's just r

Re: my new project, is this the right way?

2011-11-28 Thread 88888 Dihedral
On Sunday, November 27, 2011 4:49:14 PM UTC+8, 8 Dihedral wrote: > On Sunday, November 27, 2011 4:29:52 PM UTC+8, 88888 Dihedral wrote: > > On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: > > > Sounds like you want a key-value store. If it's

Re: Executing .pyc using python c api

2011-11-29 Thread 88888 Dihedral
On Tuesday, November 29, 2011 5:02:31 PM UTC+8, Ulrich Eckhardt wrote: > Am 29.11.2011 08:34, schrieb Mrinalini Kulkarni: > > I need to run .pyc files using python c api. if i do PyImport_Import it > > executes the script. However, i need to pass a set of variables and > > their values which will b

<    1   2   3   >