Re: python book

2019-04-16 Thread John Doe
On 2019-04-16, Larry Martell wrote: > https://www.reddit.com/r/Python/comments/bc2606/just_found_the_best_python_bookcover NOT FOUND -- https://mail.python.org/mailman/listinfo/python-list

newer version

2019-04-09 Thread John Doe
I've already -X555UJ:~$ python python python3python3.6m python3m python2python3.6 python3.6m-config python3m-config python2.7 python3.6-config python3-config Wondering if not add Python3.7 yet if so should I just do: sudo apt instal

Re: Losing words

2019-04-02 Thread John Doe
On 2019-04-01, Paul Rubin wrote: > John Doe writes: >> sendall also is not sending a whole sentence. > > Have you observed that with something like wireshark? > I was about colon ":" before message with a colon a whole message is " before message wit

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Abdur-Rahmaan Janhangeer wrote: > Since this is IRC, you might want to see a demo here: > https://github.com/Abdur-rahmaanJ/honeybot/blob/master/honeybot/main.py Yes. However get these def text() and loop while 1: working together. def text(): while True: mess = input

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Rhodri James wrote: > > I'm not an expert, but looking at RFC-1459 it looks like your final > parameter (the message) needs to be preceded by a colon. In other words > you want: > > s.send(bytes("PRIVMSG " + channel + " :" + mess + "\n", "UTF-8")) > > (Try printing out the line y

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Chris Angelico wrote: > > Cool. Please don't post context-free messages though - not everyone > knows that you were talking about IRC. (Part of that is because your > subject line didn't mention IRC either.) > I've mentioned it in a mother post mate. > If you're going to do a lot w

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Roel Schroeven wrote: > This is what 'while' is made for: > > def text(): > while True: > mess = input("> ") > s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", > "UTF-8")) > see it working thanks, indeed while is powerful, had to add colon to b

Re: Losing words

2019-04-01 Thread John Doe
The colon was the solution, thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Chris Angelico wrote: > > Use a loop, not recursion :) > I can guess only you mean: while but I've got no idea while what. -- https://mail.python.org/mailman/listinfo/python-list

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Joel Goldstick wrote: >> >> def text(): >> mess = input("> ") >> s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) >> >> text() >> > > Is this a typo or are you calling text() from within text()? >> Indeed I do :-) I was thinking on another way but

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Jon Ribbens wrote: > On 2019-04-01, John Doe wrote: >> I'm learning SOCKETS and working with Irc. >> --- >> s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) >> --

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, David Raymond wrote: > https://docs.python.org/3.7/library/socket.html#socket.socket.send > > .send returns the number of bytes that it actually succeeded in sending. From > the docs: "Applications are responsible for checking that all data has been > sent; if only some of the dat

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Chris Angelico wrote: >> >> I'm learning SOCKETS and working with Irc. >> --- >> s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) >> >> When more than one word ( for example: This is a message) >> in

Losing words

2019-04-01 Thread John Doe
I'm learning SOCKETS and working with Irc. --- s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) When more than one word ( for example: This is a message) in *message* it sends the FIRST word only "This" and skips th

Your IDE's?

2019-03-25 Thread John Doe
What is your favorite Python IDE? -- https://mail.python.org/mailman/listinfo/python-list

Re: cant use def command

2019-02-02 Thread John Doe
On 2019-02-01, mb1541def 0 <12345678mb1541...@gmail.com> wrote: > > Hello, > I need help on the def command. > > My script: > > Import os > Test > > def Test(): > print(“test”) > os.system(“pause”) > > someone please help,it gives me an error in python 3. > I did everything right. > On 2019-02-01,

Re: get the terminal's size

2019-01-14 Thread John Doe
On 2019-01-14, Bob van der Poel wrote: > try this: > > > http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python > and have a look at this one too: https://stackoverflow.com/questions/1396820/apt-like-column-output-python-library/1446973#1446973 > -- https://mail.pyth

Creating Win .exe file from *.py on Linux

2018-10-02 Thread John Doe
Hello World Is it possible to create on Linux win .exe file from *.py file? -- https://mail.python.org/mailman/listinfo/python-list

QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread John Doe
Presumption 1. Lists are mutable sequences. 2. There is a subtlety when the sequence is being modified by the FOR loop (this can only occur for mutable sequences, i.e. lists) Preamble =

Pythonwin forum?

2014-02-13 Thread John Doe
What's the best place for asking questions about the Pythonwin IDE? I'm a novice programmer, so in an effort to be more clear I'm talking about the program at this path on my hard drive... C:\Python27\Lib\site-packages\pythonwin\Pythonwin.exe It appears to be an editor and a compiler. I have

How would I do this?

2013-07-25 Thread John Doe
Hey guys, I;m working on making a chess program and I hit a wall. I have no idea how to get the position of the chess pieces. I have the chess board 1-8 and A-H for black as well as 1-8 and a-h for white. i just have to figure out how to declare those positions for the actual pieces so like the

Re: Wait for a keypress before continuing?

2011-08-17 Thread John Doe
Seebs wrote: > John Doe wrote: >> Context is lost when you quote only one level. > > Not significantly. Whatever you say, Jeebs. >> I was not answering a question about my code. I was pointing >> out the fact that my questioner's terminology is >&g

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
Seebs wrote: > John Doe wrote: >> Using "does your code have a GUI" produces zero search results. >> Maybe that works better in some other language. > > You shouldn't need a search engine to answer a question about > your code. Context is lost whe

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
Jerry Hill wrote: > John Doe wrote: >> No. I am running this from within Windows, all sorts of >> Windows. > > What does that mean? You snipped the context, Benny. > You seem very resistant to answering anyone's questions about > your code. No on

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
Okay... Looks like I need pyHook. -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
Tim Roberts wrote: > John Doe wrote: > >>def wait_for_keystroke(): >> char=0 while not (char==chr(27) or char==chr(110)): >>char=msvcrt.getch() if char==0: >> return >> >>That freezes the process. > > That exact code works perf

Determine what msvcrt.getch() is getting?

2011-08-16 Thread John Doe
Whatever msvcrt.getch() is returning here in Windows, it's not within the 1-255 number range. How can I determine what it is returning? I would like to see whatever it is getting. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
def wait_for_keystroke(): char=0 while not (char==chr(27) or char==chr(110)): char=msvcrt.getch() if char==0: return That freezes the process. That means char=msvcrt.getch() is getting something? Could it have something to do with the formatting of the character? -- http://mail.

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
> def wait_for_keystroke(): > char=0 > while not char==0x1B: > char=msvcrt.getch() I tried using while not char==chr(27): -- http://mail.python.org/mailman/listinfo/python-list

Re: Wait for a keypress before continuing?

2011-08-16 Thread John Doe
def wait_for_keystroke(): char=0 while not char==0x1B: char=msvcrt.getch() That freezes the process. Am I using the right code for the escape key, or doing anything else wrong? Again, I know it could be my system. But I must find a way to do this from within Windows. I use a keyboard ho

Re: Wait for a keypress before continuing?

2011-08-07 Thread John Doe
Steven D'Aprano wrote: > Also, are you using an IDE? If so, it could very well be > interfering with the keyboard buffer I really don't know how to answer your question. I am using Windows XP SP3. Komodo Edit 6 for editing the *.py file. Dragon Naturally Speaking, Natlink, and Dragonfly mig

Wait for a keypress before continuing?

2011-08-07 Thread John Doe
My program does not need a prompt, it just needs to wait for any key to be pressed before it continues. This is in Windows. char=0 while not char: char=msvcrt.getch() That doesn't delay anything here. while 1: char=msvcrt.getch() break That appears to put my program into an

Re: Komodo 6, why "Workspace Restore" after every restart?

2010-11-15 Thread John Doe
Eric Promislow wrote: > Komodo always asks you if you want to restore the last workspace > when it wasn't shut down cleanly the previous time. Why is shutting down in Windows XP more difficult for version 6? The only thing I have open is a single small Python file. Apparently version 6 is un

Re: Komodo 6, why "Workspace Restore" after every restart?

