Re: Open file in default app and exit in Windows

2015-01-28 Thread stephen . boulet
On Wednesday, January 28, 2015 at 10:07:25 AM UTC-6, Tim Golden wrote: > On 28/01/2015 15:50, stephen...@gmail.com wrote wrote: > > I am using the following to open a file in its default application in > > Windows 7: > > > > from subprocess import call > > > > filename = 'my file.csv' call('"%s"'

Open file in default app and exit in Windows

2015-01-28 Thread stephen . boulet
I am using the following to open a file in its default application in Windows 7: from subprocess import call filename = 'my file.csv' call('"%s"' % filename, shell=True) This still leaves a python process hanging around until the launched app is closed. Any idea how to get around? -- https://m

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-14 Thread stephen . boulet
On Tuesday, January 13, 2015 at 8:30:13 PM UTC, André Roberge wrote: > On Tuesday, 13 January 2015 08:23:30 UTC-4, stephen...@gmail.com wrote: > > I found a solution that I'm happy with. > > > > from datetime import datetime > > from easygui_qt import * > > > > datestring = get_date() > > mydate

Help understanding list operatoins inside functions in python 3

2015-01-13 Thread stephen . boulet
I'm a bit confused why in the second case x is not [1,2,3]: x = [] def y(): x.append(1) def z(): x = [1,2,3] y() print(x) z() print(x) Output: [1] [1] -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-13 Thread stephen . boulet
I found a solution that I'm happy with. from datetime import datetime from easygui_qt import * datestring = get_date() mydate = datetime.strptime(datestring, '%b %d %Y') On Saturday, January 10, 2015 at 1:02:30 AM UTC, André Roberge wrote: > On Friday, 9 January 2015 19:09:15 UTC-4, stephen...@g

Re: Help configuring visual studio to compile python extensions

2015-01-09 Thread stephen . boulet
On Friday, January 9, 2015 at 8:58:59 AM UTC-6, stephen...@gmail.com wrote: > I've installed Microsoft Visual Studio 10.0. Here are the steps I've been > taking. > > My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, > 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32. > > (Sorry

Re: [ANN] EasyGUI_Qt version 0.9

2015-01-09 Thread stephen . boulet
On Wednesday, December 31, 2014 at 4:24:50 PM UTC-6, André Roberge wrote: > EasyGUI_Qt version 0.9 has been released. This is the first announcement > about EasyGUI_Qt on this list. > > Like the original EasyGUI (which used Tkinter), > EasyGUI_Qt seeks to provide simple GUI widgets > that can b

Re: Help configuring visual studio to compile python extensions

2015-01-09 Thread stephen . boulet
This page helped me sort everything out: http://www.falatic.com/index.php/120/a-guide-to-building-python-2-x-and-3-x-extensions-for-windows. -- https://mail.python.org/mailman/listinfo/python-list

Help configuring visual studio to compile python extensions

2015-01-09 Thread stephen . boulet
I've installed Microsoft Visual Studio 10.0. Here are the steps I've been taking. My python version is Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32. (Sorry for the long output.) >cd "c:\Program Files (x86)\Microsoft Visual Studio 10.0"\vc >vcva

input() on python 2.7.5 vs 3.3.2

2013-12-12 Thread stephen . boulet
Can someone explain? Thanks. Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> x = input() Hello there >>> print(x) Hello there Python 2.7.5 (default, May 15 2013, 22:43:36) [M

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-18 Thread stephen . boulet
Thanks to everyone for their help. Using everyone's suggestions, this seems to work: import win32clipboard, win32con def getclipboard(): win32clipboard.OpenClipboard() s = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT) win32clipboard.CloseClipboard() if '\0' in s:

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-17 Thread stephen . boulet
On Thursday, September 12, 2013 6:01:20 PM UTC-5, stephen...@gmail.com wrote: > I have an excel file. When I select cells, copy from excel, and then use > win32clipboard to get the contents of the clipboard, I have a 131071 > character string. > > > > When I save the file as a text file, and u

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-13 Thread stephen . boulet
On Friday, September 13, 2013 9:31:45 AM UTC-5, stephen...@gmail.com wrote: > On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote: > > > Stephen Boulet: > > > > > > > > > > > > > From the clipboard contents copied f

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-13 Thread stephen . boulet
On Thursday, September 12, 2013 10:43:46 PM UTC-5, Neil Hodgson wrote: > Stephen Boulet: > > > > > From the clipboard contents copied from the spreadsheet, the characters > > s[:80684] were the visible cell contents, and s[80684:] all started with > > "

Re: Stripping characters from windows clipboard with win32clipboard from excel

2013-09-12 Thread stephen . boulet
Hi Steven. Here is my code: import win32clipboard, win32con def getclipboard(): win32clipboard.OpenClipboard() s = win32clipboard.GetClipboardData(win32con.CF_TEXT) win32clipboard.CloseClipboard() return s I use this helper function to grab the text on the clipboard and do useful

Stripping characters from windows clipboard with win32clipboard from excel

2013-09-12 Thread stephen . boulet
I have an excel file. When I select cells, copy from excel, and then use win32clipboard to get the contents of the clipboard, I have a 131071 character string. When I save the file as a text file, and use the python 3.3 open command to read its contents, I only have 80684 characters. Excel (an

Printing the name of a variable

2010-09-09 Thread Stephen Boulet
Does an arbitrary variable carry an attribute describing the text in its name? I'm looking for something along the lines of: x = 10 print x.name >>> 'x' Perhaps the x.__getattribute__ method? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Photo layout

2005-06-26 Thread Stephen Boulet
Is there a python solution that someone could recommend for the following: I'd like to take a directory of photos and create a pdf document with four photos sized to fit on each (landscape) page. Thanks. Stephen -- http://mail.python.org/mailman/listinfo/python-list