why import, reload, import again?

2006-01-03 Thread beliavsky
Near the beginning of file test_matrix.py from scipy are the lines import scipy.base reload(scipy.base) from scipy.base import * del sys.path[0] Could someone please explain why the first two lines were included? A similar script I wrote works fine without them. Also, what is the purpose of the "

Re: Python Projects Continuous Integration

2006-07-28 Thread beliavsky
Harry George wrote: > "Dave Potts" <[EMAIL PROTECTED]> writes: > > > Hi, > > > > I'm just starting a development project in Python having spent time in > > the Java world. I was wondering what tool advice you could give me > > about setting up a continuous integration environment for the python >

programming with Python 3000 in mind

2006-08-15 Thread beliavsky
At http://www-03.ibm.com/developerworks/blogs/page/davidmertz David Mertz writes "Presumably with 2.7 (and later 2.x versions), there will be a means of warning developers of constructs that are likely to cause porting issues [to Python 3000]. In the simplest case, this will include deprecated fun

Re: where can i get older version of python?

2006-08-17 Thread beliavsky
[EMAIL PROTECTED] wrote: > does any one know where can I get older version of python for windows? > > I am looking for versions between 2.0 and 2.2. http://www.python.org/download/releases/ -- http://mail.python.org/mailman/listinfo/python-list

Re: EXCITING OPPORTUNITY FOR EXPERIENCED APPLICATION DEVELOPERS (PYTHON)

2006-10-16 Thread beliavsky
If the company is so good, why does it hire recruiters like you? It is rude to SHOUT your subject in all caps. Your subject conveys nothing more than "Python job offered". You should have mentioned in the subject that the job is in Hyderabad, because even most readers of this group looking for j

Re: PSF Infrastructure has chosen Roundup as the issue tracker for Python development

2006-10-21 Thread beliavsky
BJörn Lindqvist wrote: > On 10/20/06, Brett Cannon <[EMAIL PROTECTED]> wrote: > > At the beginning of the month the PSF Infrastructure committee announced > > that we had reached the decision that JIRA was our recommendation for the > > next issue tracker for Python development. I wonder if the co

profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Beliavsky
Cliff Wells wrote: > On Mon, 2006-11-06 at 18:20 -0800, Beliavsky wrote: > > Carl J. Van Arsdall wrote: > > > > > > > > > Pyro is fucking amazing and has been a great help to a couple of our > > > projects. > > > > You should watch your

article on Python 2.5 features

2006-11-12 Thread Beliavsky
A Parade of New Features Debuts in Python 2.5 by Gigi Sayfan "Python 2.5 still has the smell of fresh paint but it's the perfect time to drill down on the most important new features in this comprehensive release. Read on for detailed explanations and examples of exception handling, resource manage

Re: Programmatically finding "significant" data points

2006-11-14 Thread Beliavsky
erikcw wrote: > Hi all, > > I have a collection of ordered numerical data in a list. Called a "time series" in statistics. > The numbers > when plotted on a line chart make a low-high-low-high-high-low (random) > pattern. I need an algorithm to extract the "significant" high and low > points fr

Re: accessing fortran modules from python

2006-11-16 Thread Beliavsky
sam wrote: > hello all, > > i am currently in the process of planning a piece of software to model > polymerisation kinetics, and intend to use python for all the > high-level stuff. the number-crunching is something i would prefer to > do in fortran (which i have never used, but will learn), but

source reduction using Python

2006-06-21 Thread beliavsky
Intel has introduced something called CESR, written in Python, to aid C, C++, and Fortran programmers in reducing the sizes of programs included in bug reports. Here is a brief description from http://cache-www.intel.com/cd/00/00/21/93/219320_relnotes_10.pdf : "Compiler Error Source Reducer (CESR)

Re: Making a time series analysis package in python - advice or assistance sought

2006-07-07 Thread beliavsky
Ray Tomes wrote: > Hi Folks > > I am an old codger who has much experience with computers > in the distant past before all this object oriented stuff. > Also I have loads of software in such languages as FORTRAN > and BASIC, QBASIC etc that is very useful except that it > really doesn't like to run

How to make an announcement (was Re: ANN: GMPY binaries for Windows 2.5)

