For questions that are specific to Python 2.6. (Be sure to also add [python] as a language tag.)
-2
votes
0answers
23 views
Redesign to change class por functions
I would like to know if is possible to redesign the code above to make it functional:
lazyproperty.py
...
3
votes
2answers
183 views
Transforming tuple with (int month, int year) in string “mm/yyyy”
I would like to improve the following code:
...
0
votes
2answers
63 views
Refactoring code to avoid breaking line because of 80 characters rule
Currently I'm trying to redo this code to avoid the breaking line because of the 80 characters rule:
...
2
votes
2answers
184 views
3
votes
0answers
87 views
Generate similar methods programmatically
I'm repeatedly faced with writing proxy classes for various purposes, recently lazy evaluation and IPC. This usually means having a single method pattern, which just forwards the call. I'm having a ...
6
votes
1answer
58 views
Container (dict preserving key order, with attribute access)
This class is part of the Construct library.
Container is a dict that:
turns attribute access into key access so ...
9
votes
1answer
216 views
Poor man's f-strings in Python 2.6
f-strings is a new feature in the upcoming python release which basically lets you do this:
>>> s = 'qwerty'
>>> f'{s} {1+2}'
'qwerty 3'
Not ...
1
vote
1answer
86 views
Parsing Python arguments
I'm trying to cover the following 4 scenarios:
No parameters
DB param
DB param and 1 option
No DB param and 1 option
So far I have the program working for all scenarios. However, I'm not happy with ...
1
vote
2answers
99 views
Updating ArcPy feature classes
I am looking for the way to speed up my script. The final output is as required, but it's clunky and really slow. I know it's slow because of the double for..in.. ...
1
vote
2answers
38 views
Overall utility tool for a project that will create account lists for pulls
I'm creating a meta-utility tool for a project that I'm on that has a lot of repetitive tasks that can eat up a lot of time. My goal with this tool is to eventually be able to automate, or at least ...
1
vote
1answer
365 views
Uploading and downloading files with FTP
I'm learning Python and decided to rewrite my FTP tool from Perl to Python. The program is able to up/download files, change the directory and list the files of the current directory.
Is there ...
5
votes
1answer
139 views
Edit configuration files script
Script designed to avoid manually edit configuration files by support.
Config file example:
...
8
votes
1answer
2k views
Learn Python the Hard Way #48 — lexicon exercise
I'm trying to get some feedback on my code for the lexicon exercise (#48) in Learn Python the Hard Way. I have only recently started learning Python and want to make sure I have my fundamentals down ...
8
votes
3answers
2k views
Stack Overflow user info fetcher
I'm starting to look at Python and its facilities. I've just tried to make one simple program using some base libraries.
I would like to hear some comments about anything you've noticed - style, ...