Hi I try to upload my picture to local server via FTP Batch file I created script.batch which is contain open 127.0.0.1 Tony 123abc #cd public_html lcd C:\xampp\htdocs lcd XAMPP Shared Folder binary mput C:\Users\Laptop\Desktop\XAMPP Shared Folder\AboutMe.jpg bye I have also another script(upload.batch) which is contain `ftp -i -s:script.bat` When I run upload.batch file it happen nothing? I wonder why? Is there any better code to upload picture to server? I appreciate your help

Member Avatar
Member Avatar
+0 forum 1

Hi I have python code that can list all drive letters but now I need also list the name of drive letter (Label) and the size of hard drive like below! Ltr Label Size ---- ------ --------- C Windows 800 GB E Local Disk 200 GB F My Passport 500 GB Y Secret 1 GB import string from ctypes import windll def get_drives(): drives = [] bitmask = windll.kernel32.GetLogicalDrives() for letter in string.ascii_uppercase: if bitmask & 1: drives.append(letter) bitmask >>= 1 return drives if __name__ == '__main__': print (get_drives()) # On my PC, this prints ['A', 'C', 'D', 'F', 'H'] …

Member Avatar
Member Avatar
+1 forum 1

I am using PySide2 for GUI. I have a "Rename Project" QAction. The function must be like this: 1. set enable to false if tab name is "*Untitled" or file is unsaved. 2. set enable to True if file is loaded. How to do this? 3. Whenever switching to tab, these functions should be observed.

Member Avatar
Member Avatar
+1 forum 5

Hello, I created html file with Checkbox and i use python when i check one box and submit i have problem with list when i check 2 box or more and submit i see the result list like ['120', '104', '12'] i can use "for" to loop the list and do action but when i check one box i see the result withour list like 120 not ['120'] whe i use for it the loop will be 1 , 2, 0 how can i fix this Thanks

Member Avatar
Member Avatar
+0 forum 4

I've seen the following code for binding the Escape Key to a Tkinter GUI: import Tkinter as tk def exit(): root.destroy() root = tk.Tk() root.bind("<Escape>", exit) root.mainloop() However, when I add this to my GUI program, I don't get a response when Esc key is pressed. It does nothing. Any suggestions?

Member Avatar
+0 forum 0

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated

Member Avatar
Member Avatar
+0 forum 8

I have a file that contains flow statistics from a switch. This is a big file with alot of values I would like to print out the statistics based on user input. I'm having a hard time to figure out which way is the most efficient, using a dictionary or a list. I'm looking for a way to split my keys and values element ={"cookie": " ","duration": " ","table": " ","n_packets": " ","n_bytes": " ", "idle_timeout": " ","idle_age": " ","priority": " ","arp": " ","in_port": " ","vlan_tci": " ","dl_src": " ","dl_dst": " ","arp_spat": " ",",arp_tpa": " ",",arp_op": " ",",actions": " ",} …

Member Avatar
Member Avatar
+0 forum 2

