How do I make Python 3 pick a random variable out of a set of variables I
give it?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
and the box would
disappear.
I wonder if you are running this in a text only environment and that is
why the box is not showing up.
I am still a newbie when it comes to programming but I am willing to
help if I can.
Good luck George,
Eric
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
I don't know if i'm sending the email to the right address but here it
goes!. Would Python be a suitable language for first time learners like me?
--
Eric G
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription opti
This is my first non-MATLAB programming language so I am having some
trouble with object-oriented programming. Specifically, I am working on a
program that simulates a blackjack game. It was functioning but I have
tried adding some new functionality in allowing players to make bets
To surmise, BJ
re the appropriate user data
values, but of course none worked. I'm using Glade 3, Gtk+ 3, and Python
34.
Thanks in advance for any help and suggestions (I'm sure there are other
mistakes here too).
Eric
The Python code is here:
--
le I want to
request the FTP GET on.
So something like:
seedfile.txt contents = apple.com, blue.com. car.txt
Open FTP
CD
Read "seedfile.txt"
For each line in "seedfile.txt" use the line as the variable and issue FTP
GET on that variable
That's close. I have been playing from glob and os.walk but I'm at a loss how
to get the size, creation and modified date while running it.
- Original Message -
From: "Danny Yoo"
To: "Eric Dannewitz"
Cc: "Python Tutor Mailing List"
Sent: Tu
Hello list, I'm new. I've done a few things in Python, but this one is posing
problems.
What I want to do is be able to parse a directory, say /Volumes/Stuff/Files/,
and all the directories that might be in there, and be able to pick out file
name, size, date modified, etc, and send that to a
proof.
What would be a good http request library to use for this work?
Thanks in advance
Eric Palmer
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
describe different ways of displaying output using python!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Here is my original problem:
Eric Schles wrote:
> Hello,
>
> This is my first time using this service so I am unsure what proper
> formatting should be. In any case here is my question.
>
> I just downloaded EasyInstall here:
> http://peak.telecommunity.com/DevCenter/E
So far, I have tried a few things. Listed below was my original problem and
my original help.
Eric Schles wrote:
> Hello,
>
> This is my first time using this service so I am unsure what proper
> formatting should be. In any case here is my question.
>
> I just downloade
QLObject
SyntaxError: invalid syntax
I'm not sure what I am doing wrong since I copy/pasted the code from the
tutorial. Any advice towards being able to use this module would be greatly
appreciated.
Sincerely,
Eric
___
Tutor maillist - Tutor@python.org
I've been noticing that in all the example codes I have seen, when someone
creates container, x, inside of a frame or other container class, y, they
always seem to create an instance of wx.Panel first and then use that
instance as the parent class of container x. I have been just placing 'self'
in
I am trying to create an addressbook program and am currently working on
prototype pages. Right now, I am trying to create a wx.ScrolledWindow class
with a wx.ListCtrl to display the names of all contacts. I keep running into
an error with my current configuration that is stating I have not specif
k)' which gives me a list but
not alphabetized. The dictionary keys I am using are 'Eric', 'Kyle', and
'dfd' and they always appear in that order when i use the sorted() feature
(obviously not alphabetized).
Could you please let me know what I am doing wrong or
a string argument of length
46. Would anyone be able to help me figure out what is wrong? I am currently
running Python 2.7 on Windows (not sure if that matters). Thank you.
Eric
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscr
le, it had a second argument, so I put one in, and
magically, it worked. But it can be x, it can be t, it can be anything.
Which raises the question: What is it *doing*? Honestly, I'm baffled - can
anyone point me in the right direction?
Thanks,
Eric
___
Your ideas are intriguing to me, and I wish to subscribe to your newsletter.
Eric
On Fri, Aug 6, 2010 at 11:19 AM, Ian Ozsvald wrote:
> Hi all. I'm a long time Pythonista and co-founder of
> http://ShowMeDo.com/ (and author of 140 of the Python tutorials
> there), I'
There are a few solutions here:
http://stackoverflow.com/questions/904928/python-strftime-date-decimal-remove-0
Eric
On Wed, Aug 4, 2010 at 1:30 PM, Eduardo Vieira wrote:
> I'm trying this example from python docs:
> from time import gmtime, strftime
> strftime("%a, %d %
ing is
> through
> Python. To just refer someone to Django when they don't know the first
> thing about
> web apps is, I think, off-putting.
>
> Che
>
> Che, my sentinments exactly. I'm looking for something similar.
Eric
___
here a way I could put something there?
>
>
A hosted server, so it's not on my local machine. Afraid I can't hand you
any access directly to it, I have too much personal stuff on there at the
moment. I would be more than happy to look
hing fundamental here, but
that's kind of obvious since I posted I don't know what I'm doing in the
first place! :)
Thanks,
Eric
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
>
> Get a linux hosting account, and a web address, most linux hosting
> comes with python, so practice in the 'cloud'.
>
I have that-- an account with Dreamhost. This hasn't solved my problems yet
though. Like I said, I can have it write a simple
Hello, World!
...but if I make it do anything mo
t
would be more my speed, but support is lacking and doesn't seem too
compatible with my host. I use Dreamhost, and they are very adaptable and
configurable, but so far I can't find an easy way to accomplish what I want.
Thanks for reading this far if you did! I welcome any suggestions
e off to a great start by asking this list; I've found the
people here are very friendly and extremely knowledgeable.
Thanks,
Eric
On Thu, Jul 15, 2010 at 4:07 PM, Daniel wrote:
> Hello, I recently browsed the BeginnersGuide/NonProgrammers section of the
> Python website, but I have a q
on aisle 1:
bread
magazines
Located on aisle 2
[etc...]
I tried putting "\n" into it but it just prints the literal string.
I'm sure it has to do with the list format of holding multiple items,
but so far haven't found a way to break them apart.
Thanks,
Eric
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
ms will print, but not in the order I wish.
The ultimate goal of the program will be to sort the items based on
aisle locations. Is there an efficient way to do this?
I think I want some kind of incremental counter going on in the loop
to prevent them from overwriting themselves, or
On Wed, Jul 14, 2010 at 12:26 PM, Alan Gauld wrote:
>
> If you never need a stripped version of line again, or if you
> are planning on writing it out to another file then this is fine.
> If you are going to use it again its probably better to strip()
> and asign to itelf:
>
> line = line.strip()
Fantastic! I have this, which now works. Is there a better place to put
string.strip?
aisle_one = ["chips", "bread", "pretzels", "magazines"]
grocery_list = open("grocery_list.txt", "r")
for line in grocery_list.readlines():
if line.strip() in aisle_one:
print "success! i found %s" % l
;success"
else:
print "no joy"
grocery_list.close()
I get this:
no joy
no joy
no joy
no joy
no joy
no joy
when I'm expecting this:
no joy
no joy
success
no joy
success
no joy
Am I close? This seems like it should work but I'm obviously missing somethi
I'm fairly new to programming and Python as well, but I have a suggestion
that may be worth looking into-- are you familiar with pickling? It sounds
like something that may fit in well with what you're trying to do.
Good reference article:
http://articles.techrepublic.com.com/5100-10878_11-105219
If you decide to run with wxPython there is a pretty handy video series you
could watch:
http://showmedo.com/videotutorials/series?name=PythonWxPythonBeginnersSeries
Eric
On Tue, Jul 6, 2010 at 1:48 PM, Alan Gauld wrote:
> "Payal" wrote
>
> gui programming? There seems to
> On Sat, May 8, 2010 at 5:31 PM, Kirk Z Bailey wrote:
>>
>>> An instructor of mine is about to teach the FIRST EVER class in Python at
>>> Saint Petersburg College; knowing I am a snakecharmer, he asked me for
>>> referrals to online resources.
>>>
>>> Oh my.
>>>
>>
>
> Here is another resource, t
t see how to read in a string and get it into a format for comparison.
I can do all of the other code.
Eric
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
'__file__', '__name__', '__package__', 'acos', 'acosh', 'asin',
'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh',
'degrees', &
On any platform, I use (gui) vim (gvim on Win/Linux, mvim/macvim on OSX)
with this plugin:
http://www.vim.org/scripts/script.php?script_id=30
On Tue, Feb 23, 2010 at 5:40 PM, Benno Lang wrote:
> On 24 February 2010 01:24, Giorgio wrote:
> > what text-editor do you use for python?
>
>
>
__
Not sure if this is what you're asking, but you can invoke the Python
interpreter from the command line (Terminal)
Open a new terminal, and at the $ prompt just type "python"..
$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "co
On Sat, Jan 9, 2010 at 9:08 PM, Lie Ryan wrote:
> On 1/10/2010 11:23 AM, Eric Pavey wrote:
>
>> I should add (that as I understand it), when you do a 'from foo import
>> blah', or 'from foo import *', this is doing a /copy/ (effectively) of
>> that mo
I should add (that as I understand it), when you do a 'from foo import
blah', or 'from foo import *', this is doing a *copy* (effectively) of that
module's attributes into the current namespace. Doing "import foo" or
"import foo as goo" is keeping a *reference *to the imported module rather
than a
On Thu, Dec 3, 2009 at 10:13 AM, Steve Bricker
wrote:
> We have Python applications for work with testing reports printed to PDF
> files. Don't know if you have that needed.
>
> Steve Bricker
> Now blogging at srbricker.blogspot.com
>
> On Thu 09/12/03 11:46 , skrab...@comcast.net sent:
>
> My de
On Fri, Nov 20, 2009 at 12:28 PM, Kent Johnson wrote:
> On Fri, Nov 20, 2009 at 3:05 PM, Dave Angel wrote:
> > Eric Pavey wrote:
>
> >> lol, in usual fashion, after I hack through it, while in the docs, I
> find
> >> the 'fancy' solution:
>
On Fri, Nov 20, 2009 at 10:58 AM, Eric Pavey wrote:
> On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel wrote:
>
>> Eric Pavey wrote:
>>
>>> On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson wrote:
>>>
>>>
>>>
>>>> On Thu, Nov 19, 2
On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel wrote:
> Eric Pavey wrote:
>
>> On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson wrote:
>>
>>
>>
>>> On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey wrote:
>>>
>>>
>>>> Say
On Fri, Nov 20, 2009 at 4:09 AM, Kent Johnson wrote:
> On Thu, Nov 19, 2009 at 9:31 PM, Eric Pavey wrote:
> > Say I have this package layout
> >
> > \myPackage
> >
> > __init__.py
> > moduleA.py
> > moduleB.py
> >
> > Is there a way
Say I have this package layout
- \myPackage
- __init__.py
- moduleA.py
- moduleB.py
Is there a way (and I'm sure there is...) to query, for a given package
level, which modules live under it?
I thought I could do it like so:
import myPackage
goodQualityInfo = dir(myPackage)
Th
>
> Eric Pavey wrote:
>>
>>> Presume I have a package 'a' like this:
>>>
>>>* /pystuff (added to sys.path)
>>> o /a (start of my package)
>>>
>>>+ __init__.py
>>>+ /b
On Tue, Nov 10, 2009 at 11:15 PM, Lie Ryan wrote:
> Eric Pavey wrote:
>
>> Presume I have a package 'a' like this:
>>
>>* /pystuff (added to sys.path)
>> o /a (start of my package)
>>
>>+ __init__.py
>>
Presume I have a package 'a' like this:
- /pystuff (added to sys.path)
- /a (start of my package)
- __init__.py
- /b
- __init__.py
- module.py
to import module.py:
import *a.b.module*
What I'm trying to find is a way to query exactly what I typed ab
On Mon, Nov 9, 2009 at 7:48 PM, Christopher Spears wrote:
> Hi!
>
> I need to parse several XML documents into a Python dictionary. Is there a
> module that would be particularly good for this? I heard beginners should
> start with ElementTree. However, SAX seems to make a little more sense to
If you're using bash for your shell - it looks like you need to
re-source your .bashrc. You can do this from the command line
source ~/.bashrc
or log out and log back in.
~elh
On Wed, Oct 21, 2009 at 5:56 PM, Jason Willis wrote:
> so i changed the .bashrc and added at the end :
> PATH="/home/
The directory you are sitting in doesn't appear to be in your path...
[ehow...@preacher ~/bin]$ ls macosver
macosver*
[ehow...@preacher ~/bin]$ macosver
10.5.8
[ehow...@preacher ~/bin]$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:~/bin:/opt/local/bin:/opt/local/sbin
~elh
On Wed, Oct
On Tue, Oct 13, 2009 at 5:17 PM, Kent Johnson wrote:
> On Tue, Oct 13, 2009 at 4:38 PM, David Eric wrote:
>
> > as far as print zip_command, i would add that to the program however,
> doesnt
> > just declaring it actually trigger it..thus it would executed and the
>
On Tue, Oct 13, 2009 at 4:02 PM, Kent Johnson wrote:
> On Tue, Oct 13, 2009 at 2:58 PM, David Eric wrote:
> > printing the command line,
> > would it be
> > print('gzip {0} {1}'.format(target, ' '.join(source))?
>
> Yes, or just
> print zip
On Tue, Oct 13, 2009 at 4:14 PM, Dave Angel wrote:
> (You top-posted, instead of adding your part to the end. That's frowned
> upon in a mailing list, at least in this one.)
> (You replied privately, and forgot to CC the tutor list. I'm forwarding it
> there with my resp
doing a python tutorial and one of the assignments says to develop a program
that backsup files to zip files into a backup directory
im using Darwin 10.0.0 unix version:
this is what i came up with thus far, i did copy the sample program given
but made changes for my unix OS:
#!/usr/bin/env pyth
Very new to python..getting accustomed to files, directories etc
I installed a few versions of python and ended up with a very long PATH
variable, do i need this or can i change it to something shorter?
Doing an online tutorial one exercise was to move a simple program,
helloworld into the PATH so
Ali,
I am new at this but here is my interpretation.
1) flip coin 100 times, and print out the number of heads and number of tails.
from random import Random
score = [0,0]# first position will be heads and second position will be tails
count=0#counter to find out how many times we have flipped.
a
Hi Corey,
If this is going to be a command line program, two things that immediately
come to mind for me are: validating user input and persistence. If you put
something like "(1) to attack, (2) to run" what if the user types "yes", or
"Y", or "9"? You'll want to make sure your program doesn't cra
Make sure you are in the same directory as your hello.py, then run the
interpreter/shell
Try this:
>>>import hello
then you can do things like:
>>>dir(hello)
and
>>>help(hello)
I'm not sure if that's what you were asking, but "import" is how you ..
import. HTH.
On Fri, Sep 4, 2009 at 5:31 P
>
>From: jonathan wallis
>To: tutor@python.org
>Sent: Wednesday, July 15, 2009 12:54:16 PM
>Subject: [Tutor] help
>
>>i have a duel loop that looks like thiswhile y > 0 and x > 0:
>i cant figure out if there is a way to make so if one loop ends it says
>something different than if th
quot; count explicity? Is there any difference?
Thanks.
Eric
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dayo,
I modified the code a little bit to make things work the way I think you
meant it to work(hopefully), and I changed the name of the function so that
its' not the same name as the python file itself, but hopefully this answers
your questions. Here is my countdown.py
def launchme(n):
while
Hi tutors, I am studying classes a bit, and am having trouble with this
concept and would appreciate your help!
class A:
def __init__(self, name, value=1):
self.name = name
self.value = value
And now I want a subclass, one that overrides the value=1 and defaults to
value=2, h
Senthil,
That worked like a charm, thank you for the help! Now my Snipt's are
actually legible :)
On Wed, Mar 4, 2009 at 12:01 AM, Senthil Kumaran wrote:
> On Wed, Mar 4, 2009 at 11:13 AM, Eric Dorsey wrote:
> > I know, for example, that the > code means >, but what I don&
*So here is my program, I'm pulling some information off of my Snipt feed ..
*
import feedparser
d = feedparser.parse('http://snipt.net/dorseye/feed')
x=0
for i in d['entries']:
print d['entries'][x].title
print d['entries'][x].summary
print
x+=1
*Output*
Explode / Implode List
Not sure if this is what you mean, but:
Say you have the files efunc.py and trytry.py in the same folder.
*The content of efunc.py is:*
def funky():
print 'funkytown'
*The content of trytry.py is:*
import efunc
efunc.funky()
*Output would be:*
n...@ububox:~$ python trytry.py
funkytown
n...@
27;)
mylist.append(x)
#output the type of objects you've entered (hint: they'll always be
strings.. ;)
print type(mylist[0])
print type(mylist[1])
#print the list of items
for i in mylist:
print i
*When you run the program:*
Enter num or text: 27
Enter num or text: Eric
27
Eric
On
ÙØ² Ø§ÙØ¨Ø§ØªÙÙ wrote:
>
> > On Wed, 18 Feb 2009 20:19:56 -0700
> > Eric Dorsey wrote:
> >> I did an aptitute install of ibreadline5-dev and then did ./configure
> >> and make again, and still don't have any functionality to be able to
> >> hit
18 Feb 2009 20:19:56 -0700
> Eric Dorsey wrote:
> > I did an aptitute install of ibreadline5-dev and then
> > did ./configure and make again, and still don't have any
> > functionality to be able to hit up-arrow and get a command repeated
> > while inside the int
2009 22:34:23 -0700, Eric Dorsey wrote:
>
> > Greetings Tutor:
> > I've managed to install Python 2.6 on my Ubuntu VM from source, however,
> > it looks as though I missed something important along the way. My 2.6
> > interpreter does not have readline support (ex
Greetings Tutor:
I've managed to install Python 2.6 on my Ubuntu VM from source, however, it
looks as though I missed something important along the way. My 2.6
interpreter does not have readline support (example: I cant hit up arrow to
repeat the last command) Is there a way to add this functionali
But you need to have an order that will work with sorted().
> Its not just the order you add items to the dict. To store an
> arbitrary order I suspect you would need to maintain a
> secondary list with the keys in the order of insertion.
> The most reliable way to dop that would be to subclas
>>> config_names = {'start_time': '18:00:00', 'gray_scale': True, 'long':
120.0}
>>> config_names
{'start_time': '18:00:00', 'gray_scale': True, 'long': 120.0}
>>> for i, x in config_names.items():
... print i, x
...
start_time 18:00:00
gray_scale True
long 120.0
>>>
On Wed, Feb 11, 2009 at 7
You can call a .py script from the command line, and it will run there. So,
in Windows XP: Start > Run > type "CMD"
Vista: Start > type "CMD" into the Start Search field.
If you're in Linux, get to a Terminal.
In Windows another window will open with something
like...C:\FolderWithMyPyFile>
Linux so
I am trying to teach myself Linux, and so I'm running Ubuntu (Gutsy Gibbon)
as a virtual machine. I went to terminal, started up Python and realized it
was version 2.5 so I thought I'd just upgrade to 2.6.1 After doing some
Googling around, it seems that Ubuntu is highly reliant on Python 2.5, so
u
.
> Jim
> ___
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
--
eric dorsey | www.perfecteyedesign.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
that you can import X, then from X import Y, but
only if Y is another module and not an object. The import chains above
work until I try to import a class definition. Can someone explain
what it is about module imports that makes it work this way? And why
the unhelpful error message
on? Or possibly nonprofits or the like that
need smaller-type applications worked on?
Much thanks!
--
eric dorsey | www.perfecteyedesign.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
eric dorsey | www.perfecteyedesign.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ple/good/smart way to get it all back to the 4
spacing default? Or if for example I wanted to convert my 2 spacing program
to the conventional 4?
- Eric
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
MARY KEY, reps SMALLINT(1000),
weight SMALLINT(1000), exer VARCHAR(30), date DATE)
''')
#query the WR table, feeding it the 'srch' variable which fills in where the
SQL has a ?
cursor.execute(
"SELECT SUM(REPS) FROM WR WHERE EXER=?",
(srch,)
)
-Er
ters.
What's the difference between this command writing to the terminal,
and writing to the file?
Thanks,
Eric
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
it only started to come clear after I'd looked
at a module I was writing, realized that there was something really
fundamentally wrong with it, and then slowly realized that the answer
was metaclasses. About eleven lines of metaclass programming, as it
turned out, but those seven lines tur
Greetings,I have a program where I ask a user to enter a date in format
-MM-DD, and get a string like: '2008-10-25'
Can anyone tell me how I would verify this is a real date before allowing it
to be passed on to the next part of the program?
--
(e)
___
7;s been a learning experience...
E
On Aug 27, 2008, at 2:22 AM, Kent Johnson wrote:
On Tue, Aug 26, 2008 at 1:24 PM, Eric Abrahamsen
<[EMAIL PROTECTED]> wrote:
On Aug 26, 2008, at 7:20 PM, Kent Johnson wrote:
If all you want to do with the nested Month, etc is to iterate the
even
On Aug 26, 2008, at 7:20 PM, Kent Johnson wrote:
On Tue, Aug 26, 2008 at 1:36 AM, Eric Abrahamsen
<[EMAIL PROTECTED]> wrote:
So my test case: a Month has a 'child' attribute pointing at Week,
which has
a 'child' attribute pointing at Day, so they all know what
first access, then I might
as well just call list() on the QuerySet at object instantiation, and
save myself some trouble.
I hope that's a little clearer. My central issue is maintaining my
place in the self.events loop, and only advancing it as far as the
date-based while loop advanc
break
self.sentinel += c.dt_range
if not require_events or c.has_events():
# if require_events == True, omit empty children.
yield c
On Aug 25, 2008, at 11:49 AM, Eric Abrahamsen wrote:
On Aug 24, 2008, at 7:20 PM, Kent Johnson wrote:
Forward
On Aug 24, 2008, at 7:20 PM, Kent Johnson wrote:
Forwarding to the list with my reply. Please use Reply All to reply
to the list.
Grr, sorry, I keep forgetting...
On Sun, Aug 24, 2008 at 1:02 AM, Eric Abrahamsen
<[EMAIL PROTECTED]> wrote:
On Aug 23, 2008, at 11:22 PM, Kent J
of that range. Probably I'll have to settle for just one or
the other, but one can dream.
Thanks for reading all this. I'm hoping that all the restrictions and
conditions will make the solution more obvious, rather than less
obvious, to those who know more than I...
--Eric
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Thanks to you both. I'll read up on sockets, but it seems unlikely
that it works the way I thought it might...
On Aug 12, 2008, at 8:45 PM, Kent Johnson wrote:
On Tue, Aug 12, 2008 at 7:27 AM, Eric Abrahamsen
<[EMAIL PROTECTED]> wrote:
On Aug 11, 2008, at 6:54 PM, Kent Johnson
o be coming from? If my web server (lighttpd in this case)
is set to listen on a particular port, is there any way that it can
'see' that traffic and interact with it, or is it purely between the
python library and the outside world?
Thank
environment variables' and 'don't imply "import site" on
initialization' – I just don't quite get it.
Thanks in advance for any and all enlightenment.
Eric
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
list items with the two strings I want. Either the cycle goes off and
splits the wrong strings, or I get nested list items, which is not
what I want. Can someone please point me in the right direction here?
Thanks,
Eric
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
As for other resources, I recently came across this:
http://farmdev.com/talks/unicode/
This was the first explanation that really made me understand the
difference between Unicode and utf-8 (and realize that I'd been using
the terms 'encode' and 'decode' backwards!). Anyway, just one more
r
On Jul 2, 2008, at 12:36 PM, Christopher Spears wrote:
I'm working on problem 13-5 in Core Python Programming (2nd
Edition). I am supposed to create point class. Here is what I have
so far:
#!/usr/bin/python
class Point(object):
def __init__(self, x=0.0,y=0.0):
self.x = float(
What you have almost works. Try this:
No kidding that's what I get for wild stabs in the dark, I thought
I'd tried that. I'm pleased that it really is that simple (and that,
whatever metaclasses are used for, I don't need to worry about them
yet).
Thanks!
Eri
self.keyword = args[1]
The desired behavior, of course, is this:
File.add('somefilename','keywordforthisfile')
and to be able to extend this behavior to other classes.
Any pointers would be much appreciated...
Eric
___
Tutor mail
the learning exercise, but it will
be *very* nice to return to a full framework package...
Eric
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http:
1 - 100 of 434 matches
Mail list logo