(tried to write a descriptive subject line)
I'm curious whether I should consider learning either SQLObject
or SQLAlchemy, and whether my needs would be worth it. I am
learning to use SQlite databases for fairly simple storage and later
search, and have only recently learned about object relati
Christopher Spears ha scritto:
I've been working out of Core Python Programming (2nd Edition). Here is an
example demonstrating multiple inheritance.
class A(object):
... pass
...
class B(A):
... pass
...
class C(B):
... pass
...
class D(A, B):
... pass
...
Traceback (
On Wed, Jun 11, 2008 at 3:11 PM, Trey Keown <[EMAIL PROTECTED]> wrote:
> Hey all,
> I'm creating a program that will copy a user's internet history from
> Internet Explorer, and I'm having a bit of trouble.
>
> I need to get python to either initiate a command via the command prompt,
> or open a
Hey all,
I'm creating a program that will copy a user's internet history from
Internet Explorer, and I'm having a bit of trouble.
I need to get python to either initiate a command via the command prompt,
or open a file with its default program (in this case, a .bat file with
cmd.exe).
I've been
I've been working out of Core Python Programming (2nd Edition). Here is an
example demonstrating multiple inheritance.
>>> class A(object):
... pass
...
>>> class B(A):
... pass
...
>>> class C(B):
... pass
...
>>> class D(A, B):
... pass
...
Traceback (most recent call last):
On Tue, June 10, 2008 9:17 pm, Christopher Spears wrote:
> I am reading Wesley Chun's "Core Python Programming" (2nd Edition) and
> have reached the part on static and class methods. I typed in the
> following to demonstrate the difference between the two methods:
>
class TestClassMethod:
I am reading Wesley Chun's "Core Python Programming" (2nd Edition) and have
reached the part on static and class methods. I typed in the following to
demonstrate the difference between the two methods:
>>> class TestClassMethod:
... def foo(cls):
... print 'calling class method fo
"Tiago Saboga" <[EMAIL PROTECTED]> wrote
The count var is never updated. What about:
for i in someArray[1:]:
print i
Yes, that's much better than my enumerate version! :-)
Alan G
___
Tutor maillist - Tutor@python.org
http://mail.python.org
"Sean Novak" <[EMAIL PROTECTED]> wrote
I would normally write this in PHP like this:
for($i=1; i< count($someArray); $i++)
{
print $someArray[i]
}
essentially,, I want to loop through an array skipping
"someArray[0]"
for i,n in enumerate(myArray):
if i == 0: continue
print n
is how
"Terry Carroll" <[EMAIL PROTECTED]> wrote
If TextPad is your default txt editor just use
os.system("foo.txt")
or os.startfile("foo.txt"); sounds like the equivalent, but for some
reason, I prefer it.
Actually os.startfile was what I meant for the default case!
Thanks for pointing it out. sy
Sean Novak wrote:
> I know I'm going to feel stupid on this one..
> I would normally write this in PHP like this:
>
> for($i=1; i< count($someArray); $i++)
> {
> print $someArray[i]
> }
>
> essentially,, I want to loop through an array skipping "someArray[0]"
> but in python the for syntax is
On Tue, Jun 10, 2008 at 09:36:47PM -0400, Sean Novak wrote:
> I know I'm going to feel stupid on this one..
>
> I would normally write this in PHP like this:
>
> for($i=1; i< count($someArray); $i++)
> {
> print $someArray[i]
> }
>
> essentially,, I want to loop through an array skipping "som
Sean Novak wrote:
I know I'm going to feel stupid on this one..
I would normally write this in PHP like this:
for($i=1; i< count($someArray); $i++)
{
print $someArray[i]
}
essentially,, I want to loop through an array skipping "someArray[0]"
but in python the for syntax is more like forea
"W W" answered the question to my satisfaction. When I first saw the
comment, I thought the auther was able to open two virtual windows in the same
terminal (Linux) that he was able to view (and interact with)
simultaneously. That was the advice that I was inquiring after.
When I realized he
From: "jordan halsey" <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2008 1:40 PM
Any one here using cutter... http://www.fundza.com
Free Java based ide with many built in functions and bindings. This is an
especially useful tool if you are doing 3d or any kind of shader writing.
Also, try this ed
On Tue, 10 Jun 2008, Sean Novak wrote:
> I know I'm going to feel stupid on this one..
>
> I would normally write this in PHP like this:
>
> for($i=1; i< count($someArray); $i++)
> {
> print $someArray[i]
> }
>
> essentially,, I want to loop through an array skipping "someArray[0]"
Like
On Tue, 10 Jun 2008, Alan Gauld wrote:
> If TextPad is your default txt editor just use
> os.system("foo.txt")
or os.startfile("foo.txt"); sounds like the equivalent, but for some
reason, I prefer it.
___
Tutor maillist - Tutor@python.org
http://ma
I know I'm going to feel stupid on this one..
I would normally write this in PHP like this:
for($i=1; i< count($someArray); $i++)
{
print $someArray[i]
}
essentially,, I want to loop through an array skipping "someArray[0]"
but in python the for syntax is more like foreach in PHP..
I'
At 05:17 PM 6/10/2008, John Fouhy wrote:
On 11/06/2008, Dick Moores <[EMAIL PROTECTED]> wrote:
> At 03:44 PM 6/10/2008, Alan Gauld wrote:
[on Windows cmd.exe]
> > (assuming you have QuickEdit mode turned on in the
> > preferences obviously!)
> How about pasting INTO the command prompt. Ctrl+V do
On 11/06/2008, Dick Moores <[EMAIL PROTECTED]> wrote:
> At 03:44 PM 6/10/2008, Alan Gauld wrote:
[on Windows cmd.exe]
> > (assuming you have QuickEdit mode turned on in the
> > preferences obviously!)
> How about pasting INTO the command prompt. Ctrl+V doesn't work, even with
> QuickEdit..
Single
At 03:44 PM 6/10/2008, Alan Gauld wrote:
"Dick Moores" <[EMAIL PROTECTED]> wrote
The script prints into the Windows command line
window (I don't know the official term), from which
copying is a PITA.
Whats the problem copying from a command prompt?
1. Click on the little black icon in the
Any one here using cutter... http://www.fundza.com
Free Java based ide with many built in functions and bindings. This is an
especially useful tool if you are doing 3d or any kind of shader writing.
Jordan Reece Halsey
maya | mental ray | renderman | nuke | houdini | ae
www.jordanhalsey.com
___
"Dick Moores" <[EMAIL PROTECTED]> wrote
The script prints into the Windows command line
window (I don't know the official term), from which
copying is a PITA.
Whats the problem copying from a command prompt?
Just grab with the mouse and it's selected automatically
(assuming you have QuickEdit
"Lowell Tackett" <[EMAIL PROTECTED]> wrote
1) I have two terminal windows open, one with an interactive python
prompt, and the other with vim...
How do you do that (as you describe above)?
Can you elaborate on the question?
He says he opens two terminal windows and runs vim
in one and pyth
"Sean Novak" <[EMAIL PROTECTED]> wrote
Thus far,, I know only the basic VIM functionality ie. navigating
the document.. search/replace, etc. Still need to learn regular
expressions also. This filter stuff rocks.. thanks!
vim can do all siort of stuff, most of the basic emacs stuff.
split
"Michael yaV" <[EMAIL PROTECTED]> wrote
Since I'm on a mac, how about using Xcode?
XCode with the PyObjC bridge is OK for Cocoa work but
as a general purpose IDE is no better than a good editor IMHO.
I still tend to work with 3 windows on the Mac - vim, shell
and Python interactive. I can
On Tue, Jun 10, 2008 at 4:27 PM, Lowell Tackett <[EMAIL PROTECTED]> wrote:
>
>
> From the virtual desk of Lowell Tackett
>
>
> --- On Tue, 6/10/08, W W <[EMAIL PROTECTED]> wrote:
>
> From: W W <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] IDE
> To: "Sean Novak" <[EMAIL PROTECTED]>
> Cc: tutor@python.o
I know there must be a better way to do this with slices, but I can't
seem to figure it out - I keep getting errors about the need to have the
same dimensions:
Look at the error message more closely.
ValueError: arrays must have same number of dimensions
What does this mean?
The 1-d a
>From the virtual desk of Lowell Tackett
--- On Tue, 6/10/08, W W <[EMAIL PROTECTED]> wrote:
From: W W <[EMAIL PROTECTED]>
Subject: Re: [Tutor] IDE
To: "Sean Novak" <[EMAIL PROTECTED]>
Cc: tutor@python.org
Date: Tuesday, June 10, 2008, 1:09 PM
1) I have two terminal windows open, one with an
I know there must be a better way to do this with slices, but I can't seem to
figure it out - I keep getting errors about the need to have the same
dimensions:
Here's what I'm trying:
>>> type(time)
>>> type(new_data)
>>> shape(time)
(1334,)
>>> shape(new_data)
(1334, 54)
>>> newArray=concatena
At 11:48 AM 6/10/2008, Wim De Hul wrote:
What about Wingware,
I use Wingware professional at ork and the free version at home.
Here's the link: http://www.wingware.com
What do you like about Wing? Esp. Wing Pro?
Dick Moores
___
Tutor maillist -
I have a script, fcn_double_phone_grep.py, that does a good job of
searching my text file of phone numbers, phone.txt. The script is at
<
http://py77.python.pastebin.com/f3a8c1f87>
The script prints into the Windows command line window (I don't know the
official term), from which copying is a PIT
f = open(conf, 'w')
f.writelines(lines)
f.close()
Is it as safe to use the following
open(conf, 'w').writelines(lines)
ie no close() to flush the data, but also not assigned an object name
so am I right in thinking that as the object is 'reclaimed' close() is
automatically called ?
Thanks, I'll give it look.
On Jun 10, 2008, at 2:48 PM, Wim De Hul wrote:
What about Wingware,
I use Wingware professional at ork and the free version at home.
Here's the link: http://www.wingware.com
Cheers!
Wim
On 10 Jun 2008, at 20:13, Michael yaV wrote:
Since I'm on a mac, how abou
> -Original Message-
> From: Michael yaV [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2008 12:13 PM
> To: Kent Johnson
> Cc: Hansen, Mike; tutor@python.org
> Subject: Re: [Tutor] IDE
>
> Since I'm on a mac, how about using Xcode?
>
>
> On Jun 10, 2008, at 2:07 PM, Kent Johnson
What about Wingware,
I use Wingware professional at ork and the free version at home.
Here's the link: http://www.wingware.com
Cheers!
Wim
On 10 Jun 2008, at 20:13, Michael yaV wrote:
Since I'm on a mac, how about using Xcode?
On Jun 10, 2008, at 2:07 PM, Kent Johnson wrote:
On Tue, Jun
Sweet Jesus!! Thank you!
Thus far,, I know only the basic VIM functionality ie. navigating the
document.. search/replace, etc. Still need to learn regular
expressions also. This filter stuff rocks.. thanks!
Sean
On Jun 10, 2008, at 1:21 PM, Alan Gauld wrote:
"Sean Novak" <[EMAIL PROT
On Tue, Jun 10, 2008 at 1:30 PM, Michael yaV <[EMAIL PROTECTED]> wrote:
> Thanks. What do you think of IDLE?
It's primitive.
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Since I'm on a mac, how about using Xcode?
On Jun 10, 2008, at 2:07 PM, Kent Johnson wrote:
On Tue, Jun 10, 2008 at 1:30 PM, Michael yaV <[EMAIL PROTECTED]>
wrote:
Thanks. What do you think of IDLE?
It's primitive.
Kent
___
Tutor maillist -
On Tue, Jun 10, 2008 at 1:13 PM, Chris Balderas <[EMAIL PROTECTED]> wrote:
> I would like to be remove off your mailing list please...
Just follow the directions here:
> To subscribe or unsubscribe via the World Wide Web, visit
>http://mail.python.org/mailman/listinfo/tutor
> or, via email
dave selby wrote:
Hi All,
Up to now I when I need to write some data to a file I have been
purposely using close()
f = open(conf, 'w')
f.writelines(lines)
f.close()
Is it as safe to use the following
open(conf, 'w').writelines(lines)
ie no close() to flush the data, but also not assigne
On Tue, Jun 10, 2008 at 10:07 AM, dave selby <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> Up to now I when I need to write some data to a file I have been
> purposely using close()
>
> f = open(conf, 'w')
> f.writelines(lines)
> f.close()
>
> Is it as safe to use the following
>
> open(conf, 'w')
On Tue, Jun 10, 2008 at 1:07 PM, dave selby <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Up to now I when I need to write some data to a file I have been
> purposely using close()
>
> f = open(conf, 'w')
> f.writelines(lines)
> f.close()
>
> Is it as safe to use the following
>
> open(conf, 'w').w
costs big
> bucks and doesn't do Python.
>
> For Python work, since I assume that's what you are really
> interested in, I use Pythonwin for small projects. For bigger jobs
> I use vim with a command prompt and an interactive session.
> 3 windows and Unix or Cygwin to provide t
"dave selby" <[EMAIL PROTECTED]> wrote
Up to now I when I need to write some data to a file I have been
purposely using close()
f = open(conf, 'w')
f.writelines(lines)
f.close()
Is it as safe to use the following
open(conf, 'w').writelines(lines)
In theory yes, but in practice its muc
Thanks. What do you think of IDLE?
On Jun 10, 2008, at 11:39 AM, Hansen, Mike wrote:
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael yaV
Sent: Tuesday, June 10, 2008 8:45 AM
To: Alan Gauld
Cc: tutor@python.org
Subject: Re: [Tutor] IDE
How a
"Sean Novak" <[EMAIL PROTECTED]> wrote
like about EMACS, however, is the ability to run the current buffer
interactively to a python command line. Is there a way to set this
up in VIM?
Yes, it's a standard vi (not even vim) feature.
The command is something like:
:!(motion) python
Where (m
On Tue, Jun 10, 2008 at 12:07 PM, dave selby <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Up to now I when I need to write some data to a file I have been
> purposely using close()
>
> f = open(conf, 'w')
> f.writelines(lines)
> f.close()
>
> Is it as safe to use the following
>
> open(conf, 'w').
On Tue, Jun 10, 2008 at 11:44 AM, Sean Novak <[EMAIL PROTECTED]> wrote:
>> however, is the ability to run the current buffer interactively to a python
>> command line. Is there a way to set this up in VIM?
I know there's some python what-nots with vim, but I just do one of a
few options:
1) I ha
Hi All,
Up to now I when I need to write some data to a file I have been
purposely using close()
f = open(conf, 'w')
f.writelines(lines)
f.close()
Is it as safe to use the following
open(conf, 'w').writelines(lines)
ie no close() to flush the data, but also not assigned an object name
so
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Sean Novak
> Sent: Tuesday, June 10, 2008 10:44 AM
> To: tutor@python.org
> Subject: Re: [Tutor] IDE
>
> >
> > Wow.. thanks everyone!! I am on a mac,, currently. But, I often
> > bounce from one
Wow.. thanks everyone!! I am on a mac,, currently. But, I often
bounce from one computer to the next.. often Linux. So, I like the
VIM option as it comes pre installed on either OS. One thing that I
like about EMACS, however, is the ability to run the current buffer
interactively to a
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Sean Novak
> Sent: Tuesday, June 10, 2008 5:08 AM
> To: tutor@python.org
> Subject: [Tutor] IDE
>
> I'm looking for the perfect IDE, preferably open source. I've
> installed Bluefish, which I fin
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Michael yaV
> Sent: Tuesday, June 10, 2008 8:45 AM
> To: Alan Gauld
> Cc: tutor@python.org
> Subject: Re: [Tutor] IDE
>
> How about for the Mac platform?
>
Textmate(not open source) but most who p
How about for the Mac platform?
On Jun 10, 2008, at 8:26 AM, Alan Gauld wrote:
"Sean Novak" <[EMAIL PROTECTED]> wrote
I'm looking for the perfect IDE, preferably open source.
Aren't we all! :-)
We used to have editor wars, now its IDE wars...
someone has tried a few different IDEs and fo
I have tried a few and I mainly stick with Eclipse IDE + PyDev for large
projects, simply because I develop stuff in other languages and it is
X-platform. For small stuff, I might just use Notepad++ (Windows),
Kate/(KDE)/ vim, or ipython for rapid python prototyping :) My only dislike
about vim i
"Sean Novak" <[EMAIL PROTECTED]> wrote
I'm looking for the perfect IDE, preferably open source.
Aren't we all! :-)
We used to have editor wars, now its IDE wars...
someone has tried a few different IDEs and found the one that they
love.. I'd be interested in your insight!
I've tried many
On Tue, Jun 10, 2008 at 7:07 AM, Sean Novak <[EMAIL PROTECTED]> wrote:
> I'm looking for the perfect IDE, preferably open source.
'Perfect' is in the eye of the beholder! Some suggestions here:
http://wiki.python.org/moin/IntegratedDevelopmentEnvironments
Kent
On Tue, Jun 10, 2008 at 7:45 AM, bob gailer <[EMAIL PROTECTED]> wrote:
> questionary = []
>
> for line in textdata.split('\n'):
> if line:
> tag, content = line.split(' ', 1)
tag = tag[1:] # strip leading %
> if tag == "question":
> questionary.append({tag : content
On Tue, Jun 10, 2008 at 7:32 PM, mail limodou <[EMAIL PROTECTED]>
wrote:
> On Tue, Jun 10, 2008 at 7:07 PM, Sean Novak <[EMAIL PROTECTED]> wrote:
>
>> I'm looking for the perfect IDE, preferably open source. I've installed
>> Bluefish, which I find to be a little buggy still. I'm just starting t
I use vi/vim.
I find it extremely useful/powerful.
-Wayne
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
glist wrote:
Let's say I have a file with this kind of content/lines
textdata = '''
%question What is Python?
%correct A programming language
%wrong A graphical package
%wrong An operating system
%question Is Computer Science really about computers?
%wrong Yes
%correct No
'''
I want to pose th
You can use either Komodo or Anjuta.
Komodo is better than Anjuta.
On Tue, Jun 10, 2008 at 4:37 PM, Sean Novak <[EMAIL PROTECTED]> wrote:
> I'm looking for the perfect IDE, preferably open source. I've installed
> Bluefish, which I find to be a little buggy still. I'm just starting to
> dive in
On Tue, Jun 10, 2008 at 7:07 PM, Sean Novak <[EMAIL PROTECTED]> wrote:
> I'm looking for the perfect IDE, preferably open source. I've installed
> Bluefish, which I find to be a little buggy still. I'm just starting to
> dive into emacs, which I feel is a little daunting. If someone has tried a
On the subject of controlling interactive programs and Tcl, one can hardly
forget expect.. now add Python and you probably have what you want:
http://www.noah.org/wiki/Pexpect
Cheers
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailm
I'm looking for the perfect IDE, preferably open source. I've
installed Bluefish, which I find to be a little buggy still. I'm just
starting to dive into emacs, which I feel is a little daunting. If
someone has tried a few different IDEs and found the one that they
love.. I'd be interes
On Monday 09 June 2008 14:13, Alan Gauld wrote:
> You need to find an API that lets you work at the X windows
> protocol level. I don;t know of one but will be surprised if
> there isn't such a beast around somewhere!
This made me think of Tcl's send() function. This web page has some links
that
Let's say I have a file with this kind of content/lines
textdata = '''
%question What is Python?
%correct A programming language
%wrong A graphical package
%wrong An operating system
%question Is Computer Science really about computers?
%wrong Yes
%correct No
'''
I want to pose the question to a
"Demonic Software" <[EMAIL PROTECTED]> wrote
I have been working with the Popen class, and it hangs when I
perform the
read on the stdout socket.
Strange. I get similar results. Yet I've used it successfully in the
past.
Even simple commands are not returning anything.
I will need to do s
69 matches
Mail list logo