Hello, here is my code: import tkinter as tk import tkinter.font as tkFont from tkinter import ttk from tkinter import * root = tk.Tk() pressed = False class Example(tk.Frame): def _create_circle(self, x, y, r, **kwargs): return self.create_oval(x-r, y-r, x+r, y+r, **kwargs) tk.Canvas.create_circle = _create_circle def __init__(self, root): tk.Frame.__init__(self, root) self.customFont = tkFont.Font(family="Helvetica", size=20) root.title("Test") self.canvas = Canvas(self, width=400, height=400, background="white") self.xsb = tk.Scrollbar(self, orient="horizontal", command=self.canvas.xview) self.ysb = tk.Scrollbar(self, orient="vertical", command=self.canvas.yview) self.canvas.configure(yscrollcommand=self.ysb.set, xscrollcommand=self.xsb.set) self.canvas.configure(scrollregion=(0,0,1000,1000)) self.xsb.grid(row=1, column=0, sticky="ew") self.ysb.grid(row=0, column=1, sticky="ns") self.canvas.grid(row=0, column=0, sticky="nsew") self.grid_rowconfigure(0, weight=1) self.grid_columnconfigure(0, weight=1) self.canvas.create_line(300,160,1200,160, width = 10, fill= 'black') self.canvas.create_line(300,200,1200,200, width = 10, fill= 'black') self.canvas.create_circle(278, 180, …

Member Avatar
Member Avatar
+0 forum 3

Hi! My name is Steven and I am a computer science student. I've been working on a project recently (just for fun, practice, and because I was bored lol). I need some testers. It is a game engine for developing text based games in python (3). As of now, it is in very early stages. I need some people to try to develop with it, find bugs, or just suggest features. It is available to download from github [here](https://github.com/tman540/T.A.R.B.S.-Engine). There is also documentation for the most recent version [here](https://tautonico-enterprises.gitbook.io/tarbs/). Thanks! Note: I haven't been programming python for too long, so …

Member Avatar
+0 forum 0

Hi i am having a code to check the input and output rates of ports on few cisco mds switches. i will be saving yesterday and today values to two separate csv files. I am trying to write a python code where it will check the difference in values and will give me updated sheet with the difference my csv files look like: yest.csv 10.5.137.231,port-channel14,0,0 10.5.137.231,port-channel21,100,2 10.5.137.232,port-channel14,0,0 10.5.137.232,port-channel21,102,2 today.csv 10.5.137.231,port-channel14,0,0 10.5.137.231,port-channel21,151,2 10.5.137.232,port-channel14,0,0 10.5.137.232,port-channel21,153,2 Please help me with the python coding on how to get difference.csv file

Member Avatar
Member Avatar
+0 forum 3

Hi guys : Any help with this please! script1.py in 192.168.1.10 x = 10 script2.py in 192.168.1.20 if x == 10: print x else: print "sorry" how can apply this between two scripts in same network. Thanks for all

Member Avatar
Member Avatar
+0 forum 4

[B]Hi all.. I need to do a condition check in a script. The same condition check needs to be repeated in another script. So, I am looking for a way, where i can set, say a flag in the first script ,upon meeting the condition, and be able to access that flag in another script, instead of repeating the check all over again. Hope I am clear in explaining what I want to do. Can anyone pls give me suggestions? [/B]

Member Avatar
Member Avatar
+0 forum 13

![Untitled_spreadsheet_Google_Sheets.png](/attachments/small/2/57c66e06439c72d5acbb2b9623cf737a.png "align-left") I have column A and Column B. I need to create new column C by iterating through Column A and B and if value in Column A is same then merge value in Column B.

Member Avatar
+0 forum 0

i want to display this number pattern in python, help me! 9 89 789 6789 56789 456789 3456789 23456789 123456789

Member Avatar
Member Avatar
+0 forum 1

I am trying to calculate some thing called directional derivatives of a vector b (which defined in attached file as an example) to calculate the directional derivatives of the vector b . the result of the example is also in the attached file. I serached in goolge to find how we can calculate the directional derivatives, but I could not find any function in python to do this kind of calculation ; the only thing I found which do derivative in python is: scipy.misc.derivative(func, x0, dx=1.0, n=1, args=(), order=3) this function dose not give me the right answer . Could …

Member Avatar
Member Avatar
+0 forum 1

Sorry for the lousy title, "InterProcess Communication" was too long Basically, I'm looking to use the native `_winapi` and `msvcrt` modules to launch an integrated python interpreter and communicate with it over pipes I can't find anything on Google or DDG, and I've been searching for days, but nobody uses these modules for some reason... I already have the foundation with a 1-way Parent->Child pipe that works, but it's giving me a few issues: 1: I can't seem to get a 2nd Child->Parent pipe to run without the program hanging 2: the output of the subprocess only prints after the …

Member Avatar
Member Avatar
+0 forum 9

You must then use a loop (for or while) to find the sum of all the numbers in the geometric sequence of 3 less than N. The geometric sequence of 3 looks like this 1, 3, 9, 27, 81, 243, ... where you start with the number one and multiply the previous number by 3 to get the next number. add the sequences together to get answer

Member Avatar
Member Avatar
+0 forum 2

Hi, I've been doing research on a career in coding/programming and now I'm very interested and motivated to learn it. I'm a complete beginner and limited financially at present. So I'm confused as to how to go about it. I love reading a lot and sitting on my laptop, so no problem with studying. I'm the type of person that likes to learn an important big wide subject in stages. To first get a decent background and understanding of it. Then to go deeper into it. Is the following way a good way to go about it? Go through books …

Member Avatar
Member Avatar
+1 forum 3

I made a scraper for a web site, but I'm having problems runninf my code... #!/usr/bin/env python from bs4 import BeautifulSoup import urllib2 import re # Get the links... html = urllib2.urlopen('http://www.blah.fi/asdf.html').read() links = re.findall(r'''<a\s+.*?href=['"](.*?)['"].*?(?:</a|/)>''', html, re.I) links_range = links[6:len(links)] # Scrape and append the output... f = open("test.html", "a") for link in links_range: html = urllib2.urlopen('http://www.blah.fi/' + link).read() soup = BeautifulSoup(open(html)) content = soup.find(id="content") f.write(content.encode('utf-8') + '<hr>') f.close() Here is the error... Traceback (most recent call last): File "<stdin>", line 3, in <module> IOError: [Errno 36] File name too long: '\xef\xbb\xbf<!DOCTYPE html PUBLIC "... If I remove the 'for' …

Member Avatar
Member Avatar
+0 forum 6

Hello, This is my first time using Python. I only know the basic syntax of python but I never actually run the code itself. Therefore, I am trying to figure out how to install Python web server on localhost ? I have this installer - GoogleCloudSDKInstaller When trying to install it: hecking network connection...done. Reachability Check passed. Network diagnostic (1/1 checks) passed. You must log in to continue. Would you like to log in (Y/n)? y Your browser has been opened to visit: https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline and it stops right there! What else do I need to do? Please advice me. Thanks …

Member Avatar
Member Avatar
+0 forum 4

import requests.packages.urllib3 requests.packages.urllib3.disable_warnings() from flask import Flask from flask import request import requests from requests_toolbelt import MultipartEncoder import requests app = Flask(__name__) import requests import json from datetime import datetime botEmail = "" # botun email adresi accessToken = "" # Botun access tokeni host = "https://api.ciscospark.com/v1/" # CISCO Spark tarafından sunulan hizmetler arasında iletişim kurmak için sağlanan son nokta server = "localhost" # Web hook sunucu kuruluncaya kadar çalışmaz port = 4000 headers = {"Authorization": "Bearer %s" % accessToken, "Content-Type": "application/json"} @app.route('/', methods=['POST']) def get_tasks(): messageId = request.json.get('data').get('id') messageDetails = requests.get(host + "messages/" + messageId, headers=headers) replyForMessages(messageDetails) return "" …

Member Avatar
Member Avatar
+0 forum 1

I am trying to take a user input from an entry input and display it back to the user in a simpl text widget. I have implementing a label but apparently that's a bad idea for what I desire. Ultimatley, I'd like my gui to look like this: User: Hey Bot: Oh hey there, User: How are you My gui and response code is as follows: #Creating the GUI myText = tk.StringVar() window.resizable(False, False) window.title("Ashley-UDOL Chatbot") window.geometry('400x400') User_Input = tk.Entry(window, textvariable=myText, width=50).place(x=20, y=350) subButton = tk.Button(window, text="Send", command=Response).place(x =350, y=350) displayText = Text(window, height=20, width=40).pack() scroll = Scrollbar(window, command=displayText).pack(side=RIGHT) window.mainloop() …

Member Avatar
+0 forum 0

I'm trying to compare 2 different CSV files, mark those differences respectively, then produce it as an output. However, my code seems to be only reading the last part of the lines from sample1.csv and sample2.csv as you can see below: Sample1.csv Planet,Account,Name,Station,City Earth,1234,Pete,Nebula,Phoenix Earth,1234,Pete,Nebula,Phoenix Earth,1234,Pete,Nebula,Phoenix Sample2.csv Planet,Account,Name,Station,City Earth,1234,Pete,Nebula,Wakanda Earth,1234,Pete,Nebula,Montgomery Earth,1234,Pete,Nebula,Carlo Current Output History,Planet,Account,Name,Station,City Changed,Earth,1234,Pete,Nebula,Carlo Expected Output History,Planet,Account,Name,Station,City Changed,Earth,1234,Pete,Nebula,Wakanda Changed,Earth,1234,Pete,Nebula,Montgomery Changed,Earth,1234,Pete,Nebula,Carlo Here is the code I have: import csv with open('old.csv', newline='') as f_old: csv_old = csv.reader(f_old, delimiter=',') header = next(csv_old) old_data = {row[0] : row for row in csv_old} with open('new.csv', newline='') as f_new: csv_new = csv.reader(f_new, delimiter=',') header …

Member Avatar
Member Avatar
+0 forum 6

How can I calculate the average weight in python for two columns (x,y) data file, between 8<r< 9. in python I have tried this put it dose not work with my np.average(X,Y, weights=[8,9]) I have calculated the average weight which is 12.14, now I am trying to use this weight to calculate the average fro the X, Y values?? How can I do so ?

Member Avatar
Member Avatar
+0 forum 2

I have two array data files. I want to add weight function to these two array which I ploted see attached file. what I am trying to do now is use the weight function below, for two data set and select the points between 8<r <9 in each data then plot the histogram. how can I do so. # weight function: def W(r): Rsn = 5.4 return np.exp(-r/Rsn) thank you very much

Member Avatar
Member Avatar
+0 forum 1

Just wondering how you would add user input from within the program into a drop down bar for future use.

Member Avatar
Member Avatar
+0 forum 1

Hello all, I am quite impress knowing that Python has been the most popular programming language in July 2018. Check this statistic: https://pypl.github.io/PYPL.html It looks like there is a changing in trends - in 2015 PHP is rank no 2 and now rank 4. While Python rank 3 moves up to rank no. 1. I wonder what makes it so populer? Thanks in advance, Davy

Member Avatar
Member Avatar
+0 forum 3

Could anyone please review my code https://github.com/LeoUpperThrower4/GeneticAlgorithm

Member Avatar
Member Avatar
+0 forum 8

I am facing issue while appending fieldlist through append_entry in flask-wtf. I am able to add one row of fields from fieldlist but after adding first row, i am not able to add second row. No errors are shown. In first attempt a new row is added of field list items and in server log "Data is King" and "True" is printed {I have included this to see if add button sends data and loop actually goes through}. In second attemt new row is not added but page reloads and in server log "Data is King" and "True" is printed …

Member Avatar
+0 forum 0

Suppose I have a text file : > As a manager, he told FIFA TV he communicates his messages in a measured way. “I’m not one of the lads,” Southgate explained. How do I change the sentence inside the quote (") into indirect sentence? What method/algorithm do I need to use? Can someone give me an example on how?

Member Avatar
Member Avatar
+0 forum 6

The End.