Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread Michael Torrie
On 12/09/2015 04:11 AM, Steven D'Aprano wrote: > Maildir is also *much* safer too. With mbox, a single error when writing > email to the mailbox will likely corrupt *all* emails from that point on, > so potentially every email in the mailbox. With maildir, a single error > when writing will, at wor

Re: Python variable assigning problems...

2015-12-09 Thread Steven D'Aprano
On Thursday 10 December 2015 04:49, ICT Ezy wrote: > Pl refer question which attached image here: > > link: https://drive.google.com/open?id=0B5L920jMv7T0dFNKQTJ2UUdudW8 Do you really expect us to sign in to Google in order to help you? Let me give you some friendly advice. You are asking us fo

Re: How to use internal python c funtions, from python code

2015-12-09 Thread Chris Angelico
On Thu, Dec 10, 2015 at 3:44 PM, srinivas devaki wrote: > For competitive programming purposes I really want to use those functions > for speed. Recommendation: Write your code the simple and obvious way, and *then* start thinking about speed. And before you look at calling on C code manually, tr

How to use internal python c funtions, from python code

2015-12-09 Thread srinivas devaki
Hi I'm coming from this link ( https://groups.google.com/forum/#!topic/python-ideas/cBFvxq1LQHM), which proposes to use long_to_decimal_string(), int_to_decimal_string() functions for printing integers in different bases. Now is there anyway i can use such internal functions from pure python code,

Windows 10 and PYODBC

2015-12-09 Thread William Abdo
Hi All, I am not sure if anyone has asked this question already or not but I will again. Hopefully someone else has had and found a fix for this issue. I'm grateful for any and all assistance. I have recently upgraded to Windows 10 and I have an issue with PYODBC connecting to Oracle 11g. It was

Re: PyTk cascaded radiobuttons, howto?

2015-12-09 Thread nickgeovanis
This is of course using tkinter from python, PyTk is a misnomer. Python 3.4.2 wit tcl/tk 8.5 under CentOS 7. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a data type rule on 'x+=' and 'x0=x+'?

2015-12-09 Thread Steven D'Aprano
On Thu, 10 Dec 2015 08:57 am, Robert wrote: > Hi, > > I have a numpy np.array data x: > > x= np.array([[157, 185], [169, 195], [162, 179], [145, 195], [159, 199], > [165, 180], [172, 195], [180, 201], [163, 195], [169, 191]]) > > Here is the original code snippet: > > x+=uniform(-8, 8, x.shap

PyTk cascaded radiobuttons, howto?

2015-12-09 Thread nickgeovanis
Using python 3.4.2. Tcl/tk example here is from /usr/share/tk8.5/demos/widget and .../menu.tcl. The way tcl/tk adds cascaded radiobuttons to a menu is like this: set m $w.menu.cascade $w.menu add cascade -label "Cascades" -menu $m -underline 0 $m add cascade -label "Radio buttons" -menu $w.men

Is there a data type rule on 'x+=' and 'x0=x+'?

2015-12-09 Thread Robert
Hi, I have a numpy np.array data x: x= np.array([[157, 185], [169, 195], [162, 179], [145, 195], [159, 199], [165, 180], [172, 195], [180, 201], [163, 195], [169, 191]]) Here is the original code snippet: x+=uniform(-8, 8, x.shape) x Out[557]: array([[163, 192], [163, 187], [17

Re: How to connect the MYSQL database to Python program?

2015-12-09 Thread Mark Lawrence
On 09/12/2015 17:51, ICT Ezy wrote: Pl explain me how to connect the MYSQL database to Python program? Use a search engine. Then run up an editor, write some code, run said code. If you then have problems state your OS, Python version and provide us with the full traceback. An alternativ

Re: Python variable assigning problems...

2015-12-09 Thread Mark Lawrence
On 09/12/2015 17:49, ICT Ezy wrote: Pl refer question which attached image here: link: https://drive.google.com/open?id=0B5L920jMv7T0dFNKQTJ2UUdudW8 Please put your code, query or whatever it is inline here, I'm not going off into the great wide world just to suit you. If it has anything t

Re: 3D numpy array subset

2015-12-09 Thread Oscar Benjamin
On 9 Dec 2015 14:26, "Heli" wrote: > > Dear all, > > I am reading a dataset from a HDF5 file using h5py. my datasets are 3D. > > Then I will need to check if another 3d numpy array is a subset of this 3D array i am reading from the file. > > In general, is there any way to check if two 3d numpy ar

Re: Reading lines of text from 7z compressed files in Python

2015-12-09 Thread srinivas devaki
On Dec 9, 2015 3:07 PM, "Anmol Dalmia" wrote: > > > I wish to use the native LZMA library of Python 3.4 for faster performance > than any other third- party packages. Is it possible to do so? > you can check the source of lzma module main compression and decompression algorithms were written in c

Re: How to connect the MYSQL database to Python program?

2015-12-09 Thread Chris Angelico
On Thu, Dec 10, 2015 at 4:51 AM, ICT Ezy wrote: > Pl explain me how to connect the MYSQL database to Python program? You start by looking for a module that lets you do that. You can use your favourite web search engine, or go directly to PyPI. Then you learn how to use that module, including lea

How to connect the MYSQL database to Python program?

2015-12-09 Thread ICT Ezy
Pl explain me how to connect the MYSQL database to Python program? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variable assigning problems...

2015-12-09 Thread Joel Goldstick
On Wed, Dec 9, 2015 at 12:49 PM, ICT Ezy wrote: > Pl refer question which attached image here: > > link: https://drive.google.com/open?id=0B5L920jMv7T0dFNKQTJ2UUdudW8 > -- > https://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com/stats/birthdays -- h

Re: Python variable assigning problems...

2015-12-09 Thread Joel Goldstick
On Wed, Dec 9, 2015 at 12:51 PM, Joel Goldstick wrote: > > > On Wed, Dec 9, 2015 at 12:49 PM, ICT Ezy wrote: > >> Pl refer question which attached image here: >> >> link: https://drive.google.com/open?id=0B5L920jMv7T0dFNKQTJ2UUdudW8 >> -- >> https://mail.python.org/mailman/listinfo/python-list >

Python variable assigning problems...

2015-12-09 Thread ICT Ezy
Pl refer question which attached image here: link: https://drive.google.com/open?id=0B5L920jMv7T0dFNKQTJ2UUdudW8 -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread Grant Edwards
On 2015-12-09, Steven D'Aprano wrote: > Thanks Mozilla, for picking the *less* efficient and *more* risky format as > the default. Good choice! At least they picked a standard format as the default and gave you the option to use a different standard format (cf. Microsoft and Outlook). -- Grant

Re: np.searchSorted over 2D array

2015-12-09 Thread Peter Otten
Heli wrote: [Please don't open a new thread for the same problem] > I need to check whether two 2d numpy arrays have intersections and if so I > will need to have the cell indices of the intersection. > > By intersection, I exactly mean the intersection definition used in set > theory. > > I w

np.searchSorted over 2D array

2015-12-09 Thread Heli
Dear all, I need to check whether two 2d numpy arrays have intersections and if so I will need to have the cell indices of the intersection. By intersection, I exactly mean the intersection definition used in set theory. I will give an example of what I need to do: a=[[0,1,2],[3,4,5],[6,7,8]]

3D numpy array subset

2015-12-09 Thread Heli
Dear all, I am reading a dataset from a HDF5 file using h5py. my datasets are 3D. Then I will need to check if another 3d numpy array is a subset of this 3D array i am reading from the file. In general, is there any way to check if two 3d numpy arrays have intersections and if so, get the in

Re: filter a list of strings

2015-12-09 Thread Sivan Greenberg
That might also work: new_list = [i for i in the_list if i not in targets] # given you have no special requirements for the selection # out of 'targets' -Sivan On Wed, Dec 9, 2015 at 12:58 AM, Thomas 'PointedEars' Lahn < pointede...@web.de> wrote: > Mark Lawrence wrote: > > > On 03/12/2015 01:1

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread Chris Angelico
On Thu, Dec 10, 2015 at 1:06 AM, srinivas devaki wrote: > On Dec 9, 2015 4:45 PM, "Steven D'Aprano" wrote: >> >> Maildir is also *much* safer too. With mbox, a single error when writing >> email to the mailbox will likely corrupt *all* emails from that point on, >> so potentially every email in t

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread srinivas devaki
On Dec 9, 2015 4:45 PM, "Steven D'Aprano" wrote: > > Maildir is also *much* safer too. With mbox, a single error when writing > email to the mailbox will likely corrupt *all* emails from that point on, > so potentially every email in the mailbox. With maildir, a single error > when writing will, a

Re: tkinter

2015-12-09 Thread Zachary Ware
On Dec 9, 2015 3:36 AM, "Chris Harwood" wrote: > > Hi, > > Python » 3.5.0 Documentation » The Python Standard Library » 25. Graphical User Interfaces with Tk » states that "You can check that tkinter is properly installed on your system by running python -m tkinter from the command line; this shou

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread Steven D'Aprano
On Wed, 9 Dec 2015 07:03 pm, Christian Gollwitzer wrote: > 1) As noted before, Thunderbird ususally stores mail in mbox format, > which you can read and parse. However it keeps an extra index file > (.msf) to track deleted messages etc. Until you "compact" the folders, > the messages are not delet

Re: Image download failure from wget.download function.

2015-12-09 Thread Peter Otten
ashw...@nanoheal.com wrote: > I am trying to download the image from a URL, I am able to download a > file but after downloading if I try to open the image it says file format > is corrupted or damaged. What version of python are you using? Where did you get the wget libary? > I use this funct

Re: tkinter

2015-12-09 Thread Chris Angelico
On Wed, Dec 9, 2015 at 4:59 AM, Chris Harwood wrote: > Having recently installed Python 3.5.0 I find that python -m tkinter produces: > 'python' is not recognised as an internal or external command, operable > program or batch file. Try instead: python3 -m tkinter But it might mean that you d

RE: Python Script - Windows Task Scheduler - Logging

2015-12-09 Thread Raheel Rao
Update: I was able to figure this one out eventually. I had to put path of where the script is in "Start in" section of my task. Consider this ticket 'closed' :) > Date: Mon, 7 Dec 2015 23:53:10 + > From: rr.codeproj...@outlook.com > To: python-list@python.org > Subject: Python Script - Wi

Reading lines of text from 7z compressed files in Python

2015-12-09 Thread Anmol Dalmia
Hello all. I am trying to read a compressed xml file line by line under the 7z format. I found an answer to a related question here: http://stackoverflow.com/questions/20104460/how-to-read-from-a-text-file-compressed-with-7z-in-python I wish to use the native LZMA library of Python 3.4 for faste

tkinter

2015-12-09 Thread Chris Harwood
Hi, Python » 3.5.0 Documentation » The Python Standard Library » 25. Graphical User Interfaces with Tk » states that "You can check that tkinter is properly installed on your system by running python -m tkinter from the command line; this should open a window demonstrating a simple Tk interface

Image download failure from wget.download function.

2015-12-09 Thread ashwath
Hi I am trying to download the image from a URL, I am able to download a file but after downloading if I try to open the image it says file format is corrupted or damaged. I use this function to download the image - wget.download('http:realpython.com//learn//python-first-steps//i

Re: Getting data out of Mozilla Thunderbird with Python?

2015-12-09 Thread Christian Gollwitzer
Am 08.12.15 um 19:21 schrieb Anthony Papillion: I have a TON of email (years) stored in my Thunderbird. My backup strategy for the last few years has been to periodically dump it all in a tar file, encrypt that tar file, and move it up to the cloud. That way, if my machine ever crashes, I don't l