Okay. When I try to run the script from the terminal, it still doesn't work.
Here is a screenshot.
<>
What am I doing wrong?
On Feb 25, 2011, at 6:46 PM, Alan Gauld wrote:
>
> "Justin Bonnell" wrote
>
>> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) [GCC 4.2.1 (Apple Inc.
>> build 5664
Bill,
That's the same thing we are talking about.
The problem is those environment variables are
highly variable so you can't talk about a machine's environment.
Two users on the same machine (at the same time) may have
very different environments. And a batch file or program can
add or remove v
The error says it can't find the file hello.py.
That means its probably in some other folder
or you need to specify the full or relative path to the file
This is a MacOS issue not Python, its how your MacOS
shell is searching for the file.
If it is in the same folder try explicitly telling MacOS
On 26-Feb-11 01:19, ALAN GAULD wrote:
Bill,
That's the same thing we are talking about.
The problem is those environment variables are
highly variable so you can't talk about a machine's environment.
Two users on the same machine (at the same time) may have
very different environments. And a bat
"Corey Richardson" wrote
I'm slightly concerned about performance when it comes to
reading/writing to disk a lot when doing things like that, since if
this
thing ever needs to scale I want it to be able to do that.
There is always an overhead but it depends what you
mean by "a lot".
You m
On 01/-10/-28163 02:59 PM, Justin Bonnell wrote:
Okay. When I try to run the script from the terminal, it still doesn't work.
Here is a screenshot.
What am I doing wrong?
1) You're top-posting. Put your responses after the quote you're
responding to.
2) You're trying to include graphic
On 25 February 2011 14:30, Bill Allen wrote:
>
> I have times when it is useful for me to check the environment of a user
> system on our lan remotely while trouble shooting and issue with them. Now,
> this is quite easy to do while I am using a windows system via the computer
> management consol
On 26 February 2011 05:33, Corey Richardson wrote:
> Aha, that explains why I didn't get any results. Each file got its own
> interpreter instance.
>
Not wanting to nit pick, but no: It's not that each *file* does has its own
interpreter instance, it's that every python instance that you start d
On 26 February 2011 05:33, Corey Richardson wrote:
>
> I'm slightly concerned about performance when it comes to
> reading/writing to disk a lot when doing things like that, since if this
> thing ever needs to scale I want it to be able to do that.
>
I'd be tempted to say you should not be worry
On 02/26/2011 06:02 AM, Walter Prins wrote:
> On 26 February 2011 05:33, Corey Richardson wrote:
>
>> Aha, that explains why I didn't get any results. Each file got its own
>> interpreter instance.
>>
>
> Not wanting to nit pick, but no: It's not that each *file* does has its own
> interpreter i
On 02/26/2011 06:05 AM, Walter Prins wrote:
> I'd be tempted to say you should not be worrying about such performance
> issues at this stage.
Indeed, but I can't have every piece of variable information being saved
to disk and then read back again every time a player leaves or enters a
room, tha
On 26 February 2011 11:06, Corey Richardson wrote:
> I ran them like this:
> python use1.py
> python use2.py
> python plib.py
>
> Each file got its own instance of the interpreter.
>
Yes, but not because instances are intrinsically linked to seperate python
modules, which is what it sounds like
Bill,
Coming into this thread late: If you are working with Windows
workstations, try posting your question on the Python Windows API
mailing list.
http://mail.python.org/mailman/listinfo/python-win32
You may be able to use WMI (via Python) to accomplish what you're trying
to do.
Malcolm
__
On 26 February 2011 11:10, Corey Richardson wrote:
> On 02/26/2011 06:05 AM, Walter Prins wrote:
> > I'd be tempted to say you should not be worrying about such performance
> > issues at this stage.
>
> Indeed, but I can't have every piece of variable information being saved
> to disk and then re
Justin Bonnell wrote:
Okay. When I try to run the script from the terminal, it still doesn't work.
Here is a screenshot.
Please don't send screenshots except as a last resort. Just copy and
paste the error message -- it is ordinary text in a terminal window.
The error seems pretty straight-
On 26 February 2011 04:26, Bill Allen wrote:
> Yes, that's it exactly.:-)
>
> I administrate the workstations in our engineering environment and some of
> the major pieces of software we use are configured via the Windows system
> environment variables. Being able to reach out to a PC and ch
On 01/-10/-28163 02:59 PM, Steve Willoughby wrote:
On 26-Feb-11 01:19, ALAN GAULD wrote:
Bill,
That's the same thing we are talking about.
The problem is those environment variables are
highly variable so you can't talk about a machine's environment.
Two users on the same machine (at the same t
On 26 February 2011 22:42, Walter Prins wrote:
>
> On 26 February 2011 04:26, Bill Allen wrote:
>>
>> I administrate the workstations in our engineering environment and some of
>> the major pieces of software we use are configured via the Windows system
>> environment variables. Being able to re
I'm coming into this thread late so I might be off the mark here, but
it seems like you're going about it backwards:
Instead of trying to reach in and modify a user's environment, which
is highly variable and process dependent, why not just wrap the
software they're running? Have a python script w
On 2/26/11, Modulok wrote:
...
> The server then replies with any variables that the client needs to
> set and their values. You could do this with a python script running
> on a server sending ajax responses. (There's an ajax module in the
> standard library.)
...
Sorry, I meant a 'json' module,
Wow! What an overwhelming response to my inquiry. All the post have been
very informative and have given me plenty to consider. I can see now this
is a win32 api question, not really Python. There has been more than
enough here to point to some resources for win32 api and I have found
libra
Hi,
Is there in Python private/protected attributes in class like in other
langage ?
--
Brookes Christopher.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Am 26.02.2011 18:49, schrieb Christopher Brookes:
Hi,
Is there in Python private/protected attributes in class like in other
langage ?
Yes, there is. But it's protected by convention not compiler ;-).
Check out this:
http://docs.python.org/tutorial/classes.html#private-variables
--
Brookes Chr
On Feb 26, 2011, at 4:49 AM, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, Justin Bonnell wrote:
>> Okay. When I try to run the script from the terminal, it still doesn't work.
>> Here is a screenshot.
>>
>>
>>
>>
>>
>> What am I doing wrong?
>>
> 1) You're top-posting. Put your response
On 02/26/2011 04:10 PM, Justin Bonnell wrote:
> --This is the location of the file:
>
> /jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py
>
> but it still says it cannot find the directory when I try to run it or cd to
> it. Is there any way that I can tell which directory the
On Feb 26, 2011, at 3:29 AM, Alan Gauld wrote:
This is really helpful directions and I am trying to follow what you're saying.
I think you are getting my response to another person helping me so this will
basically repeat what I was saying there. I am really new to this and am trying
to learn
On 27-Feb-2011, at 2:40 AM, Justin Bonnell wrote:
> On Feb 26, 2011, at 4:49 AM, Dave Angel wrote:
>> 3) You don't tell us where the hello.py file actually is. Presumably it's
>> not in the current directory when you run that. Two cures for that: either
>> specify its real location,
>> p
On 02/26/2011 04:10 PM, Justin Bonnell wrote:
On Feb 26, 2011, at 4:49 AM, Dave Angel wrote:
On 01/-10/-28163 02:59 PM, Justin Bonnell wrote:
Okay. When I try to run the script from the terminal, it still doesn't work.
Here is a screenshot.
What am I doing wrong?
1) You're top-posting
On 26 February 2011 21:18, Justin Bonnell wrote:
> --I tried to follow this using:
> /jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py
> which is the correct location of the hello.py file.
>
Try putting quotes around the full path. The problem is that the space
between "Python" and "2
Justin Bonnell wrote:
--This is the location of the file:
/jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py
I doubt that. Mac OS is a type of Unix, and it would shock me if it puts
home directories (the jwbonnell/ part) directly under the file system
root /
My guess i
On Feb 26, 2011, at 3:18 PM, Corey Richardson wrote:
> On 02/26/2011 04:10 PM, Justin Bonnell wrote:
>
>> --This is the location of the file:
>>
>> /jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py
>>
>> but it still says it cannot find the directory when I try to run it or cd
On 02/26/2011 04:32 PM, Justin Bonnell wrote:
> --My current working directory is not what I have been trying to cd to, so
> I'm assuming that I am using the cd command wrong.
>
> I have tried:
>
> $ cd /jwbonnell/bin/Python\2.7/Extras/Demo/tkinter/guido
> $ cd /jwbonnell/bin/Python\2.7/Extras/
Christopher Brookes wrote:
Hi,
Is there in Python private/protected attributes in class like in other
langage ?
There's a short answer, a long answer, and an even longer answer.
The short answer is No.
The long answer is, not exactly. Python has private names, but they are
not enforced by t
Justin Bonnell wrote:
--My current working directory is not what I have been trying to cd to, so I'm assuming that I am using the cd command wrong.
You don't need to cd into the current working directory. You're already
there. That's what "working directory" means -- the directory you just
--This is the location of the file:
>
>
>/jwbonnell/bin/Python 2.7/Extras/Demo/tkinter/guido/hello.py
>
>
>but it still says it cannot find the directory when I try to run it or cd to
>it.
>
>As an obvious beginner with the shell the easiest way to change folder
is MacOS is to use the Finder.
"Christopher Brookes" wrote
Is there in Python private/protected attributes in class like in
other
langage ?
Steven has given you a comprehensive answer but as a bit of
history none of the early OOP languages used public/protected/private
etc. They either made all variables private (Smallta
Hello all,
I am looking forward for a python module to search a website and extract
the url.
For example I found a module for Amazon with the name "amazonproduct",
the api does the job of extracting the data based on the query it even
parses the url data. I am looking some more similar query
On 02/26/2011 10:11 PM, vineeth wrote:
> Hello all,
>
> I am looking forward for a python module to search a website and extract
> the url.
What website, what is it searching for, and what URL is it looking for?
>
> For example I found a module for Amazon with the name "amazonproduct",
> the
n Sat, Feb 26, 2011 at 21:11, vineeth wrote:
> Hello all,
>
> I am looking forward for a python module to search a website and extract
> the url.
>
> For example I found a module for Amazon with the name "amazonproduct", the
> api does the job of extracting the data based on the query it even par
Once again a very insightfull answer. Much appreciated! Same to you, Alan.
I paricularly like the "even longer answer". It remindes us of how lucky
we are using Python and brings me light in dark times when I wish I had
better code completion in my IDE for my own spaghetti-code ;-))
___
Hi Bill,
Thanks for the reply, I know how the urllib module works I am not
looking for scraping. I am looking to obtain the html page that my query
is going to return. Just like when you type in a site like Amazon you
get a bunch of product listing the module has to search the website and
ret
41 matches
Mail list logo