[wingide-users] Compiled pyton in windows

Tom Stambaugh tms at zeetix.com
Tue Jun 26 14:26:52 MDT 2007


Dan and Jaime, thanks for your information. I fear I have not said enough 
about my problem.

I create and debug the python source on a local WinXP machine. After it 
works, I upload the source to a linux box.

As Jaime points out, unless I do lots of WinXP magic, I get .pyc files 
intermingled with the .py files in the same directory on my WinXP machine. 
Unless I do something like cygwin (which I have but don't use much), I don't 
have any winxp-side tools like tar and make. OTOH, if cygwin DOES include 
tar, then perhaps that's the way to go. My immediate problem is that FTP 
blindly transfers the .pyc files along with the .py files. Even something as 
simple as applying a filter within FTP, saying "don't send files with an 
extension of .pyc" would work. I just don't see such a filter within the ftp 
doc (I use WS-FTP pro).

Don, I think I probably didn't explain my problem clearly enough. I have a 
cable modem between my local WinXP box and my linux server. While the 
download speed is very high, the *upload* speed is much slower. Because of 
this communication bottleneck, I'm looking for an easy way to avoid pushing 
the .pyc files up the channel to the server. I don't see how a makefile 
running on either machine solves this.

Thx,
Tom

----- Original Message ----- 
From: "Dan Cook" <onedsc at sonic.net>
To: <wingide-users at wingware.com>
Sent: Tuesday, June 26, 2007 3:41 PM
Subject: RE: [wingide-users] Compiled pyton in windows


> You can create a simple makefile rule to use the compile module of python.
> I have done this:
>
> ${TARGET_DIR}/%.pyc: ./src/%.py
>    @test -d `dirname $@` | mkdir -p `dirname $@`
>    $(PYTHON) -c "import py_compile; py_compile.compile(\"$<\",\"$@\")"
>
> Where TARGET_DIR is the dir of the pyc files.
>
>
>
> -----Original Message-----
> From: wingide-users-bounces at wingware.com
> [mailto:wingide-users-bounces at wingware.com] On Behalf Of Wyant, Jaime
> Sent: Tuesday, June 26, 2007 5:53 AM
> To: wingide-users at wingware.com
> Subject: RE: [wingide-users] Compiled pyton in windows
>
> I don't think there is a way to have .pyc files not show up in their
> associated source file directories.  It makes sense if you think about it,
> otherwise how would you know what package a module belongs to?  I guess 
> you
> could have some elaborate `tree mirror' somewhere, but that well it's 
> pretty
> elaborate :).
>
> But if you just want to skip *.pyc files, you could use tar's --exclude.
> I think the command line would look something like this:
>
> tar --exclude='*.pyc' -cjf mytarfile.tar.bz2 sourcedir
>
> HTH!
> jw
>
>> -----Original Message-----
>> From: Tom Stambaugh [mailto:tms at zeetix.com]
>> Sent: Monday, June 25, 2007 6:01 PM
>> To: wingide-users at wingware.com
>> Subject: [wingide-users] Compiled pyton in windows
>>
>> This question is as much about python as wing, but this group might
> know
>> the
>> answer.
>>
>> Is there a way to configure wing or python so that the compiled (.pyc)
>> files go into a different directory hierarchy than the source? I'd
>> like to
> be
>> able
>> to ftp the source tree up to my (linux) server, and I'd like to leave
> the
>> compiled files behind.
>>
>>
>>
>> _________________________________________________
>> Wing IDE users list
>> http://wingware.com/lists/wingide
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
> 





More information about the wingide-users mailing list