-
Replied To a Post in Hard Disk Full cannot Track
A very simple thing to do is to launch a graphical disk usage analyser such as filelight or baobab. -
Replied To a Post in python: how to make different instances in a loop?
You must use lists for this A = [] Y = [] val = [12, 5, -12, 1, 120, -1, 10] for i, v in enumerate(val): t = test() name … -
Gave Reputation to rproffitt in Problem : There is no wireless interface on the system
Try this with an alternative OS like a Live Linux OS. No install required. Run it off some USB or DVD. I don't see a model number so try the … -
Replied To a Post in CLass Math
There is still some work to do with the addition operation because something must be done if the month becomes larger than 12, or if the day becomes larger than … -
Replied To a Post in CLass Math
Please post the whole code. If you write def __init__(self, year, month, day): then you need 3 arguments (python says it's 4) date = Date(2016, 5, 3) If you write … -
Replied To a Post in How to run multiple python file in a folder one after another
Did you try `--html-file="myfolder/${f}.html"` ? -
Replied To a Post in Can't reply or create topics programmingforums.org
Aren't you the original owner ? -
Replied To a Post in CLass Math
yes it looks correct. Does it work the way you want ? -
Replied To a Post in CLass Math
The first definition is correct. The `__add__()` method must return a value, you must add return Date(year, month, day) in this method. -
Replied To a Post in CLass Math
You need to pass arguments for `Date()`, such as date = Date(2016, 4, 30) -
Replied To a Post in defined an array and plot it
Have a look at this quickstart page [Click Here](https://docs.scipy.org/doc/numpy-dev/user/quickstart.html) explaining how to build numpy arrays. -
Replied To a Post in CLass Math
Look at the **whole error message**, it tells you that the error is at line 17, because there are 2 paremeters named `year `in your `__init__()` method. -
Replied To a Post in CLass Math
For Delta, you need optional parameters. For this you can define def __init__(self, year=1970, month=1, day=1) for example. -
Replied To a Post in CLass Math
It is much better for class Date, but you must create an instance with parameters, for example date = Date(2016, 4, 29) There should be a `__init__() `method for class … -
Replied To a Post in CLass Math
Remove all the classes content and start with a single `__init__() `method for each of the two classes. -
Replied To a Post in How to analyze the running time of a recursive function!?
Nevertheless, 2N+1 calls exactly is a more precise result than O(N). There is no best case or worst case in this function in terms of number of calls. There is … -
Replied To a Post in CLass Math
Post your code. You don't need `__call__()` methods, you only need one `__init__()` method per class, and also `__add__()` and perhaps `__radd__()` methods. -
Replied To a Post in How to analyze the running time of a recursive function!?
For a tree with N nodes, the function will be called exactly 2N+1 times in my opinion (N times with a real node and N+1 times with a null node). … -
Replied To a Post in [python] need help with some (self-teaching) fun
You could write cipher = [(key[(key.index(char) + offset) % 26] if char in key else char) for char in text] -
Replied To a Post in [PYTHON] Place pieces on a chessboard
I don't think you need `x2` and `y2` in the call to `delete()`, `canvas.delete(captured)` should work. Also shouldn't the last call be written canvas.coords(closest, (x_center, y_center)) ? What do you … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
If you want to access the `correct` variable, you need to return its value in `movecreate()`. For examble, this function could return two values return correct, movelist The function that … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
Your code is very difficult to understand because it is not modular enough. You say you need to add something after `if len(movecreate(tour,b,d))>0`. Start by writing pseudo code to describe … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
You must write from game_engine import movecreate but first you must move the definition of `movecreate()` outside the body of the `engine()` function. You don't need nested function definitions in … -
Replied To a Post in How to run multiple python file in a folder one after another
No, I don't know, I thought that you were using a plugin such as [Click Here](https://pypi.python.org/pypi/nose-html-reporting) or [Click Here](https://pypi.python.org/pypi/nose-htmloutput) which have this option. You could perhaps try them. -
Replied To a Post in How to run multiple python file in a folder one after another
@OP don't you have an option `--html-file` ? -
Replied To a Post in How to run multiple python file in a folder one after another
@AndrisP yes I know. What you describe is called the [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). You can also use #!/bin/env python which uses the environment to find the python path. I was thinking about … -
Replied To a Post in How to run multiple python file in a folder one after another
You can get the path to the python command by pasting this in a terminal: python -c "import sys; print(sys.executable)" edit: @AndrisP what you say will only work if the … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
Try `k = i + 8 * j`. The reverse conversion is `j, i = divmod(k, 8)`. -
Replied To a Post in plot piecewise function in python
I suggest def Density(rho0, r, Rc, Rd): return rho0 * np.exp(-np.maximum(r-Rc, 0)/Rd) -
Replied To a Post in How to run multiple python file toether
@Karthik_4 in linux, the command to make the file `myscript` executable is chmod +x myscript -
Replied To a Post in [python3-tk/ttk] testers and reviewers needed
You could complain to virustotal.com (which appears to be another appendix of google)... -
Gave Reputation to rproffitt in [python3-tk/ttk] testers and reviewers needed
Well that's annoying. I don't run .EXEs from others without a clean pass like https://www.virustotal.com/en/file/fb8f90b15bd06f3f549c0ffa296621681d7b9cd822da80616b14bef5631a78a3/analysis/1461550967/ You may want to ask your compliler source what's up. > Antivirus Result Update Antiy-AVL … -
Replied To a Post in ttk styles not applying in python 3 script
Very nice, here is how it looks here. -
Replied To a Post in ttk styles not applying in python 3 script
In principle, you can double-click on the code and then use ^C to copy the code without the line numbers. -
Replied To a Post in ttk styles not applying in python 3 script
I only have the 'default' style. I get something better with a single frame from tkinter import Tk from tkinter.ttk import Frame, Label, Button, Style from random import randrange from … -
Replied To a Post in ttk styles not applying in python 3 script
I can't run the script in kubuntu 14.04. I get Traceback (most recent call last): File "foo.py", line 99, in <module> clicker = Game() File "foo.py", line 11, in __init__ … -
Replied To a Post in loop through list and exec one line at a time
You could download `subprocess.py` from the python 2.7 distribution and try to use its methods. If your server is a linux server, it may work. -
Replied To a Post in python3-tk scratchpad advice needed
It seems very good to me. -
Replied To a Post in python3-tk scratchpad advice needed
Hello, I think you can start a long list of missing features. The first in sight are 1. A shortcut to exit the editor 2. Why is there no menubar … -
Replied To a Post in plot function
Yes but when `u` is close enough to 0, exp(u) is close to `1 + u`. -
Replied To a Post in plot function
I don't understand your question. If you write `return H0*np.exp(r/Rh)`, the code works and draws a curve, which is almost a straight line (I suppose it is because `1/Rh` is … -
Replied To a Post in plot function
Try to remove all the calls to `float()`. They are not necessary, and numpy uses its own float type. -
Replied To a Post in [PYTHON] Place pieces on a chessboard
No, this article only means that symbolic constants don't exist in the core of the python language, but programmers can use class instances or other ersatz as symbolic constants. The … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
If you don't want to use classes, you can use symbolic constants, that's what C programmers do SqContent_white = 3452 SqContent_black = 3453 SqContent_empty = 3454 Click_first = 654333 Click_second … -
Replied To a Post in Can someone PLEASE help me with one line
@hericles The comma trick works only in python 2. With python 3, `print` is a full fledged function and the way to prevent the newline is to use the parameter … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
You could perhaps make things easier by using enumeration types to represent the values of state variables, something like from enum import Enum class SqContent(Enum): white = 0 black = … -
Replied To a Post in [PYTHON] Place pieces on a chessboard
The easiest way to maintain state variables is to work wih classes. You could have a class class Game: def __init__(self): self.state = self.black_select .... game = Game() game.run() -
Replied To a Post in [PYTHON] Place pieces on a chessboard
I don't understand the `clic = 0` part. You can use if len(t) == 4: ... elif len(t) == 2: ... else: ... -
Replied To a Post in [PYTHON] Place pieces on a chessboard
You have 4 coordinates, it is probably the bounding rectangle of the object you clicked with the mouse. -
Replied To a Post in [PYTHON] Place pieces on a chessboard
What does it mean ? It cannot fail ! try print(repr(t)) if there is an error message, post it here
The End.