New File Template

336 views
Skip to first unread message

Yatharth Agarwal

unread,
Jul 5, 2012, 2:54:25 AM7/5/12
to pyscr...@googlegroups.com
Anyone know how to change the default template that appears when you open a new file? Here's what I'm talking about:

#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      Yatharth
#
# Created:     05/07/2012
# Copyright:   (c) Yatharth 2012
# Licence:     <your licence>
#-------------------------------------------------------------------------------
def main():
    pass
if __name__ == '__main__':
    main()
And where does it pull the Author information from? A registry key? Which one? 

Matt Wilkie

unread,
Jul 5, 2012, 11:40:48 PM7/5/12
to pyscr...@googlegroups.com
You're looking for "Tools > Options > File Templates"

cheers,

-matt
> --
> You received this message because you are subscribed to the Google Groups
> "PyScripter" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pyscripter/-/6uuKzNN1vV8J.
> To post to this group, send email to pyscr...@googlegroups.com.
> To unsubscribe from this group, send email to
> pyscripter+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pyscripter?hl=en.



--
-matt
Message has been deleted

Yatharth Agarwal

unread,
Jul 6, 2012, 5:23:21 AM7/6/12
to pyscr...@googlegroups.com
k, thanks. That worked. Any idea about where PyScripter get its `$username` value from? It'll be of tremendous help, please.
> pyscripter+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pyscripter?hl=en.



--
-matt
> pyscripter+unsubscribe@googlegroups.com.

Matt Wilkie

unread,
Jul 6, 2012, 2:47:21 PM7/6/12
to pyscr...@googlegroups.com
I think it comes from the Windows %username% environment variable,
e.g. it's not defined in PyScritper. You could use a Custom Parameter
(Under Tools> Options) if you use a different name for signing your
code files.

-matt
>> > pyscripter+...@googlegroups.com.
>> > pyscripter+...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/pyscripter?hl=en.
>>
>>
>>
>> --
>> -matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyScripter" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pyscripter/-/dp7doCQDhHMJ.
>
> To post to this group, send email to pyscr...@googlegroups.com.
> To unsubscribe from this group, send email to
> pyscripter+...@googlegroups.com.

PyScripter

unread,
Jul 11, 2012, 1:26:22 PM7/11/12
to pyscr...@googlegroups.com
Indeed...

Yatharth Agarwal

unread,
Jul 12, 2012, 7:22:09 AM7/12/12
to pyscr...@googlegroups.com
OK, thanks. But do you know how to change the Windows `%username%` variable then?
Message has been deleted

Yatharth Agarwal

unread,
Jul 12, 2012, 7:24:18 AM7/12/12
to pyscr...@googlegroups.com
I found it! You have to execute `set username=<userneme>` in the shell. Issue resolved. 


On Friday, July 6, 2012 9:47:21 PM UTC+3, maphew wrote:
>> > pyscripter+unsubscribe@googlegroups.com.
>> > pyscripter+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/pyscripter?hl=en.
>>
>>
>>
>> --
>> -matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyScripter" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pyscripter/-/dp7doCQDhHMJ.
>
> To post to this group, send email to pyscr...@googlegroups.com.
> To unsubscribe from this group, send email to
> pyscripter+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages