Re: from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

2016-02-09 Thread Mark Lawrence
On 09/02/2016 04:22, Mike S via Python-list wrote: I have Python 3.4.4 installed on Windows 7, also IPython, scipy, numpy, statsmodels, and a lot of other modules, and am working through this tutorial http://www.analyticsvidhya.com/blog/2016/02/time-series-forecasting-codes-python/ [snip bulk

[newbie] how to create log files

2016-02-09 Thread jenswaelkens
When I run my Python scripts from the command prompt in Linux, I can make visible all kinds of information I want to check by using print statements e.g. print (top.winfo_width()), this is very useful when debugging. However, the final version of my program won't be run from the command line, but

Re: Heap Implementation

2016-02-09 Thread Mark Lawrence
On 09/02/2016 04:25, Cem Karan wrote: No problem, that's what I thought happened. And you're right, I'm looking for a priority queue (not the only reason to use a heap, but a pretty important reason!) I'm assuming I've missed the explanation, so what is the problem again with https://docs

Re: [newbie] how to create log files

2016-02-09 Thread marco . nawijn
Hello Jens, Are you aware of Python's own logging facility? It is quite powerful and flexible. Python 2: https://docs.python.org/2/library/logging.html Python 3: https://docs.python.org/3/library/logging.html Marco -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] how to create log files

2016-02-09 Thread Mark Lawrence
On 09/02/2016 09:33, jenswaelk...@gmail.com wrote: Hello and welcome. When I run my Python scripts from the command prompt in Linux, I can make visible all kinds of information I want to check by using print statements e.g. print (top.winfo_width()), this is very useful when debugging. However

newbie. how can i solve this looping problem?

2016-02-09 Thread asdasdqeqe
http://pastebin.com/Khrm3gHq for the code above, everytime it scraps off tweets and loads the next 13 tweets, it'll re-run through the previous scrapped tweets before recording the new ones. I'm up to 700 over tweets and it'll keep re-running the previous 700 before adding the final 13 to the l

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 4:40 AM, Mark Lawrence wrote: > On 09/02/2016 04:25, Cem Karan wrote: >> >> No problem, that's what I thought happened. And you're right, I'm looking >> for a priority queue (not the only reason to use a heap, but a pretty >> important reason!) >> > > I'm assuming I've m

Re: coroutine, throw, yield, call-stack and exception handling

