Sorry about all that trouble for you Alan, after I posted that, I
reformatted my code a bit and updated it to do the defining and then
the calling, like you said. The only problem I had, and I was
probably doing something wrong, was that I would do:
choice()
if choice in["1","circle"]:
circle
Sup all,
Ok, this is my research for a better calculator. I want to make a
calculator that is much less lame than the one that comes standard
with windows. If anyone has any ideas for how to start or some things
I should know, then feel free to inform me. The truth is, I don't
exactly know wher
Brad,
I believe that this will work . . .
import os
os.system(your_exe.exe)
in my case the following code opens the nautilus file browser
import os
os.system('nautilus')
best of luck,
Grant
On 6/1/07, Brad Tompkins <[EMAIL PROTECTED]> wrote:
Is there an easy way to make a python script th
Is there an easy way to make a python script that will launch an external
application for me ? I'm using Windows XP and I'm trying to create a little
front end that will launch the VLC media player for me.
___
Tutor maillist - Tutor@python.org
http://
Thanks for this suggestion, Grant, it might prove illuminating.
I got this import error when I tried running PyCrust.py from within
PythonWin (version 2.5).
"ImportError: Module use of python24.dll conflicts with this version of
Python."
I also have previous versions of python install
Nick,
Have you tried copying the contents of PyCrust.py into your current IDLE?
Running that script will cause PyCrust to open on my machine. Perhaps this
is a start . . .
- Grant
On 6/1/07, Switanek, Nick <[EMAIL PROTECTED]> wrote:
Hi Alan,
Thanks for the path. I find a .py, .pyc, and an ic
Hi Alan,
Thanks for the path. I find a .py, .pyc, and an icon file name PyCrust,
but no .pyw.
Any ideas?
Thanks,
Nick
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Hieu,
In my Scripts folder there are MS-DOS batch files and files without extensions
that include "pycrust" and "pyalamode". Double-clicking either version of
pycrust in this folder doesn't do anything I can see. There are no .py files
(apart from CreateBatchFiles.py and CreateMacScripts.py,
I agree that pycrust is faster in terms of autocomplete. However, I love
being able to to just hit f5 to run my code in the shell while in the Python
IDLE environment. I wonder if this is possible with pycrust . . .
. . . on the wxPython page I found a list of other py related programs:
http://w
"Switanek, Nick" <[EMAIL PROTECTED]> wrote
> Your excitement for the PyCrust IDE made me want to check it out,
> but
> after downloading wxPython and the "Docs and Demos" at
> http://www.wxpython.org/download.php#prerequisites
> I've not been able to find an IDE to launch.
PyCrust is part of th
Hi Nick,
Installing wxPython on Windows creates a Scripts folder, in which the
goodies like PyCrust and Pyalamos are installed, you can run it and be
good to go.
On *nix, the scripts would be installed in the prefix's bin dir,
hopefully all starting with py :-)
The PyCrust is a better python shel
Hi Alan,
Your excitement for the PyCrust IDE made me want to check it out, but
after downloading wxPython and the "Docs and Demos" at
http://www.wxpython.org/download.php#prerequisites
I've not been able to find an IDE to launch. Can you explain what I need
to do?
Thanks,
Nick
___
On Tue, 22 May 2007, Alan Gauld wrote:
> "Alan Gilfoy" <[EMAIL PROTECTED]> wrote
>
> > soon, and I plan to use wxPython to do so. What, do you think, is
> > the best tutorial out there for wxPython?
>
> I'm working through the new wxPython book and highly recommend
> it.
I second that. I've
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gauld
> Sent: Friday, June 01, 2007 12:24 PM
> To: tutor@python.org
> Subject: Re: [Tutor] Design Question
> > remove_question(self,question) -- returns True if the question
> > was removed, False
<[EMAIL PROTECTED]> wrote
>I think I may have sent an incomplete version of this question
Indeed and I andswered it! :-)
> So I'm looking for comments/suggestions on the key pieces of the
> design: the questions and the flash card deck:
> Psudo-code of current design:
>
> class Deck():
Better,
Alan,
Good point. Earlier I was trying to figure out how the script worked, and
having else: print "break" seemed to help with that. For example, in one
version that I was tinkering with, break was printed 17 times. In the
current version, break is printed twice.
hope that makes sense,
Grnat
O
<[EMAIL PROTECTED]> wrote
> I'm doing the initial design for what will (hopefully) be something
> like a flash-card system. This is mostly a learning exercise,
> but I'm hoping the results will be at least usable.
> So my question is does this class design shown
> by the psudo-code below sound rea
[EMAIL PROTECTED] said unto the world upon 06/01/2007 10:46 AM:
> I think I may have sent an incomplete version of this question a moment ago
> (sorry). Here is the complete question:
>
> I'm designing something along the lines of a flash card program. It's mostly
> just an exercise in learning
I think I may have sent an incomplete version of this question a moment ago
(sorry). Here is the complete question:
I'm designing something along the lines of a flash card program. It's mostly
just an exercise in learning Python, but I'd like it to be at least marginally
usable when I'm done. S
I'm doing the initial design for what will (hopefully) be something like a
flash-card system. This is mostly a learning exercise, but I'm hoping the
results will be at least usable. So my question is does this class design shown
by the psudo-code below sound reasonable?
class Deck(Questions):
"Grant Hagstrom" <[EMAIL PROTECTED]> wrote
> The reason why I didn't want the import solution is that I am
> learning
> python because I want to parse text data. This problem was perfect
> practice.
The best book on this topic is David Mertz' book Text Processing in
Python. The draft version i
Grant Hagstrom wrote:
> Thanks for the links. I'll check them out. You don't happen to have any
> parsing tutorials bookmarked somewhere do you? I'm already exploring
> http://gnosis.cx/TPiP/. It's pretty heavy though.
For general text processing, you might want to browse the Text section
of t
Grant,
> My question is, is it possible to strip out multiple characters at once?
Kent answered that bit.
> started = False
> for line in file('mylist.py'):
> if 'jobs' in line and not started:
> ...
>if ']' not in line and started:
>
jobs.append(line.strip('...'))
>else: p
Kent,
Your multistrip tid-bit worked perfectly. Thanks!
The reason why I didn't want the import solution is that I am learning
python because I want to parse text data. This problem was perfect practice.
Thanks for the links. I'll check them out. You don't happen to have any
parsing tutorials b
> -Original Message-
> Date: Wed, 30 May 2007 14:50:25 -0500
> From: "Grant Hagstrom" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] leave tutorial
> To: "Kriti Satija" <[EMAIL PROTECTED]>
> Cc: Tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso
Grant Hagstrom wrote:
> Thanks for your help Alan.
>
> I found that when I used the code, it did returne a list but it is
> riddled with formatting characters.
> My question is, is it possible to strip out multiple characters at once?
Yes, just pass multiple characters to strip(), e.g.
line = li
Is anyone else out there using PyCrust as their python shell?
I've been using it for a few weeks now and I'm completely sold.
It is the best shell I've used, everything just seems to work.
I can cut n paste sections of interpreter code and PyCrust
correctly strips out the prompts and organises th
Thanks for your help Alan.
I found that when I used the code, it did returne a list but it is riddled
with formatting characters.
My question is, is it possible to strip out multiple characters at once?
started = False
for line in file('mylist.py'):
if 'jobs' in line and not started:
j
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Just the way IDLE works. Unexpected, but certainly not a bug, I'd say.
Andreas
Grant Hagstrom wrote:
> A bug or feature in the IDLE of python 2.5?
>
> pre-step: save the following file to your computer:
> # file mylist.py
> jobs = [
> 'Lions
Hi Grant,
> I'm a newbie and this is my first script submission to this email list.
> I was able to parse out the jobs list into a string: "jobs = [ . . ."
> However, I can't make python interpret that string as the command "jobs = [
> some list]"
There are ways of doing that but unless you are
A bug or feature in the IDLE of python 2.5?
pre-step: save the following file to your computer:
# file mylist.py
jobs = [
'Lions',
'SysTest',
'trainDD',
'Cats',
'train',
'sharks',
'whale',
]
Step 1.
copy, paste this script into the idle wi
Hey,
I'm a newbie and this is my first script submission to this email list.
I was able to parse out the jobs list into a string: "jobs = [ . . ."
However, I can't make python interpret that string as the command "jobs = [
some list]"
#SCRIPT
# open the file and assign it to the variable "thefi
"Preecha Bundrikwong" <[EMAIL PROTECTED]> wrote
> I have a text file (mylist.py actually), it contains exactly below:
> ---
> # file mylist.py
> jobs = [
>'Lions',
>'SysTest',
>]
>
>
> I want to write another script and get the list "jobs" from
> I have a text file (mylist.py actually), it contains exactly below:
> ---
> # file mylist.py
> jobs = [
> 'Lions',
> 'SysTest',
> 'trainDD',
> 'Cats',
> 'train',
> 'sharks',
> 'whale',
> ]
>
>
> I want
34 matches
Mail list logo