I want to run an external python script inside my script. So here is what I
came up with:
Print codename for testing purposes.
Define an empty dictionary.
Read the file.
Do StringIO assignments and run the code.
Get the outputs and append them to the dictionary.
Print the outputs for testing purp
1) Unordered maps/collections like sets and dictionaries also seem to
support iterating over set members or dictionary keys with "for x in
y" syntax. As far as I can tell, the following three ways generally
behave the same way, or is there a difference in behavior between:
a) for key in dictionary
So I've written my first python program (the ubiquitous 'Hello, World').
Already, I'm having problems. First, the question I can't find the answer
to.
Where (exactly) am I supposed to save my files? When I wrote "hello.py"
there was no clearly stated "Make sure you save it HERE or else Python wo
On 4/28/07, Alexander Dering <[EMAIL PROTECTED]> wrote:
> But I can't get it to run directly from Python. If I go to the terminal and
> type "python hello.py" (which is what the instructions say I should be
> doing!) I get the following:
>
> >>> hello.py
> Traceback (most recent call last):
>
Cecilia Alm wrote:
> 1) Unordered maps/collections like sets and dictionaries also seem to
> support iterating over set members or dictionary keys with "for x in
> y" syntax. As far as I can tell, the following three ways generally
> behave the same way, or is there a difference in behavior between
2007/4/30, Kent Johnson <[EMAIL PROTECTED]>:
. Also if you are adding or deleting from the dict
> during the iteration then dict.keys() is safer because the list of keys
> is created before the add and delete.
Thanks for the response; by adding and deleting, I assume you refer to
adding or deletin
Necmettin Begiter wrote:
> I want to run an external python script inside my script. So here is what I
> came up with:
>
> Print codename for testing purposes.
> Define an empty dictionary.
> Read the file.
> Do StringIO assignments and run the code.
> Get the outputs and append them to the dictio
Cecilia Alm wrote:
> 2007/4/30, Kent Johnson <[EMAIL PROTECTED]>:
> . Also if you are adding or deleting from the dict
>> during the iteration then dict.keys() is safer because the list of keys
>> is created before the add and delete.
>
> Thanks for the response; by adding and deleting, I assume y
hello there all,
i am wondering, what would be the simplest way to get a true/false
am i connected to the internet ?
right now i am using httplib to fetch a webpage every 20 minutes to see, but
i am thinking that there is a better way,
any suggestions would be encouraging
thanks
shawn
ping a host on the net if you get an echo response back you are good.
better yet ping the host page you are scraping.
On 4/30/07, shawn bright <[EMAIL PROTECTED]> wrote:
hello there all,
i am wondering, what would be the simplest way to get a true/false
am i connected to the internet ?
righ
ok, cool.
thanks
sk
On 4/30/07, Jalil <[EMAIL PROTECTED]> wrote:
ping a host on the net if you get an echo response back you are good.
better yet ping the host page you are scraping.
On 4/30/07, shawn bright < [EMAIL PROTECTED]> wrote:
>
> hello there all,
>
> i am wondering, what would be t
11 matches
Mail list logo