2010-11-15 Thread John Doe
alex23 wrote: > John Doe wrote: >> Google Groups spews a massive amount of sewage onto UseNet >> everyday. Google Groups is your news server. You should be >> ashamed > > Get over yourself. You too, and stop using the spammers den while you are at it. --

Re: Komodo 6, why "Workspace Restore" after every restart?

2010-11-15 Thread John Doe
alex23 wrote: > John Doe wrote: >> UseNet would be better off if Google Groups didn't exist, IMO. > > I'm sorry, are you cranky because you didn't get the answer you > wanted when you posted in a less relevant forum? Do you realize the harm your filth

Re: Komodo 6, why "Workspace Restore" after every restart?

2010-11-14 Thread John Doe
alex23 wrote: > John Doe wrote: >> Does Komodo have to be shut down individually every time I want >> to restart Windows XP? Is there some way to eliminate the >> persistent Workspace Restore error after every restart? I have >> tried setting it to restore fil

Komodo 6, why "Workspace Restore" after every restart?

2010-11-14 Thread John Doe
Does Komodo have to be shut down individually every time I want to restart Windows XP? Is there some way to eliminate the persistent Workspace Restore error after every restart? I have tried setting it to restore files without asking, but that does not seem to work. Thanks. -- http://mail.pyth

Re: OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread John Doe
André wrote: > ... set it up so that linenumbers are shown, then you get a much > larger target to click and select the line. Yes... And it allows clicking and dragging the number area to select multiple lines. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread John Doe
Is there a way to increase the line selection gutter width? It seems to be only one pixel wide. In other words... When I single click on the left side of the line, in order to automatically select the line, the pointer must be in a precise single pixel location immediately to the left of the line.

Komodo Edit: Editor settings?

2010-04-29 Thread John Doe
Komodo Edit 5.1 I would very much like to stop code from expanding automatically. Like when several consecutive lines of code have a plus sigh in the left margin, meaning they are collapsed, when I go to copy or cut one of those collapsed lines, the collapsed lines that follow that line automa

Messages from Python Macros, always on top?

2009-05-28 Thread John Doe
Anyone here familiar with Messages from Python Macros? Can you make that window Always on Top? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: The ultimate in voice-powered scripting in Windows... need help

2009-05-20 Thread John Doe
The author provided solutions. Posted to (comp.lang.beta). -- http://mail.python.org/mailman/listinfo/python-list

The ultimate in voice-powered scripting in Windows... need help

2009-05-18 Thread John Doe
http://code.google.com/p/dragonfly/ The help I need probably requires a Python programmer to become familiar with the project. I cannot tell exactly how much syntax versus logic is involved. But if you have ever had any interest in voice/speech activated system wide scripting in Windows, this

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-27 Thread John Doe
Terry Reedy wrote: > John Doe wrote: ... >> Windows Explorer does include Undo. > > I learn something new. In my WinXP, I found that Explorer has 'Undo > Move' (good to learn actually, for when I drop a file in the wrong > place), Yup! FWIW... I enable

Re: ActiveState Komodo Edit?

2009-04-27 Thread John Doe
Trent Mick wrote: > John Doe wrote: >> There is a region on the left margin to the left of the code > BTW, we call those regions "gutters" of the editing area. Okay. >> the right of the outlining area, in between the code and the >> outlining area. It looks

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-27 Thread John Doe
Terry Reedy wrote: > John Doe wrote: >> John Doe wrote: >> >> ... >> >>> Another file manager, FreeCommander, does find text in Python >>> files. >> >> However... It does not have Undo! Potentially risky. > > Undo is an edito

Re: ActiveState Komodo Edit?

2009-04-27 Thread John Doe
Dave Angel wrote: > John Doe wrote: >> Dave Angel wrote: ... >> Lastly... Is there a way to force the editor to open text (*.txt) >> files as Python files so that they are color-coded? Without >> changing the *.txt extension? I will be editing text files th

Re: Re: ActiveState Komodo Edit?

