Re: tkinter and cygwin

2005-11-21 Thread Jason Tishler
John,

On Mon, Nov 21, 2005 at 08:18:09PM +0900, John wrote:
> I've recently started learning python programming and have been
> experimenting with a few basic GUI programs.  My work system is
> cygwin/Windows XP.  I use X-windows in cygwin but when I run my
> python/tkinter program from an x-win terminal , a normal XP window is
> opened up.

For better or worse, Cygwin's tcltk package is essentially a Win32
build.  So, the behavior you are observing is expected although not
necessarily desired.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cygwin Popen object

2005-01-17 Thread Jason Tishler
On Mon, Jan 17, 2005 at 12:41:25PM -0800, christiancoder wrote:
> Is anybody else getting the following error with the Popen object in
> cygwin? The code works fine in windows and linux.
> 
> File "d:\atg\personal\python\buildroot\util.py", line 100, in System
> pipe = subprocess.Popen( command, shell=True,
> stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
> universal_newlines=True )
> File "/usr/local/lib/python2.4/subprocess.py", line 554, in __init__
> errread, errwrite)
> File "/usr/local/lib/python2.4/subprocess.py", line 914, in
> _execute_child
> self.pid = os.fork()
> OSError: [Errno 11] Resource temporarily unavailable

Try rebasing your Cygwin installation.  See the README:

/usr/share/doc/Cygwin/python-2.4.README

for more information.  Does it solve your problem?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-01 Thread Jason Tishler
Dean,

On Tue, Feb 01, 2005 at 02:31:03AM -0800, Dean N. Williams wrote:
> I am trying to build Python with Tcl/Tk under the Cygwin_NT-5.1 OS. 
> Has anyone done this?

Yes, Cygwin Python with _tkinter has been part of the standard Cygwin
distribution for over three years:

http://www.cygwin.com/ml/cygwin-announce/2001/msg00118.html

> Do I need to build tcl8.4.9 and tk8.4.9 under the unix directory or
> the win directory.

No, Tcl/Tk is part of the standard Cygwin distribution too.

> I found that the Tcl/Tk unix directories compiled just fine and built
> the libtcl8.4.a and libtk8.4.a libraries for use. But I don't think
> that Python is looking for this. If you've built Python with Tcl/Tck,
> is it possible for you to send me instructions on how you did it?

See the Cygwin Python README:

http://www.tishler.net/jason/software/python/python-2.4.README

BTW, why don't you just use the pre-built Cygwin Python?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-02 Thread Jason Tishler
Dean,

On Tue, Feb 01, 2005 at 08:01:13AM -0800, Dean N. Williams wrote:
> I am getting the following error message from the Python build:
> 
> Traceback (most recent call last):
>  File "", line 1, in ?
>  File "/usr/local/ASD_work/cdat/lib/python2.4/lib-tk/Tkinter.py", line 
> 38, in ?
>import _tkinter # If this fails your Python may not be configured for Tk
> ImportError: No module named _tkinter
> Python Tkinter import failed.
> 
> 
> Have you seen this type of error message before?

No.

> I've attached the following log files for each build.

It appears you did not carefully read the build logs yourself:

building '_tkinter' extension
gcc -shared -Wl,--enable-auto-image-base 
build/temp.cygwin-1.5.12-i686-2.4/_tkinter.o 
build/temp.cygwin-1.5.12-i686-2.4/tkappinit.o -L/usr/X11R6/lib64 
-L/usr/X11R6/lib -L/usr/local/ASD_work/cdat/lib -L/usr/local/lib -L. -ltk8.4 
-ltcl8.4 -lpython2.4 -o build/lib.cygwin-1.5.12-i686-2.4/_tkinter.dll

