There's a simple way you can add your directory to
the execution path.
try this
>>>
sys.path.append(r'C:\python24\myPythonFiles')
now, you can import your file with the import
command
>>> import yourFile
Note: This is only a temporary solution, when you
close the interpreter, it will nee
Henry Dominik wrote:
> Hello people,
>
> As a new python programmer, I created a directory in
> 'C:\python24\myPythonFiles',
> and added a simple python under the myPythonFiles directory; but when I
> tried running it on the Python Shell, I got the following error.
>
> >>> import myPythonFil
Hi Henry,
> As a new python programmer, I created a directory in
> 'C:\python24\myPythonFiles', and added a simple python
> under the myPythonFiles directory; but when I tried
> running it on the Python Shell, I got the following error.
>
>>> import myPythonFiles.readOut
> ImportError: No modu
The mistakes in my databae topic have now been rectified.
I have no idea how I managed to post the file without testing
that section of code. And unfortunately it's one of the areas
where SqlLite SQL syntax varies from the Oracle syntax that
I'm most familiar with. But that's only a partial excu
> On my computer (Win2K) Python puts the current working directory in
> sys.path. (I'm not sure this happens on Linux.)
yes it does, on any unix-flavored system (Linux, FreeBSD, MacOS X,
Solaris, etc.).
since we're on the topic, there is another attribute in the sys
module, sys.modules that shows
Alan Gauld wrote:
> The mistakes in my databae topic have now been rectified.
> I have no idea how I managed to post the file without testing
> that section of code. And unfortunately it's one of the areas
> where SqlLite SQL syntax varies from the Oracle syntax that
> I'm most familiar with. Bu
Thanks Bob,
Feedback is always appreciated, its how the tutor improves.
> 1 - people familiar with other databases might be puzzled by the
> lack of column datatypes. I'd mention that sqlite allows but does
> not require types at the first introduction of CREATE TABLE,.
Fair point, although by
Hello!
At my university we are creating a Wiki with information about the
careers and articles, one of the most important section is the Systems
Engineering, which sports a Python section :)
Spanish Python Tutorials at:
http://wikitec.itnogales.edu.mx/index.php/Python
Saludos!
_
Hi,
I am having problems selecting a row in treeview.
I am using Pythoncard,
Glade 2 and Python 2.4.
I am using the following code:-
combo3 = self.wTree.get_widget("treeview1")
model=gtk.TreeStore(gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,gobject.TYPE_STRING,
Hey
all,
How do I create the
equivalent of a Java class in Python? I've been looking at the reference, and
it's been confusing to me at least.
Thanks,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo
> Some observations:
These have now all been addressed as previously discussed.
I've also added a section at the end covering the use of execute() to
insert parameters rather than relying on format strings since the
latter can be a security risk.
Hopefully its now complete! :-)
Alan Gauld
Autho
> How do I create the equivalent of a Java class in Python? I've been looking
> at the reference, and it's been confusing to me at least.
can you clarify what you are looking for? do you want to create a
class using Python, create the equivalent of a Java class using Python
via Jython, accessing
> How do I create the equivalent of a Java class in Python? I've been
> looking at the reference, and it's been confusing to me at least.
You may want to look at a tutorial on classes, like:
http://www.freenetpages.co.uk/hp/alan.gauld/tutclass.htm
Does this help?
Best of wishes!
13 matches
Mail list logo