On 31/7/19 2:21 am, boB Stepp wrote:
I have been using various iterations of a solitaire scorekeeper
program to explore different programming thoughts. In my latest
musings I am wondering about -- in general -- whether it is best to
store calculated data values in a file and reload these values,
On 21/3/19 10:19 am, Alan Gauld via Tutor wrote:
On 20/03/19 22:43, Chris Roy-Smith wrote:
Is there a "graphics library" of common button uses? that is things
like forward record, back record, 1st record, last record, printer,
save and the likes.
The short answer is no. But you
Hi,
Is there a "graphics library" of common button uses? that is things like
forward record, back record, 1st record, last record, printer, save and
the likes.
I don't have very artistic abilities, so would prefer to save making my
own library.
Thank you
On 9/3/19 10:13 pm, Alan Gauld via Tutor wrote:
On 09/03/2019 02:53, Chris Roy-Smith wrote:
What is happening is that the contents of the frame appear in the master
window. I was expecting them to show in the second window. Also I
expected the frame to be sunken, but there is no obvious signs
. Also I
expected the frame to be sunken, but there is no obvious signs of the
frame, not even a colored background.
What am I doing wrong?
Thank you, Chris Roy-Smith
here is my code:
#! /usr/bin/python3
from tkinter import *
def NewWindow():
sw=Toplevel(master)
sw.title('New W
'hello'
:print(a)).grid(row=0, column=0)
main.mainloop()
===
any explanation gratefully recieved
Regards, Chris ROy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 01/07/18 19:19, Steven D'Aprano wrote:
On Sun, Jul 01, 2018 at 03:32:59PM +1000, Chris Roy-Smith wrote:
Python is the first language I have
attempted since macro assembler for CP/M. Python seems to be another world.
Yes indeed, high-level languages like Python *are* a radically diff
On 01/07/18 02:17, Alan Gauld via Tutor wrote:
On 30/06/18 03:55, Chris Roy-Smith wrote:
I am trying to change the command of a tkinter Button in my program.
Eventually I want to be able to do this to many buttons.
Since I'm not 100% sure if you mean the command or the label or both
here
On 01/07/18 02:17, Alan Gauld via Tutor wrote:
On 30/06/18 03:55, Chris Roy-Smith wrote:
I am trying to change the command of a tkinter Button in my program.
Eventually I want to be able to do this to many buttons.
Since I'm not 100% sure if you mean the command or the label or both
here
I do this, I had worked around the problem by destroying the
window and building it again, but it was pointed out that I have an
unusual coding style doing this.
All hints appreciated!
Regards, Chris Roy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 15/04/18 18:10, Alan Gauld via Tutor wrote:
On 15/04/18 03:57, Chris Roy-Smith wrote:
I am trying to get tkinter to return a number from a window, which then
sets how many times to print a sign.
I don;t jhave time to look at this in detail just now, maybe later.
But first impressions is
ons after that.
Regards, Chris Roy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
gn code to wait till getcount() returns it's value?
Any help greatly appreciated.
Regards, Chris Roy-Smith
chris@chris-X451MA:~/Scripts/python3/dvms$ ./debug1.py
line 27 ### required sign count for D is None ###
Exception in Tkinter callback
Traceback (most recent call last):
File "/
r any assistance, I'm hoping to learn something from this
experience
Regards, Chris Roy-Smith
#!/usr/bin/python3
import mysql.connector
from tkinter import *
import pickle
master = Tk()
def getCfg():
fobj = open('members.pkl', 'rb')
cfg = pickle.load(fobj)
On 16/01/18 22:35, Alan Gauld via Tutor wrote:
On 16/01/18 04:37, Chris Roy-Smith wrote:
File "./debugString.py", line 7, in SetFin
SetStatus[x] = var.get(x)
AttributeError: 'list' object has no attribute 'get'
var=[IntVar() for x in range(8)]
He
broken things down to what I think is as simple as I can
get.
Thank you for looking at this,
Regards, Chris Roy-Smith
Error message:
=
chris@chris-X451MA:~/Scripts/python3/dvms$ ./debugString.py
Exception in Tkinter callback
Traceback (most recent call last):
File
log.list.insert(END, item)
mainloop()
Thank you, that works, I have difficulties with object oriented coding.
Never used a language where I needed it.
Regards, Chris Roy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
/listbox.py
selection is .140537834621024
Thank you for any help
Regards, Chris Roy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 10/05/16 07:03, Ondřej Rusek wrote:
Dne 9.5.2016 v 10:13 Chris Roy-Smith napsal(a):
Hi
Python 3.4 Linux (ubuntu)
This code does what I want.
curs is the result of a mysql query
data = [[" " for x in range(9)] for y in range(count)]
for (ddate, mood, walk, lag, sleep) in curs:
On 10/05/16 12:01, Steven D'Aprano wrote:
On Mon, May 09, 2016 at 06:13:32PM +1000, Chris Roy-Smith wrote:
data = [[" " for x in range(9)] for y in range(count)]
for (ddate, mood, walk, lag, sleep) in curs:
data[row][0]=ddate
data[row][1]=mood
da
ata[row][3]=lag
data[row][4]=sleep
row +=1
While I don't know a better way to do this, it seems a bit awkward, is
there a better way?
Thank you
Chris Roy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subsc
On 07/11/15 20:18, Alan Gauld wrote:
On 07/11/15 04:34, Chris Roy-Smith wrote:
def genF(ofield): ...
for x in range(10):
def second():
main=Toplevel(root)
ofield=Text(main, height=15, width=15)
ofield.pack()
B3=Button(main, text='exit', command=main.destro
Hi,
Environment:
Python 2.7
Linux (Ubuntu 15.10)
I am experiencing a problem with the code below running the "genF"
function on opening the second window. I expected that function to be
executed on clicking the 'fill text' button. The text widget gets filled
on opening the window. This is my f
On 23/08/15 23:52, Laura Creighton wrote:
oooh. Seems that there is an undocumented feature we can use!
Laura
--- Forwarded Message
Return-Path:
Date: Sun, 23 Aug 2015 12:40:02 +0200
From: Michael Lange
To: tkinter-disc...@python.org
Message-Id: <20150823124002.7391f37e21f9b5cfaa917...@
On 23/08/15 18:13, Laura Creighton wrote:
In a message of Sun, 23 Aug 2015 13:09:41 +1000, Chris Roy-Smith writes:
On 22/08/15 23:32, Alan Gauld wrote:
On 22/08/15 11:43, Laura Creighton wrote:
How can I filter out these hidden directories?
Help(tkFileDialog) doesn't help me as it just
On 23/08/15 00:42, Laura Creighton wrote:
In a message of Sat, 22 Aug 2015 14:32:56 +0100, Alan Gauld writes:
But maybe some questions on a Tix (or Tk) forum might
get more help? Once you know how to do it in native
Tcl/Tk/Tix you can usually figure out how to do it
in Python.
--
Alan G
I ask
On 22/08/15 23:32, Alan Gauld wrote:
On 22/08/15 11:43, Laura Creighton wrote:
How can I filter out these hidden directories?
Help(tkFileDialog) doesn't help me as it just shows **options, but
doesn't show what these options might be.
tix (tkinter extensions) https://wiki.python.org/moin/Tix
Hi,
environment: Python 2.7, Ubuntu 12.4 Linux
I am trying to get the list of directories shown by
tkFileDialog.askdirectory to not show hidden files (starting with .)
this code results in lots of hidden directories listed in the interface
making things harder than they need to be for the use
On 27/07/15 11:06, Job wrote:
I want to be able to ask a user to input an integer and print out the root and
power of the given integer.
Why do you use abs(x) for this program?
I don't understand or see the link between abs() and root and powers.
This reminds me of this:
By knowing that when
On 22/07/15 08:07, Chris Roy-Smith wrote:
On 21/07/15 21:52, Alan Gauld wrote:
On 21/07/15 08:15, Chris Roy-Smith wrote:
On 21/07/15 17:02, Alan Gauld wrote:
On 21/07/15 06:05, Chris Roy-Smith wrote:
I am working my way through Alan Gauld's tutorial and have just
started
the section o
On 21/07/15 21:52, Alan Gauld wrote:
On 21/07/15 08:15, Chris Roy-Smith wrote:
On 21/07/15 17:02, Alan Gauld wrote:
On 21/07/15 06:05, Chris Roy-Smith wrote:
I am working my way through Alan Gauld's tutorial and have just started
the section on GUI. The windows that are created look odd
On 21/07/15 17:02, Alan Gauld wrote:
On 21/07/15 06:05, Chris Roy-Smith wrote:
I am working my way through Alan Gauld's tutorial and have just started
the section on GUI. The windows that are created look odd with no title
bar or maximise, minimise or close window button.
The sim
orial?
Thank you
Chris Roy-Smith
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Fri, Jul 11, 2014 at 10:43 PM, Steven D'Aprano wrote:
> On Fri, Jul 11, 2014 at 01:04:59PM -0700, Audrey M Roy wrote:
>> Steven, any chance you could clarify how to interpret that section? I'm
>> assuming it refers to not importing objects that share state across modul
Steven, any chance you could clarify how to interpret that section? I'm
assuming it refers to not importing objects that share state across modules?
Not being passive-aggressive here, just genuinely seek clarification and
want to learn to be a smarter Python user. I'm on this list to learn stuff
a
pen a browser instance, and PAMIE
is quite slow, and I expect Selenium to be quite slow as well.
How are you navigating around these Javascript based pages? Is there a
library or plugin that I am missing?
Thanks in advance.
--
Roy Hinkelman
**Few people are capable of expressing with equan
27;images/weather/' )
#write to txt file TEST
_temp = 'D:\\Inetpub\\AtoZ\\hometown\\include\\weatherFeed_TEMP.txt'
temp = open( _temp, 'w' )
temp.write( _thumb )
temp.close()
return _thumb
city = 'Establish
cript was writing to.
Now, exec() and passthru() are both working, as in, passing the argument to
python and executing the script. Output Buffer (ob), however, is not. I
still need to write to a temp file.
Thanks for everyone's help.
Roy
___
#write to txt file TEST
_temp = 'D:\\Inetpub\\AtoZ\\hometown\\include\\weatherFeed_TEMP.txt'
temp = open( _temp, 'w' )
temp.write( _thumb )
temp.close()
return _thumb
city = 'Establish'
state = '
#x27;w' )
temp.write( _thumb )
temp.close()
#print _thumb
[/code]
And my PHP:
[code]
Python Weather Feed for ' . $city . ', ' . $state .
'';
ob_start();
$command = "include/weatherFeed.py -c " . $city . "-s " . $state;
exec($com
My script doesn't want to recognize the variables from the exec() command in
PHP. Plus, it won't capture the results of the script.
This Python script works in IDLE, and I've got some testing code in there.
One Known Unsolved Issue:
I put Python in C:\Program Files\Python26\python.exe and have tr
Evert,
Thank you very much. I do hope it goes on working. :D
Roy
On Mon, Aug 2, 2010 at 2:09 AM, Evert Rol wrote:
> > I got it back working. But it was with some stroke of luck. And I dont
> know the explanation.
> >
> > I installed the latest source of GEOS (as suggeste
shared object file: No such file
or directory
I uninstalled the thing. And then tried the script again and it worked. :| I
answered some of your questions below. Again, thanks.
Roy
On Sun, Aug 1, 2010 at 10:39 PM, Evert Rol wrote:
> > Hi. Good day.
> >
> > I am having an import e
nstalled something that "broke" it but
I dont know how to trace it back.
Could I ask for some pointers on how to fix this?
Thank you.
Roy
P.S. I dont know if this is the right list to post this. If it isnt, I'm
sorry for the inconvenience. Kindly direct me to the right one.
___
Interesting.
I am using urllib2 to open some government pages, and they have some js
checking for Flash on my computer.
Is there a way to show them that I have flash? Or possibly another solution?
My code:
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
headers = {'User-Agent' : us
I got it.
Switched to shutil and made to paths complete paths. The added benefit is
that it didn't trash the original file.
shutil.copy2(_files_to_mod + "\\" + fname, _files_to_mod + "\\" + new_name)
Thanks.
-- Forwarded message --
From: Roy Hinkelman
Why don't you simply print out fname? This should point you to the error.
Denis
I did here:
> if fname == old_name:
> print fname # test
and it looks correct.
On an WinXP, should I use shutil instead?
Roy
___
Tut
I can't find anything on this error I am getting when renaming some files.
I'm pulling info from a csv file and parsing it to build new file names.
Any pointers appreciated
Roy
My code:
# RENAME FILES using META file - new name = [place]_[state]_[sku].tif
import re, os, csv
t depend on the file format?
I will eventually be working with Excel and possibly mssql tables.
Thanks again for your help.
Roy
On Thu, Dec 3, 2009 at 3:46 AM, Christian Witts wrote:
> Roy Hinkelman wrote:
>
>>
>> Your list is great. I've been lurking for the past t
nt me in the right direction, I'd appreciate it.
I would also like to know the difference between open() and csv.reader(). I
had similar issues with csv.reader() when opening these files.
Any help greatly appreciated.
Roy
Code: Select all
# DOWNLOAD USGS MISSING FILES
import
2009/3/22 Mathias Andersson
> Im currently trying to learn how to use python. But my only problem seems to
> be at what to make? So anyone have a nifty list or some ideas on things to
> program, school tasks or algorithms to try and implement. Beginner- to
> mid-skill level. Thanks in advance.
Hi,
I'm stuck with Problem 10 (
http://projecteuler.net/index.php?section=problems&id=10) :-)
A part of my code deals with the calculation of prime numbers. However it is
really slow. Hopefully you have some ideas how to make it faster.
pz = [2]
# only iterate over odd numbers
for i in xrange(3,
Hi,
recently I learned about Project Euler (http://projecteuler.net/) and now
I'm trying to work me through. At the moment I'm thinking about
http://projecteuler.net/index.php?section=problems&id=8
One step for my solution should be transforming this big integer to a list
of integers. I did:
imp
Thank you very much.
On Mon, Sep 8, 2008 at 2:35 AM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Sun, Sep 7, 2008 at 11:07 AM, Roy Khristopher Bayot
> <[EMAIL PROTECTED]> wrote:
> > Hi. I added self to parts of the code. But after making an instance and
>
self, x)
... Parallel.setAutoFeed(self, y)
... Parallel.setInitOut(self, z)
... def generateClockPulse(self):
... Parallel.setSelect(self,0)
... Parallel.setSelect(self,1)
...
>>> a = LightsHandle()
>>> a.setData(0xF0)
>>> a.se
Hi. I am having some difficulty using methods from a base class.
I have 2 classes. The first one is Parallel which is inside the module
parallel. The methods useful to me from this class are setDataStrobe(),
setAutoFeed(), setInitOut(), setSelect(), and setData().
The second one is derived from t
Hi. I tried it. It worked. Thank you.
On Fri, Sep 5, 2008 at 9:42 AM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 4, 2008 at 9:00 PM, Roy Khristopher Bayot
> <[EMAIL PROTECTED]> wrote:
>
> > class CamHandle(object):
> > def __init__(self):
&g
Hi. Good day. I am new to Python but I have had experience with C/C++ and
Matlab. I've been reading How to Think Like a Computer Scientist and skimmed
Core Python to learn. Now I havent done the exercises because I wanted to
get down to the project I'm doing in my spare time. The project involves
t
I go with wxPython for now.
Best regards,
Roy
On Jan 3, 2008 2:58 AM, johnf <[EMAIL PROTECTED]> wrote:
> On Wednesday 02 January 2008 09:41:46 am Alan Gauld wrote:
>
> > I tried to fined a decent GUI builder for wxPython but failed.
> > There are two or three available b
Thanks, that certainly looks interesting and I'll give it a try. Perhaps
it's a little too much work for what I have in mind, but definitely
something useful to learn in the long run.
Best regards,
Roy
On Jan 2, 2008 11:56 PM, Michael Langford <[EMAIL PROTECTED]>
wrote:
> Wh
ly) GUI builder. I'm
leaning towards wxPython so far (it's had a recent release just a month or
so ago), but if anyone has any suggestions, that'd be great.
Thanks in advance,
Roy Chen
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hello everyone,
I've just started trying PythonCard to build a simple GUI for a little
application I'm writing.
Just wondering if anyone knows the "proper" way to do some simple error
checking:
for example, I have a textField, and I wish to check that only integers
within a certain
range are enter
,
Roy Chen
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi everyone, been looking at the following functions, but can't
figure out how they work.
def f(a, L=[]):
L.append(a)
return L
def g(a, L=None):
if L == None:
L = []
L.append(a)
return L
print f(1)
print f(2)
print f(3)
print g(1)
print g
Hello all,
I'm using MacPython 2.5 on OS X 10.4.
I was just wondering if all the Python modules are contained in this
directory:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
Also, I've installed the Python Image Library (PIL), and it seems to
be installed in this folder:
> model of a variable name representing an area in
> memory where assignment copies data to a new area
> in memory with the other variable name will get caught
> on this until they catch on.
>
> I'll be very grateful for any criticism of the above.
>
>
>
> O
If you copy a list into another variable, and then change the second
one, the first gets changed aswell, for example:
>>> a = [10, 40, 30, 20]
>>> b = a
>>> b.sort()
>>> a
[10, 20, 30, 40]
>>> b
[10, 20, 30, 40]
or:
>>> a = [10, 40, 30, 20]
>>> b = a
>>> b[0] = 99
>>> a
[99, 40, 30, 20]
>>> b
[
I sorry, maybe I am stupid at the moment but I cannot follow your
question,
1) User can select a date, or a range of dates.
2) At the moment you are only able to let the user select a date that
has entered the database today.
3) A value from a table called duratation will be returned for the
Try looking at PyDO - This provides an interface between Python and your
database. This allows you to change your database at a later time and not
have to change any Python.
The excerpt below is from:
http://skunkweb.sourceforge.net/PyDO2/api/html/public/pydo-module.html
PyDO (Python Data Object
s
is the string providing this method. "
Fortunately my new Python instinct suggested what I was doing was not
quite right, and thank you for correcting my misunderstanding.
This Tutor service is an invaluable help for us lonely new to Python
programmers.
Thanks,
Roy
PS Despite this glitch I
I have a list of strings and wanted to output them as a single delimited
string.
Eg
('ab','cd','ef') becomes "ab:cd:ef"
My first attempt was to do it as a function:
def Addsomething(a):
y = []
for x in a:
y.append( x + ':')
return "".join(y)
I then conv
I have created a List within a class. If I try and append to the list using
the set function using the property value my variable stops being a list.
Can anyone explain why the set function called by the class property does
not append to the list?
Here is some sample code:
class ShoppingBag:
Hi
In the example below I would like the program to stop if I forgot to
provide an argument . Though I could do all my processing indented under
the else statement, I was wondering if there was a command that would allow
me to halt the program execution early.
Regards,
Roy
# Example
tion
order might be ambiguous.
I don't understand the reason why except and finally clauses cannot be
together. I know they can be together in java. how does it cause
ambiguous execution order? An example may help me understand.
Thank you very much!
--
Roy
**May I open-s
74 matches
Mail list logo