Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Better than an array
Post: RE: Better than an array
As mentioned earlier my lifetime programming language was Basic.
I ran a test of your suggestion and it gives an error message I have
no idea how to deal with.
Any suggestion most helpful.
tia
oldcity... |
|
oldcity |
General Coding Help |
4 |
2,453 |
Dec-13-2018, 01:01 AM |
|
|
Thread: Better than an array
Post: Better than an array
Using Linux Mint 18.2 and Python 3.5.2 as before I'm old school basic.
Need help with this array type problem.
tia
oldcity
#!/usr/bin/python3
#AT&T
#FP&L
#WATER
#GAS ... |
|
oldcity |
General Coding Help |
4 |
2,453 |
Dec-12-2018, 07:09 PM |
|
|
Thread: Help with stripping output
Post: RE: Help with stripping output
Solved.
Thank you.
I'm a little thick sometimes also may read too fast.
oldcity |
|
oldcity |
General Coding Help |
6 |
3,453 |
Oct-28-2018, 07:40 PM |
|
|
Thread: Help with stripping output
Post: RE: Help with stripping output
Found that Python 3.5 is on my system
Did not get same results as you. Used with python and python3.
Used with print(*item) and with print(item). Results below.
Also do not see or understand how yo... |
|
oldcity |
General Coding Help |
6 |
3,453 |
Oct-27-2018, 10:24 PM |
|
|
Thread: Help with stripping output
Post: RE: Help with stripping output
What I needed was a clean output as below.
For result from dcatagory1 and decatagory2
In other words display horizontal lines.
1. AT&T 2. FP&L 3. WATER 4. GAS 5. PLAN. D
6. AAR... |
|
oldcity |
General Coding Help |
6 |
3,453 |
Oct-27-2018, 05:40 PM |
|
|
Thread: Help with stripping output
Post: Help with stripping output
Using Linux Mint 18.2 and Python 2.7.12.
The routine runs fine the way it is. However the output is too busy with
characters " [] ' , ". I have done many searches looking for the correct
way to... |
|
oldcity |
General Coding Help |
6 |
3,453 |
Oct-26-2018, 03:55 PM |
|
|
Thread: Incomplete Output
Post: RE: Incomplete Output
Had bad info re: 3. + on my system.
Had bad info to use '#!/usr/bin/python3'
Do not require 3. + for in-house.
Found could call using; import os and the
command os.system(('python filename.py')
from m... |
|
oldcity |
General Coding Help |
6 |
3,711 |
Oct-21-2018, 07:08 PM |
|
|
Thread: Incomplete Output
Post: Incomplete Output Part 2
Part 2 Revised.
Using Linux Mint 18.2 and running programs from Python 3.5 which is the default for 18.2.
Running the program from Basic-Menu.py the tuple in Verify-Expenses.py fails.
But running t... |
|
oldcity |
General Coding Help |
6 |
3,711 |
Oct-20-2018, 08:28 PM |
|
|
Thread: Incomplete Output
Post: Incomplete Output
Using Linux Mint 18.2 and running programs from Python 3.5 which is the default for 18.2.
Upon of doing python Basic-Menu.py and making selection '3' the file names
are not presented. On entering a nu... |
|
oldcity |
General Coding Help |
6 |
3,711 |
Oct-19-2018, 08:03 PM |
|
|
Thread: If statement not working
Post: < SOLVED >RE: If statement not working
Did complete re-write.
Thanks |
|
oldcity |
General Coding Help |
4 |
3,112 |
Oct-14-2018, 10:45 AM |
|
|
Thread: If statement not working
Post: If statement not working
Using Linux Mint 18.2 and Python 2.7 with Python 3.5.
Help needed do not understand why the ' if (number == line_num) ' does
not work. The routine continues and gives results for ' expenses-18 '.
How ... |
|
oldcity |
General Coding Help |
4 |
3,112 |
Oct-09-2018, 11:57 PM |
|
|
Thread: Tuple no attribute error
Post: Tuple no attribute error
Linux Mint 18.2 Python 3.5. Am old time BASIC person.
Help. Have no understanding how to deal with this.
An example please.
#!/usr/bin/python3
#
with open( 'expenses-18', 'r') as yrs_file:
f... |
|
oldcity |
General Coding Help |
3 |
9,965 |
Oct-06-2018, 02:51 PM |
|
|
Thread: Array alternative
Post: RE: Array alternative
Thanks for the tips. Using Linux Mint 18.2. Python 2.7 is the default, have just learned 3.5 is
on the system. Will be using it as I have no skill in installing 3.7. My programming background
is fr... |
|
oldcity |
General Coding Help |
3 |
3,495 |
Oct-01-2018, 07:47 PM |
|
|
Thread: Array alternative
Post: Array alternative
I do something like this in perl
have no idea how to in python help please.
tia
oldcity
#!/usr/bin/python
i = 0
with open('test-exp-yrs', 'r') as file:
for line in file:
datafile = line.strip("... |
|
oldcity |
General Coding Help |
3 |
3,495 |
Oct-01-2018, 05:26 PM |
|
|
Thread: Help with subprocess..call
Post: Help with subprocess..call
Came out of the old BASIC. Using Linux Mint 18.2 fully updated. The old os.system command now
no longer. Below is my code. For information have done "chmod +x verify-expenses.py".
Need explicit help... |
|
oldcity |
General Coding Help |
1 |
2,562 |
Sep-28-2018, 03:19 PM |
|
|
Thread: How to do in Python
Post: RE: How to do in Python
Please help. Show me how to do this. Have indented code and get no complaint.
As it is still only reports last item. What is correct?
The plan is to work with 11 categories.
tia
Example of expenses-... |
|
oldcity |
Data Science |
6 |
3,433 |
May-24-2018, 03:53 PM |
|
|
Thread: How to do in Python
Post: RE: How to do in Python
Would only do the last item in list of 'expenses-18'. Need to loop thru file.
expenses-18
010118,1,1.00,1
020218,2,2.22,2
030318,3,33.33,3
040418,4,44.44,4
#!/usr/bin/python
num_lines = sum(1 for li... |
|
oldcity |
Data Science |
6 |
3,433 |
Apr-27-2018, 03:07 PM |
|
|
Thread: How to do in Python
Post: How to do in Python
Using Python version 2.7.12 on Linux Mint 18.2. Will be upgrading os next week.
My background is that of various forms of basic and some perl. I have researched
and am unable to figureout how do the ... |
|
oldcity |
Data Science |
6 |
3,433 |
Apr-26-2018, 03:20 PM |