نسخ ولصق النصوص عبر Python - Yehia Online -->
  • الحماية
  • إختبار الأختراق
    • ِعبر الهاتف
    • عبر الويندوز
    • عبر لينكس
    • عبر موقع
  • أكواد جاهزه
    • ِPython
    • Ruby
    • HTML
  • أعلن بلموقع
  • مكتبات
    • Python
    • Ruby
  • حول الموقع
    • أتصل بنا
    • سياسة الخصوصية
    • من نحن
    • إتفاقية الإستخدام

Yehia Online

موقع Yehia يمنح فرصه لتعلم لغات البرمجه و إختبار الأختراق نحاول دائما نشر محتوي مميز وجديد للزائرين وكتابه المعلومه بطريقه سهله مثل تعلم مكتبات بايثون والتعامل مع Python بإحترافيه

نسخ ولصق النصوص عبر Python

Yehia 2020-09-12T02:46:11Z code-output , python-code
هل تسألت هل يمكن نسخ أو لصق نص أو كلمه تلقائيا بدون تحديد النص والضغط علي زر نسخ؟
يمكنك فعل ذلك بواسطه مكتبه في لغه البرمجه Python تستطيع نسخ ولصق الكلمات التي تريدها تلقائيا بواسطه مكتبه في بايثون يطلق عليها: PyperClip وهي لتخزين البيانات ولها إستخدامات عديده لاكن سنستخدم النسخ واللصق

كيفيه تثبيت المكتبه ؟

1- قم بفتح سطر الأوامر
2- pip install pyperclip
بعد تثبيت المكتبه قم بإنشاء ملف بايثون جديد.

w

ماذا يفعل كل سطر ؟

1- السطر الأول لإستدعاء المكتبه pyperclip
2- السطر الثاني لإستدعاء مكتبه time لعمل وقت إنتظار
3- السطر الثالث لوضع متغير به الكلمه المراد نسخها
4- السطر الرابع لنسخ المتغير yehia الذي يتواجد فيه الكلمه
5- السطر الخامس لطباعه كلمه انتظر جاري اللصق
6- السطر السادس لإجراء وقت إنتظار 5 ثواني
7- السطر السابع لإعطاء متغير للصق
8- السطر الثامن لعمل طباعه للمتغير وإظهار ما تم نسخه
يمكنك حذف سطر 6,7,8,9 إذا كنت لا تريد اللصق وتريد النسخ فقط.


python-code


1 comment :

  1. UnknownApril 1, 2021 at 2:21 PM

    # we will insert the list first and make the N for the length of the list and another list we will fill it with -1 value and the same length as the first length
    # and we will make stack than we will make a loop that make sure it will loop the list only one cycle than make if statment if the stack is empty
    # and another if statement if the list index moudle the length of the list is greater thean the list index of the stack empty
    # and insert to the seacond list the key of the stack and remove elment frome stack, else insert the elment to stack and change the variable that loop to +1
    # else of the first loop insert to the stack the reminder of the variable with the length of the list and change the variable that loop to +1
    # last print the second list


    # insert the list
    lista = [177, 175, 166, 184, 186, 179, 170,187,167]
    # make a variable with the length of the list
    N=len(lista)
    #make another list with same length of the first list and fill it with -1 value
    theoutput = [-1 for _ in range(N)]
    # make a stack
    stacka=[]
    # make a variable for the loop
    G=0

    while(G!=2*N):
    # If the stack is not empty
    if(len(stacka)!=0):
    # the element is greater
    # than top element of the stack
    if(lista[G % N] > lista[stacka[-1]]):
    # check next greater element
    # for the top element of the stack
    theoutput[stacka[-1]]=lista[G%N]-lista[stacka[-1]]
    stacka.pop() #remove element from the top of the stack
    else:
    stacka.append(G % N) #puch element in stack
    G+=1 #increase the variable with 1
    else:
    stacka.append(G % N) # push element in stack
    G+=1 #increase the variable with 1
    print(theoutput) #print the seacnd list

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

ألاكثر شهره

  • اكواد بايثون جاهزة وسكربتات مع  أمثلة
    اكواد بايثون جاهزة وسكربتات مع أمثلة
    قد تكون مبتدأ في لغة البرمجة بايثون أو محترف لكن تريد كود جاهز للتدريب أو الإبداع على نفس الكود عبر التعديل علية أو يمكن ان تعتبرها تغذية ب...
  • شرح مكتبه socket في بايثون
    شرح مكتبه socket في بايثون
    مكتبه socket في بايثون من ضمن الشبكات في بايثون لأنها تتصل بلخادم لإرسال وإستقبال البيانات من الخادم وتتصل بأجهزه مختلفه بعيده بإستخدام ...
  • جمع معلومات عن حساب فيسبوك
    ربما قد يكون لك شخص صديق لك علي الفيسبوك ويخفي بياناته ولايشاركها الي العامه وتريد معرفه معلومات حسابه . يمكنك معرفه الكثير عنه بواسطه ا...
  • أفضل مكتبات بايثون مع الشرح بلعربي
    أفضل مكتبات بايثون مع الشرح بلعربي
    لغة البرمجة بايثون تعتبر الأن من أفضل لغات البرمجة بلعالم لأن المبرمجين أنتبهوا لها بشكل كبير وبدأت بلتصاعد ولا يوجد لغة برمجة ليست جيده ...
  • شرح مكتبه requests في بايثون مع امثلة للكود
    شرح مكتبه requests في بايثون مع امثلة للكود
    ما هي مكتبة Requests ؟ مكتبه requests في لغة البرمجة بايثون تستخدم لإستقبال وإرسال الطلبات بواسطه بروتكول HT...

الأقسام

  • adsense
  • blogger
  • code-html
  • code-output
  • polat
  • Programming-libraries
  • python
  • Python-Algorithms
  • python-code
  • Python-Data-Structures
  • python-library
  • ruby
  • security
  • security-android
  • security-linux
  • security-windows
  • spyer
  • spyer-android
  • spyer-linux
  • spyer-website
  • spyer-windows
  • win-program

القوائم

python


نموذج الاتصال

Name

Email

Message




2020 © Yehia Online جميع الحقوق محفوظة لدى

الصفحة الرئيسية Ctrl + Yإعادة نشر المحتويCtrl + q
My-Twitter Ctrl + ?! المساهمة بلنشر Ctrl + ?!