to use del to clear a list appears to the
inexperienced as being an odd shaped brick when they've already used
the .clear() brick in other places.
Having bricks that work in lots of places makes the language
'guessable'. I've never cleared a list before, but I've cleared
dictionaries and I guess
)
# Just trying to clean the screen:
if sys.platform == win32:
os.system(cls)
else:
os.system(clear)
print
print Hello !
print
print I just encrypted some text. It looks like this now:
print
print base64.b64encode(a[0])
print
print 'Please notice, that I just encoded the text once more using
the text to encrypt, a password is generated:
a = doEncrypt(For your eyes only !, Melina)
# Just trying to clean the screen:
if sys.platform == win32:
os.system(cls)
else:
os.system(clear)
print
print Hello !
print
print I just encrypted some text. It looks like this now:
print
within seconds of
distributing the jobs to the compute nodes -- even though I'm doing
nothing but executing the clear screen command, which technically
doesn't pipe any output to the location for logging stdout.
Even if I change the SGE script file to redirect standard output and
error to explicitly
system skyrockets within seconds of
distributing the jobs to the compute nodes -- even though I'm doing
nothing but executing the clear screen command, which technically
doesn't pipe any output to the location for logging stdout.
Even if I change the SGE script file to redirect standard output
lurching Python
schooling?
As you're not being clear on what you wanted, I'm just guessing this is
what you wanted:
s = '123#abc456'
re.match('\d+', re.sub('#\D+', '', s)).group()
'123456'
s = '123#this is a comment and is ignored456'
re.match('\d+', re.sub('#\D+', '', s)).group()
'123456
version yet. The current
version of Neobot (v0.7a) is written in BASH and Python3.
To emulate the Linux shell's date command, use this Python
function def DATE(): print(time.strftime(%a %B %d %H:%M:%S %Z %Y))
Want an easy way to clear the terminal screen? Then try this:
def clr(): os.system
the Linux shell's date command, use this Python
function def DATE(): print(time.strftime(%a %B %d %H:%M:%S %Z %Y))
Want an easy way to clear the terminal screen? Then try this:
def clr(): os.system(['clear','cls'][os.**name http://os.name == 'nt'])
Here are two Linux-only functions:
def GETRAM
:%M:%S %Z %Y))
Want an easy way to clear the terminal screen? Then try this:
def clr(): os.system(['clear','cls'][os.**name http://os.name ==
'nt'])
Here are two Linux-only functions:
def GETRAM(): print(linecache.getline('/**proc/meminfo',
1).replace('MemTotal:', '').strip()) #Get Total RAM
; if each section were to be a tutorial,
the manual would be huge. Here I think the solution is to encourage
separate tutorials and HOWTOs, and link to them from the LibRef.
We don't have a clear place to put that material. People's personal
pages leave the potential for material disappearing
hose examples, need to be recognizable to humans as interactive sessions with
outputs clearly distinguished from inputs. When I tried out the new sidebar in
prep for a class, it was impossible to include the ps1 prompts in a cut and
paste selection. They had to be manually typed ba
* Fall back to 80x24 if screen size detection fails
* Fix screen.stop(), screen.start() disabling mouse events
* Fix to make GridFlow v_sep argument behave as documented
* Fix for registering high palette entries in the form hX where
X 15 so that basic colors are applied in 88-color mode
it should be clear even before
the machine grows unusable. Note that you can select which
columns are shown in the Processes tab of the Task Manager
window, to get more detail on a given process. (The Performance
Monitor found under Control Panel, Administrative Tools can
be even more useful
Ville Vainio wrote:
Daniel Thanks for the advice. I'll probably go with either the
Daniel BSD license, or possibly the LGPL. But I'm leaning
Daniel towards the BSD since it fits on the screen...
Isn't MIT license even shorter and simpler? A while ago some Debian
guys were speculating
-item tuple.
A bit like every char being a string.
There is no char. There are strings of lenght 1.
That is a matter of view. But to illustrate what I mean,
the following is an infinite loop in python
s = 'hi'
while true:
s = s[0]
And the above example makes
it clear that there would
to enumerate simple screen savers
(graphicals, graphiclizers). It may be profitable on some non-bank-
breaking scale to compile the results. Shall I proceed? The risk is
overunity, such that one person can't be at liberty to live, which
in some technical political arenas would be an anarchy
, there is an easily understood relationship
between
the objects and what you see on the screen - so its a great way of getting
into OO - as far as people like you and me will go with it, which is not very
far, as we tend to think in machine instructions...
And for what its worth - you can programme
En Thu, 06 Dec 2007 08:03:49 -0300, Andreas Tawn
[EMAIL PROTECTED] escribió:
There was a strange error when using 'print' threads. When
what I printed filled the entire screen, instead of moving
all the text up, IDLE just hanged. Try running your code from
the shell instead, to see
know that if you use forkpty, the child get slaughtered, but
using the
subprocess module just seems much easier than forking.
Yeah, and if there is some way (there may be, but I don't know) to
make your python script the head of a process group (or session --
I'm not very clear
I accidentally stumbled across the Turtle Graphics module (turtle.py)
the other day and have been having some fun with it.
Now I'm wondering if there is a way to build into a script the saving
of each window just before it is cleared. For example, here are a
couple that I've saved by screen
is with its publisher handler.
It let's you code your applications in a MVC (model view controller)
style.
This way you can cleanly separate presentation and logic, making your
code more concise, clear and mantainable.
With publisher, every function defined in your script represents a web
page
scrollwheel works, but for
scrolling horizontally the tilt wheel isn't supported. Another
example: sometimes it's only clear what a link points to when
you hover over it (revealing a text behind an image, for
instance), which is impossible on some devices (think handhelds
question!
I've been looking at and tinkering a little with the various
networking modules in python. The examples are pretty clear and a
module such as the SimpleXMLRPCServer is actually simple!
All the examples though are based on a client interrogating a server,
with the client initiating
and scrollbar. And with the frame as attribute
the object that you have a direct reference to would then not be the complete
thing on screen, with respect to sizing and placement and such. I generally
don't like widgets that present stuff outside their bounding box. I guess that
could be fixed up somehow
the consequences?
Again, it's not your beliefs about other tops that are causing
problems for you. What's causing problems is the manner in which you
are expressing your beliefs about this topic.
My beliefs are that the majority doesn't care about the minority of screen
reader users, because if it would
[:-1]
#
# end of file
The \t is to prove where the screen output came from.
From Peter __pete...@web.de
Nonsense. The minimal Tkinter program is
from
sometimes severe impact in memory-constrained environments,
though. See http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/,
about half-way down, specifically
http://sealedabstract.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-14-at-10.15.29-PM.png
.
The best verification
versions would actually be enough of an improvement to
justify changing it.
To be clear: I have no intention of modifying the IDLE codebase just for fairly
trivial points like this one line.
The most satisfying (to me) of the possibilities is if key and key[0] == '' and
key[-1
be explained at that level.
Not really clear on what you're talking about on this part...
If you were to create a web application, you'd have to worry about the
same question of is this person an admin or just data-entry. If you
were to do this as a single program that other programs script
didn't is there an easiest way to print tables and forms by
using python's html generation functions and not plain print statements
that will make the code more clear?
And also in my pelatologio.py and other script i use if statements to
check if user submitted data or not so to print them
unittest
rather than regrtest. One thing to copy may be to put gui-tests in a separate
directory. I presume load_tests() could conditionally load tests in such a
directory.
It is not clear to me to what extent tk widgets can be created and manipulated
without being shown on a screen or needing
; Or does anyone really name a global var xxx and a function var xxx? I
> am sure no one at all will do it.
Not sure I follow you here. What do the names programmers choose have
to do with it? If I'm looking at a function, which should never be more
than a screen of code long, if I see
buttonHandler_a(self, event, arg1, arg2, arg3):
print("buttonHandler_a received event", event)
self.buttonHandler(arg1, arg2, arg3)
print("\n"*100) # clear the screen
print("Starting program tt077.")
root = Tk()
myapp = M
nux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> spam
KeyboardInterrupt
Python 3.9.0a1+ (heads/master:a62ad4730c, Dec 2 2019, 17:38:37)
[GCC 9.2.0] on linux
Type "help", "copyright"
.
0 (Examples: Windows Notepad and Firefox entry box). The cursor stays where it
is and a selection stays selected, even if one has scrolled the cursor and
possible selection off the screen with mousewheel or scrollbar. Paste inserts
at the possibly hidden cursor, deleting any possibly hidden
f those perennial questions.
>
> The issue (if I have understood it correctly) is that Python was damaged
> when a framework or library was removed. So, Python was re-installed
> from the official repository. However, whilst it will now start from
> Geany (editor) there is no (longer) a Window
e to do just about everything (even though the program
> is GUI!) and so I tend to edit in one window and test in an adjacent
> window on the same screen, I don't find GUI development environments
> comfortable.
+1. All of it. Except that I'm on Arch rather than XUbuntu, and our
defin
vial it rather defeats the concept of
>> using the terminfo functions to create text effects without
>> diving into full curses screen control!
>
> Indeed, that appears to be the case for Python 3.x (unless we can
> figure out a way to flush 's FILE *stdio stream from Python).
Julius Hamilton added the comment:
I’m trying to patch this bug.
Here are my current working questions:
1. What is the relationship between an fd (file descriptor) and a terminal?
What software / hardware component goes to “fd 0” to receive input from it?
Is there a GNU Screen command
, , parsestring)
newstring = re.sub(Y, , newstring)
# Clear the screen
turtle.clear()
strlen = len(newstring)
colorinc = 1.0 / float(strlen)
turtle.color(colorator(0))
for i in range(strlen):
value = newstring[i]
turtle.color(colorator(float(i) * colorinc
think the old site does a much better job of making clear
what links are available and what's available on those links than the
new one does.
The site
should invite users to read the content, the contrary of many corporate
websites that seem to try to hide it, almost like the fineprint
approach of Delphi/Kylix (or other similar tools) is much chop. It
encourages one, for instance, to just place elements on the screen in
fixed positions that make no allowance for differing fonts, screen
resolutions, etc. Java (my experience is with JBuilder) is much better
in this regard, although
SLOC *function*.
My definition of long is more than one screen.
How do functions of this length enhance the readability of your source
code?
If the code is of one screen, you can easily see what it does without
having to scroll back and forth.
And I always put a single class in a file.
Why
. They can't do the
right thing if they believe that Tk or Silverlight or Flash is accessible no
matter if they follow the recommendations for accessibility, because the
screen readers don't support those interfaces.
No, even using the right tools:
http://doc.qt.nokia.com/qq/qq24
something I have
never been able to do on any other operating system since, start assembling
a long assembly language file on one of the screens on the color monitor,
hit the clear key to advance to the amber screen and start a listing on it
of the assemblers output listing file.
Because the file
the
files, while another user is still accessing them?
Are these 'files' so enormous that you can't just use in-memory file
objects?
The analogy to global variables must be clear. They're fine if they're
constant. But as soon as you have multiple threads making new versions
of them, everything
Windows programs,
execute system or shell commands, read and respond to keyboard key presses,
send text etc. to a running Windows program such as Notepad.exe and have it
printed on the screen, and read and write to the Windows clipboard.
Other important resources would be the ability
d
explore the functionality of the language very easily.
(One of the weaknesses of Python, and nearly all mainstream programming
languages, is that there is nothing even remotely like an easy-to-explore
UI for programming GUI applications.)
> (2) The path to the underlying process is not even remot
3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32
> bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
> Is this what you were suggesting?
I wasn't clear enough, I was referring to your 'pip' inst
copyright", "credits" or "license" for more information.
> >
> > Is this what you were suggesting?
>
> I wasn't clear enough, I was referring to your 'pip' install. But since
> this idents the 3.7 as 32 bit, I wonder if there is a 64 bit version
>
adopt to the
environment it's being run in. Windows that don't fit on the screen
are simply unacceptable - but all to common if you use a very small
screen resolution. By flexible, I man the user should be able to
adjust the UI to suit their viewing conditions - the DPI on the
screen, the viewing
ange to Python. All you need is to
start by introducing a GUI builder, and then have a way to pop out an
"event editor" where you enter the code to be run when a button gets
clicked (and that code would then be Python). But I'm not sure we need
that. In my experience, those kinds of "
the widgets on
the screen) took me a while to grasp, and it is still not 100% clear,
but I can get it to do most of what I want.
The cross-platform capability is very good, but there were times when I
got something to work on one platform and not the other. After much
experimenting I usually managed
. Stop saying hex when you're talking about a string
(array of bytes). hex is a way to _represent_ a value
textually. It's simply a format used when print a value on
paper or a screen. The value itself isn't hex any more than a
particular instance of Canis lupus familiaris is English
because
- for the GUI stuff, there is an easily understood relationship
between
the objects and what you see on the screen - so its a great way of getting
into OO - as far as people like you and me will go with it, which is not very
far, as we tend to think in machine instructions...
And for what its worth
Stack instance ? Or: a given (Canvas instance,
Thing instance) couple must share a same Stack instance ? Or (etc...)
It gets things pushed onto
it by them both.
Both what ? classes ? instances ?-)
Now the point that isn't clear is the exact relationship between Stack
and Canvas. You didn't give
are immutables. If you want to sequentially build a string, you
can either rebind the name to a new string :
Huh? Where did strings come into this question?
s =
for c in abcdef:
s += c
Huh? Why not just use: s = list(s)? For a more clear example:
list(foo)
['f', 'o
that uses Python to
intrepret another language (an educational language
called Guido van Robot), and it also uses wxPython to
allow the user to step through the program one line at
a time, and the user gets quite visual feedback.
Check out these screen shots, which hopefully
illustrate something along
That's not clear cut to me. I think vertical
conciseness has an advantage for readability, as
it
means you get to keep more real code on the
screen.
What I meant was that doctest should be type this
into the
interpreter and you should see that. A doctest is
not a unit test
do not know the
password in Windows 98. It is quite simple, in fact I discovered it by
accident. If that user was logged in last, and shut down the computer, you
(1) start up the computer, (2) type in a few bogus passwords in the login
screen and try to login with them, and (3) clear the password
On 16/09/2006 2:55 AM, Tempo wrote:
John Machin thanks for all of your help, and I take responsibility for
the way I worded my sentences in my last reply to this topic. So in an
effort to say sorry, I want to make it clear to everybody that it seems
as though errors in my code and use
of curiosity: how do you refresh those plots? in a loop
closing/opening the figure or clear the figure and replot on it? are
those graphs embedded in an application or are just shown on screen?
What are the things you like the most of matplotlib, that you want
to give emphasis to? And why
What is your code not doing?
Are you winding up with duplicate data in the DB?
Is your web browser re-submitting the form with the same data if you refresh
the screen?
Is your web browser pre-filling the fields of the form due to caching?
I don't understand what's not working
On Wed, Sep 23
in line...
On Wed, Sep 23, 2009 at 9:13 PM, BJ Swope bigbluesw...@gmail.com wrote:
What is your code not doing?
see below
Are you winding up with duplicate data in the DB?
yes
Is your web browser re-submitting the form with the same data if you
refresh the screen?
yes
Is your
! The fact that the shell does not insert a ...
continuation is a real nuance!
1. I agree.
2. This does not much affect me since I do not directly enter compound
statement with more than, say, 2 lines in the body, even with the
command window interpreter. I much prefer a full screen editor
current focus is to fix this bug:
1. When I pass it any file, it does it stuff but inserts a blank
line everytime it processes a new line. (Please notice that I don't
want the output in an another file, I want it on screen).
Firstly, THANK YOU for making your question so easy to work
, there is a 30-minute movie,
Patent Absurdity: How software patents broke the system, which explains
it well.
=/block quote=
it isn't clear to me that software and
computation are synonymous. Lambda calculus only models computation,
and software has real properties in implementation
On 8/3/2014 10:06 PM, Andrew Berg wrote:
On 2014.08.03 23:14, Glenn Linderman wrote:
Having read a bit about ConEmu, it seems that it is a pretty face built on
top of Windows Console, by screen scraping the real (but hidden) Windows
Console, and providing a number of interesting display
and use that variable to
write() to the other file, and also to print to the screen. Then if
something's wrong, you can be sure it's the same both places. Never do
something like y.write(x.read()) till you're sure everything's
working. That's a kind of optimization which doesn't save any
goal is to parse the data looking for post vars txtUserId txtPwd and
extract them, dumping them to the screen as userid_value = password.
I've never worked on Mac OSx And the only times I had and used scapy
were on a work machine that's long gone. I still run Linux, but versions
plots that could display on the
screen and also be saved as .png files etc.
numpy and matplotlib are the leaders here.
The language also has to have the ability to be cloned. That
means that it could be stored in some directory that could be copied
from one computer to another
and the other a second. (but you can debate if
that is "pair-programming")
No, that's not pair programming. That's collaboration on a project,
but it's not the sort of thing where you need to see the other
person's screen.
Agreed. "Pair-programming" seemed the closest, commonly-used
e database.
> > Also imagine this application will be used by millions of users inside
> > different companies.
> >
> > SInce the application will require DB access you will need a dialog to
> > ask for credentials.
> >
> > I, personally, would be very sur
. (stdin/stdout) Gee... There is never a County
Lineman when needed is there Glen? :)
It's not clear why you need to start the GUI at all as you seem to have
control over boths scripts.
Peter
=
To cover two responses at once
variables
moveLeft = False
moveRight = False
moveDown = False
moveUp = False
MOVE_SPEED = 15
ER MER GERD
Think about what you're doing here. If I ask you what direction an
object on the screen is going in, do you say:
1) Left, about 15 pixels a frame
2) West at 5 klicks per hour
3) Left=True, Right
this by convincing python to use utf-8
in any and all cases, and then live with the amount garbish that
appears on screen when using cp850 and cp1252 terminals.
what has changed in python is that they now somehow find out about the
terminal's encoding, and then put that encoding into place and defend
) to send extra escape
sequences to update your screen as changes were made. Sometimes it would clear
the screen and re-enter the new stuff and sometimes delete three lines then put
in the replacement and so on.
End of example. There are other examples like a format for documents that might
take one
()# Notice I have a bias against 'top',
'master', 'root', etc
fred.title('SUDOKU SCREEN')
#fred.geometry('400x400')
#fred.resizable(0,0)
#-- Declare 9 frames plus one for the buttons
fr1 = Frame(fred); fr2 = Frame(fred); fr3 = Frame(fred)
fr4 = Frame
, if any.
Thanks,
Norm
import tkFileDialog
fred = Tk()# Notice I have a bias against 'top', 'master',
'root', etc
fred.title('SUDOKU SCREEN')
#fred.geometry('400x400')
#fred.resizable(0,0)
#-- Declare 9 frames plus one for the buttons
fr1
tkFileDialog
fred = Tk()# Notice I have a bias against 'top', 'master',
'root', etc
fred.title('SUDOKU SCREEN')
#fred.geometry('400x400')
#fred.resizable(0,0)
#-- Declare 9 frames plus one for the buttons
fr1 = Frame(fred); fr2 = Frame(fred); fr3 = Frame
usually used for making larger and smaller
versions of text for titles and such.
link rel=stylesheet type=text/css media=screen
id=screen-switcher-stylesheet
href=/styles/screen-switcher-default.css /
This points to a css file, which refers to another one, called
styles.css
, but then it's not clear WHERE.
Perfection is reached, not when there is no longer anything to
add, but when there is no longer anything to take away, as Antoine de
Saint-Exupery wrote.
That's debatable. Why does Python have decorators when there was already a
perfectly usable syntax
rently unique while other
programs like WORD make them in pairs with a clear open and close quote
slanted differently. Would we be better able to write clear constructs if
our programs also clearly marked beginning and ends of text in some
contexts, perhaps allowing even things like nested text?
to the
screen. It's simple and works very well ... but I only designed it to
have axis labels and the title of the plot. They are all three
interactive, editable by the user. That's good, but for anything else
it's hack time. Witness lines, legends, point labels, etc., etc. don't
have a natural home
- which is what I believe the user deserves. Please
bear with me. By robust, I mean the user interface should adopt to the
environment it's being run in. Windows that don't fit on the screen
are simply unacceptable - but all to common if you use a very small
screen resolution. By flexible, I
likely that
all relevant things are visible on the screen at the same
time etc. You'll make more errors that aren't typos.
Python is designed to allow you to easily write short and
clear programs. Its dynamic typing is a very important
part of that. The important thing isn't that we are
relieved from
lease enter the following
information"_url = raw_input("URL: ")_port = raw_input("Port:
")print "Starting IIM client on port: " + _port
socketOut = socket.socket(socket.AF_INET,
socket.SOCK_STREAM)socketOut.connect((_url, int(_port)))
# clear screen he
two different things; the first one being...
bits of Python code that are embedded within an HTML file
... (this being from a message you quoted), although they don't really
make themselves totally clear, because they then say...
that after mapping .html will no
longer be call as normal html
you're talking about a string
(array of bytes). hex is a way to _represent_ a value
textually. It's simply a format used when print a value on
paper or a screen. The value itself isn't hex any more than a
particular instance of Canis lupus familiaris is English
because somebody spells it dog instead
come to the right place. (Incoming this!) Is
this the Python newsgroup? I heard it was called comp.lang.python.
Now to repeat the subject line. I'm stuck in Python.
Now that was fun. I will also try to enumerate simple screen savers
(graphicals, graphiclizers). It may be profitable
to enumerate simple screen savers
(graphicals, graphiclizers). It may be profitable on some non-bank-
breaking scale to compile the results. Shall I proceed? The risk is
overunity, such that one person can't be at liberty to live, which
in some technical political arenas would be an anarchy
line. I'm stuck in Python.
Now that was fun. I will also try to enumerate simple screen savers
(graphicals, graphiclizers). It may be profitable on some non-bank-
breaking scale to compile the results. Shall I proceed? The risk is
overunity, such that one person can't be at liberty
it was called comp.lang.python.
Now to repeat the subject line. I'm stuck in Python.
Now that was fun. I will also try to enumerate simple screen savers
(graphicals, graphiclizers). It may be profitable on some non-bank-
breaking scale to compile the results. Shall I proceed? The risk
. (Incoming this!) Is
this the Python newsgroup? I heard it was called comp.lang.python.
Now to repeat the subject line. I'm stuck in Python.
Now that was fun. I will also try to enumerate simple screen savers
(graphicals, graphiclizers). It may be profitable on some non-bank
it is absolutely needed for the
program.
From what I can see on the web, and the few texts I have had access to, no
one makes a clear distinction between the two choices by way of words or
examples. This comes close:
From Tkinter reference: a GUI for Python
One special quality of a control variable
of the function was so
short that it would be a pretty poor developer who didn't know it was a
global.
But in a more substantial function, one using lots of variables, it might
not be clear which were global and which weren't unless you studied the
code, line-by-line.
it IS perfectly
suitable
guess is you'll take a
performance (mem/cpu or both) hit, if for no other reason than introducing the
Python interpreter overhead.
For example, to create a menu that has an image in the center of the
screen, the XML would be this:
Page
Frame type=Root
Frame type=Image value
:
# update the buffer
dc = wx.MemoryDC()
dc.SelectObject(self._Buffer)
self.Draw(dc)
# update the screen
wx.ClientDC(self).Blit(0, 0, self.Width, self.Height, dc,
0, 0)
class DrawWindow(BufferedWindow):
def __init__(self, parent
True
def iMsg(self, msg):
Same as msg(), but the screen will refresh instantly.
'i' is standing for Interface or Instant message.
if isinstance(msg, str):
msg = [msg] # List'it!
count = len(msg)
for item in msg
be uniformly removed from the left
of every line in `text`, optionally expanding tabs before altering
the text.
This can be used e.g. to make triple-quoted strings line up with
the left edge of screen/whatever, while still presenting it in the
source code in indented form
301 - 400 of 470 matches
Mail list logo