2006-09-01 Thread beliavsky
[EMAIL PROTECTED] wrote: > GMPY binaries for Python 2.5 are available at > http://home.comcast.net/~casevh/ "The General Multiprecision PYthon project (GMPY) focuses on Python-usable modules providing multiprecision arithmetic functionality to Python programmers." A sign of Python's health is tha

why a main() function?

2006-09-18 Thread beliavsky
I think I read a suggestion somewhere to wrap the code where a Python script starts in a main() function, so one has def main(): print "hi" main() instead of print "hi" What are the advantages of doing this? -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: productivity and long computing delays

2006-09-27 Thread beliavsky
Paul Rubin wrote: > I'm doing something where I frequently but unpredictably (i.e. I can't > plan for it in advance) hit a snag that requires me to rebuild a large > project. The rebuild takes a couple hours. During that time, I'm > twiddling my thumbs and/or posting here, i.e. not getting anythi

Re: Finding skilled pythonistas for micro-jobs?

2006-11-18 Thread Beliavsky
I have gotten some Python tasks done at http://www.rentacoder.com. Progammers are cheaper outside the U.S. and Western Europe, and you can get a lot done for even $100. -- http://mail.python.org/mailman/listinfo/python-list

Re: Quadratic Optimization Problem

2006-11-22 Thread Beliavsky
Stefan Behnel wrote: > [EMAIL PROTECTED] wrote: > > I need to do a quadratic optimization problem in python where the > > constraints are quadratic and objective function is linear. > > > > What are the possible choices to do this. > > Too bad these homework assignments get trickier every time, isn

Re: Remarkable results with psyco and sieve of Eratosthenes

2006-11-29 Thread Beliavsky
Will McGugan wrote: > Steve Bergman wrote: > > Just wanted to report a delightful little surprise while experimenting > > with psyco. > > The program below performs astonoshingly well with psyco. > > > > It finds all the prime numbers < 10,000,000 > > Actualy, it doesn't. You forgot 1 and 2. The n

Re: How do I print a numpy array?

2006-12-01 Thread Beliavsky
Robert Kern wrote: > Grant Edwards wrote: > > How do you print a numpy array? > > > > I tried the obvious print a, print `a`, and print str(a), but > > none of them work on anything other than trivially small > > arrays. Most of my real data is elided and replaced with > > ellipses. > > You might

Re: len() and PEP 3000

2006-12-06 Thread Beliavsky
Thomas Guettler wrote: > Hi, > > The function len() is not mentioned in the Python 3000 PEPs. > > I suggest that at least lists, tupples, sets, dictionaries and strings > get a len() method. I think the len function can stay, removing it > would break to much code. But adding the method, would bu u

Re: feed-forward neural network for python

2006-12-07 Thread Beliavsky
mwojc wrote: > Hi! > I released feed-forward neural network for python (ffnet) project at > sourceforge. Implementation is extremelly fast (code written mostly in > fortran with thin python interface, scipy optimizers involved) and very > easy to use. > I'm announcing it here because you, folks, a

Re: Automatic debugging of copy by reference errors?

2006-12-11 Thread Beliavsky
Carl Banks wrote: > Niels L Ellegaard wrote: > > Marc 'BlackJack' Rintsch wrote: > > > In <[EMAIL PROTECTED]>, Niels L > > > Ellegaard wrote: > > > > I have been using scipy for some time now, but in the beginning I made > > > > a few mistakes with copying by reference. > > > But "copying by refer

Re: About alternatives to Matlab

2006-12-11 Thread Beliavsky
I came across SAGE "Software for Algebra and Geometry Experimentation" http://sage.math.washington.edu/sage/ , which includes Python and Numeric and consists of Group theory and combinatorics -- GAP Symbolic computation and Calculus -- Maxima Commutative algebra -- Singular Number theory -- PARI,

Re: automatically grading small programming assignments

2006-12-14 Thread Beliavsky
Brian Blais wrote: > Hello, > > I have a couple of classes where I teach introductory programming using > Python. What > I would love to have is for the students to go through a lot of very small > programs, > to learn the basic programming structure. Things like, return the maximum in > a lis

Re: first and last index as in matlab

2006-12-17 Thread Beliavsky
Evan wrote: > In matlab I can do the following: > > >> ind = [3,5,7,2,4,7,8,24] > ind = 3 5 7 2 4 7 824 > >> ind(1) ans = 3 > >> ind(end) ans =24 > >> ind([1 end]) ans = 324 > > but I can't get the last line in python: > > In [690]: ind =

