Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41704
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'modify': 0.05; 'result,': 0.05; 'sys': 0.05; '__name__': 0.07; 'main()': 0.07; 'python': 0.09; "'\\n')": 0.09; "'w')": 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; 'sep': 0.09; '~ethan~': 0.09; 'def': 0.10; "'__main__':": 0.16; "'this": 0.16; '2.7.3': 0.16; '3.2,': 0.16; '3.3,': 0.16; 'main():': 0.16; 'pentium': 0.16; 'received:69.93': 0.16; 'received:gateway13.websitewelcome.com': 0.16; 'skip:i 120': 0.16; 'subject:3.3': 0.16; 'subject:Change': 0.16; 'underscore.': 0.16; 'string': 0.17; 'wrote:': 0.17; 'input': 0.18; 'versions': 0.20; 'bit': 0.21; 'import': 0.21; 'statement': 0.23; 'random': 0.24; 'linux': 0.24; 'machine': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'first,': 0.27; 'disk': 0.27; "doesn't": 0.28; 'skip:( 20': 0.28; 'initial': 0.28; 'run': 0.28; 'cpu': 0.29; 'second,': 0.29; 'skip:i 60': 0.29; 'code': 0.31; "skip:' 20": 0.32; 'extract': 0.33; 'joined': 0.33; 'ram': 0.33; 'to:addr:python-list': 0.33; 'text': 0.34; 'pm,': 0.35; 'compare': 0.36; 'subject:with': 0.36; 'test': 0.36; 'charset:us-ascii': 0.36; 'being': 0.37; 'subject:: ': 0.38; 'skip:o 20': 0.38; 'some': 0.38; 'delete': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'free': 0.61; 'between': 0.63; 'url:%20': 0.63; 'more': 0.63; 'show': 0.63; 'url:%1': 0.68; 'increasing': 0.75 |
| Date | Fri, 22 Mar 2013 15:11:51 -0700 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Change in Python 3.3 with the treatment of sys.argv |
| References | <kiik4o$s8b$1@theodyn.ncf.ca> |
| In-Reply-To | <kiik4o$s8b$1@theodyn.ncf.ca> |
| Content-Type | text/plain; charset=us-ascii; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - gator410.hostgator.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - stoneleaf.us |
| X-BWhitelist | no |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| X-Source-Sender | ([173.12.184.235]) [173.12.184.235]:49103 |
| X-Source-Auth | ethan+stoneleaf.us |
| X-Email-Count | 1 |
| X-Source-Cap | dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3618.1363990906.2939.python-list@python.org> (permalink) |
| Lines | 54 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1363990906 news.xs4all.nl 6845 [2001:888:2000:d::a6]:35642 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:41704 |
Show key headers only | View raw
On 03/22/2013 02:57 PM, Colin J. Williams wrote:
> Below is an extract from some code to run on Python 2.7.3, 3.2.3 and 3.3.0 to compare speeds, both between versions and
> machines:
>
> if __name__ == '__main__':
> # Text string for initial test - Modify for your own machine or
> # delete it and and answer the input statement with your own machine
> # characteristics.
> sys.argv[1:]= ('Intel Pentium D CPU 3.0GHz 1.99 GB of RAM 221GB Disk Free space', )
> main()
>
>
> def main():
> if len(sys.argv) > 1:
> idMachine= ' '.join(sys.argv[1:])
> ...
> oFile= open('FP' + now + '.log', 'w')
> oFile.writelines(idM + '\n' + sys.version + '\n')
>
> For 2.7, the result is:
> Intel_Pentium_D_CPU_3.0GHz_1.99_GB_of_RAM_221GB_Disk_Free_space
> 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
>
> for 3.2, the result is:
> Intel_Pentium_D_CPU_3.0GHz_1.99_GB_of_RAM_221GB_Disk_Free_space
> 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]
>
> For 3.3, the result is:
> I_n_t_e_l___P_e_n_t_i_u_m___D___C_P_U___3_._0_G_H_z___1_._9_9___G_B___o_f___R_A_M___2_2_1_G_B___D_i_s_k___F_r_e_e___s_p_a_c_e
>
> 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)]
>
> The full test result, for random matrices of increasing order is available
> here(http://web.ncf.ca/cjw/FP%20Summary%20over%20273-323-330.txt)
First, this is what I get with 3.3:
Python 3.3.0 (default, Sep 29 2012, 17:14:58)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
--> import sys
--> sys.argv
['']
--> sys.argv[1:] = ('this is a test!', )
--> sys.argv
['', 'this is a test!']
--> ' '.join(sys.argv[1:])
'this is a test!'
Second, your code doesn't show being joined by an underscore.
--
~Ethan~
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Change in Python 3.3 with the treatment of sys.argv "Colin J. Williams" <cjw@ncf.ca> - 2013-03-22 17:57 -0400
Re: Change in Python 3.3 with the treatment of sys.argv Chris Angelico <rosuav@gmail.com> - 2013-03-23 09:13 +1100
Re: Change in Python 3.3 with the treatment of sys.argv Ethan Furman <ethan@stoneleaf.us> - 2013-03-22 15:11 -0700
Re: Change in Python 3.3 with the treatment of sys.argv "Colin J. Williams" <cjw@ncf.ca> - 2013-03-23 06:43 -0400
Re: Change in Python 3.3 with the treatment of sys.argv Peter Otten <__peter__@web.de> - 2013-03-23 11:59 +0100
Re: Change in Python 3.3 with the treatment of sys.argv "Colin J. Williams" <cjw@ncf.ca> - 2013-03-23 06:43 -0400
Re: Change in Python 3.3 with the treatment of sys.argv "Colin J. Williams" <cjw@ncf.ca> - 2013-03-23 08:27 -0400
Re: Change in Python 3.3 with the treatment of sys.argv Chris Angelico <rosuav@gmail.com> - 2013-03-23 23:34 +1100
Re: Change in Python 3.3 with the treatment of sys.argv "Colin J. Williams" <cjw@ncf.ca> - 2013-03-23 08:27 -0400
Re: Change in Python 3.3 with the treatment of sys.argv Peter Otten <__peter__@web.de> - 2013-03-22 23:33 +0100
Re: Change in Python 3.3 with the treatment of sys.argv Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-22 23:45 +0000
csiph-web