2016-02-09 Thread Veek. M
Ian Kelly wrote: > On Mon, Feb 8, 2016 at 2:17 AM, Veek. M wrote: >> >> Exceptions can be raised inside a coroutine using the throw( >> >> Exceptions raised in this manner will originate at the currently >> executing yield state-ment in the coroutine.A coroutine can e

How to trap this error (comes from sqlite3)

2016-02-09 Thread cl
I have the following code snippet populating a wxPython grid with data from a database. :- # # # populate grid with data # all = self.cur.execute("SELECT * from " + table + " ORDER by id ") for row in all: row_num = row[0] ce

Re: How to trap this error (comes from sqlite3)

2016-02-09 Thread Peter Otten
c...@isbd.net wrote: > I have the following code snippet populating a wxPython grid with data > from a database. :- > > # > # > # populate grid with data > # > all = self.cur.execute("SELECT * from " + table + " ORDER by id ") > for row in all: >

Re: How to trap this error (comes from sqlite3)

2016-02-09 Thread Mark Lawrence
On 09/02/2016 11:57, c...@isbd.net wrote: I have the following code snippet populating a wxPython grid with data from a database. :- # # # populate grid with data # all = self.cur.execute("SELECT * from " + table + " ORDER by id ") for row in

Re: newbie. how can i solve this looping problem?

2016-02-09 Thread Joel Goldstick
On Tue, Feb 9, 2016 at 5:49 AM, wrote: > http://pastebin.com/Khrm3gHq > > for the code above, everytime it scraps off tweets and loads the next 13 > tweets, it'll re-run through the previous scrapped tweets before recording > the new ones. I'm up to 700 over tweets and it'll keep re-running the >

First Program with Python!

2016-02-09 Thread anitagoyal571
Python is a very powerful high-level, object-oriented programming language.Python has a very easy-to-use and simple syntax, making it the perfect language for someone trying to learn computer programming for the first time. Python is an interpreted language. Interpreter is a program that convert

Re: Searching Sets (Lottery Results)

2016-02-09 Thread MrPink
On Monday, February 8, 2016 at 7:05:24 PM UTC-5, Chris Angelico wrote: > On Tue, Feb 9, 2016 at 8:45 AM, MrPink wrote: > > I load the lottery drawings into memory for searching with the following > > code although, it is incomplete. I am stuck and need some guidance. > > > > The set datatype seem

Re: newbie. how can i solve this looping problem?

2016-02-09 Thread asdasdqeqe
http://pastebin.com/uQSW5iwZ here's the part of the code which I would like to change. I don't know how to get the following line to not "Timeout" and instead continue onwards to printTweet(driver) elem = WebDriverWait(driver,10).until(EC.visibility_of_element_located((By.CSS_SELECTOR,lastTwee

Re: Heap Implementation

2016-02-09 Thread Mark Lawrence
On 09/02/2016 11:44, Cem Karan wrote: On Feb 9, 2016, at 4:40 AM, Mark Lawrence wrote: On 09/02/2016 04:25, Cem Karan wrote: No problem, that's what I thought happened. And you're right, I'm looking for a priority queue (not the only reason to use a heap, but a pretty important reason!)

Re: How to trap this error (comes from sqlite3)

2016-02-09 Thread cl
Peter Otten <__pete...@web.de> wrote: > c...@isbd.net wrote: > > > It's absolutely right, there is a non-UTF character in the column. > > However I don't want to have to clean up the data, it would take > > rather a long time. How can I trap the error and just put a Null or > > zero in the datagr

ImportError: cannot import name 'RAND_egd'

2016-02-09 Thread shaunak . bangale
Hi, I am trying to run a 60 lines Python code which is running on a mac machine but on windows machine, I am getting this error when I run on it on shell(open file and run module). I have Python 3.5 installed. from _ssl import RAND_status, RAND_egd, RAND_add ImportError: cannot import name '

Re: Set Operations on Dicts

2016-02-09 Thread Ian Kelly
On Tue, Feb 9, 2016 at 12:21 AM, Grobu wrote: > On 08/02/16 17:12, Ian Kelly wrote: > >> dict does already expose set-like views. How about: >> >> {k: d[k] for k in d.keys() & s} # d & s >> {k: d[k] for k in d.keys() - s} # d - s >> > Interesting. But seemingly only applies to Python 3. Substit

Cygwin and Python3

2016-02-09 Thread Fillmore
Hi, I am having a hard time making my Cygwin run Python 3.5 (or Python 2.7 for that matter). The command will hang and nothing happens. A cursory search on the net reveals many possibilities, which might mean a lot of trial and error, which I would very much like to avoid. Any suggestions on h

Re: Cygwin and Python3

2016-02-09 Thread alvin . hacopian
On Tuesday, February 9, 2016 at 8:41:43 AM UTC-8, Fillmore wrote: > Hi, I am having a hard time making my Cygwin run Python 3.5 (or Python 2.7 > for that matter). > The command will hang and nothing happens. > > A cursory search on the net reveals many possibilities, which might mean a lot > of t

Re: Cygwin and Python3

2016-02-09 Thread Fillmore
On 2/9/2016 2:29 PM, alvin.hacop...@gmail.com wrote: $ ls -l /usr/bin/python rm /usr/bin/python $ ln -s /usr/bin/python /usr/bin/python3.2m.exe $ /usr/bin/python --version Python 3.2.5 $ pydoc modules Still no luck (: ~ $ python --version Python 3.5.1 ~ $ python (..hangs indefinitel

Re: ImportError: cannot import name 'RAND_egd'

2016-02-09 Thread Ian Kelly
On Tue, Feb 9, 2016 at 7:55 AM, wrote: > Hi, > > I am trying to run a 60 lines Python code which is running on a mac machine > but on windows machine, I am getting this error when I run on it on > shell(open file and run module). I have Python 3.5 installed. > >from _ssl import RAND_status,

Re: Cygwin and Python3

2016-02-09 Thread alvin . hacopian
On Tuesday, February 9, 2016 at 12:20:06 PM UTC-8, Fillmore wrote: > On 2/9/2016 2:29 PM, alvin.hacop...@gmail.com wrote: > > > > > > $ ls -l /usr/bin/python > > rm /usr/bin/python > > > > $ ln -s /usr/bin/python /usr/bin/python3.2m.exe > > > > $ /usr/bin/python --version > > Python 3.2.5 > > > >

Re: Cygwin and Python3

2016-02-09 Thread Fillmore
On 2/9/2016 3:30 PM, alvin.hacop...@gmail.com wrote: When you run the cygwin installer you have the option of installing 2.7 > and 3.2.5, by default it will install 2.7 and 3.2 together. > After running the installer run whereis python and use the alternatives > to change it or use python3 ins

Re: Cygwin and Python3

2016-02-09 Thread Fillmore
On 2/9/2016 4:47 PM, Fillmore wrote: On 2/9/2016 3:30 PM, alvin.hacop...@gmail.com wrote: When you run the cygwin installer you have the option of installing 2.7 > and 3.2.5, by default it will install 2.7 and 3.2 together. > After running the installer run whereis python and use the altern

Importing two modules of same name

2016-02-09 Thread Tim Johnson
Before proceding, let me state that this is to satisfy my curiousity, not to solve any problem I am having. Scenario : Web application developed at /some/dir/sites/flask/ If I have a package - let us call it app and in my /some/dir/sites/flask/app/__init__.py is the following: from config import

Re: from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

2016-02-09 Thread Mike S via Python-list
On 2/9/2016 1:33 AM, Mark Lawrence wrote: On 09/02/2016 04:22, Mike S via Python-list wrote: I have Python 3.4.4 installed on Windows 7, also IPython, scipy, numpy, statsmodels, and a lot of other modules, and am working through this tutorial http://www.analyticsvidhya.com/blog/2016/02/time-seri

Re: Importing two modules of same name

2016-02-09 Thread Carl Meyer
Hi Tim, On 02/09/2016 04:23 PM, Tim Johnson wrote: > Before proceding, let me state that this is to satisfy my > curiousity, not to solve any problem I am having. > > Scenario : > Web application developed at /some/dir/sites/flask/ > > If I have a package - let us call it app and in my > /some/d

Re: Python's import situation has driven me to the brink of imsanity

2016-02-09 Thread Oscar Benjamin
On 8 February 2016 at 00:38, wrote: > Running python setup.py develop doesn't work, it gives me this error: error: > invalid command 'develop' This is presumably because your setup.py script uses distutils rather than setuptools: distutils doesn't have the develop command. > Running pip instal

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 9:27 AM, Mark Lawrence wrote: > On 09/02/2016 11:44, Cem Karan wrote: >> >> On Feb 9, 2016, at 4:40 AM, Mark Lawrence wrote: >> >>> On 09/02/2016 04:25, Cem Karan wrote: No problem, that's what I thought happened. And you're right, I'm looking for a priori

Re: Importing two modules of same name

2016-02-09 Thread Tim Johnson
* Carl Meyer [160209 15:28]: > Hi Tim, <...> > The proper way to do this in Python 2.7 is to place `from __future__ > import absolute_import` at the top of flask/app/__init__.py (maybe best > at the top of every Python file in your project, to keep the behavior > consistent). Once you have that f

There has to be a better way to split this string!

2016-02-09 Thread Anthony Papillion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hello Everyone, I am using datetime.now() to create a unique version of a filename. When the final file is named, it will look something like: myfile-2015-02-09-19-08-45-4223 Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by date

Re: Heap Implementation

2016-02-09 Thread srinivas devaki
On Feb 10, 2016 6:11 AM, "Cem Karan" wrote: > > Eh, its not too bad once you figure out how to do it. It's easier in C though; you can use pointer tricks that let you find the element in constant time, and then removal will involve figuring out how to fix up your heap after you've removed the ele

Re: There has to be a better way to split this string!

2016-02-09 Thread Chris Angelico
On Wed, Feb 10, 2016 at 12:26 PM, Anthony Papillion wrote: > I am using datetime.now() to create a unique version of a filename. First off, be aware that this won't make a unique file name. But if you're okay with that (deal with collisions somehow), then sure. > When the final file is named, it

Re: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Anthony Papillion
On 02/09/2016 07:26 PM, Anthony Papillion wrote: > Hello Everyone, > > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > > myfile-2015-02-09-19-08-45-4223 > > Notice I'm replacing all of the "."'s, " "'s, and ":"'s

Re: There has to be a better way to split this string!

2016-02-09 Thread Oscar Benjamin
On 10 February 2016 at 01:26, Anthony Papillion wrote: > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > > myfile-2015-02-09-19-08-45-4223 > > Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by > da

Re: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Ben Finney
Anthony Papillion writes: > On 02/09/2016 07:26 PM, Anthony Papillion wrote: > > I am using datetime.now() to create a unique version of a filename. > > […] > > Found the solution in strftime(). Exactly what I was looking for. For the task of making a unique filename, you should also consider th

Re: There has to be a better way to split this string!

2016-02-09 Thread srinivas devaki
On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Hello Everyone, > > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > > myfile-2015-02-09-19-08-45-4223 >

Re: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Anthony Papillion
On 02/09/2016 07:47 PM, Ben Finney wrote: > Anthony Papillion writes: > >> On 02/09/2016 07:26 PM, Anthony Papillion wrote: >>> I am using datetime.now() to create a unique version of a filename. >>> […] >> >> Found the solution in strftime(). Exactly what I was looking for. > > For the task of

Re: There has to be a better way to split this string!

2016-02-09 Thread Tim Chase
On 2016-02-09 19:26, Anthony Papillion wrote: > myfile-2015-02-09-19-08-45-4223 > > Notice I'm replacing all of the "."'s, " "'s, and ":"'s returned by > datetime.now() with "-"'s. I'm doing that using the following code > but it's freaking ugly and I KNOW there is a better way to do it. I > just

Re: [SOLVED] There has to be a better way to split this string!

2016-02-09 Thread Chris Kaynor
On Tue, Feb 9, 2016 at 5:58 PM, Anthony Papillion wrote: > > On 02/09/2016 07:47 PM, Ben Finney wrote: > > Anthony Papillion writes: > > > >> On 02/09/2016 07:26 PM, Anthony Papillion wrote: > >>> I am using datetime.now() to create a unique version of a filename. > >>> […] > >> > >> Found the so

Re: There has to be a better way to split this string!

2016-02-09 Thread srinivas devaki
On Feb 10, 2016 7:23 AM, "srinivas devaki" wrote: > > > On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Hello Everyone, > > > > I am using datetime.now() to create a unique version of a filename. > > When the final file is na

Re: Heap Implementation

2016-02-09 Thread Cem Karan
On Feb 9, 2016, at 8:27 PM, srinivas devaki wrote: > > > On Feb 10, 2016 6:11 AM, "Cem Karan" wrote: > > > > Eh, its not too bad once you figure out how to do it. It's easier in C > > though; you can use pointer tricks that let you find the element in > > constant time, and then removal wi

Re: Cygwin and Python3

2016-02-09 Thread Larry Hudson via Python-list
On 02/09/2016 08:41 AM, Fillmore wrote: Hi, I am having a hard time making my Cygwin run Python 3.5 (or Python 2.7 for that matter). The command will hang and nothing happens. Just curious... Since Python runs natively in Windows, why are you trying to run it with Cygwin? I'm not implying t

Re: Cygwin and Python3

2016-02-09 Thread Mike S via Python-list
On 2/9/2016 7:26 PM, Larry Hudson wrote: On 02/09/2016 08:41 AM, Fillmore wrote: Hi, I am having a hard time making my Cygwin run Python 3.5 (or Python 2.7 for that matter). The command will hang and nothing happens. Just curious... Since Python runs natively in Windows, why are you trying

Re: There has to be a better way to split this string!

2016-02-09 Thread Cameron Simpson
On 10Feb2016 07:34, srinivas devaki wrote: On Feb 10, 2016 7:23 AM, "srinivas devaki" wrote: On Feb 10, 2016 6:56 AM, "Anthony Papillion" wrote: > I am using datetime.now() to create a unique version of a filename. > When the final file is named, it will look something like: > myfile-2015-0

Re: Importing two modules of same name

2016-02-09 Thread dieter
Carl Meyer writes: > ... > If you omit the future-import in Python 2.7, `import config` will import > the neighboring app/config.py by default, and there is no way to import > the top-level config.py. There is the "__import__" builtin function which allows to specify the "parent package" indirect