Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Editing Python scripts in TheIde  () 1 Vote
Editing Python scripts in TheIde [message #22072] Tue, 16 June 2009 18:08 Go to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I noticed that TheIde removes the +x attribute from files that are edited+saved in theide, I have python scripts that are part of my project; these need the +x attribute set to be able to execute them. Can we device a way to work with this?

Maybe the behaviour can be disabled somehow?
Maybe a better question is: why does theide do this?


Gr,

Jan


Jan (skyhawk)
Re: Editing Python scripts in TheIde [message #22086 is a reply to message #22072] Wed, 17 June 2009 08:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
skyhawk wrote on Tue, 16 June 2009 12:08


Maybe a better question is: why does theide do this?



It just saves the file. Right now, it does not read attributes of existing file; file is simply created.

Should be quite simple to fix, I think.

Mirek
Re: Editing Python scripts in TheIde [message #22115 is a reply to message #22086] Thu, 18 June 2009 13:47 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

I think theide should just not recreate a file in the same location, but instead open the existing file, truncate it
(http://linux.about.com/library/cmd/blcmdl2_truncate.htm)

and write the new content. That way you prevent having to know about all aspects of the file (attributes, file-rights etc)

Gr,

Jan


Jan (skyhawk)

[Updated on: Thu, 18 June 2009 13:48]

Report message to a moderator

Re: Editing Python scripts in TheIde [message #22135 is a reply to message #22115] Fri, 19 June 2009 13:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
skyhawk wrote on Thu, 18 June 2009 07:47

I think theide should just not recreate a file in the same location, but instead open the existing file, truncate it
(http://linux.about.com/library/cmd/blcmdl2_truncate.htm)

and write the new content. That way you prevent having to know about all aspects of the file (attributes, file-rights etc)

Gr,

Jan


Unsafe.

The actual protocol is: Rename current file (add .bak to filename), save file, delete backup.

At any point, either old or new file exists.

Mirek
Re: Editing Python scripts in TheIde [message #22146 is a reply to message #22135] Fri, 19 June 2009 15:54 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

Ok,

that's fine, but can also be done like: Copy existing file to .bak, truncate existing file and write new content, delete .bak

and this way the original file's attributes and right are preserved.

Gr,

Jan


Jan (skyhawk)
Re: Editing Python scripts in TheIde [message #22167 is a reply to message #22146] Sun, 21 June 2009 20:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Slower Smile

Mirek
Re: Editing Python scripts in TheIde [message #22172 is a reply to message #22167] Mon, 22 June 2009 09:59 Go to previous messageGo to next message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

if writing to uncached media _maybe_
otherwise, doubtful...

Very Happy
Gr,

Jan


Jan (skyhawk)

[Updated on: Mon, 22 June 2009 09:59]

Report message to a moderator

Re: Editing Python scripts in TheIde [message #22173 is a reply to message #22172] Mon, 22 June 2009 10:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
skyhawk wrote on Mon, 22 June 2009 03:59

if writing to uncached media _maybe_
otherwise, doubtful...

Very Happy
Gr,

Jan


Sometimes I edit >5MB files...

Smile

Never mind, I will add attributes copy ASAP.

Mirek
Re: Editing Python scripts in TheIde [message #22177 is a reply to message #22173] Mon, 22 June 2009 23:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Implemented.

Mirek
Re: Editing Python scripts in TheIde [message #22220 is a reply to message #22177] Thu, 25 June 2009 13:03 Go to previous message
janwilmans is currently offline  janwilmans
Messages: 51
Registered: January 2007
Member

Thanks mirek, I will retest soon.

Jan (skyhawk)
Previous Topic: Suggestion: cross-platform "U++ package" file type.
Next Topic: Some small issues with TheIDE and DLLs
Goto Forum:
  


Current Time: Fri Apr 26 04:31:53 CEST 2024

Total time taken to generate the page: 0.01633 seconds