Re: Python path and append

2016-04-29 Thread Steven D'Aprano
On Sat, 30 Apr 2016 06:26 am, boB Stepp wrote: > On Mon, Apr 25, 2016 at 8:51 PM, Steven D'Aprano > wrote: > >> See here for the *start* of a more professional approach: >> >> http://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/ > > What else would I need to know/co

Re: Python path and append

2016-04-29 Thread boB Stepp
On Mon, Apr 25, 2016 at 8:51 PM, Steven D'Aprano wrote: > See here for the *start* of a more professional approach: > > http://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/ What else would I need to know/consider in order to have a *complete* professional approach?

Re: Python path and append

2016-04-27 Thread Stephen Hansen
On Tue, Apr 26, 2016, at 07:56 PM, Seymore4Head wrote: > On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano > wrote: > > >On Tue, 26 Apr 2016 08:04 am, Seymore4Head wrote: > > > >> BTW I was trying to use a line like yours that used an output file > >> that didn't exist and was getting an error.

Re: Python path and append

2016-04-26 Thread Chris Angelico
On Wed, Apr 27, 2016 at 12:56 PM, Seymore4Head wrote: > On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano > wrote: > >>On Tue, 26 Apr 2016 08:04 am, Seymore4Head wrote: >> >>> BTW I was trying to use a line like yours that used an output file >>> that didn't exist and was getting an error. I a

Re: Python path and append

2016-04-26 Thread Seymore4Head
On Tue, 26 Apr 2016 19:16:56 +0100, Michael wrote: >If you want to read an entire file, append a space and asterisk and write it >to another file, this is the code you need: > >infile = open('win.txt', 'r') >text = f.read() >infile.close() >text += " *" >outfile = open('outfile.txt', 'w') >outfi

Re: Python path and append

2016-04-26 Thread Seymore4Head
On Tue, 26 Apr 2016 11:53:57 +1000, Steven D'Aprano wrote: >On Tue, 26 Apr 2016 08:04 am, Seymore4Head wrote: > >> BTW I was trying to use a line like yours that used an output file >> that didn't exist and was getting an error.  I assume that import os >> fixes that. > > >Why would you assume th

Re: Python path and append

2016-04-26 Thread Michael
If you want to read an entire file, append a space and asterisk and write it to another file, this is the code you need: infile = open('win.txt', 'r') text = f.read() infile.close() text += " *" outfile = open('outfile.txt', 'w') outfile.write(text) outfile.close() If, on the other hand, you wis

Re: Python path and append

2016-04-25 Thread Gregory Ewing
Steven D'Aprano wrote: (Possible a few very old operating systems on supercomputers from the 1970s or 80s may have supported inserting... I seem to recall that VMS may have allowed that... but don't quote me.) I wouldn't be surprised if VMS provided some sort of indexed random-access file struc

Re: Python path and append

2016-04-25 Thread Dan Sommers
On Tue, 26 Apr 2016 11:51:23 +1000, Steven D'Aprano wrote: > ... (Possible a few very old operating systems on supercomputers from > the 1970s or 80s may have supported inserting... I seem to recall that > VMS may have allowed that... but don't quote me.) Some [non-supercomputer] OSes/filesystems

Re: Python path and append

2016-04-25 Thread Steven D'Aprano
On Tue, 26 Apr 2016 08:04 am, Seymore4Head wrote: > BTW I was trying to use a line like yours that used an output file > that didn't exist and was getting an error.  I assume that import os > fixes that. Why would you assume that? "Doctor, I have a problem with my arm, but I won't tell you wha

Re: Python path and append

2016-04-25 Thread Steven D'Aprano
On Tue, 26 Apr 2016 05:00 am, Seymore4Head wrote: > I was reading that. I have read it before. I don't use python enough > to even remember the simple stuff. Then when I try to use if for > something simple I forget how. It is perfectly fine to forget things that you read weeks or months befor

Re: Python path and append

2016-04-25 Thread Chris Angelico
On Tue, Apr 26, 2016 at 7:26 AM, John Gordon wrote: > It's much easier to create a new file and then rename it afterwards, > instead of rewriting the original file. And more importantly, it's safer. If anything happens to your process while it's doing its work, you'll have a junk file sitting aro