Re: Wow, Python much faster than MatLab

2006-12-29 Thread Beliavsky
Stef Mientki wrote: > hi All, > > instead of questions, > my first success story: > > I converted my first MatLab algorithm into Python (using SciPy), > and it not only works perfectly, > but also runs much faster: > > MatLab: 14 msec > Python: 2 msec For times this small, I wonder if timing com

Re: Writing more efficient code

2007-01-01 Thread Beliavsky
If in the newsgroup comp.lang.x somone asks how to do y, and you suggest using language z, without answering their question, which was how to do it in x, you will likely just annoy people and perhaps make it even less likely that they will try z. I have my own favorite language z and have not alwa

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Beliavsky
Thomas Ploch wrote: > Jonathan Smith schrieb: > > Thomas Ploch wrote: > >> [EMAIL PROTECTED] schrieb: > >>> I'm still pretty new to Python. I'm writing a function that accepts > >>> thre integers as arguments. I need to divide the first integer by te > >>> second integer, and get a float as a resu

Re: Python advocacy in scientific computation

2006-02-15 Thread beliavsky
I have posted your essay in a thread "Python for Fortran programmers" in comp.lang.fortran since it is written in part for a Fortran audience, and since you are more likely to get critical (but hopefully constructive) comments there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python advocacy in scientific computation

2006-03-04 Thread beliavsky
Dennis Lee Bieber wrote: >F90/F95 is scary, isn't it... >F77 wasn't that big a change from FORTRAN-IV (F66) (hmmm, we're due > for another standard, aren't we? 1966, 1977, 1990 [95 was a tweak]...) Fortran 2003 is the latest standard -- see http://www.fortran.com/fortran/fcd_ann

get file modification time in mm/dd/yyyy format?

2005-05-07 Thread beliavsky
Using Python 2.4 on Windows, for me the command print os.stat("temp.txt")[stat.ST_MTIME] gives 1115478343 , which is "seconds since the epoch". How can I get the modification time in a format such as 05/07/2005 11:05 AM as in Windows with the dir command? Ideal would be a tuple of 6 values,

Re: Newbie : checking semantics

2005-05-15 Thread beliavsky
[EMAIL PROTECTED] wrote: > 2. Trust me (and other Python programmers most likely would agree) this > type of error happens much more seldom then newbies (especially coming > from strongly typed languages) imagine while adjusting to the language. > > 3. Python advantages "overpower" drawbacks 10

Re: first release of PyPy

2005-05-21 Thread beliavsky
Shane Hathaway wrote: > > Please could somebody explain to us non-CS people why PyPy could > > have speed features CPython can't have? > > The idea is to shift more of the responsibility to optimize code from > the human to the computer. Since C code is at a low level, the computer > can only i

Re: What are OOP's Jargons and Complexities?

2005-05-24 Thread beliavsky
Thomas G. Marshall wrote: > > I am not familiar with modern Fortran. Surely it at least has argument > > prototyping by now? Since the 1990 standard, if Fortran subroutines and functions are placed in MODULEs, or if INTERFACEs are provided, the compiler checks that procedures are called with the

Re: Python Developers Handbook

2005-06-10 Thread beliavsky
wooks wrote: > I thought that posting a link that contained the word ebay and a > subject title of Python Developers Handbook conveyed all the relevant > information and didn't want to patronise the NG. > > I have had 110 hits on the item but seem to have upset 3 people. This statement shows a mis

Re: What language to manipulate text files

2005-06-12 Thread beliavsky
ross wrote: > Roose wrote: > > Why do people keep asking what language to use for certain things in the > > Python newsgroup? Obviously the answer is going to biased. > > > > Not that it's a bad thing because I love Python, but it doesn't make sense > > if you honestly want an objective opinion. >

compressing consecutive spaces

2007-07-09 Thread Beliavsky
How can I replace multiple consecutive spaces in a file with a single character (usually a space, but maybe a comma if converting to a CSV file)? Ideally, the Python program would not compress consecutive spaces inside single or double quotes. An inelegant method is to repeatedly replace two consec

Re: Pass by reference or by value?

2007-07-16 Thread Beliavsky
On Jul 13, 11:58 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > In Fortran you can only pass references. > > integer(4) :: a > a = 1 > call bar(a) > > subroutine bar(a) > integer(4) :: a > a = 0 ! side-effect > end subroutine > > That means, when a variable is used to call a function,

Re: Python Feature Request: Explicit variable declarations

2007-04-20 Thread Beliavsky
On Apr 14, 6:21 am, [EMAIL PROTECTED] wrote: > Hello. Please tell me whether this feature request is sane (and not > done before) for python so it can be posted to the python-dev mailing > list. I should say first that I am not a professional programmer with > too much technical knowledge. > > I wo

Re: Generalized range

2007-04-27 Thread Beliavsky
On Apr 27, 1:32 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Michael Hoffman <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Thanks - you have covered a fair bit of gorund here - I will modify > > > myRange taking your suggestions into account. The one suggestion that > > > I'm goin

Re: Portable SciPy v0.1 released

2007-04-27 Thread Beliavsky
On Apr 27, 6:17 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Portable SciPy, is an easy installer of SciPy for M$ windows users. If you have an announcement for Windows users, I suggest that you not needlessly turn them off by abbreviating Microsoft as M$ . You don't like Windows, but many of us

Re: Numbers and truth values

2007-04-29 Thread Beliavsky
On Apr 28, 4:05 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > John Nagle <[EMAIL PROTECTED]> wrote: > > > I'd have to consider that a bug. > > > Some very early FORTRAN compilers allowed you to redefine > > integer constants: > > > CALL SET(25,99) > > WRITE (6,100) 25 > >

Re: Single precision floating point calcs?

2007-05-10 Thread Beliavsky
Off-topic, but maybe as practical as "[making] your own Python build from altered source." --- Fortran 95 (and earlier versions) has single and double precision floats. One could write a Fortran code with variables declared REAL, and compilers will by default treat the REALs as single precision, b

Re: Trying to choose between python and java

2007-05-15 Thread Beliavsky
On May 15, 1:30 am, Anthony Irwin <[EMAIL PROTECTED]> wrote: > #5 someone said that they used to use python but stopped because the > language changed or made stuff depreciated (I can fully remember > which) and old code stopped working. Is code written today likely to > still work in 5+ years o

Re: Python-URL! - weekly Python news and links (May 16)

2007-05-17 Thread Beliavsky
On May 16, 2:45 pm, "Cameron Laird" <[EMAIL PROTECTED]> wrote: > QOTW: "Sometimes you just have to take the path of least distaste". - Grant > Edwards > > "I want to choose my words carefully here, so I'm not misunderstood. I think Cameron Laird does a good job with the Python digest but blun

Re: List Moderator

2007-05-18 Thread Beliavsky
On May 18, 9:22 am, [EMAIL PROTECTED] wrote: > You're probably right, but this week has been pretty bad. Every few > posts there's another porn or boob related link. Sheesh! > > Mike I wish Google Groups were enhanced to let users block messages according to (1) "keywords" (2) average ranking

Re: Python compared to other language

2007-05-18 Thread Beliavsky
On May 18, 3:04 pm, scott <[EMAIL PROTECTED]> wrote: > Hi all, > > I have been looking at the various programming languages available. I > have programed in Basic since I was a teenager and I also have a basic > understanding of C, but I want something better. > > Can anybody tell

Re: Where do they tech Python officialy ?

2007-07-24 Thread Beliavsky
On Jul 23, 1:27 pm, [EMAIL PROTECTED] (Cameron Laird) wrote: > Autodidacticism is an alternative; feel free to regard > http://wiki.python.org/moin/PythonTraining> as a member of > that class. > > If you, for example, were to teach yourself Python, then > volunteer with prominent extensions or

Re: Python Book Recommendations

2007-08-15 Thread Beliavsky
On Aug 15, 10:47 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: > If I could have only one book, I would buy "Core Python, Second > Edition," by Wesley Chun. I have bought about half a dozen Python books but will purchase only Python 3 books in the future, when they become available. I wonder whe

Re: Python stock market analysis tools?

2007-03-05 Thread Beliavsky
On Mar 5, 12:41 am, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > On Mar 4, 7:52 pm, "Mudcat" <[EMAIL PROTECTED]> wrote: > > > I have done a bit of searching and can't seem to find a stock market > > tool written in Python that is active. Anybody know of any? I'm trying > > not to re-create the

check if files are the same on Windows

