When I need classes?

2016-01-09 Thread Arshpreet Singh
Hello Friends, I am quite new to OOP(object oriented Programming), I did some projects with python which includes Data-Analysis, Flask Web Development and some simple scripts. I have only one question which is bothering me most of the time, When I will get the need to use Classes in Python? Or

pyd file for python package using cython

2016-01-09 Thread Palpandi
Hi All, I have a package structure, A ( uses files from B and C) B ( init.py, a,py, b.py) C ( init.py, c.py, d.py) How to create a pyd file structure for above package structure? Is it possible to create a single pyd file? Do I need cython to run pyd file? Thanks. -- https://mail.python.org/ma

Re: Python launcher options

2016-01-09 Thread Edward Diener
On 1/9/2016 11:03 AM, Tim Golden wrote: On 06/01/2016 00:48, Edward Diener wrote: The Python launcher in Windows is a neat tool for running multiple versions of Python 2 and Python 3 at different times. It allows as options the ability to specify the latest version of either Python 2 or Python 3

Re: Help on return type(?)

2016-01-09 Thread Rustom Mody
On Sunday, January 10, 2016 at 7:16:23 AM UTC+5:30, Robert wrote: > Hi, > > I see below code snippet. The return line is not as the usual type. > > > > def make_cov(cov_type, n_comp, n_fea): > mincv = 0.1 > rand = np.random.random > return { > 'spherical': (mincv + mincv * n

Re: Help on return type(?)

2016-01-09 Thread Martin A. Brown
Hello there, >> def make_cov(cov_type, n_comp, n_fea): >> mincv = 0.1 >> rand = np.random.random >> return { >> 'spherical': (mincv + mincv * np.dot(rand((n_components, 1)), >> np.ones((1, n_features ** >>

Re: Python 3.4.4 Install

2016-01-09 Thread Steven D'Aprano
On Sun, 10 Jan 2016 09:25 am, Colin J. Williams wrote: > The reponse is not understood. > > *** Python 3.4.4rc1 (v3.4.4rc1:04f3f725896c, Dec 6 2015, 17:06:10) [MSC > v.1600 64 bit (AMD64)] on win32. *** File "C:\Users\Adm\AppData\Roaming\PyScripter\python_init.py", line 1 > Öü:Vt‡Ö

Re: Help on return type(?)

2016-01-09 Thread Steven D'Aprano
On Sun, 10 Jan 2016 12:45 pm, Robert wrote: > Hi, > > I see below code snippet. The return line is not as the usual type. > > > > def make_cov(cov_type, n_comp, n_fea): > mincv = 0.1 > rand = np.random.random > return { > 'spherical': (mincv + mincv * np.dot(rand((n_compone

Re: licenses

2016-01-09 Thread Steven D'Aprano
On Sat, 9 Jan 2016 06:41 am, Martinez, Jorge Alberto (GE Aviation) wrote: > Hello > We develop applications here with Python and I want to know if there's > issues by using. We use NumPy, PyDaqMx, Py Visa > > How can we cover this licensing? What do you do with those applications? Do you use th

Help on return type(?)

2016-01-09 Thread Robert
Hi, I see below code snippet. The return line is not as the usual type. def make_cov(cov_type, n_comp, n_fea): mincv = 0.1 rand = np.random.random return { 'spherical': (mincv + mincv * np.dot(rand((n_components, 1)), np.ones((1,

Re:

2016-01-09 Thread paul.hermeneutic
On Jan 9, 2016 7:56 AM, "tommy roberts" wrote: > > It will not allow my to run python 3.5.1 Python 3.4 is the last version that will run on Windows XP. If this is not your problem, please provide more information. -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Karim
Yes it changes your quotechar = "'" into quotechar = '"' You should no more get the double quoting of the data string and no more slicing step. Karim On 10/01/2016 00:15, Saran Ahluwalia wrote: Thank you for the feedback on this. I believe that the excel dialect includes just that: class

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Saran Ahluwalia
Thank you for the feedback on this. I believe that the excel dialect includes just that: class excel(Dialect): delimiter = ',' quotechar = '"' doublequote = True skipinitialspace = False lineterminator = '\r\n' quoting = QUOTE_MINIMAL On Sat, Jan 9, 2016 at 5:23 PM, Karim

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Saran Ahluwalia
As mentioned previously, I assigned the variable *data *to the string ''',0001,0070,". When any utility that attempts to parse this string (this is one example of millions found in my actual data source) you receive that error. You would need to comment out the following: data = row['E

Re: Python 3.4.4 Install

2016-01-09 Thread Terry Reedy
On 1/9/2016 5:25 PM, Colin J. Williams wrote: The reponse is not understood. What part of 'SyntaxError: invalid syntax' do you not understand? *** Python 3.4.4rc1 (v3.4.4rc1:04f3f725896c, Dec 6 2015, 17:06:10) [MSC v.1600 64 bit (AMD64)] on win32. *** Consider replacing with 3.4.4, though

Python 3.4.4 Install

2016-01-09 Thread Colin J. Williams
The reponse is not understood. *** Python 3.4.4rc1 (v3.4.4rc1:04f3f725896c, Dec 6 2015, 17:06:10) [MSC v.1600 64 bit (AMD64)] on win32. *** >>> File "C:\Users\Adm\AppData\Roaming\PyScripter\python_init.py", line 1 Öü:Vt‡Ö{ZðN)’ƒ2%hóýL"®ÁwÇ,”¿ƾJ ^ SyntaxError: invalid syntax Fil

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Karim
On 09/01/2016 21:54, kbtyo wrote: My specs: Python 3.4.3 Windows 7 IDE is Jupyter Notebooks What I have referenced: 1) http://stackoverflow.com/questions/1546717/python-escaping-strings-for-use-in-xml 2) http://stackoverflow.com/questions/7802418/how-to-properly-escape-single-and-double-qu

Re: Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread Karim
On 09/01/2016 21:54, kbtyo wrote: My specs: Python 3.4.3 Windows 7 IDE is Jupyter Notebooks What I have referenced: 1) http://stackoverflow.com/questions/1546717/python-escaping-strings-for-use-in-xml 2) http://stackoverflow.com/questions/7802418/how-to-properly-escape-single-and-double-qu

Re: licenses

2016-01-09 Thread Ben Finney
"Martinez, Jorge Alberto (GE Aviation)" writes: > We develop applications here with Python and I want to know if there's > issues by using. We use NumPy, PyDaqMx, Py Visa Those are all free software: meaning, every recipient has freedom to execute, modify, and/or redistribute the work. So long a

Understanding how to quote XML string in order to serialize using Python's ElementTree

2016-01-09 Thread kbtyo
My specs: Python 3.4.3 Windows 7 IDE is Jupyter Notebooks What I have referenced: 1) http://stackoverflow.com/questions/1546717/python-escaping-strings-for-use-in-xml 2) http://stackoverflow.com/questions/7802418/how-to-properly-escape-single-and-double-quotes 3)http://stackoverflow.com/quest

Re: How to remove item from heap efficiently?

2016-01-09 Thread Paul Rubin
"Sven R. Kunze" writes: > Basically a task scheduler where tasks can be thrown away once they > are too long in the queue. I don't think there's a real nice way to do this with heapq. The computer-sciencey way would involve separate balanced tree structures for the two sorting keys (think of a d

Re: Python launcher options

2016-01-09 Thread Tim Golden
On 06/01/2016 00:48, Edward Diener wrote: The Python launcher in Windows is a neat tool for running multiple versions of Python 2 and Python 3 at different times. It allows as options the ability to specify the latest version of either Python 2 or Python 3 defaulting to the 64-bit version if both

Re: licenses

2016-01-09 Thread Tim Golden
On 08/01/2016 19:41, Martinez, Jorge Alberto (GE Aviation) wrote: Hello We develop applications here with Python and I want to know if there's issues by using. We use NumPy, PyDaqMx, Py Visa How can we cover this licensing? [copying the answer I've just given over at webmaster@] I'm not sure

Re: Problem with 'print'

2016-01-09 Thread D'Arcy J.M. Cain
On Sat, 9 Jan 2016 12:40:16 +0100 pablo gormi wrote: > Hello, recently I downloaded python, but when I try to execute one > file with the command 'print' it shows me a error. The error is: > > Missing parentheses in call to 'print' You downloaded Python 3. but your script was written for Python

Re: Problem with 'print'

2016-01-09 Thread Peter Otten
pablo gormi wrote: > Hello, recently I downloaded python, but when I try to execute one file > with the command 'print' it shows me a error. The error is: > > Missing parentheses in call to 'print' > > Please help mThank you. You have downloaded Python 3 and are using Python 2 syntax. Learnin

Re: Problem with 'print'

2016-01-09 Thread Chris Angelico
On Sat, Jan 9, 2016 at 10:40 PM, pablo gormi wrote: > Hello, recently I downloaded python, but when I try to execute one file > with the command 'print' it shows me a error. The error is: > > Missing parentheses in call to 'print' The error is telling you what you need to do. Put parentheses arou

Problem with 'print'

2016-01-09 Thread pablo gormi
Hello, recently I downloaded python, but when I try to execute one file with the command 'print' it shows me a error. The error is: Missing parentheses in call to 'print' Please help mThank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove item from heap efficiently?

2016-01-09 Thread Sven R. Kunze
Thanks for your reply. On 08.01.2016 14:26, Peter Otten wrote: Sven R. Kunze wrote: Hi everybody, suppose, I need items sorted by two criteria (say timestamp and priority). For that purpose, I use two heaps (heapq module): heapA # items sorted by timestamp heapB # items sorted by priority N

Re: graphs

2016-01-09 Thread Sven R. Kunze
Hi Saski, Python's dataset processing machine is *pandas*. Have a look at this cookbook entry here: http://nbviewer.ipython.org/github/jvns/pandas-cookbook/blob/v0.1/cookbook/Chapter%204%20-%20Find%20out%20on%20which%20weekday%20people%20bike%20the%20most%20with%20groupby%20and%20aggregate.ipyn

[no subject]

2016-01-09 Thread tommy roberts
It will not allow my to run python 3.5.1 -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove item from heap efficiently?

2016-01-09 Thread Sven R. Kunze
Thanks for your suggestion. On 08.01.2016 14:21, srinivas devaki wrote: You can create a single heap with primary key as timestamp and secondary key as priority, i.e by creating a tuple insert the elements into the heap as (timestamp, priority) I think I cannot use that because I need the list

licenses

2016-01-09 Thread Martinez, Jorge Alberto (GE Aviation)
Hello We develop applications here with Python and I want to know if there's issues by using. We use NumPy, PyDaqMx, Py Visa How can we cover this licensing? Regards Jorge Alberto Martinez GE Aviation Systems HW Team Manager GEIQ Power Engineering T +52 442 456 6446 E jorgealberto.marti...@ge

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-09 Thread geraldjuwah
On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com wrote: > On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang wrote: > > i have these task which i believe i have done well to some level > > > > Create a function get_algorithm_result to implement the algorithm below > > > > 1-