Hi all,
Going to build a repository for my code snippets (and I know that
pre-existing solutions exist, but I like to roll my own to see what I
can learn.), and just wondering on how to best store it and search it.
My current planned approach is to have each file added read and
keywords extracted
> My question is: when invoking a program with, let's say, a filename
> containing spaces as a parameter:
>
> myprog -file "Long name"
>
> What does sys.argv hold in this case?
What did you get when you tried it?
I ran:
###test.py ##
import sys
print sys.argv
###
p
On Sat, 2005-12-03 at 17:23 -0800, Danny Yoo wrote:
>
> > > My question is: when invoking a program with, let's say, a filename
> > > containing spaces as a parameter:
> > >
> > > myprog -file "Long name"
> > >
> > > What does sys.argv hold in this case? I am specifically interested in
> > > wheth
> Is there a more efficient approach? I don't think a relational DB
> really suits this sort of task at present,
Why not?
If its a big data set then a proper database will be more effective.
The advantages are that you can define many more parameters for
searching - author, date, number of acce
thanks. i had actually coded this almost exactly
the same. i'll try to make my
questions more specific. i am able to pickle and
restore world. which is a dictionary
of coordinates : room objects. when i look at the
savefile that pickle generates i can
see all my descriptions and exits. howeve
david wrote:
> hello :)
> i have some questions that are more about programming in general than
> python specifically.
> suppose, for whatever reason, you had a burning desire to write a
> simple text adventure.
> how would you start? would you just start writing some code?
Alan G and I had a b
I don't have Python on Windows and didn't want to make any assumptions
about the way the Windows shell passes parameters. Sorry again for being
trivial.
On Sun, 2005-12-04 at 09:00 +, Alan Gauld wrote:
> > My question is: when invoking a program with, let's say, a filename
> > containing space
>> Might the problem only be related to Win32com, not Python since Python
>> prints it without trouble?
>That's another issue. First you need to know what you are starting with.
>You really should read this:
>The Absolute Minimum Every Software Developer Absolutely, Positively Must
>Know About U
i added a list of rooms and rooms.append(self) to
the Room initialization.
then i run my program and create one room. there
should now be two rooms.
when i look at rooms i have three rooms! where did
this other room come from?
anyway, thanks for taking time to look at my code.
import sy
Hello.
I need to get some whois-info from whois.ripe.net. I have been able to
connect and get the info that I need, but I would like to know what is the
most 'polite' way of doing so. I need to do quite a few whois lookups
(from my server logs) and don't want to risk creating more hassle for
their
i fixed this myself !
i think i can get everything working now so please
disregard previous messages.
if you haven't already. :)
- Original Message -
From:
david
To: tutor@python.org
Sent: Sunday, December 04, 2005 10:06
AM
Subject: [Tutor] (no subject)
i adde
> then i run my program and create one room. there should now be two rooms.
> when i look at rooms i have three rooms! where did this other room come
> from?
Dunno but have uyou tried asking it about itself using the debugger?
Call the description methjod or look at the coordinates...
One wee ob
> My current planned approach is to have each file added read and keywords
> extracted (i.e. variable names, libraries imported etc.) and used as
> keys in a dictionary, and each key points to a list of files containing
> it (files will be stored in a zip or similar).
>
> i.e.
>
> words = {
>
> "im
On Sun, 4 Dec 2005, david wrote:
> i fixed this myself ! i think i can get everything working now so
> please disregard previous messages. if you haven't already. :)
That's great!
By the way, you asked a while back if trying to write a text-adventure
game was a good way to learn how to progra
> I need to get some whois-info from whois.ripe.net. I have been able to
> connect and get the info that I need, but I would like to know what is
> the most 'polite' way of doing so. I need to do quite a few whois
> lookups (from my server logs) and don't want to risk creating more
> hassle for t
when i restore from the pickle i can see my exits
and descriptions are still there.
but look won't see the description and move can't
move to the next room.
i am stumped. what is going on here? how can i fix
it? please help?
IDLE 1.1.2 No
Subprocess >>> >rooms[<__main__.R
Hi everyone,
I am not able to run any script in python ver2.4.2. under window xp.I get the
following error messagepython.exe has encountered a problem and
needs to be closed. Though path for python.exe is correct.Error meeasge
generated by MS office is
?xml version="1.0" encodin
Dear Expert programmers,
I aplogise if this mail is out of context here.
I have a list of elements like these:
Contr1 SPR-10 SPR-101 SPR-125 SPR-137 SPR-139 SPR-143
contr2 SPR-1 SPR-15 SPR-126 SPR-128 SPR-141 SPR-148
contr3 SPR-106 SPR-130 SPR-135 SPR-138 SPR-139 SPR-145
contr4 SPR-12
On 05/12/05, david <[EMAIL PROTECTED]> wrote:
> when i restore from the pickle i can see my exits and descriptions are still
> there.
> def save(self):
> f = open('savefile', 'w')
> pickle.dump(world,f)
> pickle.dump(rooms,f)
> for i in rooms:
> pickl
thanks that was very helpful. i added all that stuff because i was
trying to figure out some way of getting at the descriptions and exits.
that is the part i'm stuck on. but knowing that world is all i need is
good because i can focus my efforts better. thanks.
> You could make your save() metho
Srinivas Iyyer wrote:
>Dear Expert programmers,
>
>I aplogise if this mail is out of context here.
>
>I have a list of elements like these:
>
>Contr1 SPR-10 SPR-101 SPR-125 SPR-137 SPR-139 SPR-143
>contr2 SPR-1 SPR-15 SPR-126 SPR-128 SPR-141 SPR-148
>contr3 SPR-106 SPR-130 SPR-135 SPR-138 S
i have finally got save and restoring to work. here
is my code for posterity. :)
i was (i think) putting the player in a room that
wasnt the room from the pickle.
but somehow the same room.
anyway comments welcome.
import sysimport stringimport
pickleimport os.path
world = {}rooms = []cl
On Sun, 4 Dec 2005, Srinivas Iyyer wrote:
> Contr1SPR-10 SPR-101 SPR-125 SPR-137 SPR-139 SPR-143
> contr2SPR-1 SPR-15 SPR-126 SPR-128 SPR-141 SPR-148
> contr3SPR-106 SPR-130 SPR-135 SPR-138 SPR-139 SPR-145
> contr4SPR-124 SPR-125 SPR-130 SPR-139 SPR-144 SPR-14
Hello everyone, this is my first time using the tutor e-mail, so if I mess up
any common format or something just let me know :). Alright, for a little
background, I'm in the process of writing a merkle-hellman cryptosystem for my
CS15 class. I'm doing fine till I get to the decatonation of the
24 matches
Mail list logo