2007-03-19 Thread Beliavsky
A crude way to check if two files are the same on Windows is to look at the output of the "fc" function of cmd.exe, for example def files_same(f1,f2): cmnd= "fc " + f1 + " " + f2 return ("no differences" in popen(cmnd).read()) This is needlessly slow, because one can stop comparing tw

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Beliavsky
On Mar 26, 8:40 am, [EMAIL PROTECTED] wrote: > On Mar 26, 8:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > OK... > > I've been told that Both Fortran and Python are easy to read, and are > > quite useful in creating scientific apps for the number crunching, but > > then Python is a tad

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Beliavsky
On Mar 26, 8:42 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > You can get the speed of fortran in Python by using libraries like > Numeric without losing the readability of Python. Numeric and Numpy will faster than raw Python for array operations, but I don't think they will match well-

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Beliavsky
On Mar 26, 9:06 am, stef <[EMAIL PROTECTED]> wrote: > As said by others, "Portability, scalability & RAD" as an advantage of > Python are probably far more important. All of those claimed advantages can be debated, although they may exist for some tasks. (1) Portability. Fortran has been run on

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Beliavsky
On Mar 26, 10:31 am, "Carl Banks" <[EMAIL PROTECTED]> wrote: > > You can write programs in Python that do usefully complicated things, > > and you can get them to work in a reasonable time. Fortran can't do > > this, for anything more than the trivial. "Classic" Fortran tasks of > > the past are

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Beliavsky
On Mar 26, 10:16 am, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>,[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >Is there a mac version?? > >Thanks > >Chris > > Yes. > > Several, in fact--all available at no charge. The Python > world is different from what experienc

Re: Fortran vs Python - Newbie Question

2007-03-27 Thread Beliavsky
On Mar 27, 6:32 am, [EMAIL PROTECTED] (Cameron Laird) wrote: > In article <[EMAIL PROTECTED]>,Beliavsky <[EMAIL PROTECTED]> wrote: > > . > . > . > > > > >Your experience with Fortran

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-15 Thread Beliavsky
On Apr 14, 10:55 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > The FORTRAN family had started as 1-based (F95, and Ada, now allow > for each array to have its own "base" => x : array (-10..10) of float). Fortran has allowed a user-specified base since at least the 1977 standard --

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-15 Thread Beliavsky
On Apr 14, 10:12 pm, "Paddy" <[EMAIL PROTECTED]> wrote: > So the running count is: > Ayes to the left: VB compatibility. > Nays to the right: QuadIO, Perl, Dijkstra paper. > > The nays have it! One-based indexing would also Python more compatible with Fortran, Matlab/Octave/Scilab, and S

Re: Reading Fortran Data

2007-01-21 Thread Beliavsky
Tyler wrote: > Hello All: > > After trying to find an open source alternative to Matlab (or IDL), I > am currently getting acquainted with Python and, in particular SciPy, > NumPy, and Matplotlib. While I await the delivery of Travis Oliphant's > NumPy manual, I have a quick question (hopefully) re

Re: Reading Fortran Data

2007-01-21 Thread Beliavsky
Carl Banks wrote: > > WRITE(90,*) nfault,npoint > > Fortran writes this as two arbitrary integers separated by a space. I wrote a paragraph in my reply explaining why this is wrong. A Fortran list-directed write can print results in an almost arbitrary format, depending on the compiler. Many

Re: Reading Fortran Data

2007-01-21 Thread Beliavsky
Carl Banks wrote: > > A Fortran > > list-directed write can print results in an almost arbitrary format, > > depending on the compiler. Many compilers will separate integers by > > several spaces, not just one, and they could use commas instead of > > spaces if they wanted. > > 1. Hardly any co

Re: Pep 3105: the end of print?

2007-02-20 Thread Beliavsky
On Feb 16, 10:17 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 16 Feb 2007 09:49:03 -0500, Jean-Paul Calderone wrote: > > On Sat, 17 Feb 2007 01:32:21 +1100, Steven D'Aprano > >> [snip] > > >>I don't think that follows at all. print is only a problem if you expect > >>your code to work u

Re: f2py and Fortran90 gfortran_filename error

2007-02-28 Thread Beliavsky
On Feb 28, 12:40 am, Robert Kern <[EMAIL PROTECTED]> wrote: > Tyler wrote: > > Hello All: > > > Since my last post I have attempted to use the f2py program which > > comes with numpy. > > It's better to ask these questions on numpy-discussion, instead. There are > more > f2py users per capita ther

Re: what has python added to programming languages? (lets be esoteric, shall we ; )

2006-04-24 Thread beliavsky
Michael Tobis wrote: > Although somewhat more elegant, Python slices follow Matlab's slice > notation. In simpler cases they are identical. > > mt I think in Matlab, as in Fortran 90, i:j refers to the elements from i up to and including j, unlike Python, where j is excluded. Another language with

search file for tabs

2006-05-02 Thread beliavsky
The following code to search a file for tabs does not work, at least on Windows XP. Could someone please tell me what's wrong? Thanks. xfile = "file_with_tabs.txt" for text in open(xfile,"r"): text = text.strip() if ("\t" in text): print text -- http://mail.python.org/mailman/lis

Re: search file for tabs

2006-05-02 Thread beliavsky
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > The following code to search a file for tabs does not work, at least on > > Windows XP. Could someone please tell me what's wrong? Thanks. > > > > xfile = "file_with_tabs.txt" > > for text in open(xfile,"r"): > > text = text.strip() > >

connect file object to standard output?

2006-05-08 Thread beliavsky
I want to write a function that writes to an output file if specified and otherwise to standard output. How can I connect a file object to standard output in the code below? I could use an if statement to choose between print and print>>fp throughout the function, but this seems awkward. I think th

Re: Econometrics in Panel data?

2006-05-08 Thread beliavsky
DeepBlue wrote: > Hi all, > > I am new to Python. Just wondering can Python able to do econometric > regression in either Time-series or pooled (panel) data? As well as test > for hetero, autocorrelation, or endogeneity? > Thank you! NumPy can do linear regression, and one can certainly program a

Re: Econometrics in Panel data?

2006-05-10 Thread beliavsky
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, I counseled: > >In article <[EMAIL PROTECTED]>, > >DeepBlue <[EMAIL PROTECTED]> wrote: > >>so are you saying that Python is not an appropriate language for doing > >>econometrics stuff? > >> > >> > >>Dennis Lee Bieber wrote: > >>> On Tue, 09 M

Re: Books to begin learning Python

2008-08-07 Thread Beliavsky
On Aug 6, 4:08 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Aug 6, 2:56 pm, Edward Cormier <[EMAIL PROTECTED]> wrote: > > > Which computer books are the best to begin learning Python 2.5 with? > > I've heard that Learning Python 3rd Edition is a good choice - can > > anyone give any more advic

processing email with Python on Windows?

2008-10-03 Thread Beliavsky
I work for a financial company where we run Windows XP and read email using Microsoft Outlook 2003. I get daily files that come as email attachments from various counterparties. I save them as h:\firm_name \mmdd.csv . Would Python be a good tool to automate the process of saving reports, or wou

Re: time series calculation in list comprehension?

2006-03-10 Thread beliavsky
falcon wrote: > Is there a way I can do time series calculation, such as a moving > average in list comprehension syntax? I'm new to python but it looks > like list comprehension's 'head' can only work at a value at a time. I > also tried using the reduce function and passed in my list and anothe

XEmacs output from Python

2011-02-01 Thread Beliavsky
The script name = raw_input("What is your name? ") print "Hello, ",name runs fine from the Windows prompt (cmd.exe), but when I run it in a shell buffer under XEmacs, I only see the text "What is your name? " AFTER I enter some text, so a run looks like this: H:\python>python xinput.py x What is

scipy code runs in empty directory, not another

2010-11-13 Thread Beliavsky
After installing numpy, scipy, and matplotlib for python 2.6 and running the code from http://www.scipy.org/Cookbook/OptimizationDemo1 (stored as xoptimize.py) in a directory with other python codes, I got the error messages C:\python\code\mycode>python xoptimize.py Traceback (most recent call las

Humble Book Bundle: Python by Packt

2018-01-01 Thread beliavsky--- via Python-list
One can purchase the following Python books and videos published by Packt for $15 at https://www.humblebundle.com/books/python-by-packt-book-bundle for about the next two weeks. Python Data Analysis Cookbook Mastering Python, Second Edition Learning Robotics using Python Python Programming with

Python library to break text into words

2018-05-31 Thread beliavsky--- via Python-list
I bought some e-books in a Humble Bundle. The file names are shown below. I would like to hyphenate words within the file names, so that the first three titles are a_devils_chaplain.pdf atomic_accidents.pdf chaos_making_a_new_science.pdf Is there a Python library that uses intelligent guesses t

Re: Python library to break text into words

2018-05-31 Thread beliavsky--- via Python-list
On Thursday, May 31, 2018 at 5:31:48 PM UTC-4, Dietmar Schwertberger wrote: > On 5/31/2018 10:26 PM, beliavsky--- via Python-list wrote: > > Is there a Python library that uses intelligent guesses to break sequences > > of characters into words? The general strategy would be t

Re: Python is an Equal Opportunity Programming Language

2016-05-06 Thread beliavsky--- via Python-list
On Thursday, May 5, 2016 at 3:00:01 PM UTC-4, Terry Reedy wrote: > https://motherboard.vice.com/blog/python-is-an-equal-opportunity-programming-language > > from an 'Intel(R) Software Evangelist' > -- > Terry Jan Reedy >From the link: MB: What is it about Python that makes it friendly to women?

Re: Python is an Equal Opportunity Programming Language

2016-05-06 Thread beliavsky--- via Python-list
On Friday, May 6, 2016 at 5:07:28 PM UTC-4, Ethan Furman wrote: > On 05/06/2016 01:35 PM, beliavsky--- via Python-list wrote: > > > Most of [Guido's] keynote at that conference was answering questions from > > the people who had attended. And he actually said, &quo

Re: Python is an Equal Opportunity Programming Language

2016-05-08 Thread beliavsky--- via Python-list
other > > 95 are men. > > > > Alternating between men and women means that all of the > > women get their questions answered, and only 5/95 of the > > men. So in this example, if you're a woman you have a 100% > > chance of getting answered, and if you're a

Intel Distribution for Python

2016-05-10 Thread beliavsky--- via Python-list
The Intel Distribution for Python 2017 Beta https://software.intel.com/en-us/python-distribution is available for Windows, Linux, and Mac OS for Python 2.7 and 3.5. "The Beta product adds new Python packages like scikit-learn, mpi4py, numba, conda, tbb (Python interfaces to Intel® Threading Bui

Re: Intel Distribution for Python

2016-05-11 Thread beliavsky--- via Python-list
On Tuesday, May 10, 2016 at 11:17:33 PM UTC-4, Arshpreet Singh wrote: > Thanks for the information, I just applied for program but I got one mail > about license and expiration. > > > This software license expires on October 29, 2016. > > > I am not able to understand that can anyone put some

Re: Intel Distribution for Python

2016-06-09 Thread beliavsky--- via Python-list
Intel has released Beta Update 1 of its Python distribution: "What's New! Jupyter* notebook interface Neural network APIs support for pyDAAL Optimized random number generation features for numpy.random package" -- https://mail.python.org/mailman/listinfo/python-list

Python Humble Bundle from Packt

2019-01-01 Thread beliavsky--- via Python-list
For about the next two weeks, Humble Bundle https://www.humblebundle.com/books/python-packt-2019-books offers the following 18 books and 7 videos on Python for $15. BOOKS: Python Interviews OpenCV 3 Computer Vision with Python Cookbook Mastering Flask Web Development Python Automation Cookbo

book on modern Python

2019-07-25 Thread beliavsky--- via Python-list
I did some basic programming in Python 2 and now use Python 3. All I know about Python 3 is that print is a function requiring parentheses. What is a good book on modern Python that covers topics such as type annotations? I know of Fluent Python: Clear, Concise, and Effective Programming by Luc

discussion group for Python in finance?

2016-03-18 Thread beliavsky--- via Python-list
Is there an active online group discussing the use of Python in finance? Here are some resources for Python in finance I know of. Numpy, scipy, pandas, and matplotlib are useful packages discussed in the books "Python for Finance" by Hilpisch and "Python for Data Analysis" by McKinney. Quandl is

Exclude every nth element from list?

2016-03-26 Thread beliavsky--- via Python-list
I can use x[::n] to select every nth element of a list. Is there a one-liner to get a list that excludes every nth element? -- https://mail.python.org/mailman/listinfo/python-list

Re: Exclude every nth element from list?

2016-03-26 Thread beliavsky--- via Python-list
On Saturday, March 26, 2016 at 1:02:06 PM UTC-4, Gary Herron wrote: > On 03/26/2016 09:49 AM, beliavsky--- via Python-list wrote: > > I can use x[::n] to select every nth element of a list. Is there a > > one-liner to get a list that excludes every nth element? > > Yes: >

repeat items in a list

2016-03-26 Thread beliavsky--- via Python-list
I can create a list that has repeated elements of another list as follows: xx = ["a","b"] nrep = 3 print xx yy = [] for aa in xx: for i in range(nrep): yy.append(aa) print yy output: ['a', 'b'] ['a', 'a', 'a', 'b', 'b', 'b'] Is there a one-liner to create a list with repeated element

Re: repeat items in a list

2016-03-26 Thread beliavsky--- via Python-list
On Saturday, March 26, 2016 at 7:24:10 PM UTC-4, Erik wrote: > Hi, > > On 26/03/16 22:12, beliavsky--- via Python-list wrote: > > I can create a list that has repeated elements of another list as follows: > > > > xx = ["a","b"] > > nrep = 3 &g

Re: repeat items in a list

2016-03-26 Thread beliavsky--- via Python-list
On Saturday, March 26, 2016 at 7:30:14 PM UTC-4, Mark Lawrence wrote: > On 26/03/2016 22:12, beliavsky--- via Python-list wrote: > > I can create a list that has repeated elements of another list as follows: > > > > xx = ["a","b"] > > nre

Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-11 Thread beliavsky--- via Python-list
On Sunday, May 10, 2015 at 9:38:38 PM UTC-4, Ian wrote: > On Sun, May 10, 2015 at 3:16 PM, Marko Rauhamaa wrote: > > Scheme is my favorite language. I think, however, it is a pretty > > advanced language and requires a pretty solid basis in programming and > > computer science. > > > > Python, in

Python programming classes for children

2015-07-01 Thread beliavsky--- via Python-list
My 11yo son is taking the online class "Intermediate Programming with Python" http://www.artofproblemsolving.com/school/course/catalog/python2 offered by the Art of Problem Solving company (AoPS). Classes meet for 1.5 hours a week for 12 weeks. During the classes the instructor "lectures" (types

Re: The EuroPython 2015 Keynotes

2015-07-10 Thread beliavsky--- via Python-list
On Friday, July 10, 2015 at 7:21:14 AM UTC-4, M.-A. Lemburg wrote: > With Mandy Waite we have announced all keynotes for EuroPython 2015: > 5 keynotes, 6 speakers, 4 women and 2 men. Your mentioning these numbers makes me wonder if the organizing committee is using gender preferences in its selec

Re: The EuroPython 2015 Keynotes

2015-07-10 Thread beliavsky--- via Python-list
On Friday, July 10, 2015 at 2:58:18 PM UTC-4, Chris Angelico wrote: > On Fri, Jul 10, 2015 at 10:01 PM, beliavsky--- via Python-list > wrote: > > On Friday, July 10, 2015 at 7:21:14 AM UTC-4, M.-A. Lemburg wrote: > >> With Mandy Waite we have announced all keynotes for Eu

Re: Python speed

2015-08-07 Thread beliavsky--- via Python-list
On Friday, August 7, 2015 at 10:08:37 AM UTC-4, roge...@gmail.com wrote: > Can anyone compare PyNum calculation speed to Fortran? > > This is for a number crunching program working with large files. > > Roger Did you mean NumPy? It depends on the program. Here are two posts that compared speeds

Planet Scipy blog

2015-10-08 Thread beliavsky--- via Python-list
There used to be a blog about SciPy at https://planet.scipy.org/ , discussing the applications of Python to scientific computing. Now there is a static page about "MPI for Python". What happened? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 vs Python 3 for teaching

2015-11-02 Thread beliavsky--- via Python-list
I think Python 2.x is still used more than Python 3.x in scientific computing. The Python books I have in this area, such as "Python for Finance: Analyze Big Financial Data" and "Python for Data Analysis", still use Python 2.x . An aspiring computational scientist, data scientist, or financial q

Refactoring tool to create Python functions

2017-05-08 Thread beliavsky--- via Python-list
Googling "refactoring python code to create functions" I came to https://wingware.com/doc/intro/tutorial-refactoring where the "Extract Function/Method" does what I want. Is there a free Python tool that does this? -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   >