Re: Python path and append

2016-04-25 Thread Seymore4Head
On Mon, 25 Apr 2016 21:26:34 + (UTC), John Gordon wrote: >In <27nshbp40p1llr231dqm31p754tvurk...@4ax.com> Seymore4Head > writes: > >> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head >> wrote: > >> I am going to forget using a directory path. >> I would like to take the file win.txt and app

Re: Python path and append

2016-04-25 Thread Peter Otten
Random832 wrote: > On Mon, Apr 25, 2016, at 16:15, Seymore4Head wrote: >> Thanks for the tip. >> >> Still broke. :( >> >> f = open('wout.txt', 'r+') >> for line in f: >> if line=="": >> exit >> line=line[:-1] >> line=line+" *" >> f.write(line) >> print line >> f.clos

Re: Python path and append

2016-04-25 Thread John Gordon
In <27nshbp40p1llr231dqm31p754tvurk...@4ax.com> Seymore4Head writes: > On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head > wrote: > I am going to forget using a directory path. > I would like to take the file win.txt and append a space and the * > symbol. > f = open('win.txt', 'r+') > for line

Re: Python path and append

2016-04-25 Thread Seymore4Head
removing some other character. It's safer to use >line.rstrip("\n"). > >> -Original Message- >> From: Python-list >> [mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf >> Of Seymore4Head >> Sent: 25 April 2016 20:01

Re: Python path and append

2016-04-25 Thread Random832
On Mon, Apr 25, 2016, at 16:15, Seymore4Head wrote: > Thanks for the tip. > > Still broke. :( > > f = open('wout.txt', 'r+') > for line in f: > if line=="": > exit > line=line[:-1] > line=line+" *" > f.write(line) > print line > f.close() Your problem is that after y

Re: Python path and append

2016-04-25 Thread Seymore4Head
e beginning and the end of the string (default whitespace >characters). > >Use to remove return carriage--> line[:-1] > >-Original Message- >From: Python-list >[mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf Of >Seymore4Head >Sent: 25

Re: Python path and append

2016-04-25 Thread MRAB
ine ending, so line[:-1] could be removing some other character. It's safer to use line.rstrip("\n"). -Original Message- From: Python-list [mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf Of Seymore4Head Sent: 25 April 2016 20:01 To: python-list@python

Re: Python path and append

2016-04-25 Thread Rob Gaddi
Seymore4Head wrote: > On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi > wrote: > >>Seymore4Head wrote: >> >>> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head >>> wrote: >>> >>> I am going to forget using a directory path. >>> I would like to take the file win.txt and append a space and the

RE: Python path and append

2016-04-25 Thread Joaquin Alzola
ist [mailto:python-list-bounces+joaquin.alzola=lebara@python.org] On Behalf Of Seymore4Head Sent: 25 April 2016 20:01 To: python-list@python.org Subject: Re: Python path and append On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi wrote: >Seymore4Head wrote: > >> On Tue, 19 Apr 2016

Re: Python path and append

2016-04-25 Thread Seymore4Head
On Mon, 25 Apr 2016 18:24:02 - (UTC), Rob Gaddi wrote: >Seymore4Head wrote: > >> On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head >> wrote: >> >> I am going to forget using a directory path. >> I would like to take the file win.txt and append a space and the * >> symbol. >> >> f = open('win.

Re: Python path and append

2016-04-25 Thread Rob Gaddi
Seymore4Head wrote: > On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head > wrote: > > I am going to forget using a directory path. > I would like to take the file win.txt and append a space and the * > symbol. > > f = open('win.txt', 'r+') > for line in f: > f.read(line) > f.write(line+" *"

Re: Python path and append

2016-04-25 Thread Seymore4Head
On Tue, 19 Apr 2016 18:29:38 -0400, Seymore4Head wrote: I am going to forget using a directory path. I would like to take the file win.txt and append a space and the * symbol. f = open('win.txt', 'r+') for line in f: f.read(line) f.write(line+" *") This doesn't work. Would someone fix

Re: Python path and append

2016-04-19 Thread Matthew Barnett
On 2016-04-19 23:38, Chris Angelico wrote: On Wed, Apr 20, 2016 at 8:29 AM, Seymore4Head wrote: handle = open("\\Winmx\New$\q.txt") for line in handle: line=line.strip() print line Traceback (most recent call last): File "\\Winmx\New$\add viewed.py", line 2, in handle = open("

Re: Python path and append

2016-04-19 Thread Chris Angelico
On Wed, Apr 20, 2016 at 8:29 AM, Seymore4Head wrote: > > handle = open("\\Winmx\New$\q.txt") > for line in handle: > line=line.strip() > print line > > > Traceback (most recent call last): > File "\\Winmx\New$\add viewed.py", line 2, in > handle = open("\\Winmx\New$\q.txt") > IOErro

Python path and append

2016-04-19 Thread Seymore4Head
This doesn't work. Does Python recognize hidden directories? handle = open("\\Winmx\New$\q.txt") for line in handle: line=line.strip() print line Traceback (most recent call last): File "\\Winmx\New$\add viewed.py", line 2, in handle = open("\\Winmx\New$\q.txt") IOError: [Err

Re: Python path

2016-03-09 Thread Steven D'Aprano
On Wed, 9 Mar 2016 06:29 pm, ast wrote: > Hello > > Python path may be read with: > >>>> import sys >>>> sys.path > > There is an environnement variable $PYTHONPATH (windows) > to set if you want to add some additionnal directories to the >

Python path

2016-03-08 Thread ast
Hello Python path may be read with: import sys sys.path There is an environnement variable $PYTHONPATH (windows) to set if you want to add some additionnal directories to the path. But the default path seems not to be stored in any environnement variable. Is it correct ? Is it stored

Re: Python path on windows

2015-02-21 Thread Chris Angelico
On Sun, Feb 22, 2015 at 1:10 AM, Dave Angel wrote: > But you could always write your own py.exe, which interprets the shebang > differently. > > Or run python.exe yourself, which as far as I know, pays no attention to > shebang lines. Or, my preferred solution: Fix the shebangs :) It's usually no

Re: Python path on windows

2015-02-21 Thread Dave Angel
On 02/21/2015 06:05 AM, Gisle Vanem wrote: Dave Angel wrote: Finally, when py.exe starts, it reads that first (shebang) line, and decides which python interpreter to actually use. py.exe? Do you mean python.exe? Reread my post, or read Mark's reply to yours. The job of py.exe or pyw.exe i

Re: Python path on windows

2015-02-21 Thread Mark Lawrence
On 21/02/2015 11:05, Gisle Vanem wrote: Dave Angel wrote: Finally, when py.exe starts, it reads that first (shebang) line, and decides which python interpreter to actually use. py.exe? Do you mean python.exe? py.exe or pyw.exe come with the Python launcher on Windows and work out which ve

Re: Python path on windows

2015-02-21 Thread Gisle Vanem
Dave Angel wrote: Finally, when py.exe starts, it reads that first (shebang) line, and decides which python interpreter to actually use. py.exe? Do you mean python.exe? Is there a way to make python.exe ignore all Shebang lines in all scripts? I had many generated .py-files with: #!g:\Prog

Re: Python path on windows

2015-02-20 Thread Wolfgang Maier
On 20.02.2015 19:25, Ian Kelly wrote: On Fri, Feb 20, 2015 at 8:16 AM, loial wrote: On Friday, February 20, 2015 at 2:54:26 PM UTC, Ian wrote: On Feb 20, 2015 7:46 AM, "loial" wrote: On Linux we use #!/usr/bin/env python At the start of scripts to ensure that the python execut

Re: Python path on windows

2015-02-20 Thread Mark Lawrence
On 20/02/2015 15:16, loial wrote: On Friday, February 20, 2015 at 2:54:26 PM UTC, Ian wrote: On Feb 20, 2015 7:46 AM, "loial" wrote: On Linux we use #!/usr/bin/env python At the start of scripts to ensure that the python executable used is the one defined in the PATH variable,

Re: Python path on windows

2015-02-20 Thread Ian Kelly
On Fri, Feb 20, 2015 at 8:16 AM, loial wrote: > On Friday, February 20, 2015 at 2:54:26 PM UTC, Ian wrote: >> On Feb 20, 2015 7:46 AM, "loial" wrote: >> >> > >> >> > On Linux we use >> >> > #!/usr/bin/env python >> >> > >> >> > At the start of scripts to ensure that the python executable used is

Re: Python path on windows

2015-02-20 Thread loial
On Friday, February 20, 2015 at 2:54:26 PM UTC, Ian wrote: > On Feb 20, 2015 7:46 AM, "loial" wrote: > > > > > > On Linux we use > > > #!/usr/bin/env python > > > > > > At the start of scripts to ensure that the python executable used is the > > one defined in the PATH variable, rather than

Re: Python path on windows

2015-02-20 Thread Ian Kelly
On Feb 20, 2015 7:46 AM, "loial" wrote: > > On Linux we use > #!/usr/bin/env python > > At the start of scripts to ensure that the python executable used is the one defined in the PATH variable, rather than hardcoding a path to the python executable. > > What is the equivalent functionality in Win

Re: Python path on windows

2015-02-20 Thread Dave Angel
On 02/20/2015 09:43 AM, loial wrote: On Linux we use #!/usr/bin/env python At the start of scripts to ensure that the python executable used is the one defined in the PATH variable, rather than hardcoding a path to the python executable. What is the equivalent functionality in Windows? Dep

Python path on windows

2015-02-20 Thread loial
On Linux we use #!/usr/bin/env python At the start of scripts to ensure that the python executable used is the one defined in the PATH variable, rather than hardcoding a path to the python executable. What is the equivalent functionality in Windows? -- https://mail.python.org/mailman/listinf

Re: Finding the local directory of a file in the python path

2011-05-17 Thread are Dogue
Nevermind... os.path.dirname (__file__) On May 17, 9:44 pm, are Dogue wrote: > Hi there, > > I have a problem that I can't seem to solve after quite a bit of > searching, probably because I can't find the right terms to search > for. > > Basically, here's the situation. Let's say I have a file a

Finding the local directory of a file in the python path

2011-05-17 Thread are Dogue
Hi there, I have a problem that I can't seem to solve after quite a bit of searching, probably because I can't find the right terms to search for. Basically, here's the situation. Let's say I have a file at ~/foo/bin/ foo.py that imports a script that at ~/bar/bin/bar.py. The imported file needs

Re: Python Path registry Key

2011-02-18 Thread Sathish S
o entries in this key. Some stations have > > only one entry. Some do not have both. Probably they were removed > > while python was uninstall ed and was not added again when it was > > installed again. > > > > > > So what will be a good solution to get the Pytho

Re: Python Path registry Key

2011-02-18 Thread Westley Martínez
> only one entry. Some do not have both. Probably they were removed > while python was uninstall ed and was not added again when it was > installed again. > > > So what will be a good solution to get the Python path ? > > > > Thanks, > Sathish > Try sys.prefix -- http://mail.python.org/mailman/listinfo/python-list

Python Path registry Key

2011-02-17 Thread Sathish S
dded again when it was installed again. So what will be a good solution to get the Python path ? Thanks, Sathish -- http://mail.python.org/mailman/listinfo/python-list

Re: python path separator

2010-09-02 Thread Nobody
On Wed, 01 Sep 2010 23:57:21 -0700, swapnil wrote: > I could not find any documentation for variables os.path.sep and > os.path.altsep. Although the first is pretty straightforward can > anyone explain the purpose of the second variable? Is it even useful? The purpose is so that you can do e.g.:

Re: python path separator

2010-09-02 Thread swapnil
On Sep 2, 12:25 pm, Vlastimil Brom wrote: > 2010/9/2 swapnil :> I could not find any documentation > for variables os.path.sep and > > os.path.altsep. Although the first is pretty straightforward can > > anyone explain the purpose of the second variable? Is it even useful? > > According to issueh

Re: python path separator

2010-09-02 Thread Vlastimil Brom
2010/9/2 swapnil : > I could not find any documentation for variables os.path.sep and > os.path.altsep. Although the first is pretty straightforward can > anyone explain the purpose of the second variable? Is it even useful? > According to issue http://bugs.python.org/issue709428, os.path.altsep >

python path separator

2010-09-02 Thread swapnil
I could not find any documentation for variables os.path.sep and os.path.altsep. Although the first is pretty straightforward can anyone explain the purpose of the second variable? Is it even useful? According to issue http://bugs.python.org/issue709428, os.path.altsep was 'None' till a long time a

Re: Set Python Path for Idle Mac 10.5

2010-07-20 Thread Ned Deily
In article , neoethical wrote: > New to programming and after doing some research I've chosed to work with > Python. One thing that's bothering me is that I would like to set up a > specific folder in my Documents folder to hold my modules. How do I go about > doing this? I've found the way to c

Set Python Path for Idle Mac 10.5

2010-07-20 Thread neoethical
Hi, New to programming and after doing some research I've chosed to work with Python. One thing that's bothering me is that I would like to set up a specific folder in my Documents folder to hold my modules. How do I go about doing this? I've found the way to change it for each IDLE session but I'd

Re: Permanently adding to the Python path in Ubuntu

2009-09-01 Thread David C. Ullrich
When I wanted to set PYTHONPATH I had the advantage of knowing nothing about how Linux/Ubuntu was supposed to work, so I tried everything. ~/.profile worked for me. In article , Chris Colbert wrote: > I'm having an issue with sys.path on Ubuntu. I want some of my home > built packages to oversh

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Chris Colbert
Great! That was the solution I was looking for. Thanks! Chris On Sun, Aug 30, 2009 at 12:29 PM, Christian Heimes wrote: > Chris Colbert wrote: >> Is there a way to fix this so that the local dist-packages is added to >> sys.path before the system directory ALWAYS? I can do this by editing >> site

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Christian Heimes
Chris Colbert wrote: > Is there a way to fix this so that the local dist-packages is added to > sys.path before the system directory ALWAYS? I can do this by editing > site.py but I think it's kind of bad form to do it this way. I feel > there has to be a way to do this without root privileges. >

Re: Permanently adding to the Python path in Ubuntu

2009-08-30 Thread Chris Colbert
I don't want to have to modify the path in each and every application. There has to be a way to do this... Personally, I don't agree with the Debian maintainers in the order they import anyway; it should be simple for me to overshadow system packagers. But that's another story. P.S. my first nam

Re: Permanently adding to the Python path in Ubuntu

2009-08-29 Thread Sean DiZazzo
On Aug 29, 5:39 pm, Chris Colbert wrote: > I'm having an issue with sys.path on Ubuntu. I want some of my home > built packages to overshadow the system packages. Namely, I have built > numpy 1.3.0 from source with atlas support, and I need it to > overshadow the system numpy 1.2.1 which I had to

Permanently adding to the Python path in Ubuntu

2009-08-29 Thread Chris Colbert
I'm having an issue with sys.path on Ubuntu. I want some of my home built packages to overshadow the system packages. Namely, I have built numpy 1.3.0 from source with atlas support, and I need it to overshadow the system numpy 1.2.1 which I had to drag along as a dependency for other stuff. I have

Re: Run pyc file without specifying python path ?

2009-08-03 Thread Dave Angel
Barak, Ron wrote: -Original Message- From: Dave Angel [mailto:da...@ieee.org] Sent: Sunday, August 02, 2009 12:36 To: Barak, Ron Cc: 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Barak, Ron wrote: Hi Dave, It seems like I don&#x

Re: Run pyc file without specifying python path ?

2009-08-02 Thread Dave Angel
Barak, Ron wrote: Hi Dave, It seems like I don't understand your solution. I use the (appatched) soapAPI.py as the wrapper to parsing.pyc. However, if I do (for instance): $ python -u parsing.pyc -U aaa The last line of the output is (as expected): return_code: 12 ; params: {'username': 'aaa'

RE: Run pyc file without specifying python path ?

2009-08-02 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@dejaviewphoto.com] > Sent: Thursday, July 30, 2009 20:08 > To: Barak, Ron > Cc: 'python-list@python.org' > Subject: Re: Run pyc file without specifying python path ? > > Barak, Ron wrote: > > Hi

Re: Run pyc file without specifying python path ?

2009-07-31 Thread Processor-Dev1l
On Jul 30, 4:47 pm, "Barak, Ron" wrote: > > -Original Message- > > From: Dave Angel [mailto:da...@dejaviewphoto.com] > > Sent: Thursday, July 30, 2009 16:03 > > To: Barak, Ron > > Cc: 'Dave Angel'; 'python-l...@python.org'

RE: Run pyc file without specifying python path ?

2009-07-31 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@dejaviewphoto.com] > Sent: Thursday, July 30, 2009 16:03 > To: Barak, Ron > Cc: 'Dave Angel'; 'python-list@python.org' > Subject: RE: Run pyc file without specifying python path ? > >

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Aahz
In article , Chris Rebert wrote: > >No, with the shebang line (and assuming execute permissions on the >file), it would look like: > >./wrapper.py There's no reason to name it ".py"; you can have a perfectly useful "shell script" that just happens to list python on the shebang line instead of th

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Gabriel Genellina
En Thu, 30 Jul 2009 12:16:46 -0300, Unknown escribió: On 2009-07-30, Barak, Ron wrote: On second thoughts, I may have a problem implementing the wrapper solution, because my actual test_pyc.pyc, needs to parse its command line. Namely, the actual call to test_pyc.pyc looks something like th

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Dave Angel
#x27;s an obvious answer, I just cannot figure it out). Bye, Ron. -Original Message- From: Dave Angel [mailto:da...@dejaviewphoto.com] Sent: Thursday, July 30, 2009 16:03 To: Barak, Ron Cc: 'Dave Angel'; 'python-list@python.org' Subject: RE: Run

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Grant Edwards
On 2009-07-30, Barak, Ron wrote: > Hi Dave, > > On second thoughts, I may have a problem implementing the > wrapper solution, because my actual test_pyc.pyc, needs to > parse its command line. Namely, the actual call to > test_pyc.pyc looks something like this: > > $ python test_pyc.py -U dave -P

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
ious answer, I just cannot figure it out). Bye, Ron. > -Original Message- > From: Dave Angel [mailto:da...@dejaviewphoto.com] > Sent: Thursday, July 30, 2009 16:03 > To: Barak, Ron > Cc: 'Dave Angel'; 'python-list@python.org' > Subject: RE: Run pyc f

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Grant Edwards
On 2009-07-30, Dave Angel wrote: > Steven makes some good points. You have to define what level > of clever you're protecting from. A determined hacker will > get in no matter what you do, unless you want to ship the > program in a proprietary embedded system, encased in epoxy. That won't stop

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Dave Angel
Barak, Ron wrote: -Original Message- From: Dave Angel [mailto:da...@ieee.org] Sent: Wednesday, July 29, 2009 21:05 To: Barak, Ron Cc: 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Barak, Ron wrote: Hi, I wanted to make a python

Re: Run pyc file without specifying python path ?

2009-07-30 Thread PythonAB
ct: Re: Run pyc file without specifying python path ? Hi Dave, Your solution sort of defeats my intended purpose (sorry for not divulging my 'hidden agenda'). I wanted my application to "hide" the fact that it's a python script, and look as much as possible like it&

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Chris Rebert
On Thu, Jul 30, 2009 at 3:42 AM, Barak, Ron wrote: > > > > From: PythonAB [mailto:pyt...@rgbaz.eu] > Sent: Thursday, July 30, 2009 12:18 > To: Barak, Ron > Cc: 'Dave Angel'; 'python-list@python.org' > Subject: Re:

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
From: PythonAB [mailto:pyt...@rgbaz.eu] Sent: Thursday, July 30, 2009 12:18 To: Barak, Ron Cc: 'Dave Angel'; 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Hi Dave, Your solution sort of defeats my int

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Steven D'Aprano
On Thu, 30 Jul 2009 07:01:28 +0100, Barak, Ron wrote: > I wanted my application to "hide" the fact that it's a python script, > and look as much as possible like it's a compiled program. What do you think the "c" in .pyc stands for? What it's not is a compiled to machine-code stand alone executa

Re: Run pyc file without specifying python path ?

2009-07-30 Thread Christian Heimes
Barak, Ron wrote: > Your solution sort of defeats my intended purpose (sorry for not divulging my > 'hidden agenda'). > I wanted my application to "hide" the fact that it's a python script, and > look as much as possible like it's a compiled program. > The reason I don't just give my user a py fi

Re: Run pyc file without specifying python path ?

2009-07-30 Thread PythonAB
Hi Dave, Your solution sort of defeats my intended purpose (sorry for not divulging my 'hidden agenda'). I wanted my application to "hide" the fact that it's a python script, and look as much as possible like it's a compiled program. The reason I don't just give my user a py file, is that I

RE: Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@ieee.org] > Sent: Wednesday, July 29, 2009 21:05 > To: Barak, Ron > Cc: 'python-list@python.org' > Subject: Re: Run pyc file without specifying python path ? > > Barak, Ron wrote: > > Hi, >

Re: Run pyc file without specifying python path ?

2009-07-29 Thread Dave Angel
1 python]# Is there a way to run a pyc file without specifying the python path ? Bye, Ron. I don't currently run Unix, but I think I know the problem. In a text file, the shell examines the first line, and if it begins #! it's assumed to point to the executable of an i

Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
e a way to run a pyc file without specifying the python path ? Bye, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 5:08 PM, Nikolas Tautenhahn wrote: > Hi, > > Reimar Bauer wrote: > > I can install pydev using the update manager in eclipse for 64 bit from > the > > SuSE 11.1 repo. But I can't configure pydev without crashing it. > > I can select the interpreter /usr/bin/python > > and

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Nikolas Tautenhahn
Hi, Reimar Bauer wrote: > I can install pydev using the update manager in eclipse for 64 bit from the > SuSE 11.1 repo. But I can't configure pydev without crashing it. > I can select the interpreter /usr/bin/python > and I do see the System PYTHONPATH > Forced builtin libs also looks good. > > B

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 7:49 AM, Reimar Bauer wrote: > Hi > > I can install pydev using the update manager in eclipse for 64 bit from the > SuSE 11.1 repo. But I can't configure pydev without crashing it. > I can select the interpreter /usr/bin/python > and I do see the System PYTHONPATH > Forced

SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Reimar Bauer
Hi I can install pydev using the update manager in eclipse for 64 bit from the SuSE 11.1 repo. But I can't configure pydev without crashing it. I can select the interpreter /usr/bin/python and I do see the System PYTHONPATH Forced builtin libs also looks good. But Apply gives me # # An unexpected

Re: Python Path Dictionary

2007-08-22 Thread bg_ie
;c:\\python24\\lib\\site-packages\\Numeric', > > > 'c:\\python24\\lib\\site-packages\\PIL', > > > 'c:\\python24\\lib\\site-packages\\gtk-2.0', > > > 'c:\\python24\\lib\\site-packages\\win32', > > > 'c:\\python24\\lib\\site-packages\

Re: Python Path Dictionary

2007-08-21 Thread Chris Mellon
> > 'c:\\python24', 'c:\\python24\\lib\\site-packages', > > 'c:\\python24\\lib\\site-packages\\Numeric', > > 'c:\\python24\\lib\\site-packages\\PIL', > > 'c:\\python24\\lib\\site-packages\\gtk-2.0', > > 'c:\\python24\\l

Re: Python Path Dictionary

2007-08-21 Thread aine_canby
On 21 Aug, 17:42, Gary Herron <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > Do the Python Paths come in the form of a dictionary where I can > > access a particular path my its key in the registry? > > > For example, in PythonWin Tools>>Edit Python Paths shows the name as > >