2009-04-27 Thread John Doe
Dave Angel wrote: ... > Quickest way to indent multiple lines is to select them, then > press tab. Thanks. Useful because I usually paste blocks of code. Lastly... Is there a way to force the editor to open text (*.txt) files as Python files so that they are color-coded? Without changing the

Re: ActiveState Komodo Edit?

2009-04-26 Thread John Doe
George Sakkis wrote: > John Doe wrote: >> Having trouble tabifying a section of Python code. >> Code -- Tabify Region >> Does it work for anyone else? > > Yes it does, you have to select a region before (e.g. ctrl+A for > the whole file). Regardless, the co

ActiveState Komodo Edit?

2009-04-26 Thread John Doe
Having trouble tabifying a section of Python code. Code -- Tabify Region Does it work for anyone else? Thanks. -- Interested in making Windows and games obey your verbal commands? Continuous command recognition (much easier than speech recognition) can now be enabled using Naturally Speakin

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-26 Thread John Doe
John Doe wrote: ... > Another file manager, FreeCommander, does find text in Python files. However... It does not have Undo! Potentially risky. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-09 Thread John Doe
Tim Golden wrote: > John Doe wrote: >> Anybody have a solution for Windows (XP) Explorer search not >> finding ordinary text in *.py files? > > It came up a couple of months ago either on this > list or on python-win32. Don't have web access > at the moment, bu

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-04 Thread John Doe
Dave Angel wrote: > John Doe wrote: >> ...at least by the time I move from Windows XP to Windows 7, >> very likely I will be using a different file manager. If I cannot >> search Python files, now might be a good time to switch. > and the product xplorer2 is at

Re: Cannot find text in *.py files with Windows Explorer?

2009-04-03 Thread John Doe
Tim Golden wrote: > Now I think about it, try searching for "xplorer2" since I think I > mentioned that I have used that instead of explorer for some > while. Yeah... at least by the time I move from Windows XP to Windows 7, very likely I will be using a different file manager. If I cannot

Cannot find text in *.py files with Windows Explorer?

2009-04-03 Thread John Doe
Anybody have a solution for Windows (XP) Explorer search not finding ordinary text in *.py files? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speech activated scripting/macroing for Windows

2009-03-30 Thread John Doe
This might be a better link. http://code.google.com/p/dragonfly/ After getting it to work, at first, it seems excellent for continuous command recognition (with speech activated scripting) in Windows. Yes! -- http://mail.python.org/mailman/listinfo/python-list

Speech activated scripting/macroing for Windows

2009-03-29 Thread John Doe
For a time, a Dr. Rick Mohr worked on a Vocola project that allowed continuous command recognition through Dragon NaturallySpeaking in Windows. Currently Vocola is available for Windows Vista and higher, but no longer available for use through DNS. More recently, Christo Butcher has begun a P

Wing IDE Backup configuration settings?

2009-03-29 Thread John Doe
Anyone know how to back up the configuration settings like font sizes and colors in the Wing IDE? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

arf

2007-02-24 Thread John Doe
arf -- http://mail.python.org/mailman/listinfo/python-list

Generator chaining?

2006-08-29 Thread John Doe
This is sort of a feature request/idea: Chaining generators. If you have two lists (or tuples) and you add them, the result is a concatenation of the two. I think it would be nice if it was possible to do something similar with generators. The best way to explain is by code example: def add_gener

Newbie question: does file("text.txt', "w").write("stuff") ever get closed?

2005-11-17 Thread John Doe
 I am learning as Python as we speak, to do some text processing stuff.  For instance,>>> l = [[]]*5>>> l[0].append("a")>>> l[['a'], ['a'], ['a'], ['a'], ['a']]just bit me; however, thats not the question.  In an effort to avoid another potential mistake, I am wondering if the anonymous file ob

Re: How come print cannot be assigned to a variable?

2005-05-22 Thread John Doe
[EMAIL PROTECTED] wrote: > Hi all, > In Python, some functions can be assigned to variables like this: > length=len > Why is it that print cannot be assigned to a variable like this? (A > syntax error is declared.) > > Thanks, > > Vaibhav > print can't be assigned to variables si