/usr/local/ASD_work/cdat/lib/libtk8.4.a(tkWindow.o)(.text+0x1093):tkWindow.c: 
undefined reference to `_XDestroyWindow'
...
collect2: ld returned 1 exit status

Hence, you were unsuccessful building _tkinter.  This is why the import
above fails.

> [snip]
> 
> What else am I missing to do?

Using the pre-built Python and Tcl/Tk packages that are part of the
standard Cygwin distribution instead of attempting to build your own.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-02 Thread Jason Tishler
Dean,

Please keep your replies on-list.

On Wed, Feb 02, 2005 at 05:06:30AM -0800, Dean N. Williams wrote:
> It appears that I built the  Tcl/Tk libraries, but for some reasons
> they are not correct. So I am using the Tcl/Tk libraries that were
> distributed with Cygwin. This seemed to work... Now I set the
> TCL_LIBRARY and TK_LIBRARY environment, but I get the following error
> when trying to run idle.
>
> [Dean [EMAIL PROTECTED] ...ASD_work/bin]$ ./idle
> C:\cygwin\usr\local\ASD_work\bin\python2.4.exe (3164): *** unable to 
> remap C:\cygwin\bin\cygssl-0.9.7.dll to same address as parent(0x74) 
> != 0x75
>  5 [main] python2.4 2144 sync_with_child: child 3164(0x650) died 
> before initialization with status code 0x1
>   7241 [main] python2.4 2144 sync_with_child: *** child state child 
> loading dlls
> Traceback (most recent call last):
>  File "./idle", line 5, in ?
>main()
>  File "/usr/local/ASD_work/lib/python2.4/idlelib/PyShell.py", line 
> 1355, in main
> [snip]
>  File "/usr/local/ASD_work/lib/python2.4/os.py", line 488, in _spawnvef
>pid = fork()
> OSError: [Errno 11] Resource temporarily unavailable
>
> Does this have to do with rebaseall?

Yes.  Rebase your system (via rebaseall) following the instructions in
the Cygwin Python but remember to use the "-T" option to specify the
DLLs you built locally.  After rebasing you should be good to go.

> thanks again for all your help...

You are welcome.

Maybe three times is a charm? :,(  Why don't you use the pre-built
Python that is part of the standard Cygwin distribution?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-02 Thread Jason Tishler
Dean,

Please keep your replies on-list.

On Wed, Feb 02, 2005 at 05:14:21AM -0800, Dean N. Williams wrote:
> I am trying to do the following according to your notes:
> 
> 3. Due to issues with Cygwin's fork() and DLL base address conflicts,
> one should rebase their Cygwin system to prevent fork() failures.  Use
> the following procedure to rebase your system:
> 
>a. install the Cygwin rebase package (if necessary)
>b. shutdown all Cygwin processes
>c. start bash (do not use rxvt)
>d. execute rebaseall (in the bash window)
> 
> I think this is why idle fails. So I did the above:
> 
> [Dean [EMAIL PROTECTED] ...ASD_work/bin]$ rebaseall
> ReBaseImage (/usr/bin/cygexpat-0.dll) failed with last error = 6
> 
> What am I doing wrong here?

It appears you did not follow step b above.  Did you shutdown *all*
Cygwin processes include services?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-18 Thread Jason Tishler
Dean,

On Tue, Feb 08, 2005 at 12:55:15PM -0500, Jason Tishler wrote:
> On Tue, Feb 08, 2005 at 08:01:11AM -0800, Dean N. Williams wrote:
> > $ rebaseall
> > /usr/bin/rebaseall: line 70: [: too many arguments
> > /usr/bin/rebaseall: line 75: [: too many arguments
> > /usr/bin/rebaseall: line 94: $TmpFile: ambiguous redirect
> > cannot read /cygdrive/c/Documents
> > 
> > On my laptop installation everything works just fine. What is the
> > difference?
> 
> The TMP and/or TEMP environment variables have at least two spaces in
> them.
> 
> The easiest workaround is to execute rebaseall like the following:
> 
> $ TMP=/tmp rebaseall
> 
> Long term I will change rebaseall to deal better with spaces in shell
> variables.

The above rebaseall problem has been fixed:

http://cygwin.com/ml/cygwin-announce/2005-07/msg00031.html

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-19 Thread Jason Tishler
Dean,

On Mon, Jul 18, 2005 at 05:59:20AM -0700, Dean N. Williams wrote:
> Thanks for fixing this problem.

You are quite welcome.  Thanks for your patience.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-22 Thread Jason Tishler
Dean,

On Fri, Jul 22, 2005 at 05:11:45AM -0700, Dean N. Williams wrote:
> I downloaded your new Cygwin from http://cygwin.com and tried to build
> install Python/CDAT again. It appears to have built properly, but when
> I try to execute, it receive a sock error. How do I get around this
> problem?

I don't know -- it is not clear what you are trying to do.  Are you
trying to build Cygwin Python or just CDAT?

On Fri, Jul 22, 2005 at 07:09:08AM -0700, Dean N. Williams wrote:
> To be more specific. If I try to import socket I get the "ImportError:
> No module named _socket". What do I need to install from Cygwin in
> order for this to work?

AFAICT, nothing.  The above seems to indicate your Python installation
is broken.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-22 Thread Jason Tishler
Dean,

Please keep your replies on-list.

On Fri, Jul 22, 2005 at 08:14:03AM -0700, Dean N. Williams wrote:
> Is there anyway for me to get back to an older version of Cygwin?

What do you mean by the above?  An older Cygwin?  An older Cygwin
Python?  An older rebase?

> In my Python2.4 log file, I tracked it down to the file
> Python2.4/Modules/socketmodule.c file: 3350  INET_ADDSTRLEN, which
> says "INET_ADDSTRLEN" is undeclared. I know this has something to do
> with the _ssl extension.

Is the above from building Python or CDAT?

> Also in my Python2.4 log file, I see DB_LSTAT_ERR is undeclared. Has
> something to do with the building of the gdbm extension.

Ditto.

> Also when I tryed "rebaseall" it no longer worked. When I went to
> "Start/run..." and tried to run "ash", I got the error stating it
> didn't know what "ash" was. Any help on this is appreciated.

If Cygwin's bin is not in your Windows PATH, then give the full path to
ash.  For example:

C:\Cygwin\bin\ash.exe

Then start rebaseall is follows:

$ PATH=/bin rebaseall

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
Dean,

On Mon, Jul 25, 2005 at 05:55:39AM -0700, Dean N. Williams wrote:
> >>Is there anyway for me to get back to an older version of Cygwin?
> >
> >What do you mean by the above?  An older Cygwin?  An older Cygwin
> >Python?  An older rebase?

See below...

> [snip]
> 
> When installing from the internet, there is no way to specify which
> version (or date) of Cygwin to download. I was wondering if you kept
> version controls, so I could go back to the February version of Cygwin
> since I know the Python Socket Module works.

No, but see the Cygwin Time Machine:

ftp://www.fruitbat.org/pub/cygwin/circa/2005/02/

> >>In my Python2.4 log file, I tracked it down to the file
> >>Python2.4/Modules/socketmodule.c file: 3350  INET_ADDSTRLEN, which
> >>says "INET_ADDSTRLEN" is undeclared. I know this has something to do
> >>with the _ssl extension.
> >
> >Is the above from building Python or CDAT?
> >
> The above is building Python.

Why are you trying to build Cygwin Python?  Why can't you use the
pre-built version?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
Dean,

On Mon, Jul 25, 2005 at 11:27:16AM -0700, Dean N. Williams wrote:
> I was able to run C:/cygwin/bin/ash.exe. This is good. In the
> "ash.exe" window, I ran PATH=/bin rebaseall and received the same
> error: "rebaseall: only ash processes are allowed .. Execute
> '/bin/rebaseall' from ash."

Did you read the error message?  In particular, the following:

Exit all Cygwin processes and stop all Cygwin services.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-25 Thread Jason Tishler
Dean,

On Mon, Jul 25, 2005 at 10:49:58AM -0700, Dean N. Williams wrote:
> For version control and other reasons, it would be nice to be able to
> build Python from source and it should build from source. How did the
> Cygwin version build?

I built using an older version of Cygwin (i.e, 1.5.12-1).

> I've attached the Python log file with the specific error. What file
> is missing?

None.  See below...

The "root cause" is the following:

under Cygwin 1.5.12-1:

$ configure
[snip]
checking for inet_pton... no
[snip]

under Cygwin 1.5.18-1:

$ configure
[snip]
checking for inet_pton... yes
[snip]

So, when you build under 1.5.18-1, pyconfig.h has the following:

#define HAVE_INET_PTON 1

This causes a chunk of code in socketmodule.c to be compiled under
1.5.18-1 that wasn't compiled before.

I will have to research why INET_ADDRSTRLEN is not defined under Cygwin
and submit a patch to Cygwin or Python as appropriate.

Thanks for bringing this problem to my attention.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Jason Tishler
On Mon, Jul 25, 2005 at 03:02:45PM -0700, [EMAIL PROTECTED] wrote:
> Let me know when you have it solved.

The problem has been fixed in Cygwin CVS:

http://cygwin.com/ml/cygwin/2005-07/msg01257.html
http://cygwin.com/ml/cygwin-cvs/2005-q3/msg00046.html

> In the meantime, I have a workaround.

Unfortunately, you will have to live with your workaround until Cygwin
1.5.19 is released. :,(

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-27 Thread Jason Tishler
Dean,

On Wed, Jul 27, 2005 at 12:41:05PM -0700, Dean N. Williams wrote:
> Thanks for fixing this bug in Cygwin.

You are welcome.  However, I didn't fix it -- I just got it fixed. :,)

> Remember there was another undefined variable for the Python build
> _bsd...

I didn't get this error.  Did you forgot to install one of the
libdb${version}-devel packages:

$ cygcheck -cd | grep 'libdb.*-devel'
libdb2-devel2.7.7-4
libdb3.1-devel  3.1.17-2
libdb4.1-devel  4.1.25-1
libdb4.2-devel  4.2.52-1

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-07-28 Thread Jason Tishler
Dean,

On Wed, Jul 27, 2005 at 02:56:16PM -0700, Dean N. Williams wrote:
> >I didn't get this error.  Did you forgot to install one of the
> >libdb${version}-devel packages:
> >
> >   $ cygcheck -cd | grep 'libdb.*-devel'
> >   libdb2-devel2.7.7-4
> >   libdb3.1-devel  3.1.17-2
> >   libdb4.1-devel  4.1.25-1
> >   libdb4.2-devel  4.2.52-1
> >
> No, I did an install all at the top of the installation. Didn't know I
> needed to specify libraries. If I select "install" for everything
> (that is, all packages show "install") shouldn't this include the
> above?

It should, but I wasn't looking over your shoulder when you ran Cygwin's
setup.exe. :,)  Anyway, please run the following and post the results to
the list:

$ cygcheck -cd | grep 'libdb.*-devel'

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to quit a Windows GUI program gracefully with Python under Cygwin?

2005-08-12 Thread Jason Tishler
On Fri, Aug 12, 2005 at 03:07:02AM -0700, KB wrote:
> After I confirmed 'Alt-F4' would terminate and close a win32
> application running independently,
> I installed 'SendKeys' module and tested with the following code under
> both Cygwin and Python Windows

If you installed the SendKeys binary, then it will not work with Cygwin
Python since it is a Windows Python shared extension module.  It may be
possible to port SendKeys to Cygwin.  Unfortunately, this may not solve
your problem... :,(

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Socket Support When Compiling Python 2.3.5 On Cygwin

2005-08-26 Thread Jason Tishler
Tom,

On Thu, Aug 25, 2005 at 10:39:47AM -0500, [EMAIL PROTECTED] wrote:
> What do I need to do to make sure that this file will be created with
> I compile Python 2.3.5?

Are there any error messages when the socket module is built during the
Python build?  If so, then post them to the list.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cygwin font problems

2005-08-28 Thread Jason Tishler
Steve,

On Sat, Aug 27, 2005 at 11:43:23PM -0400, Steve Holden wrote:
> Cygwin runs Python 2.4.1, Windows runs 2.4. Any light on this mystery
> gratefully received.

You may get better traction on the Cygwin mailing list.  I recommend
trying there.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-08 Thread Jason Tishler
Dean,

On Tue, Feb 08, 2005 at 08:01:11AM -0800, Dean N. Williams wrote:
> $ rebaseall
> /usr/bin/rebaseall: line 70: [: too many arguments
> /usr/bin/rebaseall: line 75: [: too many arguments
> /usr/bin/rebaseall: line 94: $TmpFile: ambiguous redirect
> cannot read /cygdrive/c/Documents
> 
> On my laptop installation everything works just fine. What is the
> difference?

The TMP and/or TEMP environment variables have at least two spaces in
them.

The easiest workaround is to execute rebaseall like the following:

$ TMP=/tmp rebaseall

Long term I will change rebaseall to deal better with spaces in shell
variables.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-10 Thread Jason Tishler
Dean,

On Wed, Feb 09, 2005 at 08:15:43AM -0800, Dean N. Williams wrote:
> The "$ TMP=/tmp rebaseall" command worked! Thank you.

You are quite welcome.

> When a new Cygwin is available w/ your changes please let me know...

Sorry, but the above does not scale.  If you subscribe to
cygwin-announce@, then you will be notified when rebase and other Cygwin
packages are released.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-28 Thread Jason Tishler
Dean,

On Mon, Feb 28, 2005 at 10:34:20AM -0800, Dean N. Williams wrote:
> I have a other Cygwin port question. It turns out that the auto-import
> for XtStrings an widgetClass didn't get resolved. This a similar
> auto-import resolving error that I got when trying to build Tcl/Tk. I
> ended up using the shared Tcl/Tk that came with Cygwin. But in this
> case I must be able to build my software. Can you tell me how to get
> around this problem? Or can you tell me which cygwin mail list to send
> my plea for help?

I recommend trying the main Cygwin list:

cygwin at cygwin dot com

> gcc -shared -Wl,--enable-auto-image-base  -o gplot gplot.o cgm.o ccgm.o 
> utils.o io.o carray.o devices.o hload.o emul.o tty.o ps.o cgmc.o 
> xws_cla.o xws_color.o xws_delim.o xws_marker.o xws_polygon.o 
> xws_polyline.o xws_setup.o xws_text.o drvcla.o-L/usr/X11R6/lib -lXp 
> -lXpm -lXaw -lXmu -lXext -lXt -lX11 /usr/lib/libm.a -lc
> Info: resolving _XtStrings by linking to __imp__XtStrings (auto-import)
> Info: resolving _widgetClass by linking to __imp__widgetClass (auto-import)

However, I also recommend providing more information than the above.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-16 Thread Jason Tishler
George,

Please keep your replies on-list.

On Wed, Dec 15, 2004 at 01:36:03PM -0500, george young wrote:
> On Wed, 15 Dec 2004 10:56:17 -0500
> Jason Tishler <[EMAIL PROTECTED]> threw this fish to the penguins:
> > On Wed, Dec 15, 2004 at 07:21:31AM -0800, gry wrote:
> > > Under cygwin, the python executable is installed as python2.4.exe
> > > with a symbolic link to python.exe.  This is fine as long as one
> > > is operating only withing the cygwin world.  But I execute python
> > > from a foo.bat file, and windows barfs on the symbolic link.
> > 
> > You can always do the following as a workaround:
> > 
> > C:\> bash -c python
> 
> Hmm, that's fine for typing a command interactively, but try fitting
> it into a DOS "ftype" command so that double-clicking a .py file gets
> the right thing with the right args -- nasty, I couldn't get it to
> work.

Since you are looking for tight integration with Windows, maybe you
should use Win32 Python?

> > > I replaced it with a hard link and all is well.
> > 
> > Note the above will only work as a true hard link under NTFS.  IMO,
> > the above is a better approach.
> >
> > > Is there some reason this shouldn't be the standard installation
> > > under cygwin?
> > 
> > Because it would require (more) modification of the Unix build to
> > accommodate Windows.  IMO, it is not worth the effort.  If you feel
> > differently, then submit a patch for consideration:
> > 
> > http://sf.net/tracker/?func=add&group_id=5470&atid=305470
> 
> I'll try that... maybe I can light a fire.
> 
> > BTW, many other Cygwin commands have this issue too:
> > 
> > $ find /bin -type l -name '*.exe'
> > /bin/awk.exe
> > /bin/c++.exe
> > /bin/captoinfo.exe
> > /bin/cc.exe
> > ...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: cygwin python.exe symlink breaks when called from .bat file

2004-12-15 Thread Jason Tishler
On Wed, Dec 15, 2004 at 07:21:31AM -0800, gry wrote:
> Under cygwin, the python executable is installed as python2.4.exe with
> a symbolic link to python.exe.  This is fine as long as one is
> operating only withing the cygwin world.  But I execute python from a
> foo.bat file, and windows barfs on the symbolic link.

You can always do the following as a workaround:

C:\> bash -c python

> I replaced it with a hard link and all is well.

Note the above will only work as a true hard link under NTFS.  IMO, the
above is a better approach.

> Is there some reason this shouldn't be the standard installation under
> cygwin?

Because it would require (more) modification of the Unix build to
accommodate Windows.  IMO, it is not worth the effort.  If you feel
differently, then submit a patch for consideration:

http://sf.net/tracker/?func=add&group_id=5470&atid=305470

BTW, many other Cygwin commands have this issue too:

$ find /bin -type l -name '*.exe'
/bin/awk.exe
/bin/c++.exe
/bin/captoinfo.exe
/bin/cc.exe
...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: change windows system path from cygwin python?

2004-12-15 Thread Jason Tishler
On Wed, Dec 15, 2004 at 06:43:35PM +, Jeff Lindholm wrote:
> The only issue with this is you will have to reboot for it take
> effect.

The above is not quite true -- at least under NT/2000/XP.  The reboot is
only necessary for the SCM (and services) to notice the change.
Otherwise, you just need to send a special Windows event:

http://support.microsoft.com/?kbid=104011

There are tools that will set environment variables and send the
required event.  For example, see the following:


http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/setx-o.asp

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problems compiling PIL under Cygwin

2005-04-04 Thread Jason Tishler
Martin,

On Mon, Apr 04, 2005 at 03:46:58PM +0200, Martin Magnusson wrote:
> I'm trying to build PIL under Cygwin (for use with the Skencil vector
> graphics program), and I couldn't find a better forum for questions
> than this.
> 
> I'm using Python 2.3.4, and when I run "python setup.py build_ext -i"
> I get the following output:
> 
> running build_ext
> building '_imaging' extension
> gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
> -DHAVE_LIBJPEG -DHAVE_LIBZ -I/usr/include/freetype2 -IlibImaging 
> -I/usr/include -I/usr/local/include -I/usr/include/python2.3 -c 
> libImaging/GifEncode.c -o 
> build/temp.cygwin-1.5.12-i686-2.3/libImaging/GifEncode.o
> C:\cygwin\bin\python2.3.exe (1352): *** unable to remap 
> C:\cygwin\bin\tk84.dll to same address as parent(0x76) != 0xBB
>   4 [main] python 1984 sync_with_child: child 1352(0x238) died 
> before initialization with status code 0x1
> 282 [main] python 1984 sync_with_child: *** child state child 
> loading dlls
> error: Resource temporarily unavailable
> 
> Does anybody know what could be done to solve this?

See the following:


http://www.google.com/search?hl=en&lr=&q=%22cygwin+python%22+%22unable+to+remap%22+%22same+address+as+parent%22

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to compile ScientificPython-2.4.9 under XP cygwin environment?

2005-04-19 Thread Jason Tishler
Zhuanshi,

On Sun, Apr 17, 2005 at 08:48:31AM -0700, Zhuanshi He wrote:
> I try to compile ScientificPython-2.4.9
> (http://starship.python.net/~hinsen/ScientificPython/) under Windows
> XP cygwin environment using python 2.3.3 ,and gcc (GCC) 3.3.3 (cygwin
> special).
> 
> The information shows as fillows:
> 
> [snip]
> 
> Does anyone meet same problem?

I was able to build ScientificPython-2.4.9 with the following
configuration:

netcdf 3.6.1-beta3
Numeric 24.0
Python 2.4
gcc 3.3.1

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Jason Tishler
Ivan,

On Tue, Apr 26, 2005 at 07:02:48PM -0600, Ivan Van Laningham wrote:
> Use win32api to find drives:
> 
> cut here
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> 
> import os
> import os.path
> import win32api
> [snip]

AFAICT, the win32api module has not been ported to Cygwin Python.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Jason Tishler
Ivan,

On Sat, Apr 30, 2005 at 07:29:32AM -0600, Ivan Van Laningham wrote:
> Jason Tishler wrote:
> > On Tue, Apr 26, 2005 at 07:02:48PM -0600, Ivan Van Laningham wrote:
> > > Use win32api to find drives:
> > >
> > > cut here
> > > #!/usr/bin/python
> > > # -*- coding: utf-8 -*-
> > >
> > > import os
> > > import os.path
> > > import win32api
> > > [snip]
> > 
> > AFAICT, the win32api module has not been ported to Cygwin Python.
> > 
> 
> I'm not running Cygwin, but Uwin.  I installed regular Python:
> 
> Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> ^Z  
> 
> with the win32api that matched.  I have no trouble running it.  Is
> there some reason to prefer a Python compiled by the Cygwin tools?

It depends on your needs.  If you are looking for a more Unix-like
Python, then the Cygwin version would probably be better.  If
Windows-like, then the native Windows version would probably be better.

The OP seem to be interested in a Cygwin Python solution -- not a
Windows one.  So, I was just clarifying that the win32api module is not
supported under Cygwin Python.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fwd: how to find the drive in python/cygwin?

2005-04-30 Thread Jason Tishler
Ivan,

On Sat, Apr 30, 2005 at 08:44:55AM -0600, Ivan Van Laningham wrote:
> Jason Tishler wrote:
> > I was just clarifying that the win32api module is not supported
> > under Cygwin Python.
> 
> Could you clarify?  I always thought that the only thing really
> different were the default path assumptions--/ instead of \, and so
> on--rather than anything substantive.  I try to use os.path.sep() and
> os.path.join(), etc.
> 
> What else could bite me?  ;-)

Not much -- at least not too hard. :,)  Anyway, only the low level stuff
would be different: Posix versus Win32, shared extensions, etc.  The
high level stuff should be the same -- isn't Python just Python. :,)

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cannot build Python 2.4.2 for Cygwin

2005-12-28 Thread Jason Tishler
Micheal,

On Wed, Dec 28, 2005 at 11:02:55AM -0800, Micheal LeVine wrote:
> I have not succeeded to build Python 2.4.2 from the source distn for
> Cygwin on XP (cygwin1.dll version 1005.7.0.0, Cygwin POSIX Emulation
> DLL).

The above is a very old version of Cygwin:

http://www.cygwin.com/ml/cygwin-announce/2004-01/msg00020.html

> [snip]
> 
> Does anyone have an idea what is wrong?

Yes, upgrading to the latest Cygwin should fix your build problem.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Resource temporarily unavailable launching idle under cygwin

2006-08-08 Thread Jason Tishler
Juan C.,

On Mon, Aug 07, 2006 at 11:47:33AM -0700, jcmendez wrote:
> Hello everyone.  Trying to run idle from a cygwin session on Win2k
> (yuk, but I must)  I'm getting the following error message.
> [snip]
> 
> $ idle
>   23367 [main] python2.4 1668 C:\cygwin\bin\python2.4.exe: *** fatal
> error - C:\cygwin\bin\python2.4.exe: *** unable to remap
> C:\cygwin\bin\tk84.dll to same address as parent(0x1889) != 0x18D2

You need to rebase your system:

http://www.google.com/search?hl=en&q=cygwin+python+%22unable+to+remap%22

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread Jason Tishler
Dave,

On Wed, Sep 13, 2006 at 09:42:48AM +, David J. Braden wrote:
> Thorsten Kampe wrote:
> > * David J. Braden (2006-09-12 18:35 +0100)
> >> I can run Python in command-line mode fine from the cygwin shell;
> >> the cygwin distribution also includes IDLE, which is apparently
> >> completely installed, yet I am unable to get IDLE running. When I
> >> double-click idle.bat (or idle.pyw) I am prompted to locate the
> >> program's creator.  Darn if I know what it is. If I try to invoke
> >> IDLE from cygwen bash, I get "unable to remap
> >> c:\cygwin\bin\tk84.dll to same address as parent".
> > 
> > rebaseall
> >  
> [snip]
> 
> Thanks, Thorsten. I assume you mean type in "idle rebaseall" (?) -
> seems to bring up a window for a split second, then come back with
> same error messages I had before. I cannot find in the IDLE doc any
> reference on how to get it going under cygwin; could you please point
> me towards a less-than-terse set of instructions?

Here's another terse response:


http://www.google.com/search?hl=en&q=unable+remap+same+address+parent&btnG=Google+Search

:,)

The following are excerpts from the rebase README:

The rebaseall utility is a convenient way for users that suffer from
the Cygwin rebase problem to rebase their entire system (i.e., all
of their DLLs).  The following is a list of known Cygwin
applications that are affected by the rebase problem:

Apache
Perl
Python

The rebase problem is due to fork() failing when it is unable to
load DLLs in the child at the same address as in the parent.  This
is caused by DLLs which have conflicting base addresses.  An error
message like the following will be displayed when the problem is
triggered:

C:\cygwin\bin\python.exe: *** unable to remap C:\cygwin\bin\cygssl.dll
to same address as parent(0xDF) != 0xE0

Use the following procedure to rebase your entire system:

1. shutdown all Cygwin processes and services
2. start ash (do not use bash or rxvt)
3. execute /bin/rebaseall (in the ash window)

BTW, idle has problems running under Cygwin Python:

http://sf.net/tracker/?func=detail&atid=105470&aid=786827&group_id=5470

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Newbie - ? get IDLE going on cygwin

2006-09-13 Thread Jason Tishler
Dave,

On Wed, Sep 13, 2006 at 03:33:01PM +, David J. Braden wrote:
> I can now confirm that, yes, IDLE pops up w/o menus under cygwin.

You should be able to workaround this problem by executing idle with the
"-n" option:

$ idle -n

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Cygwin IDLE has no menu bar

2006-02-14 Thread Jason Tishler
Steve,

On Mon, Feb 13, 2006 at 11:14:03PM -0500, Steve Holden wrote:
> I just wondered whether anyone has seen this problem:

Yes, this is a known problem:

http://sf.net/tracker/?func=detail&atid=105470&aid=786827&group_id=5470

> and fixed it.

Unfortunately, no.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building python 2.4.2 on Cygwin

2006-02-20 Thread Jason Tishler
Steve,

On Mon, Feb 20, 2006 at 12:24:34PM -0800, mrstephengross wrote:
> Ok, I'm working on building python 2.4.2 on cygwin. I *think* it's
> version 3.0 or 3.1 (is there a quick way to find out what version of
> cygwin is running within a shell?)

Use "uname -r".  What version are you running?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building python 2.4.2 on Cygwin

2006-02-21 Thread Jason Tishler
Steve,

On Mon, Feb 20, 2006 at 11:49:06PM -0500, Stephen Gross wrote:
> >On Mon, Feb 20, 2006 at 12:24:34PM -0800, mrstephengross wrote:
> >>Ok, I'm working on building python 2.4.2 on cygwin. I *think* it's
> >>version 3.0 or 3.1 (is there a quick way to find out what version of
> >>cygwin is running within a shell?)
> >
> >Use "uname -r".  What version are you running?
> 
> Uname tells me:
> 
> $ uname -r
> 1.5.18(0.132/4/2)

Just to be sure, what does the following indicate?

$ cygcheck -c cygwin

Sorry, but I cannot reproduce your problem under Cygwin 1.5.18.

BTW, can you use the pre-built Python 2.4.1 that is part of the standard
Cygwin distribution?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Building python 2.4.2 on Cygwin

2006-02-21 Thread Jason Tishler
Steve,

On Tue, Feb 21, 2006 at 09:31:48AM -0500, Stephen Gross wrote:
> >Just to be sure, what does the following indicate?
> $ cygcheck -c cygwin
> Cygwin Package Information
> Package  VersionStatus
> cygwin   1.5.18-1   OK

Try reinstalling Cygwin 1.5.18 or upgrading to 1.5.19.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket on cygwin python

2007-06-25 Thread Jason Tishler
On Mon, Jun 25, 2007 at 01:53:18PM +0100, Michael Hoffman wrote:
> [EMAIL PROTECTED] wrote:
> > I've installed cygwin with latest python 2.5.1, but it seems that the
> > socket lib file do NOT support IPv6(cygwin\lib\python2.5\lib-dynload
> > \_socket.dll), what can I do if I want to use IPv6?
> 
> I don't think Cygwin supports IPv6.

That was my impression too and seems to be substantiated by the
following:

http://win6.jp/Cygwin/index.html

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Eggs on Cygwin

2007-03-16 Thread Jason Tishler
Kazu,

On Thu, Mar 15, 2007 at 05:33:29PM -0700, Kazu Nisimura wrote:
> >>> import MySQLdb
> Traceback (most recent call last):
>   File "", line 1, in ?
>   File "build/bdist.cygwin-1.5.22-i686/egg/MySQLdb/__init__.py", line
> 19, in ?
>   File "build/bdist.cygwin-1.5.22-i686/egg/_mysql.py", line 7, in ?
>   File "build/bdist.cygwin-1.5.22-i686/egg/_mysql.py", line 6, in
> __bootstrap__
> ImportError: Permission denied
> 
> This seems to be Eggs/Cygwin problem.  Is there any solution?

The following is a WAG...

Does the MySQL Python module contain shared extension modules (i.e.,
DLLs)?  If so, are they executable?  If not, then make them so (i.e.,
chmod +x).

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sys.path issue in cygwin

2007-01-24 Thread Jason Tishler
Wang,

On Wed, Jan 24, 2007 at 04:14:48PM +0800, Wang Shuhao wrote:
> I successfully built and installed Python 2.2.3 in cygwin.
> [snip]
> Obviously, 'C/lib/python2.2/' is a wrong path. In fact my python is
> installed in /usr/local/lib/python2.2.3. The result of the issue is
> that when you run a program python can't find the module. So what I
> really want to know is where these path came from and how to fix it.

Why not use the Python that is part of the standard Cygwin distribution?

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sys.path issue in cygwin

2007-01-24 Thread Jason Tishler
Wang,

Please keep your replies on-list.

On Wed, Jan 24, 2007 at 10:28:51PM +0800, Wang Shuhao wrote:
> > Why not use the Python that is part of the standard Cygwin
> > distribution?
> > 
> Cause the Cygwin version python has the same problem, that why I try
> to build python from source.

The above implies that you may have a Cygwin installation problem that
may impact other Cygwin applications too.  I recommend taking this
problem to the Cygwin list:

http://cygwin.com/problems.html

FWIW, I get the following with the official Cygwin Python version:

$ python -c 'import sys; print sys.path'
['', '/usr/lib/python24.zip', '/usr/lib/python2.4', 
'/usr/lib/python2.4/plat-cygwin', '/usr/lib/python2.4/lib-tk', 
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']

> But finally I found the solution, the PYTHONHOME environment variable
> controls the content of initial sys.path. Thanks anyway.
> export PYTHONHOME=/usr/localWang Shuhao

IMO, the above is just a workaround, not a solution.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Jason Tishler
Lars,

On Thu, May 04, 2006 at 03:50:13AM -0700, Lars wrote:
> I have problems building a simple handcoded C-extension (hello.c) with
> Cygwin and gcc3.4.4. I hope somebody has encountered the same problem
> before, and has some advice.
> 
> [snip]

The following works for me:

$ gcc -shared -I/usr/include/python2.4 -o hello.dll hello.c 
-L/usr/lib/python2.4/config -lpython2.4
$ python -c'import hello;q = hello.message("Lars");print q'
Hello, Lars
$ python hellouse.py
Hello, C
Hello, module /tmp/Examples/PP2E/Integrate/Extend/Hello/hello.dll
Hello, 0
Hello, 1
Hello, 2

Note I had to apply the attached patch to get hello.c to compile.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
--- hello.c.orig2006-05-04 08:06:06.769910400 -0400
+++ hello.c 2006-05-04 08:06:10.988633400 -0400
@@ -25,7 +25,7 @@
 {"message", message, 1},   /* method name, C func ptr, always-tuple */
 {NULL, NULL}   /* end of table marker */
 };
-,
+
 /* module initializer */
 void inithello()   /* called on first import */
 {  /* name matters if loaded dynamically */
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Jason Tishler
On Thu, May 04, 2006 at 06:23:23AM -0700, Lars wrote:
> But first compiling hello.c with gcc, then linking it with gnu-ld just
> won't work. I only really need to compile one C-file to a shared
> library so it doesn't matter so much for me. But bigger projects will
> have a problem..

No, it works if you drive it from gcc:

$ gcc -I/usr/include/python2.4 -c hello.c
$ gcc -shared -o hello.dll hello.o -L/usr/lib/python2.4/config -lpython2.4
$ python hellouse.py 
Hello, C
Hello, module /tmp/examples/PP2E/Integrate/Extend/Hello/hello.dll
Hello, 0
Hello, 1
Hello, 2

BTW, if you use Distutils, then it will just work...

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Invalid Version Number (Distutils from Cygwin)

2008-06-09 Thread Jason Tishler
On Sat, Jun 07, 2008 at 05:34:21PM -0700, newbie73 wrote:
> [snip]
> I'm attempting to build a project (FANN libraries) using cygwin (to
> avoid installing MSVC 2003) and am receiving this error:
> 
> Traceback (most recent call last):
> [snip]
> ValueError: invalid version number '2.18.50.20080523'

The above is a known issue:

http://bugs.python.org/issue2234

Unfortunately, resolution of this issue has stalled.

Additionally, someone posted a different regular expression to the
Cygwin list that is suppose to handle more cases of ld version strings:

http://cygwin.com/ml/cygwin/2008-05/msg00622.html

Can we reach consensus on what is the best ld version string regular
expression to use?  If so, then I will work to get this change committed
to the Python code base and release a patched Cygwin Python 2.5.2 with
this fix included.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
--
http://mail.python.org/mailman/listinfo/python-list


Re: Getting Python to run Python Scripts in cygwin

2008-06-19 Thread Jason Tishler
Calvin,

On Fri, Jun 20, 2008 at 12:14:03AM +0800, Calvin Cheng wrote:
> This may be a cygwin issue but I was hoping to get some answers here
> as well if someone has fixed this problem before.
> 
> Basically, I am able to run "python .py" python files in
> command prompt.  Unfortunately, I can't seem to get it to work in
> cygwin.  I always get an error that says:
> python: can't open file '.py': [Errno 2] No such file or directory

Are you executing python in the same directory in Cygwin as you are in
the command prompt?  If not, then python will not be able to find
".py" unless you specify a (relative or absolute) path to
it.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
--
http://mail.python.org/mailman/listinfo/python-list


Re: SVN access with pysvn under Cygwin (Installation problems)

2008-07-30 Thread Jason Tishler
Andy,

On Wed, Jul 30, 2008 at 07:46:32AM -0700, Andy Dingley wrote:
> Trying to install the pysvn module I'm running into problems getting
> it to work under Cygwin. Works fine from a Windows command prompt,
> with both the svn_cmd.py example and my own Python code. Under Cygwin
> though I just get import failures. pysvn/__init__.py   seems to be
> invoked happily enough, but then fails when it tries to import
> _pysvn_2_5.pyd
> 
> $ python svn_cmd.py
> Traceback (most recent call last):
>   File "svn_cmd.py", line 10, in 
> import pysvn
>   File "/usr/lib/python2.5/pysvn/__init__.py", line 104, in 
> import _pysvn_2_5
> ImportError: No module named _pysvn_2_5
> 
> Is there some trick to getting .pyd to work under Cygwin?

You need to build (and install) pysvn under Cygwin.  The pre-built
Windows version will not work under Cygwin.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
--
http://mail.python.org/mailman/listinfo/python-list


Re: SVN access with pysvn under Cygwin (Installation problems)

2008-07-31 Thread Jason Tishler
Andy,

On Thu, Jul 31, 2008 at 03:10:26AM -0700, Andy Dingley wrote:
> On 30 Jul, 20:30, Jason Tishler <[EMAIL PROTECTED]> wrote:
> > You need to build (and install) pysvn under Cygwin. The pre-built
> > Windows version will not work under Cygwin.
> 
> Thanks. Presumably this same problem would affect anything that uses a
> .pyd under Cygwin?

Yes, Python shared extension modules are specific to the Python used to
build them.  This is the situation even though Windows Python and Cygwin
Python both run on the same operating system.

BTW, this is why I added shared extension module support to Cygwin
Python almost 8 years ago.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
--
http://mail.python.org/mailman/listinfo/python-list


Re: Problem with Python shell through Cygwin Screen (Python/Vim/Screen combo)

2008-09-19 Thread Jason Tishler
Ant,

On Fri, Sep 19, 2008 at 03:10:10AM -0700, Ant wrote:
> [snip]
> This works great in Linux, and also in Windows using the Cygwin build
> of Python, but when you call:
>
> screen -S py -s python
>
> using the Windows build of Python, the shell just hangs. Does anyone
> know if this is a known issue with screen/Python, or if there is a
> workaround, as I'd prefer to have just a single Python instance
> installed rather than having Cygwin python and windows Python both
> installed.

There are known issues when trying to run a Windows program that
directly accesses the console under Cygwin.  For example:

http://mail.python.org/pipermail/python-list/2004-June/21.html

AFAICT, you will have to use Cygwin Python with screen.

Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
--
http://mail.python.org/mailman/listinfo/python-list