Re: Python Path Dictionary

2007-08-21 Thread Gary Herron
[EMAIL PROTECTED] wrote: > Hi, > > Do the Python Paths come in the form of a dictionary where I can > access a particular path my its key in the registry? > > For example, in PythonWin Tools>>Edit Python Paths shows the name as > well of the address of each path > > Thanks, > > Aine > > If by "P

Python Path Dictionary

2007-08-21 Thread aine_canby
Hi, Do the Python Paths come in the form of a dictionary where I can access a particular path my its key in the registry? For example, in PythonWin Tools>>Edit Python Paths shows the name as well of the address of each path Thanks, Aine -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Path

2006-07-27 Thread diffuser78
In my .basrc file I commented the line of ActivePyton and after reboot everything is fine now. I can use Python 2.4.3 even on console and SPE both. thanks [EMAIL PROTECTED] wrote: > I have two python 2.4s on my Ubuntu Linux box. One is Python 2.4.2 and > other is Python 2.4.3. I use SPE as an

Re: Python Path

2006-07-27 Thread John Salerno
[EMAIL PROTECTED] wrote: > I want to get rid of ActivePython which I happend to install because I > was trying to Test the IDE by ActiveState and I think this version of > Python was installed by it. > > I am happy using Python 2.4.3 but there is not way I am being able to > use it on console.

