On the road to Python 3.x +

Development directions, tasks, and features being actively implemented or pursued by the development team.

On the road to Python 3.x +

Postby wirser » Sat Mar 30, 2019 5:17 pm

With compilable/runable VS (taose) the next project needs to be updating the python (used for the data) to version 3.x complient.

While still a rookie in python, I've decided to see if I can figure it out.

after cd into VS_root dir in terminal, I used this
Code: Select all
find ./ -name "*.py" >python.lst

to get a complete list of all python code, which will be used for project and other logging.

now learning that the "import" command is simular to #include in C/C++
using grep I did this next
Code: Select all
grep -R 'import ' */*.py  > ../py_imports_data

in the data folder to be able to make a sort of dependancy tree
I already noted one curious thing ,some modules being imported more than once in some files

next will be to use IDLE for python to verify all python modules needing checked
after that I may try to import older mods data
TecKnoledge available
Practical Wisdom for above TecKnoledge / back-ordered , lead time unknown
UPDATE: above shipment of Practical Wisdom for
TecKnoledge was lost in either luddite or kilrathie space - reward if found
wirser
Bounty Hunter
Bounty Hunter
 
Posts: 179
Topics: 27
Joined: Wed Dec 01, 2004 1:06 pm
Location: not where i want to be

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: On the road to Python 3.x +

Postby loki1950 » Sun Mar 31, 2019 9:51 am

For those extra import calls you might check the logical flow of those instances might be that they are in fact only used once :wink:

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5719
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: On the road to Python 3.x +

Postby TBeholder » Sun Mar 31, 2019 12:09 pm

If only. Inside function definitions.
Code: Select all
def MakeMiningBar(concourse,concoursetext,background,bartext):
    import bar
    return bar.MakeBar(concourse,
            concoursetext,
            bartext,
            background,
            True,
            '0',
            False,
            '',
            (.87735,-.018),
            [],
            [
            (-0.8025, -1.055 , 0.5, .8),
            (-0.1725, -0.4558125, 0.1758125, 0.5385),
            #(-0.0325, -0.3558125, 0.1758125, 0.5385),
            ])
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
User avatar
TBeholder
Elite Venturer
Elite Venturer
 
Posts: 745
Topics: 38
Joined: Fri Apr 14, 2006 7:40 pm
Location: chthonic safety

Re: On the road to Python 3.x +

Postby wirser » Mon Apr 01, 2019 6:19 pm

Like I said before I was at first looking a way map the python flow
I am not too worried about the imports just yet, still it looks wierd.
speaking of imports I need to find "VS" or some way to meet the requirement

doing a topic search for differences between python 2.x and 3.x point to 3+ changes
so far I've used search terms "xrange,print '"

the "print" seems simple enough to fix, just make
sure to enclose in () .if I understand the problem

the "xrange" I still have to study,it is used alot

There is a divison problem which may cause trouble , in short it causes wrong answers. so all of the math using division needs to be
checked. but the code should run just with bad math 8^0
TecKnoledge available
Practical Wisdom for above TecKnoledge / back-ordered , lead time unknown
UPDATE: above shipment of Practical Wisdom for
TecKnoledge was lost in either luddite or kilrathie space - reward if found
wirser
Bounty Hunter
Bounty Hunter
 
Posts: 179
Topics: 27
Joined: Wed Dec 01, 2004 1:06 pm
Location: not where i want to be

Re: On the road to Python 3.x +

Postby wirser » Tue Apr 16, 2019 12:14 pm

Ok I now have all print statements converted to print functions for python 3.x
I am still testing it but I have found out some interesting facts
there are 2 pdb.py and one bdb.py (supplied with python)
being I wasn't doing any debuging and have current versions of these I am going to have them deleted in the diff file I'll make.

I even found on a module comment about being an update for python 1.6 :o
Isuspect most if not all network modules can be updated

some comments said they wern't used anymore so I'm going to look into this before I create diff

BUGS
When trading Ive adopted a statagy of looking at all prices wether I needed them,giving me a better how to buy and/sell.
I have locked up more than once doing this :twisted: .
units.csv while present gives error about either missing or corrupt.
shader prob not python related.

Oh Loki I'd like to start a clean bug report/seperate tree for VS-taose bugs, but don't know if it should remain at sf or move to github or whereever.
TecKnoledge available
Practical Wisdom for above TecKnoledge / back-ordered , lead time unknown
UPDATE: above shipment of Practical Wisdom for
TecKnoledge was lost in either luddite or kilrathie space - reward if found
wirser
Bounty Hunter
Bounty Hunter
 
Posts: 179
Topics: 27
Joined: Wed Dec 01, 2004 1:06 pm
Location: not where i want to be

Re: On the road to Python 3.x +

Postby loki1950 » Tue Apr 16, 2019 1:55 pm

Might be easier to work on GitHub as that is where the taose source is and they have a bug tracking interface/template.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5719
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: On the road to Python 3.x +

Postby wirser » Sun Apr 21, 2019 2:52 pm

on bug tracker.
I am holding off on getting github accnr for now but will keep it in mind

About creating print diff's
I have created two diffs related to printing, one for data ond one for engine/objconv using "diff -ur"
However Due to changes in BB I can no longre upload/include them here :?
I used to be able to attach a file but not today

both use top folder as patch/diff root.(for the newbies, this is the directory that the diff and patch are issued from)

In addition I found that there is a problem with at least on python module (file) dealing with inconsistant indentation.
I figure more if not most of python code suffers this problem.
while python 2 gives warnings, python 3 gives errors.
I'm going to try to use "Idle" to try to correct these problems (I don't know if I can automate the process any, if not this will take some time). anyhow my next patch(es) will be for this then I'll attempt the xrange issue

if the code passes Idle for python 3 checks the final patch should be ready
wirser
Bounty Hunter
Bounty Hunter
 
Posts: 179
Topics: 27
Joined: Wed Dec 01, 2004 1:06 pm
Location: not where i want to be

Re: On the road to Python 3.x +

Postby loki1950 » Mon Apr 22, 2019 4:17 pm

My preferred Python IDE is Ninja not Idle but there maybe some scripts available on the official Python migration web sites.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5719
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: On the road to Python 3.x +

Postby wirser » Tue Apr 23, 2019 12:25 pm

HMM Ninja IDE is not in Debian Repos

But I did find the website
http://ninja-ide.org/
which has Debian/ubuntu pkgs and others, and has a seperate repository too

When I get some time I'll look at it, Idle isn't special, I just got intrduced to it working with my Raspberry pi.
To me IDE's do not mean much just yet ( I started using cp/m ed for a word processor back in the day).
Just do a search for python IDE (and get lost) :P

Thanks for the info btw
TecKnoledge available
Practical Wisdom for above TecKnoledge / back-ordered , lead time unknown
UPDATE: above shipment of Practical Wisdom for
TecKnoledge was lost in either luddite or kilrathie space - reward if found
wirser
Bounty Hunter
Bounty Hunter
 
Posts: 179
Topics: 27
Joined: Wed Dec 01, 2004 1:06 pm
Location: not where i want to be



Return to Engine Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron