execfile and import not working

2017-09-06 Thread Friedrich Rentsch
Hi, I am setting up Python 2.7 after an upgrade to Ubuntu 16.04, a thorough one, leaving no survivors. Everything is fine, IDLE opens, ready to go. Alas, execfile and import commands don't do my bidding, but hang IDLE. All I can do is kill the process named "python" from a bash terminal. IDLE

Re: import not working?

2009-03-13 Thread Lie Ryan
Scott David Daniels wrote: Aahz wrote: In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: ... sys.path.append(C:\\DataFileTypes) My preference: sys.path.append(rC:\DataFileTypes) This doesn't work if you need to add a trailing

Re: import not working?

2009-03-13 Thread Steve Holden
Lie Ryan wrote: Scott David Daniels wrote: Aahz wrote: In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: ... sys.path.append(C:\\DataFileTypes) My preference: sys.path.append(rC:\DataFileTypes) This doesn't work if you need to

Re: import not working?

2009-03-13 Thread Lie Ryan
Steve Holden wrote: Lie Ryan wrote: Scott David Daniels wrote: Aahz wrote: In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: ... sys.path.append(C:\\DataFileTypes) My preference: sys.path.append(rC:\DataFileTypes) This doesn't

Re: import not working?

2009-03-13 Thread Gabriel Genellina
En Fri, 13 Mar 2009 14:27:27 -0200, Lie Ryan lie.1...@gmail.com escribió: Steve Holden wrote: Lie Ryan wrote: Scott David Daniels wrote: Aahz wrote: In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: ...

Re: import not working?

2009-03-13 Thread Christian Heimes
Scott David Daniels wrote: Aahz wrote: In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: ... sys.path.append(C:\\DataFileTypes) My preference: sys.path.append(rC:\DataFileTypes) This doesn't work if you need to add a trailing

Re: import not working?

2009-03-12 Thread Aahz
In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: Just so that we're clear, this is a *really* *bad* habit to get into. Not appending to sys.path, though that isn't often a good idea, but failing to escape your backslashes. This works

Re: import not working?

2009-03-12 Thread Scott David Daniels
Aahz wrote: In article mailman.605.1235434737.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: ... sys.path.append(C:\\DataFileTypes) My preference: sys.path.append(rC:\DataFileTypes) This doesn't work if you need to add a trailing backslash, though. Also my

Re: import not working?

2009-02-23 Thread Lionel
On Feb 21, 12:37 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 20 Feb 2009 22:40:03 -0200, Lionel lionel.ke...@gmail.com   escribió: Okay, moving the wx example into the same directory containing the first example that was working fixed it. This directory only contains these

Re: import not working?

2009-02-23 Thread Lionel
On Feb 23, 11:24 am, Lionel lionel.ke...@gmail.com wrote: On Feb 21, 12:37 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 20 Feb 2009 22:40:03 -0200, Lionel lionel.ke...@gmail.com   escribió: Okay, moving the wx example into the same directory containing the first

Re: import not working?

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 18:10:07 -0200, Lionel lionel.ke...@gmail.com escribió: Taking DataFileTypes.py module out of the ...\site-packages \DataFileTypes folder and placing it directly into the site- packages folder seems to have cleared it up. Some problem between package and module usage I

Re: import not working?

2009-02-23 Thread Rhodri James
On Mon, 23 Feb 2009 19:24:46 -, Lionel lionel.ke...@gmail.com wrote: sys.path.append(C:\DataFileTypes) Just so that we're clear, this is a *really* *bad* habit to get into. Not appending to sys.path, though that isn't often a good idea, but failing to escape your backslashes. This works

Re: import not working?

2009-02-21 Thread Gabriel Genellina
En Fri, 20 Feb 2009 22:40:03 -0200, Lionel lionel.ke...@gmail.com escribió: Okay, moving the wx example into the same directory containing the first example that was working fixed it. This directory only contains these two modules and nothing else. The old directory which contained the

import not working?

2009-02-20 Thread Lionel
Hello all: I've crafted several classes and exceptions which I've stored in a file called DataFileType.py. I then invoke them from within other files like this: # Top of file import sys sys.path.append(c:\DataFileTypes) from DataFileTypes import * data = None try: # Note: INTData is a

Re: import not working?

2009-02-20 Thread Emile van Sebille
Lionel wrote: from DataFileTypes import * That's an import where you don't know what's getting import'd -- ie, namespace pollution [snip] from wx import * and more here. Try being explicit with your naming. HTH, Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: import not working?

2009-02-20 Thread Chris Rebert
On Fri, Feb 20, 2009 at 3:33 PM, Lionel lionel.ke...@gmail.com wrote: Hello all: I've crafted several classes and exceptions which I've stored in a file called DataFileType.py. I then invoke them from within other files like this: # Top of file import sys

Re: import not working?

2009-02-20 Thread Lionel
On Feb 20, 3:52 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 20, 2009 at 3:33 PM, Lionel lionel.ke...@gmail.com wrote: Hello all: I've crafted several classes and exceptions which I've stored in a file called DataFileType.py. I then invoke them from within other files like this:

Re: import not working?

2009-02-20 Thread Matimus
On Feb 20, 3:56 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 20, 3:52 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 20, 2009 at 3:33 PM, Lionel lionel.ke...@gmail.com wrote: Hello all: I've crafted several classes and exceptions which I've stored in a file called

Re: import not working?

2009-02-20 Thread Steve Holden
Chris Rebert wrote: On Fri, Feb 20, 2009 at 3:33 PM, Lionel lionel.ke...@gmail.com wrote: Hello all: I've crafted several classes and exceptions which I've stored in a file called DataFileType.py. I then invoke them from within other files like this: # Top of file import sys

Re: import not working?

2009-02-20 Thread Lionel
On Feb 20, 4:15 pm, Matimus mccre...@gmail.com wrote: On Feb 20, 3:56 pm, Lionel lionel.ke...@gmail.com wrote: On Feb 20, 3:52 pm, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 20, 2009 at 3:33 PM, Lionel lionel.ke...@gmail.com wrote: Hello all: I've crafted several

[issue1510172] Absolute/relative import not working?

2007-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 366 has been implemented for 2.6, which fixes this bug. The fix turned out to be quite invasive (hence the PEP), so it won't be backported to 2.5. -- resolution: - fixed status: open - closed type: - behavior _

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-07-10 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.6 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nick Coghlan (ncoghlan) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-30 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nick Coghlan (ncoghlan) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-27 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nick Coghlan (ncoghlan) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-27 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nick Coghlan (ncoghlan) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-26 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nick Coghlan (ncoghlan) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-23 Thread SourceForge.net
thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nobody/Anonymous (nobody) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-21 Thread SourceForge.net
/relative import not working? Initial Comment: Trying to import from a module using dotted import syntax produces this exception: ValueError: Relative importpath too deep This behavior has been confirmed on Mac OS X 10.4 using the Python 2.5b1 disk image; and on CentOS 4 using the Python 2.5b1

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-21 Thread SourceForge.net
, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Mitch Chapman (mitchchapman) Assigned to: Nobody/Anonymous (nobody) Summary: Absolute/relative import

[ python-Bugs-1510172 ] Absolute/relative import not working?

2006-06-21 Thread SourceForge.net
import not working? Initial Comment: Trying to import from a module using dotted import syntax produces this exception: ValueError: Relative importpath too deep This behavior has been confirmed on Mac OS X 10.4 using the Python 2.5b1 disk image; and on CentOS 4 using the Python 2.5b1 source