Python Path

2006-07-27 Thread diffuser78
I have two python 2.4s on my Ubuntu Linux box. One is Python 2.4.2 and other is Python 2.4.3. I use SPE as an IDE for coding. I have written a small app in wxPython. If I run it from SPE it just works fine, but if I run it from console it gives me import wx eror. Following is the log which you mi

Re: Add to python path in Linux

2005-12-20 Thread John Goebel
On 20 Dec 2005 08:13:48 -0800, ninhenzo64 <[EMAIL PROTECTED]> wrote: Hey, > Hi, > > I am trying to use wxPython under Linux. Unfortunately, our system > administrator has gone home for the holidays so I cannot get him to > install the libraries properly. However, I have unpacked the libraries > i

Re: Add to python path in Linux

2005-12-20 Thread Sybren Stuvel
ninhenzo64 enlightened us with: > The variable PYTHONPATH doesn't seem to exist. Yet it is the one you should use. It's got the same syntax as the regular PATH variable. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don'

Add to python path in Linux

2005-12-20 Thread ninhenzo64
Hi, I am trying to use wxPython under Linux. Unfortunately, our system administrator has gone home for the holidays so I cannot get him to install the libraries properly. However, I have unpacked the libraries in my home directory, so if there was some way of adding this to the path that Python se

How is the python path build ?

2005-10-25 Thread llothar
Hello, i must add my own python.exe and a little patched runtime library with my product. How can i setup the python path, so that the directories are not taken from the registry values for Python2.4 but something relative to my own python.exe ? With PYTHONPATH i can only add new items in front

Re: How to find Python path in Visual C++ install wizard

2005-08-13 Thread Philippe C. Martin
Thanks you all. As my software has python "executables" and libraries + c++ libs, the HKEY_LOCAL should be myt way out. Best regards, Philippe Philippe C. Martin wrote: > Hi, > > I realize this is not really a Python question but ... > > I am trying to setup an .msi for my software (P

Re: How to find Python path in Visual C++ install wizard

2005-08-13 Thread laurent
Hello, there's a pretty solution. if the user hasn't got python or don't want to install python. You can make your application executable without a complete installation of python. for this, look at project like py2exe or freeze. These tools make an executable of your pyc files and produce some

Re: How to find Python path in Visual C++ install wizard

2005-08-13 Thread Martin v. Löwis
Philippe C. Martin wrote: > I am trying to setup an .msi for my software (Python code (.pyc) + drivers) > to make installation easier for Windows users. > > I am using the installer that comes with V. C++ 7.1. > > I would like to find the way to make sure Python is installed and then copy > autom

How to find Python path in Visual C++ install wizard

2005-08-13 Thread Philippe C. Martin
Hi, I realize this is not really a Python question but ... I am trying to setup an .msi for my software (Python code (.pyc) + drivers) to make installation easier for Windows users. I am using the installer that comes with V. C++ 7.1. I would like to find the way to make sure Python is installe

Vanilla python path

2005-07-25 Thread Neil Benn
can point python to load required packages and libraries from any location I wish - probably by passing the path as an option to the start script and also the location of the module which will do the reassembling of the python path. This module will be loaded by sitecustomise.py - the r

Re: Python Path Setting

2005-07-21 Thread Chris Curvey
http://www.python.org/doc/2.4.1/inst/search-path.html#SECTION00041 -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >